22 #ifndef WIFI_MAC_HEADER_H
23 #define WIFI_MAC_HEADER_H
25 #include "ns3/header.h"
26 #include "ns3/mac48-address.h"
27 #include "ns3/nstime.h"
38 WIFI_MAC_CTL_BACKRESP,
41 WIFI_MAC_MGT_ASSOCIATION_REQUEST,
42 WIFI_MAC_MGT_ASSOCIATION_RESPONSE,
43 WIFI_MAC_MGT_DISASSOCIATION,
44 WIFI_MAC_MGT_REASSOCIATION_REQUEST,
45 WIFI_MAC_MGT_REASSOCIATION_RESPONSE,
46 WIFI_MAC_MGT_PROBE_REQUEST,
47 WIFI_MAC_MGT_PROBE_RESPONSE,
48 WIFI_MAC_MGT_AUTHENTICATION,
49 WIFI_MAC_MGT_DEAUTHENTICATION,
51 WIFI_MAC_MGT_ACTION_NO_ACK,
52 WIFI_MAC_MGT_MULTIHOP_ACTION,
57 WIFI_MAC_DATA_CFACK_CFPOLL,
59 WIFI_MAC_DATA_NULL_CFACK,
60 WIFI_MAC_DATA_NULL_CFPOLL,
61 WIFI_MAC_DATA_NULL_CFACK_CFPOLL,
63 WIFI_MAC_QOSDATA_CFACK,
64 WIFI_MAC_QOSDATA_CFPOLL,
65 WIFI_MAC_QOSDATA_CFACK_CFPOLL,
66 WIFI_MAC_QOSDATA_NULL,
67 WIFI_MAC_QOSDATA_NULL_CFPOLL,
68 WIFI_MAC_QOSDATA_NULL_CFACK_CFPOLL,
98 static TypeId GetTypeId (
void);
100 virtual void Print (std::ostream &os)
const;
106 void SetAssocReq (
void);
107 void SetAssocResp (
void);
108 void SetProbeReq (
void);
109 void SetProbeResp (
void);
110 void SetBeacon (
void);
111 void SetTypeData (
void);
113 void SetBlockAckReq (
void);
114 void SetBlockAck (
void);
115 void SetMultihopAction ();
116 void SetDsFrom (
void);
117 void SetDsNotFrom (
void);
119 void SetDsNotTo (
void);
124 void SetType (
enum WifiMacType type);
125 void SetRawDuration (uint16_t duration);
126 void SetDuration (
Time duration);
127 void SetId (uint16_t
id);
128 void SetSequenceNumber (uint16_t seq);
129 void SetFragmentNumber (uint8_t frag);
130 void SetNoMoreFragments (
void);
131 void SetMoreFragments (
void);
132 void SetRetry (
void);
133 void SetNoRetry (
void);
134 void SetQosTid (uint8_t tid);
136 void SetQosNoEosp ();
137 void SetQosAckPolicy (
enum QosAckPolicy);
138 void SetQosNormalAck (
void);
139 void SetQosBlockAck (
void);
140 void SetQosNoAck (
void);
141 void SetQosAmsdu (
void);
142 void SetQosNoAmsdu (
void);
143 void SetQosTxopLimit (uint8_t txop);
150 enum WifiMacType GetType (
void)
const;
151 bool IsFromDs (
void)
const;
152 bool IsToDs (
void)
const;
153 bool IsData (
void)
const;
154 bool IsQosData (
void)
const;
155 bool IsCtl (
void)
const;
156 bool IsMgt (
void)
const;
157 bool IsCfpoll (
void)
const;
158 bool IsRts (
void)
const;
159 bool IsCts (
void)
const;
160 bool IsAck (
void)
const;
161 bool IsBlockAckReq (
void)
const;
162 bool IsBlockAck (
void)
const;
163 bool IsAssocReq (
void)
const;
164 bool IsAssocResp (
void)
const;
165 bool IsReassocReq (
void)
const;
166 bool IsReassocResp (
void)
const;
167 bool IsProbeReq (
void)
const;
168 bool IsProbeResp (
void)
const;
169 bool IsBeacon (
void)
const;
170 bool IsDisassociation (
void)
const;
171 bool IsAuthentication (
void)
const;
172 bool IsDeauthentication (
void)
const;
173 bool IsAction ()
const;
174 bool IsMultihopAction ()
const;
175 uint16_t GetRawDuration (
void)
const;
176 Time GetDuration (
void)
const;
177 uint16_t GetSequenceControl (
void)
const;
178 uint16_t GetSequenceNumber (
void)
const;
179 uint16_t GetFragmentNumber (
void)
const;
180 bool IsRetry (
void)
const;
181 bool IsMoreFragments (
void)
const;
182 bool IsQosBlockAck (
void)
const;
183 bool IsQosNoAck (
void)
const;
184 bool IsQosAck (
void)
const;
185 bool IsQosEosp (
void)
const;
186 bool IsQosAmsdu (
void)
const;
187 uint8_t GetQosTid (
void)
const;
188 enum QosAckPolicy GetQosAckPolicy (
void)
const;
189 uint8_t GetQosTxopLimit (
void)
const;
191 uint32_t GetSize (
void)
const;
192 const char * GetTypeString (
void)
const;
196 uint16_t GetFrameControl (
void)
const;
197 uint16_t GetQosControl (
void)
const;
198 void SetFrameControl (uint16_t control);
199 void SetSequenceControl (uint16_t seq);
200 void SetQosControl (uint16_t qos);
201 void PrintFrameControl (std::ostream &os)
const;
204 uint8_t m_ctrlSubtype;
206 uint8_t m_ctrlFromDs;
207 uint8_t m_ctrlMoreFrag;
209 uint8_t m_ctrlPwrMgt;
210 uint8_t m_ctrlMoreData;
222 uint8_t m_qosAckPolicy;
223 uint8_t m_amsduPresent;
iterator in a Buffer instance
a unique identifier for an interface.