1*9f63336bSreyk /* $OpenBSD: hostapd.h,v 1.6 2005/09/09 13:21:13 reyk Exp $ */ 2d2b2a2e3Sreyk 3d2b2a2e3Sreyk /* 4d2b2a2e3Sreyk * Copyright (c) 2004, 2005 Reyk Floeter <reyk@vantronix.net> 5d2b2a2e3Sreyk * 6d2b2a2e3Sreyk * Permission to use, copy, modify, and distribute this software for any 7d2b2a2e3Sreyk * purpose with or without fee is hereby granted, provided that the above 8d2b2a2e3Sreyk * copyright notice and this permission notice appear in all copies. 9d2b2a2e3Sreyk * 10d2b2a2e3Sreyk * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11d2b2a2e3Sreyk * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12d2b2a2e3Sreyk * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13d2b2a2e3Sreyk * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14d2b2a2e3Sreyk * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15d2b2a2e3Sreyk * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16d2b2a2e3Sreyk * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17d2b2a2e3Sreyk */ 18d2b2a2e3Sreyk 19d2b2a2e3Sreyk #ifndef _HOSTAPD_H 20d2b2a2e3Sreyk #define _HOSTAPD_H 21d2b2a2e3Sreyk 22d2b2a2e3Sreyk #include <sys/param.h> 23d2b2a2e3Sreyk #include <sys/types.h> 24d2b2a2e3Sreyk #include <sys/socket.h> 25*9f63336bSreyk #include <sys/tree.h> 26d2b2a2e3Sreyk 27d2b2a2e3Sreyk #include <net/if.h> 28d2b2a2e3Sreyk #include <netinet/in.h> 29d2b2a2e3Sreyk #include <arpa/inet.h> 30d2b2a2e3Sreyk 31d2b2a2e3Sreyk #include <errno.h> 32d2b2a2e3Sreyk #include <event.h> 33d2b2a2e3Sreyk #include <syslog.h> 34d2b2a2e3Sreyk 35d2b2a2e3Sreyk #include <net80211/ieee80211.h> 36d2b2a2e3Sreyk #include <net80211/ieee80211_ioctl.h> 37d2b2a2e3Sreyk 38d2b2a2e3Sreyk #define IEEE80211_IAPP_VERSION 0 39d2b2a2e3Sreyk 40d2b2a2e3Sreyk /* 41d2b2a2e3Sreyk * hostapd (IAPP) <-> Host AP (APME) 42d2b2a2e3Sreyk */ 43d2b2a2e3Sreyk 44d2b2a2e3Sreyk struct hostapd_node { 45d2b2a2e3Sreyk u_int8_t ni_macaddr[IEEE80211_ADDR_LEN]; 46d2b2a2e3Sreyk u_int8_t ni_bssid[IEEE80211_ADDR_LEN]; 47d2b2a2e3Sreyk u_int32_t ni_associd; 48d2b2a2e3Sreyk u_int16_t ni_capinfo; 49d2b2a2e3Sreyk u_int16_t ni_flags; 50d2b2a2e3Sreyk u_int16_t ni_rxseq; 51d2b2a2e3Sreyk u_int16_t ni_rssi; 52d2b2a2e3Sreyk }; 53d2b2a2e3Sreyk 54d2b2a2e3Sreyk /* 55d2b2a2e3Sreyk * IAPP <-> IAPP 56d2b2a2e3Sreyk */ 57d2b2a2e3Sreyk 58d2b2a2e3Sreyk struct ieee80211_iapp_frame { 59d2b2a2e3Sreyk u_int8_t i_version; 60d2b2a2e3Sreyk u_int8_t i_command; 61d2b2a2e3Sreyk u_int16_t i_identifier; 62d2b2a2e3Sreyk u_int16_t i_length; 63d2b2a2e3Sreyk } __packed; 64d2b2a2e3Sreyk 65d2b2a2e3Sreyk enum ieee80211_iapp_frame_type { 66d2b2a2e3Sreyk IEEE80211_IAPP_FRAME_ADD_NOTIFY = 0, 67d2b2a2e3Sreyk IEEE80211_IAPP_FRAME_MOVE_NOTIFY = 1, 68d2b2a2e3Sreyk IEEE80211_IAPP_FRAME_MOVE_RESPONSE = 2, 69d2b2a2e3Sreyk IEEE80211_IAPP_FRAME_SEND_SECURITY_BLOCK = 3, 70d2b2a2e3Sreyk IEEE80211_IAPP_FRAME_ACK_SECURITY_BLOCK = 4, 71d2b2a2e3Sreyk IEEE80211_IAPP_FRAME_CACHE_NOTIFY = 5, 7250ce650fSreyk IEEE80211_IAPP_FRAME_CACHE_RESPONSE = 6, 7350ce650fSreyk IEEE80211_IAPP_FRAME_HOSTAPD_RADIOTAP = 12, 7450ce650fSreyk IEEE80211_IAPP_FRAME_HOSTAPD_PCAP = 13 75d2b2a2e3Sreyk }; 76d2b2a2e3Sreyk 77d2b2a2e3Sreyk struct ieee80211_iapp_add_notify { 78d2b2a2e3Sreyk u_int8_t a_length; 79d2b2a2e3Sreyk u_int8_t a_reserved; 80d2b2a2e3Sreyk u_int8_t a_macaddr[IEEE80211_ADDR_LEN]; 81d2b2a2e3Sreyk u_int16_t a_seqnum; 82d2b2a2e3Sreyk } __packed; 83d2b2a2e3Sreyk 84d2b2a2e3Sreyk /* 85d2b2a2e3Sreyk * IAPP -> switches (LLC) 86d2b2a2e3Sreyk */ 87d2b2a2e3Sreyk 88d2b2a2e3Sreyk struct hostapd_llc { 89d2b2a2e3Sreyk struct ether_header x_hdr; 90d2b2a2e3Sreyk struct llc x_llc; 91d2b2a2e3Sreyk } __packed; 92d2b2a2e3Sreyk 93d2b2a2e3Sreyk #define IAPP_LLC LLC_XID 94d2b2a2e3Sreyk #define IAPP_LLC_XID 0x81 95d2b2a2e3Sreyk #define IAPP_LLC_CLASS 1 96d2b2a2e3Sreyk #define IAPP_LLC_WINDOW 1 << 1 97d2b2a2e3Sreyk 98d2b2a2e3Sreyk /* 99d2b2a2e3Sreyk * hostapd configuration 100d2b2a2e3Sreyk */ 101d2b2a2e3Sreyk 102d2b2a2e3Sreyk struct hostapd_counter { 103d2b2a2e3Sreyk u_int64_t cn_tx_llc; /* sent LLC messages */ 104d2b2a2e3Sreyk u_int64_t cn_rx_iapp; /* received IAPP messages */ 105d2b2a2e3Sreyk u_int64_t cn_tx_iapp; /* sent IAPP messages */ 106d2b2a2e3Sreyk u_int64_t cn_rx_apme; /* received Host AP messages */ 107d2b2a2e3Sreyk u_int64_t cn_tx_apme; /* sent Host AP messages */ 108d2b2a2e3Sreyk }; 109d2b2a2e3Sreyk 11050ce650fSreyk #define HOSTAPD_ENTRY_MASK_ADD(_a, _m) do { \ 11150ce650fSreyk (_a)[0] &= (_m)[0]; \ 11250ce650fSreyk (_a)[1] &= (_m)[1]; \ 11350ce650fSreyk (_a)[2] &= (_m)[2]; \ 11450ce650fSreyk (_a)[3] &= (_m)[3]; \ 11550ce650fSreyk (_a)[4] &= (_m)[4]; \ 11650ce650fSreyk (_a)[5] &= (_m)[5]; \ 11750ce650fSreyk } while (0); 11850ce650fSreyk #define HOSTAPD_ENTRY_MASK_MATCH(_e, _b) ( \ 11950ce650fSreyk ((_e)->e_lladdr[0] == ((_b)[0] & (_e)->e_addr.a_mask[0])) && \ 12050ce650fSreyk ((_e)->e_lladdr[1] == ((_b)[1] & (_e)->e_addr.a_mask[1])) && \ 12150ce650fSreyk ((_e)->e_lladdr[2] == ((_b)[2] & (_e)->e_addr.a_mask[2])) && \ 12250ce650fSreyk ((_e)->e_lladdr[3] == ((_b)[3] & (_e)->e_addr.a_mask[3])) && \ 12350ce650fSreyk ((_e)->e_lladdr[4] == ((_b)[4] & (_e)->e_addr.a_mask[4])) && \ 12450ce650fSreyk ((_e)->e_lladdr[5] == ((_b)[5] & (_e)->e_addr.a_mask[5])) \ 12550ce650fSreyk ) 12650ce650fSreyk 12750ce650fSreyk struct hostapd_entry { 12850ce650fSreyk u_int8_t e_lladdr[IEEE80211_ADDR_LEN]; 12950ce650fSreyk u_int8_t e_flags; 13050ce650fSreyk 13150ce650fSreyk #define HOSTAPD_ENTRY_F_LLADDR 0x00 13250ce650fSreyk #define HOSTAPD_ENTRY_F_MASK 0x01 13350ce650fSreyk #define HOSTAPD_ENTRY_F_IPV4 0x02 13450ce650fSreyk 13550ce650fSreyk union { 13650ce650fSreyk u_int8_t a_mask[IEEE80211_ADDR_LEN]; 13750ce650fSreyk struct in_addr a_ipv4; 13850ce650fSreyk } e_addr; 13950ce650fSreyk 140*9f63336bSreyk RB_ENTRY(hostapd_entry) e_nodes; 14150ce650fSreyk TAILQ_ENTRY(hostapd_entry) e_entries; 14250ce650fSreyk }; 14350ce650fSreyk 14450ce650fSreyk #define e_mask e_addr.a_mask 14550ce650fSreyk #define e_ipv4 e_addr.a_ipv4 14650ce650fSreyk 14750ce650fSreyk #define HOSTAPD_TABLE_NAMELEN 32 148*9f63336bSreyk 149*9f63336bSreyk RB_HEAD(hostapd_tree, hostapd_entry); 15050ce650fSreyk 15150ce650fSreyk struct hostapd_table { 15250ce650fSreyk char t_name[HOSTAPD_TABLE_NAMELEN]; 15350ce650fSreyk u_int8_t t_flags; 15450ce650fSreyk 15550ce650fSreyk #define HOSTAPD_TABLE_F_CONST 0x01 15650ce650fSreyk 157*9f63336bSreyk struct hostapd_tree t_tree; 15850ce650fSreyk TAILQ_HEAD(, hostapd_entry) t_mask_head; 15950ce650fSreyk TAILQ_ENTRY(hostapd_table) t_entries; 16050ce650fSreyk }; 16150ce650fSreyk 16250ce650fSreyk struct hostapd_ieee80211_frame { 16350ce650fSreyk u_int8_t i_fc[2]; 16450ce650fSreyk u_int8_t i_dur[2]; 16550ce650fSreyk u_int8_t i_from[IEEE80211_ADDR_LEN]; 16650ce650fSreyk u_int8_t i_to[IEEE80211_ADDR_LEN]; 16750ce650fSreyk u_int8_t i_bssid[IEEE80211_ADDR_LEN]; 16850ce650fSreyk u_int8_t i_seq[2]; 16950ce650fSreyk void *i_data; 17050ce650fSreyk u_int i_data_len; 17150ce650fSreyk }; 17250ce650fSreyk 17350ce650fSreyk enum hostapd_action { 17450ce650fSreyk HOSTAPD_ACTION_NONE = 0, 17550ce650fSreyk HOSTAPD_ACTION_LOG = 1, 17650ce650fSreyk HOSTAPD_ACTION_RADIOTAP = 2, 17750ce650fSreyk HOSTAPD_ACTION_FRAME = 3, 17850ce650fSreyk HOSTAPD_ACTION_ADDNODE = 4, 17950ce650fSreyk HOSTAPD_ACTION_DELNODE = 5, 18050ce650fSreyk HOSTAPD_ACTION_RESEND = 6 18150ce650fSreyk }; 18250ce650fSreyk 18350ce650fSreyk struct hostapd_action_data { 18450ce650fSreyk union { 18550ce650fSreyk struct hostapd_ieee80211_frame u_frame; 18650ce650fSreyk u_int8_t u_lladdr[IEEE80211_ADDR_LEN]; 18750ce650fSreyk } a_data; 18850ce650fSreyk u_int16_t a_flags; 18950ce650fSreyk 19050ce650fSreyk #define HOSTAPD_ACTION_F_REF_FROM 0x0001 1918b938b68Sreyk #define HOSTAPD_ACTION_F_REF_TO 0x0002 1928b938b68Sreyk #define HOSTAPD_ACTION_F_REF_BSSID 0x0004 1938b938b68Sreyk #define HOSTAPD_ACTION_F_REF_RANDOM 0x0008 19450ce650fSreyk #define HOSTAPD_ACTION_F_REF_FROM_M 0x000f 19550ce650fSreyk #define HOSTAPD_ACTION_F_REF_FROM_S 0 19650ce650fSreyk #define HOSTAPD_ACTION_F_REF_TO_M 0x00f0 19750ce650fSreyk #define HOSTAPD_ACTION_F_REF_TO_S 4 19850ce650fSreyk #define HOSTAPD_ACTION_F_REF_BSSID_M 0x0f00 19950ce650fSreyk #define HOSTAPD_ACTION_F_REF_BSSID_S 8 20050ce650fSreyk #define HOSTAPD_ACTION_F_REF_M 0x0fff 20150ce650fSreyk #define HOSTAPD_ACTION_F_OPT_DIR_AUTO 0x1000 20250ce650fSreyk #define HOSTAPD_ACTION_F_OPT_LLADDR 0x2000 20350ce650fSreyk #define HOSTAPD_ACTION_F_OPT_TABLE 0x4000 20450ce650fSreyk }; 20550ce650fSreyk 20650ce650fSreyk #define a_frame a_data.u_frame 20750ce650fSreyk #define a_lladdr a_data.u_lladdr 20850ce650fSreyk 20950ce650fSreyk struct hostapd_frame { 21050ce650fSreyk struct hostapd_ieee80211_frame f_frame; 21150ce650fSreyk u_int32_t f_flags; 21250ce650fSreyk 21350ce650fSreyk #define HOSTAPD_FRAME_F_TYPE 0x00000001 21450ce650fSreyk #define HOSTAPD_FRAME_F_TYPE_N 0x00000002 21550ce650fSreyk #define HOSTAPD_FRAME_F_SUBTYPE 0x00000004 21650ce650fSreyk #define HOSTAPD_FRAME_F_SUBTYPE_N 0x00000008 21750ce650fSreyk #define HOSTAPD_FRAME_F_DIR 0x00000010 21850ce650fSreyk #define HOSTAPD_FRAME_F_DIR_N 0x00000020 21950ce650fSreyk #define HOSTAPD_FRAME_F_FROM 0x00000040 22050ce650fSreyk #define HOSTAPD_FRAME_F_FROM_N 0x00000080 22150ce650fSreyk #define HOSTAPD_FRAME_F_FROM_TABLE 0x00000100 22250ce650fSreyk #define HOSTAPD_FRAME_F_FROM_M 0x000001c0 22350ce650fSreyk #define HOSTAPD_FRAME_F_TO 0x00000200 22450ce650fSreyk #define HOSTAPD_FRAME_F_TO_N 0x00000400 22550ce650fSreyk #define HOSTAPD_FRAME_F_TO_TABLE 0x00000800 22650ce650fSreyk #define HOSTAPD_FRAME_F_TO_M 0x00000e00 22750ce650fSreyk #define HOSTAPD_FRAME_F_BSSID 0x00001000 22850ce650fSreyk #define HOSTAPD_FRAME_F_BSSID_N 0x00002000 22950ce650fSreyk #define HOSTAPD_FRAME_F_BSSID_TABLE 0x00004000 23050ce650fSreyk #define HOSTAPD_FRAME_F_BSSID_M 0x00007000 23150ce650fSreyk #define HOSTAPD_FRAME_F_M 0x0fffffff 23250ce650fSreyk #define HOSTAPD_FRAME_F_RET_OK 0x00000000 23350ce650fSreyk #define HOSTAPD_FRAME_F_RET_QUICK 0x10000000 23450ce650fSreyk #define HOSTAPD_FRAME_F_RET_SKIP 0x20000000 23550ce650fSreyk #define HOSTAPD_FRAME_F_RET_M 0xf0000000 23650ce650fSreyk #define HOSTAPD_FRAME_F_RET_S 28 23750ce650fSreyk 23850ce650fSreyk #define HOSTAPD_FRAME_TABLE \ 23950ce650fSreyk (HOSTAPD_FRAME_F_FROM_TABLE | HOSTAPD_FRAME_F_TO_TABLE | \ 24050ce650fSreyk HOSTAPD_FRAME_F_BSSID_TABLE) 24150ce650fSreyk #define HOSTAPD_FRAME_N \ 24250ce650fSreyk (HOSTAPD_FRAME_F_FROM_N | HOSTAPD_FRAME_F_TO_N | \ 24350ce650fSreyk HOSTAPD_FRAME_F_BSSID_N) 24450ce650fSreyk 24550ce650fSreyk struct hostapd_table *f_from, *f_to, *f_bssid; 24650ce650fSreyk struct timeval f_limit, f_then; 24750ce650fSreyk 24850ce650fSreyk enum hostapd_action f_action; 24950ce650fSreyk u_int32_t f_action_flags; 25050ce650fSreyk 25150ce650fSreyk #define HOSTAPD_ACTION_VERBOSE 0x00000001 25250ce650fSreyk 25350ce650fSreyk struct hostapd_action_data f_action_data; 25450ce650fSreyk 25550ce650fSreyk TAILQ_ENTRY(hostapd_frame) f_entries; 25650ce650fSreyk }; 25750ce650fSreyk 258d2b2a2e3Sreyk struct hostapd_config { 259d2b2a2e3Sreyk int c_apme; 260d2b2a2e3Sreyk int c_apme_raw; 261d2b2a2e3Sreyk u_int c_apme_rawlen; 262d2b2a2e3Sreyk struct event c_apme_ev; 263d2b2a2e3Sreyk char c_apme_iface[IFNAMSIZ]; 264d2b2a2e3Sreyk int c_apme_n; 265d2b2a2e3Sreyk u_int8_t c_apme_bssid[IEEE80211_ADDR_LEN]; 26650ce650fSreyk u_int c_apme_dlt; 267d2b2a2e3Sreyk 268d2b2a2e3Sreyk u_int16_t c_iapp; 269d2b2a2e3Sreyk int c_iapp_raw; 270d2b2a2e3Sreyk char c_iapp_iface[IFNAMSIZ]; 271d2b2a2e3Sreyk int c_iapp_udp; 272d2b2a2e3Sreyk struct event c_iapp_udp_ev; 273d2b2a2e3Sreyk u_int16_t c_iapp_udp_port; 274d2b2a2e3Sreyk struct sockaddr_in c_iapp_addr; 275d2b2a2e3Sreyk struct sockaddr_in c_iapp_broadcast; 276d2b2a2e3Sreyk struct sockaddr_in c_iapp_multicast; 277d2b2a2e3Sreyk 278d2b2a2e3Sreyk u_int8_t c_flags; 279d2b2a2e3Sreyk 280d2b2a2e3Sreyk #define HOSTAPD_CFG_F_APME 0x01 281d2b2a2e3Sreyk #define HOSTAPD_CFG_F_IAPP 0x02 28250ce650fSreyk #define HOSTAPD_CFG_F_IAPP_PASSIVE 0x04 28350ce650fSreyk #define HOSTAPD_CFG_F_RAW 0x08 28450ce650fSreyk #define HOSTAPD_CFG_F_UDP 0x10 28550ce650fSreyk #define HOSTAPD_CFG_F_BRDCAST 0x20 28650ce650fSreyk #define HOSTAPD_CFG_F_PRIV 0x40 287d2b2a2e3Sreyk 288d2b2a2e3Sreyk struct event c_priv_ev; 289d2b2a2e3Sreyk 290d2b2a2e3Sreyk char c_config[MAXPATHLEN]; 291d2b2a2e3Sreyk 292d2b2a2e3Sreyk u_int c_verbose; 293d2b2a2e3Sreyk u_int c_debug; 29450ce650fSreyk u_int c_id; 295d2b2a2e3Sreyk 296d2b2a2e3Sreyk struct hostapd_counter c_stats; 29750ce650fSreyk 29850ce650fSreyk TAILQ_HEAD(, hostapd_table) c_tables; 29950ce650fSreyk TAILQ_HEAD(, hostapd_frame) c_frames; 300d2b2a2e3Sreyk }; 301d2b2a2e3Sreyk 302d2b2a2e3Sreyk #define IAPP_PORT 3517 /* XXX this should be added to /etc/services */ 303d2b2a2e3Sreyk #define IAPP_MCASTADDR "224.0.1.178" 304d2b2a2e3Sreyk #define IAPP_MAXSIZE 512 305d2b2a2e3Sreyk 306d2b2a2e3Sreyk #define HOSTAPD_USER "_hostapd" 307d2b2a2e3Sreyk #define HOSTAPD_CONFIG "/etc/hostapd.conf" 30850ce650fSreyk #define HOSTAPD_DLT DLT_IEEE802_11 309d2b2a2e3Sreyk 310d2b2a2e3Sreyk #define HOSTAPD_LOG 0 311d2b2a2e3Sreyk #define HOSTAPD_LOG_VERBOSE 1 312d2b2a2e3Sreyk #define HOSTAPD_LOG_DEBUG 2 313d2b2a2e3Sreyk 31450ce650fSreyk #define PRINTF hostapd_printf 31550ce650fSreyk #define etheraddr_string(_s) ether_ntoa((struct ether_addr*)_s) 31650ce650fSreyk #define TTEST2(var, l) ( \ 31750ce650fSreyk snapend - (l) <= snapend && (const u_char *)&(var) <= snapend - (l) \ 31850ce650fSreyk ) 31950ce650fSreyk #define TTEST(var) TTEST2(var, sizeof(var)) 32050ce650fSreyk #define TCHECK2(var, l) if (!TTEST2(var, l)) goto trunc 32150ce650fSreyk #define TCHECK(var) TCHECK2(var, sizeof(var)) 32250ce650fSreyk 323d2b2a2e3Sreyk __BEGIN_DECLS 324d2b2a2e3Sreyk 325d2b2a2e3Sreyk void hostapd_log(u_int, const char *, ...); 32650ce650fSreyk void hostapd_printf(const char *, ...); 327d2b2a2e3Sreyk void hostapd_fatal(const char *, ...); 328d2b2a2e3Sreyk int hostapd_bpf_open(u_int); 329d2b2a2e3Sreyk void hostapd_cleanup(struct hostapd_config *); 330d2b2a2e3Sreyk int hostapd_check_file_secrecy(int, const char *); 33141a887d6Sreyk void hostapd_randval(u_int8_t *, const u_int) 33241a887d6Sreyk __attribute__((__bounded__(__buffer__, 1, 2))); 333d2b2a2e3Sreyk 33450ce650fSreyk struct hostapd_table *hostapd_table_add(struct hostapd_config *, 33550ce650fSreyk const char *); 33650ce650fSreyk struct hostapd_table *hostapd_table_lookup(struct hostapd_config *, 33750ce650fSreyk const char *); 33850ce650fSreyk struct hostapd_entry *hostapd_entry_add(struct hostapd_table *, 33950ce650fSreyk u_int8_t *); 34050ce650fSreyk struct hostapd_entry *hostapd_entry_lookup(struct hostapd_table *, 34150ce650fSreyk u_int8_t *); 34250ce650fSreyk void hostapd_entry_update(struct hostapd_table *, 34350ce650fSreyk struct hostapd_entry *); 344*9f63336bSreyk int hostapd_entry_cmp(struct hostapd_entry *, struct hostapd_entry *); 345*9f63336bSreyk 346*9f63336bSreyk RB_PROTOTYPE(hostapd_tree, hostapd_entry, e_nodes, hostapd_entry_cmp); 34750ce650fSreyk 348d2b2a2e3Sreyk int hostapd_parse_file(struct hostapd_config *); 349d2b2a2e3Sreyk int hostapd_parse_symset(char *); 350d2b2a2e3Sreyk 351d2b2a2e3Sreyk void hostapd_priv_init(struct hostapd_config *); 352d2b2a2e3Sreyk int hostapd_priv_llc_xid(struct hostapd_config *, struct hostapd_node *); 353d2b2a2e3Sreyk void hostapd_priv_apme_bssid(struct hostapd_config *); 3549efd6220Shenning int hostapd_priv_apme_getnode(struct hostapd_config *, 3559efd6220Shenning struct hostapd_node *); 35650ce650fSreyk int hostapd_priv_apme_setnode(struct hostapd_config *, 35750ce650fSreyk struct hostapd_node *node, int); 358d2b2a2e3Sreyk 359d2b2a2e3Sreyk void hostapd_apme_init(struct hostapd_config *); 360d2b2a2e3Sreyk void hostapd_apme_input(int, short, void *); 36150ce650fSreyk int hostapd_apme_output(struct hostapd_config *, 36250ce650fSreyk struct hostapd_ieee80211_frame *); 36350ce650fSreyk int hostapd_apme_addnode(struct hostapd_config *, 36450ce650fSreyk struct hostapd_node *node); 36550ce650fSreyk int hostapd_apme_delnode(struct hostapd_config *, 36650ce650fSreyk struct hostapd_node *node); 36750ce650fSreyk int hostapd_apme_offset(struct hostapd_config *, u_int8_t *, 36850ce650fSreyk const u_int); 369d2b2a2e3Sreyk 370d2b2a2e3Sreyk void hostapd_iapp_init(struct hostapd_config *); 371d2b2a2e3Sreyk void hostapd_iapp_term(struct hostapd_config *); 3729efd6220Shenning int hostapd_iapp_add_notify(struct hostapd_config *, 3739efd6220Shenning struct hostapd_node *); 37450ce650fSreyk int hostapd_iapp_radiotap(struct hostapd_config *, 37550ce650fSreyk u_int8_t *, const u_int); 376d2b2a2e3Sreyk void hostapd_iapp_input(int, short, void *); 377d2b2a2e3Sreyk 378d2b2a2e3Sreyk void hostapd_llc_init(struct hostapd_config *); 379d2b2a2e3Sreyk int hostapd_llc_send_xid(struct hostapd_config *, struct hostapd_node *); 380d2b2a2e3Sreyk 38150ce650fSreyk int hostapd_handle_input(struct hostapd_config *, u_int8_t *, u_int); 38250ce650fSreyk 38350ce650fSreyk void hostapd_print_ieee80211(u_int, u_int, u_int8_t *, u_int); 38450ce650fSreyk 385d2b2a2e3Sreyk __END_DECLS 386d2b2a2e3Sreyk 387d2b2a2e3Sreyk #endif /* _HOSTAPD_H */ 388