summaryrefslogtreecommitdiff
path: root/libopie2/opienet/802_11_user.h
Unidiff
Diffstat (limited to 'libopie2/opienet/802_11_user.h') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opienet/802_11_user.h47
1 files changed, 24 insertions, 23 deletions
diff --git a/libopie2/opienet/802_11_user.h b/libopie2/opienet/802_11_user.h
index cd98503..ad84514 100644
--- a/libopie2/opienet/802_11_user.h
+++ b/libopie2/opienet/802_11_user.h
@@ -52,43 +52,44 @@ struct ieee_802_3_header {
52 u_int8_tsrc_mac[6]; 52 u_int8_tsrc_mac[6];
53 53
54}; 54};
55 55
56#define P80211_OUI_LEN 3 56#define P80211_OUI_LEN 3
57 57
58struct ieee_802_11_snap_header {
59
60 u_int8_t dsap; /* always 0xAA */
61 u_int8_t ssap; /* always 0xAA */
62 u_int8_t ctrl; /* always 0x03 */
63 u_int8_t oui[P80211_OUI_LEN]; /* organizational universal id */
64
65} __attribute__ ((packed));
66
67#define P80211_LLC_OUI_LEN 3
68
69struct ieee_802_11_802_1H_header {
70
71 u_int8_t dsap;
72 u_int8_t ssap; /* always 0xAA */
73 u_int8_t ctrl; /* always 0x03 */
74 u_int8_t oui[P80211_OUI_LEN]; /* organizational universal id */
75 u_int16_t unknown1; /* packet type ID fields */
76 u_int16_t unknown2; /* here is something like length in some cases */
77} __attribute__ ((packed));
78
79struct ieee_802_11_802_2_header { 58struct ieee_802_11_802_2_header {
80 59
81 u_int8_t dsap; 60 u_int8_t dsap;
82 u_int8_t ssap; /* always 0xAA */ 61 u_int8_t ssap; /* always 0xAA */
83 u_int8_t ctrl; /* always 0x03 */ 62 u_int8_t ctrl; /* always 0x03 */
84 u_int8_t oui[P80211_OUI_LEN]; /* organizational universal id */ 63 u_int8_t oui[P80211_OUI_LEN]; /* organizational universal id */
85 u_int16_t type; /* packet type ID field */ 64 u_int16_t type; /* packet type ID field */
65};
86 66
87} __attribute__ ((packed)); 67/* See RFC 826 for protocol description. ARP packets are variable
88 68 in size; the arphdr structure defines the fixed-length portion.
69 Protocol type values are the same as those for 10 Mb/s Ethernet.
70 It is followed by the variable-sized fields ar_sha, arp_spa,
71 arp_tha and arp_tpa in that order, according to the lengths
72 specified. Field names used correspond to RFC 826. */
73
74#define ETH_ALEN 6
75
76struct myarphdr
77{
78 unsigned short int ar_hrd; /* Format of hardware address. */
79 unsigned short int ar_pro; /* Format of protocol address. */
80 unsigned char ar_hln; /* Length of hardware address. */
81 unsigned char ar_pln; /* Length of protocol address. */
82 unsigned short int ar_op; /* ARP opcode (command). */
83 /* Ethernet looks like this : This bit is variable sized
84 however... */
85 unsigned char ar_sha[ETH_ALEN]; /* Sender hardware address. */
86 unsigned char ar_sip[4]; /* Sender IP address. */
87 unsigned char ar_tha[ETH_ALEN]; /* Target hardware address. */
88 unsigned char ar_tip[4]; /* Target IP address. */
89};
89 90
90 91
91// following is incoplete and may be incorrect and need reorganization 92// following is incoplete and may be incorrect and need reorganization
92 93
93 #define ieee_802_11_frame_type_Management0x00 94 #define ieee_802_11_frame_type_Management0x00
94 #define ieee_802_11_frame_type_Control 0x01 95 #define ieee_802_11_frame_type_Control 0x01