require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_NET80211_IEEE80211_IOCTL_H_)) {
    eval 'sub _NET80211_IEEE80211_IOCTL_H_ () {1;}' unless defined(&_NET80211_IEEE80211_IOCTL_H_);
    eval 'sub SIOCG80211STATS () { &_IOWR(ord(\'i\'), 242, \'struct ifreq\');}' unless defined(&SIOCG80211STATS);
    eval 'sub SIOCS80211NWID () { &_IOWR(ord(\'i\'), 230, \'struct ifreq\');}' unless defined(&SIOCS80211NWID);
    eval 'sub SIOCG80211NWID () { &_IOWR(ord(\'i\'), 231, \'struct ifreq\');}' unless defined(&SIOCG80211NWID);
    eval 'sub IEEE80211_NWKEY_OPEN () {0;}' unless defined(&IEEE80211_NWKEY_OPEN);
    eval 'sub IEEE80211_NWKEY_WEP () {1;}' unless defined(&IEEE80211_NWKEY_WEP);
    eval 'sub IEEE80211_NWKEY_EAP () {2;}' unless defined(&IEEE80211_NWKEY_EAP);
    eval 'sub IEEE80211_NWKEY_PERSIST () {0x100;}' unless defined(&IEEE80211_NWKEY_PERSIST);
    eval 'sub SIOCS80211NWKEY () { &_IOW(ord(\'i\'), 232, \'struct ieee80211_nwkey\');}' unless defined(&SIOCS80211NWKEY);
    eval 'sub SIOCG80211NWKEY () { &_IOWR(ord(\'i\'), 233, \'struct ieee80211_nwkey\');}' unless defined(&SIOCG80211NWKEY);
    eval 'sub SIOCS80211POWER () { &_IOW(ord(\'i\'), 234, \'struct ieee80211_power\');}' unless defined(&SIOCS80211POWER);
    eval 'sub SIOCG80211POWER () { &_IOWR(ord(\'i\'), 235, \'struct ieee80211_power\');}' unless defined(&SIOCG80211POWER);
    eval 'sub IEEE80211_AUTH_NONE () {0;}' unless defined(&IEEE80211_AUTH_NONE);
    eval 'sub IEEE80211_AUTH_OPEN () {1;}' unless defined(&IEEE80211_AUTH_OPEN);
    eval 'sub IEEE80211_AUTH_SHARED () {2;}' unless defined(&IEEE80211_AUTH_SHARED);
    eval 'sub SIOCS80211AUTH () { &_IOW(ord(\'i\'), 236, \'struct ieee80211_auth\');}' unless defined(&SIOCS80211AUTH);
    eval 'sub SIOCG80211AUTH () { &_IOWR(ord(\'i\'), 237, \'struct ieee80211_auth\');}' unless defined(&SIOCG80211AUTH);
    unless(defined(&IEEE80211_CHAN_ANY)) {
	eval 'sub IEEE80211_CHAN_ANY () {0xffff;}' unless defined(&IEEE80211_CHAN_ANY);
    }
    eval 'sub SIOCS80211CHANNEL () { &_IOW(ord(\'i\'), 238, \'struct ieee80211chanreq\');}' unless defined(&SIOCS80211CHANNEL);
    eval 'sub SIOCG80211CHANNEL () { &_IOWR(ord(\'i\'), 239, \'struct ieee80211chanreq\');}' unless defined(&SIOCG80211CHANNEL);
    eval 'sub SIOCS80211BSSID () { &_IOW(ord(\'i\'), 240, \'struct ieee80211_bssid\');}' unless defined(&SIOCS80211BSSID);
    eval 'sub SIOCG80211BSSID () { &_IOWR(ord(\'i\'), 241, \'struct ieee80211_bssid\');}' unless defined(&SIOCG80211BSSID);
    eval 'sub SIOCS80211TXPOWER () { &_IOW(ord(\'i\'), 243, \'struct ieee80211_txpower\');}' unless defined(&SIOCS80211TXPOWER);
    eval 'sub SIOCG80211TXPOWER () { &_IOWR(ord(\'i\'), 244, \'struct ieee80211_txpower\');}' unless defined(&SIOCG80211TXPOWER);
    eval 'sub IEEE80211_TXPOWER_MODE_FIXED () {0;}' unless defined(&IEEE80211_TXPOWER_MODE_FIXED);
    eval 'sub IEEE80211_TXPOWER_MODE_AUTO () {1;}' unless defined(&IEEE80211_TXPOWER_MODE_AUTO);
    eval 'sub IEEE80211_SCAN_TIMEOUT () {30;}' unless defined(&IEEE80211_SCAN_TIMEOUT);
    eval 'sub SIOCS80211SCAN () { &_IOW(ord(\'i\'), 210, \'struct ifreq\');}' unless defined(&SIOCS80211SCAN);
    eval 'sub IEEE80211_NODEREQ_STATE {
        my($_s) = @_;
	    eval q((1<< $_s));
    }' unless defined(&IEEE80211_NODEREQ_STATE);
    eval 'sub IEEE80211_NODEREQ_STATE_BITS () {"\\20\\01CACHE\\02BSS\\03AUTH\\04ASSOC\\05COLLECT";}' unless defined(&IEEE80211_NODEREQ_STATE_BITS);
    eval 'sub IEEE80211_NODEREQ_RSSI {
        my($_nr) = @_;
	    eval q((((($_nr)-> &nr_rssi / ($_nr)-> &nr_max_rssi) * 100)));
    }' unless defined(&IEEE80211_NODEREQ_RSSI);
    eval 'sub IEEE80211_NODEREQ_STA () {0x;}' unless defined(&IEEE80211_NODEREQ_STA);
    eval 'sub IEEE80211_NODEREQ_AP () {0x1;}' unless defined(&IEEE80211_NODEREQ_AP);
    eval 'sub IEEE80211_NODEREQ_AP_BSS () {0x2;}' unless defined(&IEEE80211_NODEREQ_AP_BSS);
    eval 'sub IEEE80211_NODEREQ_COPY () {0x4;}' unless defined(&IEEE80211_NODEREQ_COPY);
    eval 'sub SIOCG80211NODE () { &_IOWR(ord(\'i\'), 211, \'struct ieee80211_nodereq\');}' unless defined(&SIOCG80211NODE);
    eval 'sub SIOCS80211NODE () { &_IOW(ord(\'i\'), 212, \'struct ieee80211_nodereq\');}' unless defined(&SIOCS80211NODE);
    eval 'sub SIOCS80211DELNODE () { &_IOW(ord(\'i\'), 213, \'struct ieee80211_nodereq\');}' unless defined(&SIOCS80211DELNODE);
    eval 'sub SIOCG80211ALLNODES () { &_IOWR(ord(\'i\'), 214, \'struct ieee80211_nodereq\');}' unless defined(&SIOCG80211ALLNODES);
    eval 'sub IEEE80211_F_HIDENWID () {0x10000000;}' unless defined(&IEEE80211_F_HIDENWID);
    eval 'sub IEEE80211_F_NOBRIDGE () {0x20000000;}' unless defined(&IEEE80211_F_NOBRIDGE);
    eval 'sub IEEE80211_F_HOSTAPMASK () {0x30000000;}' unless defined(&IEEE80211_F_HOSTAPMASK);
    eval 'sub IEEE80211_F_USERSHIFT () {28;}' unless defined(&IEEE80211_F_USERSHIFT);
    eval 'sub IEEE80211_F_USERBITS () {"\\20\\01HIDENWID\\02NOBRIDGE";}' unless defined(&IEEE80211_F_USERBITS);
    eval 'sub IEEE80211_FLAGS () {{ { "hidenwid",  &IEEE80211_F_HIDENWID >>  &IEEE80211_F_USERSHIFT }, { "nobridge",  &IEEE80211_F_NOBRIDGE >>  &IEEE80211_F_USERSHIFT } };}' unless defined(&IEEE80211_FLAGS);
    eval 'sub SIOCG80211FLAGS () { &_IOWR(ord(\'i\'), 216, \'struct ifreq\');}' unless defined(&SIOCG80211FLAGS);
    eval 'sub SIOCS80211FLAGS () { &_IOW(ord(\'i\'), 217, \'struct ifreq\');}' unless defined(&SIOCS80211FLAGS);
}
1;
