require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&__WI_HOSTAP_H__)) {
    eval 'sub __WI_HOSTAP_H__ () {1;}' unless defined(&__WI_HOSTAP_H__);
    eval 'sub WIHAP_MAX_STATIONS () {1800;}' unless defined(&WIHAP_MAX_STATIONS);
    eval 'sub HOSTAP_FLAGS_AUTHEN () {0x1;}' unless defined(&HOSTAP_FLAGS_AUTHEN);
    eval 'sub HOSTAP_FLAGS_ASSOC () {0x2;}' unless defined(&HOSTAP_FLAGS_ASSOC);
    eval 'sub HOSTAP_FLAGS_PERM () {0x4;}' unless defined(&HOSTAP_FLAGS_PERM);
    eval 'sub HOSTAP_FLAGS_BITS () {"\\20\\01AUTH\\02ASSOC\\03PERM";}' unless defined(&HOSTAP_FLAGS_BITS);
    eval 'sub SIOCHOSTAP_GET () { &_IOWR(ord(\'i\'), 210, \'struct ifreq\');}' unless defined(&SIOCHOSTAP_GET);
    eval 'sub SIOCHOSTAP_ADD () { &_IOWR(ord(\'i\'), 211, \'struct ifreq\');}' unless defined(&SIOCHOSTAP_ADD);
    eval 'sub SIOCHOSTAP_DEL () { &_IOWR(ord(\'i\'), 212, \'struct ifreq\');}' unless defined(&SIOCHOSTAP_DEL);
    eval 'sub SIOCHOSTAP_GETALL () { &_IOWR(ord(\'i\'), 213, \'struct ifreq\');}' unless defined(&SIOCHOSTAP_GETALL);
    eval 'sub SIOCHOSTAP_GFLAGS () { &_IOWR(ord(\'i\'), 214, \'struct ifreq\');}' unless defined(&SIOCHOSTAP_GFLAGS);
    eval 'sub SIOCHOSTAP_SFLAGS () { &_IOWR(ord(\'i\'), 215, \'struct ifreq\');}' unless defined(&SIOCHOSTAP_SFLAGS);
    eval 'sub WIHAPFL_ACTIVE () {0x1;}' unless defined(&WIHAPFL_ACTIVE);
    eval 'sub WIHAPFL_MAC_FILT () {0x2;}' unless defined(&WIHAPFL_MAC_FILT);
    eval 'sub WIHAPFL_CANTCHANGE () {( &WIHAPFL_ACTIVE);}' unless defined(&WIHAPFL_CANTCHANGE);
    if(defined(&_KERNEL)) {
	eval 'sub WI_SIFLAGS_ASSOC () { &HOSTAP_FLAGS_ASSOC;}' unless defined(&WI_SIFLAGS_ASSOC);
	eval 'sub WI_SIFLAGS_AUTHEN () { &HOSTAP_FLAGS_AUTHEN;}' unless defined(&WI_SIFLAGS_AUTHEN);
	eval 'sub WI_SIFLAGS_PERM () { &HOSTAP_FLAGS_PERM;}' unless defined(&WI_SIFLAGS_PERM);
	eval 'sub WI_SIFLAGS_DEAD () {0x1000;}' unless defined(&WI_SIFLAGS_DEAD);
	eval 'sub WI_STA_HASH_SIZE () {113;}' unless defined(&WI_STA_HASH_SIZE);
	if((defined(&WI_STA_HASH_SIZE) ? &WI_STA_HASH_SIZE : 0)*16>= 2007) {
	    die("WI_STA_HASH_SIZE too big");
	}
	if((defined(&WI_STA_HASH_SIZE) ? &WI_STA_HASH_SIZE : 0)*16< (defined(&WIHAP_MAX_STATIONS) ? &WIHAP_MAX_STATIONS : 0)) {
	    die("WI_STA_HASH_SIZE too small");
	}
	eval 'sub WIHAP_DFLT_INACTIVITY_TIME () {(120);}' unless defined(&WIHAP_DFLT_INACTIVITY_TIME);
    }
}
1;
