#ifndef _IF_AIRONET_IEEE_H
#define _IF_AIRONET_IEEE_H
#ifndef SIOCSAIRONET
#define SIOCSAIRONET SIOCSIFGENERIC
#endif
#ifndef SIOCGAIRONET
#define SIOCGAIRONET SIOCGIFGENERIC
#endif
#define AN_RID_TX_SPEED 0x1234
#define AN_MAX_DATALEN 4096
struct an_req {
u_int16_t an_len;
u_int16_t an_type;
u_int16_t an_val[AN_MAX_DATALEN];
};
#define AN_RID_IFACE_STATS 0x0100
#define AN_RID_MGMT_XMIT 0x0200
#ifdef ANCACHE
#define AN_RID_ZERO_CACHE 0x0300
#define AN_RID_READ_CACHE 0x0400
#endif
#define AN_FCTL_VERS 0x0002
#define AN_FCTL_FTYPE 0x000C
#define AN_FCTL_STYPE 0x00F0
#define AN_FCTL_TODS 0x0100
#define AN_FCTL_FROMDS 0x0200
#define AN_FCTL_MOREFRAGS 0x0400
#define AN_FCTL_RETRY 0x0800
#define AN_FCTL_PM 0x1000
#define AN_FCTL_MOREDATA 0x2000
#define AN_FCTL_WEP 0x4000
#define AN_FCTL_ORDER 0x8000
#define AN_FTYPE_MGMT 0x0000
#define AN_FTYPE_CTL 0x0004
#define AN_FTYPE_DATA 0x0008
#define AN_STYPE_MGMT_ASREQ 0x0000
#define AN_STYPE_MGMT_ASRESP 0x0010
#define AN_STYPE_MGMT_REASREQ 0x0020
#define AN_STYPE_MGMT_REASRESP 0x0030
#define AN_STYPE_MGMT_PROBEREQ 0x0040
#define AN_STYPE_MGMT_PROBERESP 0x0050
#define AN_STYPE_MGMT_BEACON 0x0080
#define AN_STYPE_MGMT_ATIM 0x0090
#define AN_STYPE_MGMT_DISAS 0x00A0
#define AN_STYPE_MGMT_AUTH 0x00B0
#define AN_STYPE_MGMT_DEAUTH 0x00C0
#ifdef ANCACHE
#define MAXANCACHE 10
struct an_sigcache {
char macsrc[6];
int ipsrc;
int signal;
int noise;
int quality;
};
#endif
struct an_rssi_entry {
u_int8_t an_rss_pct;
u_int8_t an_rss_dbm;
};
struct an_ltv_key {
u_int16_t an_len;
u_int16_t an_type;
u_int16_t kindex;
u_int8_t mac[6];
u_int16_t klen;
u_int8_t key[16];
};
struct an_ltv_stats {
u_int16_t an_fudge;
u_int16_t an_len;
u_int16_t an_type;
u_int16_t an_spacer;
u_int32_t an_rx_overruns;
u_int32_t an_rx_plcp_csum_errs;
u_int32_t an_rx_plcp_format_errs;
u_int32_t an_rx_plcp_len_errs;
u_int32_t an_rx_mac_crc_errs;
u_int32_t an_rx_mac_crc_ok;
u_int32_t an_rx_wep_errs;
u_int32_t an_rx_wep_ok;
u_int32_t an_retry_long;
u_int32_t an_retry_short;
u_int32_t an_retry_max;
u_int32_t an_no_ack;
u_int32_t an_no_cts;
u_int32_t an_rx_ack_ok;
u_int32_t an_rx_cts_ok;
u_int32_t an_tx_ack_ok;
u_int32_t an_tx_rts_ok;
u_int32_t an_tx_cts_ok;
u_int32_t an_tx_lmac_mcasts;
u_int32_t an_tx_lmac_bcasts;
u_int32_t an_tx_lmac_ucast_frags;
u_int32_t an_tx_lmac_ucasts;
u_int32_t an_tx_beacons;
u_int32_t an_rx_beacons;
u_int32_t an_tx_single_cols;
u_int32_t an_tx_multi_cols;
u_int32_t an_tx_defers_no;
u_int32_t an_tx_defers_prot;
u_int32_t an_tx_defers_energy;
u_int32_t an_rx_dups;
u_int32_t an_rx_partial;
u_int32_t an_tx_too_old;
u_int32_t an_rx_too_old;
u_int32_t an_lostsync_max_retries;
u_int32_t an_lostsync_missed_beacons;
u_int32_t an_lostsync_arl_exceeded;
u_int32_t an_lostsync_deauthed;
u_int32_t an_lostsync_disassociated;
u_int32_t an_lostsync_tsf_timing;
u_int32_t an_tx_host_mcasts;
u_int32_t an_tx_host_bcasts;
u_int32_t an_tx_host_ucasts;
u_int32_t an_tx_host_failed;
u_int32_t an_rx_host_mcasts;
u_int32_t an_rx_host_bcasts;
u_int32_t an_rx_host_ucasts;
u_int32_t an_rx_host_discarded;
u_int32_t an_tx_hmac_mcasts;
u_int32_t an_tx_hmac_bcasts;
u_int32_t an_tx_hmac_ucasts;
u_int32_t an_tx_hmac_failed;
u_int32_t an_rx_hmac_mcasts;
u_int32_t an_rx_hmac_bcasts;
u_int32_t an_rx_hmac_ucasts;
u_int32_t an_rx_hmac_discarded;
u_int32_t an_tx_hmac_accepted;
u_int32_t an_ssid_mismatches;
u_int32_t an_ap_mismatches;
u_int32_t an_rates_mismatches;
u_int32_t an_auth_rejects;
u_int32_t an_auth_timeouts;
u_int32_t an_assoc_rejects;
u_int32_t an_assoc_timeouts;
u_int32_t an_reason_outside_table;
u_int32_t an_reason1;
u_int32_t an_reason2;
u_int32_t an_reason3;
u_int32_t an_reason4;
u_int32_t an_reason5;
u_int32_t an_reason6;
u_int32_t an_reason7;
u_int32_t an_reason8;
u_int32_t an_reason9;
u_int32_t an_reason10;
u_int32_t an_reason11;
u_int32_t an_reason12;
u_int32_t an_reason13;
u_int32_t an_reason14;
u_int32_t an_reason15;
u_int32_t an_reason16;
u_int32_t an_reason17;
u_int32_t an_reason18;
u_int32_t an_reason19;
u_int32_t an_rx_mgmt_pkts;
u_int32_t an_tx_mgmt_pkts;
u_int32_t an_rx_refresh_pkts;
u_int32_t an_tx_refresh_pkts;
u_int32_t an_rx_poll_pkts;
u_int32_t an_tx_poll_pkts;
u_int32_t an_host_retries;
u_int32_t an_lostsync_hostreq;
u_int32_t an_host_tx_bytes;
u_int32_t an_host_rx_bytes;
u_int32_t an_uptime_usecs;
u_int32_t an_uptime_secs;
u_int32_t an_lostsync_better_ap;
u_int32_t an_rsvd[15];
};
struct an_ltv_genconfig {
u_int16_t an_len;
u_int16_t an_type;
u_int16_t an_opmode;
u_int16_t an_rxmode;
u_int16_t an_fragthresh;
u_int16_t an_rtsthresh;
u_int8_t an_macaddr[6];
u_int8_t an_rates[8];
u_int16_t an_shortretry_limit;
u_int16_t an_longretry_limit;
u_int16_t an_tx_msdu_lifetime;
u_int16_t an_rx_msdu_lifetime;
u_int16_t an_stationary;
u_int16_t an_ordering;
u_int16_t an_devtype;
u_int16_t an_rsvd0[5];
u_int16_t an_scanmode;
u_int16_t an_probedelay;
u_int16_t an_probe_energy_timeout;
u_int16_t an_probe_response_timeout;
u_int16_t an_beacon_listen_timeout;
u_int16_t an_ibss_join_net_timeout;
u_int16_t an_auth_timeout;
u_int16_t an_authtype;
u_int16_t an_assoc_timeout;
u_int16_t an_specified_ap_timeout;
u_int16_t an_offline_scan_interval;
u_int16_t an_offline_scan_duration;
u_int16_t an_link_loss_delay;
u_int16_t an_max_beacon_lost_time;
u_int16_t an_refresh_interval;
u_int16_t an_rsvd1;
u_int16_t an_psave_mode;
u_int16_t an_sleep_for_dtims;
u_int16_t an_listen_interval;
u_int16_t an_fast_listen_interval;
u_int16_t an_listen_decay;
u_int16_t an_fast_listen_decay;
u_int16_t an_rsvd2[2];
u_int16_t an_beacon_period;
u_int16_t an_atim_duration;
u_int16_t an_rsvd3;
u_int16_t an_ds_channel;
u_int16_t an_rsvd4;
u_int16_t an_dtim_period;
u_int16_t an_rsvd5[2];
u_int16_t an_radiotype;
u_int16_t an_diversity;
u_int16_t an_tx_power;
u_int16_t an_rss_thresh;
u_int16_t an_modulation_type;
u_int16_t an_short_preamble;
u_int16_t an_home_product;
u_int16_t an_rsvd6;
u_int8_t an_nodename[16];
u_int16_t an_arl_thresh;
u_int16_t an_arl_decay;
u_int16_t an_arl_delay;
u_int8_t an_rsvd7;
u_int8_t an_rsvd8;
u_int8_t an_magic_packet_action;
u_int8_t an_magic_packet_ctl;
u_int16_t an_rsvd9;
u_int16_t an_spare[19];
};
#define AN_OPMODE_IBSS_ADHOC 0x0000
#define AN_OPMODE_INFRASTRUCTURE_STATION 0x0001
#define AN_OPMODE_AP 0x0002
#define AN_OPMODE_AP_REPEATER 0x0003
#define AN_OPMODE_UNMODIFIED_PAYLOAD 0x0100
#define AN_OPMODE_AIRONET_EXTENSIONS 0x0200
#define AN_OPMODE_AP_EXTENSIONS 0x0400
#define AN_RXMODE_BC_MC_ADDR 0x0000
#define AN_RXMODE_BC_ADDR 0x0001
#define AN_RXMODE_ADDR 0x0002
#define AN_RXMODE_80211_MONITOR_CURBSS 0x0003
#define AN_RXMODE_80211_MONITOR_ANYBSS 0x0004
#define AN_RXMODE_LAN_MONITOR_CURBSS 0x0005
#define AN_RXMODE_NO_8023_HEADER 0x0100
#define AN_RXMODE_NORMALIZED_RSSI 0x0200
#define AN_RATE_1MBPS 0x0002
#define AN_RATE_2MBPS 0x0004
#define AN_RATE_5_5MBPS 0x000B
#define AN_RATE_11MBPS 0x0016
#define AN_DEVTYPE_PC4500 0x0065
#define AN_DEVTYPE_PC4800 0x006D
#define AN_SCANMODE_ACTIVE 0x0000
#define AN_SCANMODE_PASSIVE 0x0001
#define AN_SCANMODE_AIRONET_ACTIVE 0x0002
#define AN_AUTHTYPE_NONE 0x0000
#define AN_AUTHTYPE_OPEN 0x0001
#define AN_AUTHTYPE_SHAREDKEY 0x0002
#define AN_AUTHTYPE_MASK 0x00ff
#define AN_AUTHTYPE_ENABLE 0x0100
#define AN_AUTHTYPE_PRIVACY_IN_USE 0x0100
#define AN_AUTHTYPE_ALLOW_UNENCRYPTED 0x0200
#define AN_AUTHTYPE_LEAP 0x1000
#define AN_PSAVE_NONE 0x0000
#define AN_PSAVE_CAM 0x0001
#define AN_PSAVE_PSP 0x0002
#define AN_PSAVE_PSP_CAM 0x0003
#define AN_RADIOTYPE_80211_FH 0x0001
#define AN_RADIOTYPE_80211_DS 0x0002
#define AN_RADIOTYPE_LM2000_DS 0x0004
#define AN_DIVERSITY_FACTORY_DEFAULT 0x0000
#define AN_DIVERSITY_ANTENNA_1_ONLY 0x0001
#define AN_DIVERSITY_ANTENNA_2_ONLY 0x0002
#define AN_DIVERSITY_ANTENNA_1_AND_2 0x0003
#define AN_TXPOWER_FACTORY_DEFAULT 0x0000
#define AN_TXPOWER_50MW 50
#define AN_TXPOWER_100MW 100
#define AN_TXPOWER_250MW 250
#define AN_HOME_NETWORK 0x0001
#define AN_HOME_INSTALL_AP 0x0002
struct an_ltv_ssidlist {
u_int16_t an_len;
u_int16_t an_type;
u_int16_t an_ssid1_len;
char an_ssid1[32];
u_int16_t an_ssid2_len;
char an_ssid2[32];
u_int16_t an_ssid3_len;
char an_ssid3[32];
};
struct an_ltv_ssid_entry{
u_int16_t an_len;
char an_ssid[32];
};
#define MAX_SSIDS 25
struct an_ltv_ssidlist_new {
u_int16_t an_len;
u_int16_t an_type;
struct an_ltv_ssid_entry an_entry[MAX_SSIDS];
};
struct an_ltv_aplist {
u_int16_t an_len;
u_int16_t an_type;
u_int8_t an_ap1[8];
u_int8_t an_ap2[8];
u_int8_t an_ap3[8];
u_int8_t an_ap4[8];
};
struct an_ltv_drvname {
u_int16_t an_len;
u_int16_t an_type;
u_int8_t an_drvname[16];
};
struct an_rid_encap {
u_int16_t an_len;
u_int16_t an_type;
u_int16_t an_ethertype_default;
u_int16_t an_action_default;
u_int16_t an_ethertype0;
u_int16_t an_action0;
u_int16_t an_ethertype1;
u_int16_t an_action1;
u_int16_t an_ethertype2;
u_int16_t an_action2;
u_int16_t an_ethertype3;
u_int16_t an_action3;
u_int16_t an_ethertype4;
u_int16_t an_action4;
u_int16_t an_ethertype5;
u_int16_t an_action5;
u_int16_t an_ethertype6;
u_int16_t an_action6;
};
#define AN_ENCAP_ACTION_RX 0x0001
#define AN_ENCAP_ACTION_TX 0x0002
#define AN_RXENCAP_NONE 0x0000
#define AN_RXENCAP_RFC1024 0x0001
#define AN_TXENCAP_RFC1024 0x0000
#define AN_TXENCAP_80211 0x0002
struct an_ltv_caps {
u_int16_t an_len;
u_int16_t an_type;
u_int8_t an_oui[3];
u_int8_t an_rsvd0;
u_int16_t an_prodnum;
u_int8_t an_manufname[32];
u_int8_t an_prodname[16];
u_int8_t an_prodvers[8];
u_int8_t an_oemaddr[6];
u_int8_t an_aironetaddr[6];
u_int16_t an_radiotype;
u_int16_t an_regdomain;
u_int8_t an_callid[6];
u_int8_t an_rates[8];
u_int8_t an_rx_diversity;
u_int8_t an_tx_diversity;
u_int16_t an_tx_powerlevels[8];
u_int16_t an_hwrev;
u_int16_t an_hwcaps;
u_int16_t an_temprange;
u_int16_t an_fwrev;
u_int16_t an_fwsubrev;
u_int16_t an_ifacerev;
u_int16_t an_softcaps;
u_int16_t an_bootblockrev;
u_int16_t an_req_hw_support;
u_int16_t an_unknown[31];
};
struct an_ltv_apinfo {
u_int16_t an_len;
u_int16_t an_type;
u_int16_t an_tim_addr;
u_int16_t an_airo_addr;
};
struct an_ltv_radioinfo {
u_int16_t an_len;
u_int16_t an_type;
};
struct an_ltv_rssi_map {
u_int16_t an_len;
u_int16_t an_type;
struct an_rssi_entry an_entries[256];
};
struct an_ltv_status {
u_int16_t an_len;
u_int16_t an_type;
u_int8_t an_macaddr[6];
u_int16_t an_opmode;
u_int16_t an_errcode;
u_int16_t an_signal_quality;
u_int16_t an_ssidlen;
u_int8_t an_ssid[32];
u_int8_t an_ap_name[16];
u_int8_t an_cur_bssid[6];
u_int8_t an_prev_bssid1[6];
u_int8_t an_prev_bssid2[6];
u_int8_t an_prev_bssid3[6];
u_int16_t an_beacon_period;
u_int16_t an_dtim_period;
u_int16_t an_atim_duration;
u_int16_t an_hop_period;
u_int16_t an_cur_channel;
u_int16_t an_channel_set;
u_int16_t an_hops_to_backbone;
u_int16_t an_ap_total_load;
u_int16_t an_our_generated_load;
u_int16_t an_accumulated_arl;
u_int16_t an_cur_signal_quality;
u_int16_t an_current_tx_rate;
u_int16_t an_ap_device;
u_int16_t an_normalized_strength;
u_int16_t an_short_pre_in_use;
u_int8_t an_ap_ip_addr[4];
u_int8_t an_noise_prev_sec_pc;
u_int8_t an_noise_prev_sec_db;
u_int8_t an_avg_noise_prev_min_pc;
u_int8_t an_avg_noise_prev_min_db;
u_int8_t an_max_noise_prev_min_pc;
u_int8_t an_max_noise_prev_min_db;
u_int16_t an_spare[18];
};
#define AN_STATUS_OPMODE_CONFIGURED 0x0001
#define AN_STATUS_OPMODE_MAC_ENABLED 0x0002
#define AN_STATUS_OPMODE_RX_ENABLED 0x0004
#define AN_STATUS_OPMODE_IN_SYNC 0x0010
#define AN_STATUS_OPMODE_ASSOCIATED 0x0020
#define AN_STATUS_OPMODE_LEAP 0x0040
#define AN_STATUS_OPMODE_ERROR 0x8000
struct an_ltv_wepkey {
u_int16_t an_len;
u_int16_t an_type;
u_int16_t an_key_index;
u_int8_t an_mac_addr[6];
u_int16_t an_key_len;
u_int8_t an_key[13];
};
struct an_rxframe {
u_int32_t an_rx_time;
u_int16_t an_rx_status;
u_int16_t an_rx_payload_len;
u_int8_t an_rsvd0;
u_int8_t an_rx_signal_strength;
u_int8_t an_rx_rate;
u_int8_t an_rx_chan;
u_int8_t an_rx_assoc_cnt;
u_int8_t an_rsvd1[3];
u_int8_t an_plcp_hdr[4];
u_int16_t an_frame_ctl;
u_int16_t an_duration;
u_int8_t an_addr1[6];
u_int8_t an_addr2[6];
u_int8_t an_addr3[6];
u_int16_t an_seq_ctl;
u_int8_t an_addr4[6];
u_int8_t an_gaplen;
} __packed;
#define LEAP_USERNAME_MAX 32
#define LEAP_PASSWORD_MAX 32
struct an_ltv_leap_username {
u_int16_t an_len;
u_int16_t an_type;
u_int16_t an_username_len;
u_int8_t an_username[LEAP_USERNAME_MAX];
};
struct an_ltv_leap_password {
u_int16_t an_len;
u_int16_t an_type;
u_int16_t an_password_len;
u_int8_t an_password[LEAP_PASSWORD_MAX];
};
#define AN_RID_GENCONFIG 0xFF10
#define AN_RID_SSIDLIST 0xFF11
#define AN_RID_APLIST 0xFF12
#define AN_RID_DRVNAME 0xFF13
#define AN_RID_ENCAPPROTO 0xFF14
#define AN_RID_WEP_TEMP 0xFF15
#define AN_RID_WEP_PERM 0xFF16
#define AN_RID_ACTUALCFG 0xFF20
#define AN_RID_CAPABILITIES 0xFF00
#define AN_RID_AP_INFO 0xFF01
#define AN_RID_RADIO_INFO 0xFF02
#define AN_RID_RSSI_MAP 0xFF04
#define AN_RID_STATUS 0xFF50
#define AN_RID_BEACONS_HST 0xFF51
#define AN_RID_BUSY_HST 0xFF52
#define AN_RID_RETRIES_HST 0xFF53
#define AN_RID_16BITS_CUM 0xFF60
#define AN_RID_16BITS_DELTA 0xFF61
#define AN_RID_16BITS_DELTACLR 0xFF62
#define AN_RID_32BITS_CUM 0xFF68
#define AN_RID_32BITS_DELTA 0xFF69
#define AN_RID_32BITS_DELTACLR 0xFF6A
#define AN_RID_LEAPUSERNAME 0xFF23
#define AN_RID_LEAPPASSWORD 0xFF24
#define AN_RID_MOD 0xFF17
#define AN_RID_OPTIONS 0xFF18
#define AN_RID_FACTORY_CONFIG 0xFF18
#define AN_RID_MONITOR_MODE 0x0001
#define AN_MONITOR 1
#define AN_MONITOR_ANY_BSS 2
#define AN_MONITOR_INCLUDE_BEACON 4
#define AN_MONITOR_AIRONET_HEADER 8
#define DLT_AIRONET_HEADER 120
#define AIROGCAP 0
#define AIROGCFG 1
#define AIROGSLIST 2
#define AIROGVLIST 3
#define AIROGDRVNAM 4
#define AIROGEHTENC 5
#define AIROGWEPKTMP 6
#define AIROGWEPKNV 7
#define AIROGSTAT 8
#define AIROGSTATSC32 9
#define AIROGSTATSD32 10
#define AIROPCAP AIROGSTATSD32 + 40
#define AIROPVLIST AIROPCAP + 1
#define AIROPSLIST AIROPVLIST + 1
#define AIROPCFG AIROPSLIST + 1
#define AIROPSIDS AIROPCFG + 1
#define AIROPAPLIST AIROPSIDS + 1
#define AIROPMACON AIROPAPLIST + 1
#define AIROPMACOFF AIROPMACON + 1
#define AIROPSTCLR AIROPMACOFF + 1
#define AIROPWEPKEY AIROPSTCLR + 1
#define AIROPWEPKEYNV AIROPWEPKEY + 1
#define AIROPLEAPPWD AIROPWEPKEYNV + 1
#define AIROPLEAPUSR AIROPLEAPPWD + 1
#define AIROFLSHRST AIROPWEPKEYNV + 40
#define AIROFLSHGCHR AIROFLSHRST + 1
#define AIROFLSHSTFL AIROFLSHGCHR + 1
#define AIROFLSHPCHR AIROFLSHSTFL + 1
#define AIROFLPUTBUF AIROFLSHPCHR + 1
#define AIRORESTART AIROFLPUTBUF + 1
#define AIROMAGIC 0xa55a
typedef struct aironet_ioctl {
unsigned short command;
unsigned short len;
unsigned char *data;
} airo_ioctl;
#endif