xref: /openwifi/user_space/inject_80211/inject_80211.h (revision 17a594259c8523c157a023b03b1e45f5306c1c78)
1 #include <stdlib.h>
2 #include <resolv.h>
3 #include <string.h>
4 #include <unistd.h>
5 #include <getopt.h>
6 #include <pcap.h>
7 #include <errno.h>
8 
9 typedef unsigned int u32;
10 typedef unsigned short u16;
11 typedef unsigned char u8;
12 typedef u32 __le32;
13 
14 #if __BYTE_ORDER == __LITTLE_ENDIAN
15 #define	le16_to_cpu(x) (x)
16 #define	le32_to_cpu(x) (x)
17 #else
18 #define	le16_to_cpu(x) ((((x)&0xff)<<8)|(((x)&0xff00)>>8))
19 #define	le32_to_cpu(x) \
20 ((((x)&0xff)<<24)|(((x)&0xff00)<<8)|(((x)&0xff0000)>>8)|(((x)&0xff000000)>>24))
21 #endif
22 #define	unlikely(x) (x)
23 
24 
25 
26 
27