require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&_NET80211_IEEE80211_CRYPTO_H_)) {
    eval 'sub _NET80211_IEEE80211_CRYPTO_H_ () {1;}' unless defined(&_NET80211_IEEE80211_CRYPTO_H_);
    eval("sub IEEE80211_CIPHER_NONE () { 0x00000000; }") unless defined(&IEEE80211_CIPHER_NONE);
    eval("sub IEEE80211_CIPHER_USEGROUP () { 0x00000001; }") unless defined(&IEEE80211_CIPHER_USEGROUP);
    eval("sub IEEE80211_CIPHER_WEP40 () { 0x00000002; }") unless defined(&IEEE80211_CIPHER_WEP40);
    eval("sub IEEE80211_CIPHER_TKIP () { 0x00000004; }") unless defined(&IEEE80211_CIPHER_TKIP);
    eval("sub IEEE80211_CIPHER_CCMP () { 0x00000008; }") unless defined(&IEEE80211_CIPHER_CCMP);
    eval("sub IEEE80211_CIPHER_WEP104 () { 0x00000010; }") unless defined(&IEEE80211_CIPHER_WEP104);
    eval("sub IEEE80211_CIPHER_BIP () { 0x00000020; }") unless defined(&IEEE80211_CIPHER_BIP);
    eval("sub IEEE80211_AKM_NONE () { 0x00000000; }") unless defined(&IEEE80211_AKM_NONE);
    eval("sub IEEE80211_AKM_8021X () { 0x00000001; }") unless defined(&IEEE80211_AKM_8021X);
    eval("sub IEEE80211_AKM_PSK () { 0x00000002; }") unless defined(&IEEE80211_AKM_PSK);
    eval("sub IEEE80211_AKM_SHA256_8021X () { 0x00000004; }") unless defined(&IEEE80211_AKM_SHA256_8021X);
    eval("sub IEEE80211_AKM_SHA256_PSK () { 0x00000008; }") unless defined(&IEEE80211_AKM_SHA256_PSK);
    eval 'sub ieee80211_is_8021x_akm {
        my($akm) = @_;
	    eval q({ $akm ==  &IEEE80211_AKM_8021X || $akm ==  &IEEE80211_AKM_SHA256_8021X; });
    }' unless defined(&ieee80211_is_8021x_akm);
    eval 'sub ieee80211_is_sha256_akm {
        my($akm) = @_;
	    eval q({ $akm ==  &IEEE80211_AKM_SHA256_8021X || $akm ==  &IEEE80211_AKM_SHA256_PSK; });
    }' unless defined(&ieee80211_is_sha256_akm);
    eval 'sub IEEE80211_KEYBUF_SIZE () {16;}' unless defined(&IEEE80211_KEYBUF_SIZE);
    eval 'sub IEEE80211_TKIP_HDRLEN () {8;}' unless defined(&IEEE80211_TKIP_HDRLEN);
    eval 'sub IEEE80211_TKIP_MICLEN () {8;}' unless defined(&IEEE80211_TKIP_MICLEN);
    eval 'sub IEEE80211_TKIP_ICVLEN () {4;}' unless defined(&IEEE80211_TKIP_ICVLEN);
    eval 'sub IEEE80211_CCMP_HDRLEN () {8;}' unless defined(&IEEE80211_CCMP_HDRLEN);
    eval 'sub IEEE80211_CCMP_MICLEN () {8;}' unless defined(&IEEE80211_CCMP_MICLEN);
    eval 'sub IEEE80211_PMK_LEN () {32;}' unless defined(&IEEE80211_PMK_LEN);
    eval 'sub IEEE80211_KEY_GROUP () {0x1;}' unless defined(&IEEE80211_KEY_GROUP);
    eval 'sub IEEE80211_KEY_TX () {0x2;}' unless defined(&IEEE80211_KEY_TX);
    eval 'sub IEEE80211_KEY_IGTK () {0x4;}' unless defined(&IEEE80211_KEY_IGTK);
    eval 'sub IEEE80211_PMK_INFINITE () {0;}' unless defined(&IEEE80211_PMK_INFINITE);
    unless(defined(&IEEE80211_STA_ONLY)) {
    }
}
1;
