1 /* $OpenBSD: iapp.h,v 1.4 2015/11/03 12:21:50 mpi Exp $ */ 2 3 /* 4 * Copyright (c) 2005 Reyk Floeter <reyk@openbsd.org> 5 * 6 * Permission to use, copy, modify, and distribute this software for any 7 * purpose with or without fee is hereby granted, provided that the above 8 * copyright notice and this permission notice appear in all copies. 9 * 10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17 */ 18 19 #ifndef _IAPP_H 20 #define _IAPP_H 21 22 #define IEEE80211_IAPP_VERSION 0 23 24 /* 25 * IAPP (Inter Access Point Protocol) 26 */ 27 28 struct ieee80211_iapp_frame { 29 u_int8_t i_version; 30 u_int8_t i_command; 31 u_int16_t i_identifier; 32 u_int16_t i_length; 33 } __packed; 34 35 enum ieee80211_iapp_frame_type { 36 IEEE80211_IAPP_FRAME_ADD_NOTIFY = 0, 37 IEEE80211_IAPP_FRAME_MOVE_NOTIFY = 1, 38 IEEE80211_IAPP_FRAME_MOVE_RESPONSE = 2, 39 IEEE80211_IAPP_FRAME_SEND_SECURITY_BLOCK = 3, 40 IEEE80211_IAPP_FRAME_ACK_SECURITY_BLOCK = 4, 41 IEEE80211_IAPP_FRAME_CACHE_NOTIFY = 5, 42 IEEE80211_IAPP_FRAME_CACHE_RESPONSE = 6, 43 IEEE80211_IAPP_FRAME_HOSTAPD_RADIOTAP = 12, 44 IEEE80211_IAPP_FRAME_HOSTAPD_PCAP = 13 45 }; 46 47 #define IEEE80211_IAPP_FRAME_TYPE_NAME { \ 48 "add notify", \ 49 "move notify", \ 50 "move response", \ 51 "send security block", \ 52 "ack security block", \ 53 "cache notify", \ 54 "cache response", \ 55 "reserved#07", \ 56 "reserved#08", \ 57 "reserved#09", \ 58 "reserved#10", \ 59 "reserved#11", \ 60 "hostapd radiotap", \ 61 "hostapd pcap", \ 62 "reserved#14", \ 63 "reserved#15", \ 64 } 65 66 struct ieee80211_iapp_add_notify { 67 u_int8_t a_length; 68 u_int8_t a_reserved; 69 u_int8_t a_macaddr[IEEE80211_ADDR_LEN]; 70 u_int16_t a_seqnum; 71 } __packed; 72 73 #define IAPP_PORT 3517 74 #define IAPP_OLD_PORT 2313 75 #define IAPP_MCASTADDR "224.0.1.178" 76 #define IAPP_MAXSIZE 512 77 78 #endif /* _IAPP_H */ 79