hostapd_defs.h

Go to the documentation of this file.
00001 
00017 #ifndef HOSTAPD_DEFS_H
00018 #define HOSTAPD_DEFS_H
00019 
00020 #ifndef ETH_ALEN
00021 #define ETH_ALEN 6
00022 #endif
00023 #ifndef IFNAMSIZ
00024 #define IFNAMSIZ 16
00025 #endif
00026 #ifndef ETH_P_ALL
00027 #define ETH_P_ALL 0x0003
00028 #endif
00029 #ifndef ETH_P_PAE
00030 #define ETH_P_PAE 0x888E /* Port Access Entity (IEEE 802.1X) */
00031 #endif /* ETH_P_PAE */
00032 #ifndef ETH_P_EAPOL
00033 #define ETH_P_EAPOL ETH_P_PAE
00034 #endif /* ETH_P_EAPOL */
00035 
00036 #ifndef ETH_P_RRB
00037 #define ETH_P_RRB 0x890D
00038 #endif /* ETH_P_RRB */
00039 
00040 #ifdef _MSC_VER
00041 #pragma pack(push, 1)
00042 #endif /* _MSC_VER */
00043 
00044 #define MAX_VLAN_ID 4094
00045 
00046 struct ieee8023_hdr {
00047         u8 dest[6];
00048         u8 src[6];
00049         u16 ethertype;
00050 } STRUCT_PACKED;
00051 
00052 
00053 struct ieee80211_hdr {
00054         le16 frame_control;
00055         le16 duration_id;
00056         u8 addr1[6];
00057         u8 addr2[6];
00058         u8 addr3[6];
00059         le16 seq_ctrl;
00060         /* followed by 'u8 addr4[6];' if ToDS and FromDS is set in data frame
00061          */
00062 } STRUCT_PACKED;
00063 
00064 #ifdef _MSC_VER
00065 #pragma pack(pop)
00066 #endif /* _MSC_VER */
00067 
00068 #define IEEE80211_DA_FROMDS addr1
00069 #define IEEE80211_BSSID_FROMDS addr2
00070 #define IEEE80211_SA_FROMDS addr3
00071 
00072 #define IEEE80211_HDRLEN (sizeof(struct ieee80211_hdr))
00073 
00074 #define IEEE80211_FC(type, stype) host_to_le16((type << 2) | (stype << 4))
00075 
00076 /* MTU to be set for the wlan#ap device; this is mainly needed for IEEE 802.1X
00077  * frames that might be longer than normal default MTU and they are not
00078  * fragmented */
00079 #define HOSTAPD_MTU 2290
00080 
00081 #endif /* HOSTAPD_DEFS_H */
00082 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Generated on Sat Nov 21 23:16:48 2009 for hostapd by  doxygen 1.6.1