A Discrete-Event Network Simulator
API
mgt-headers.cc
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2006 INRIA
4  * Copyright (c) 2009 MIRKO BANCHI
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation;
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  *
19  * Authors: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
20  * Mirko Banchi <mk.banchi@gmail.com>
21  */
22 
23 #include "ns3/simulator.h"
24 #include "ns3/address-utils.h"
25 #include "mgt-headers.h"
26 
27 namespace ns3 {
28 
29 /***********************************************************
30  * Probe Request
31  ***********************************************************/
32 
33 NS_OBJECT_ENSURE_REGISTERED (MgtProbeRequestHeader);
34 
36 {
37 }
38 
39 void
41 {
42  m_ssid = ssid;
43 }
44 
45 Ssid
47 {
48  return m_ssid;
49 }
50 
51 void
53 {
54  m_rates = rates;
55 }
56 
57 void
59 {
60  m_extendedCapability = extendedCapabilities;
61 }
62 
65 {
66  return m_extendedCapability;
67 }
68 
69 void
71 {
72  m_htCapability = htCapabilities;
73 }
74 
77 {
78  return m_htCapability;
79 }
80 
81 void
83 {
84  m_vhtCapability = vhtCapabilities;
85 }
86 
89 {
90  return m_vhtCapability;
91 }
92 
93 void
95 {
96  m_heCapability = heCapabilities;
97 }
98 
101 {
102  return m_heCapability;
103 }
104 
107 {
108  return m_rates;
109 }
110 
111 uint32_t
113 {
114  uint32_t size = 0;
115  size += m_ssid.GetSerializedSize ();
116  size += m_rates.GetSerializedSize ();
122  return size;
123 }
124 
125 TypeId
127 {
128  static TypeId tid = TypeId ("ns3::MgtProbeRequestHeader")
129  .SetParent<Header> ()
130  .SetGroupName ("Wifi")
131  .AddConstructor<MgtProbeRequestHeader> ()
132  ;
133  return tid;
134 }
135 
136 TypeId
138 {
139  return GetTypeId ();
140 }
141 
142 void
143 MgtProbeRequestHeader::Print (std::ostream &os) const
144 {
145  os << "ssid=" << m_ssid << ", "
146  << "rates=" << m_rates << ", "
147  << "Extended Capabilities=" << m_extendedCapability << " , "
148  << "HT Capabilities=" << m_htCapability << " , "
149  << "VHT Capabilities=" << m_vhtCapability << " , "
150  << "HE Capabilities=" << m_heCapability;
151 }
152 
153 void
155 {
157  i = m_ssid.Serialize (i);
158  i = m_rates.Serialize (i);
159  i = m_rates.extended.Serialize (i);
161  i = m_htCapability.Serialize (i);
162  i = m_vhtCapability.Serialize (i);
163  i = m_heCapability.Serialize (i);
164 }
165 
166 uint32_t
168 {
170  i = m_ssid.Deserialize (i);
171  i = m_rates.Deserialize (i);
177  return i.GetDistanceFrom (start);
178 }
179 
180 
181 /***********************************************************
182  * Probe Response
183  ***********************************************************/
184 
186 
188 {
189 }
190 
192 {
193 }
194 
195 uint64_t
197 {
198  return m_timestamp;
199 }
200 
201 Ssid
203 {
204  return m_ssid;
205 }
206 
207 uint64_t
209 {
210  return m_beaconInterval;
211 }
212 
215 {
216  return m_rates;
217 }
218 
219 void
221 {
222  m_capability = capabilities;
223 }
224 
227 {
228  return m_capability;
229 }
230 
231 void
233 {
234  m_extendedCapability = extendedCapabilities;
235 }
236 
239 {
240  return m_extendedCapability;
241 }
242 
243 void
245 {
246  m_htCapability = htCapabilities;
247 }
248 
251 {
252  return m_htCapability;
253 }
254 
255 void
257 {
258  m_htOperation = htOperation;
259 }
260 
263 {
264  return m_htOperation;
265 }
266 
267 void
269 {
270  m_vhtCapability = vhtCapabilities;
271 }
272 
275 {
276  return m_vhtCapability;
277 }
278 
279 void
281 {
282  m_vhtOperation = vhtOperation;
283 }
284 
287 {
288  return m_vhtOperation;
289 }
290 
291 void
293 {
294  m_heCapability = heCapabilities;
295 }
296 
299 {
300  return m_heCapability;
301 }
302 
303 void
305 {
306  m_heOperation = heOperation;
307 }
308 
311 {
312  return m_heOperation;
313 }
314 
315 void
317 {
318  m_ssid = ssid;
319 }
320 
321 void
323 {
324  m_beaconInterval = us;
325 }
326 
327 void
329 {
330  m_rates = rates;
331 }
332 
333 void
335 {
336  m_dsssParameterSet = dsssParameterSet;
337 }
338 
341 {
342  return m_dsssParameterSet;
343 }
344 
345 void
347 {
348  m_erpInformation = erpInformation;
349 }
350 
353 {
354  return m_erpInformation;
355 }
356 
357 void
359 {
360  m_edcaParameterSet = edcaParameters;
361 }
362 
365 {
366  return m_edcaParameterSet;
367 }
368 
369 TypeId
371 {
372  static TypeId tid = TypeId ("ns3::MgtProbeResponseHeader")
373  .SetParent<Header> ()
374  .SetGroupName ("Wifi")
375  .AddConstructor<MgtProbeResponseHeader> ()
376  ;
377  return tid;
378 }
379 
380 TypeId
382 {
383  return GetTypeId ();
384 }
385 
386 uint32_t
388 {
389  uint32_t size = 0;
390  size += 8; //timestamp
391  size += 2; //beacon interval
392  size += m_capability.GetSerializedSize ();
393  size += m_ssid.GetSerializedSize ();
394  size += m_rates.GetSerializedSize ();
401  size += m_htOperation.GetSerializedSize ();
405  size += m_heOperation.GetSerializedSize ();
406  return size;
407 }
408 
409 void
410 MgtProbeResponseHeader::Print (std::ostream &os) const
411 {
412  os << "ssid=" << m_ssid << ", "
413  << "rates=" << m_rates << ", "
414  << "ERP information=" << m_erpInformation << ", "
415  << "Extended Capabilities=" << m_extendedCapability << " , "
416  << "HT Capabilities=" << m_htCapability << " , "
417  << "HT Operation=" << m_htOperation << " , "
418  << "VHT Capabilities=" << m_vhtCapability << " , "
419  << "VHT Operation=" << m_vhtOperation << " , "
420  << "HE Capabilities=" << m_heCapability << " , "
421  << "HE Operation=" << m_heOperation;
422 }
423 
424 void
426 {
427  //timestamp
428  //beacon interval
429  //capability information
430  //SSID
431  //supported rates
432  //FH parameter set
433  //DS parameter set
434  //CF parameter set
435  //IBSS parameter set
437  i.WriteHtolsbU64 (Simulator::Now ().GetMicroSeconds ());
438  i.WriteHtolsbU16 (static_cast<uint16_t> (m_beaconInterval / 1024));
439  i = m_capability.Serialize (i);
440  i = m_ssid.Serialize (i);
441  i = m_rates.Serialize (i);
443  i = m_erpInformation.Serialize (i);
444  i = m_rates.extended.Serialize (i);
447  i = m_htCapability.Serialize (i);
448  i = m_htOperation.Serialize (i);
449  i = m_vhtCapability.Serialize (i);
450  i = m_vhtOperation.Serialize (i);
451  i = m_heCapability.Serialize (i);
452  i = m_heOperation.Serialize (i);
453 }
454 
455 uint32_t
457 {
459  m_timestamp = i.ReadLsbtohU64 ();
461  m_beaconInterval *= 1024;
462  i = m_capability.Deserialize (i);
463  i = m_ssid.Deserialize (i);
464  i = m_rates.Deserialize (i);
476  return i.GetDistanceFrom (start);
477 }
478 
479 
480 /***********************************************************
481  * Beacons
482  ***********************************************************/
483 
485 
486 /* static */
487 TypeId
489 {
490  static TypeId tid = TypeId ("ns3::MgtBeaconHeader")
492  .SetGroupName ("Wifi")
493  .AddConstructor<MgtBeaconHeader> ()
494  ;
495  return tid;
496 }
497 
498 
499 /***********************************************************
500  * Assoc Request
501  ***********************************************************/
502 
504 
506  : m_listenInterval (0)
507 {
508 }
509 
511 {
512 }
513 
514 void
516 {
517  m_ssid = ssid;
518 }
519 
520 void
522 {
523  m_rates = rates;
524 }
525 
526 void
528 {
529  m_listenInterval = interval;
530 }
531 
532 void
534 {
535  m_capability = capabilities;
536 }
537 
540 {
541  return m_capability;
542 }
543 
544 void
546 {
547  m_extendedCapability = extendedCapabilities;
548 }
549 
552 {
553  return m_extendedCapability;
554 }
555 
556 void
558 {
559  m_htCapability = htCapabilities;
560 }
561 
564 {
565  return m_htCapability;
566 }
567 
568 void
570 {
571  m_vhtCapability = vhtCapabilities;
572 }
573 
576 {
577  return m_vhtCapability;
578 }
579 
580 void
582 {
583  m_heCapability = heCapabilities;
584 }
585 
588 {
589  return m_heCapability;
590 }
591 
592 Ssid
594 {
595  return m_ssid;
596 }
597 
600 {
601  return m_rates;
602 }
603 
604 uint16_t
606 {
607  return m_listenInterval;
608 }
609 
610 TypeId
612 {
613  static TypeId tid = TypeId ("ns3::MgtAssocRequestHeader")
614  .SetParent<Header> ()
615  .SetGroupName ("Wifi")
616  .AddConstructor<MgtAssocRequestHeader> ()
617  ;
618  return tid;
619 }
620 
621 TypeId
623 {
624  return GetTypeId ();
625 }
626 
627 uint32_t
629 {
630  uint32_t size = 0;
631  size += m_capability.GetSerializedSize ();
632  size += 2;
633  size += m_ssid.GetSerializedSize ();
634  size += m_rates.GetSerializedSize ();
640  return size;
641 }
642 
643 void
644 MgtAssocRequestHeader::Print (std::ostream &os) const
645 {
646  os << "ssid=" << m_ssid << ", "
647  << "rates=" << m_rates << ", "
648  << "Extended Capabilities=" << m_extendedCapability << " , "
649  << "HT Capabilities=" << m_htCapability << " , "
650  << "VHT Capabilities=" << m_vhtCapability << " , "
651  << "HE Capabilities=" << m_heCapability;
652 }
653 
654 void
656 {
658  i = m_capability.Serialize (i);
660  i = m_ssid.Serialize (i);
661  i = m_rates.Serialize (i);
662  i = m_rates.extended.Serialize (i);
664  i = m_htCapability.Serialize (i);
665  i = m_vhtCapability.Serialize (i);
666  i = m_heCapability.Serialize (i);
667 }
668 
669 uint32_t
671 {
673  i = m_capability.Deserialize (i);
675  i = m_ssid.Deserialize (i);
676  i = m_rates.Deserialize (i);
682  return i.GetDistanceFrom (start);
683 }
684 
685 
686 /***********************************************************
687  * Ressoc Request
688  ***********************************************************/
689 
691 
693  : m_currentApAddr (Mac48Address ())
694 {
695 }
696 
698 {
699 }
700 
701 void
703 {
704  m_ssid = ssid;
705 }
706 
707 void
709 {
710  m_rates = rates;
711 }
712 
713 void
715 {
716  m_listenInterval = interval;
717 }
718 
719 void
721 {
722  m_capability = capabilities;
723 }
724 
727 {
728  return m_capability;
729 }
730 
731 void
733 {
734  m_extendedCapability = extendedCapabilities;
735 }
736 
739 {
740  return m_extendedCapability;
741 }
742 
743 void
745 {
746  m_htCapability = htCapabilities;
747 }
748 
751 {
752  return m_htCapability;
753 }
754 
755 void
757 {
758  m_vhtCapability = vhtCapabilities;
759 }
760 
763 {
764  return m_vhtCapability;
765 }
766 
767 void
769 {
770  m_heCapability = heCapabilities;
771 }
772 
775 {
776  return m_heCapability;
777 }
778 
779 Ssid
781 {
782  return m_ssid;
783 }
784 
787 {
788  return m_rates;
789 }
790 
791 uint16_t
793 {
794  return m_listenInterval;
795 }
796 
797 void
799 {
800  m_currentApAddr = currentApAddr;
801 }
802 
803 TypeId
805 {
806  static TypeId tid = TypeId ("ns3::MgtReassocRequestHeader")
807  .SetParent<Header> ()
808  .SetGroupName ("Wifi")
809  .AddConstructor<MgtReassocRequestHeader> ()
810  ;
811  return tid;
812 }
813 
814 TypeId
816 {
817  return GetTypeId ();
818 }
819 
820 uint32_t
822 {
823  uint32_t size = 0;
824  size += m_capability.GetSerializedSize ();
825  size += 2; //listen interval
826  size += 6; //current AP address
827  size += m_ssid.GetSerializedSize ();
828  size += m_rates.GetSerializedSize ();
834  return size;
835 }
836 
837 void
838 MgtReassocRequestHeader::Print (std::ostream &os) const
839 {
840  os << "current AP address=" << m_currentApAddr << ", "
841  << "ssid=" << m_ssid << ", "
842  << "rates=" << m_rates << ", "
843  << "Extended Capabilities=" << m_extendedCapability << " , "
844  << "HT Capabilities=" << m_htCapability << " , "
845  << "VHT Capabilities=" << m_vhtCapability << " , "
846  << "HE Capabilities=" << m_heCapability;
847 }
848 
849 void
851 {
853  i = m_capability.Serialize (i);
856  i = m_ssid.Serialize (i);
857  i = m_rates.Serialize (i);
858  i = m_rates.extended.Serialize (i);
860  i = m_htCapability.Serialize (i);
861  i = m_vhtCapability.Serialize (i);
862  i = m_heCapability.Serialize (i);
863 }
864 
865 uint32_t
867 {
869  i = m_capability.Deserialize (i);
872  i = m_ssid.Deserialize (i);
873  i = m_rates.Deserialize (i);
879  return i.GetDistanceFrom (start);
880 }
881 
882 
883 /***********************************************************
884  * Assoc/Reassoc Response
885  ***********************************************************/
886 
888 
890  : m_aid (0)
891 {
892 }
893 
895 {
896 }
897 
900 {
901  return m_code;
902 }
903 
906 {
907  return m_rates;
908 }
909 
910 void
912 {
913  m_code = code;
914 }
915 
916 void
918 {
919  m_rates = rates;
920 }
921 
922 void
924 {
925  m_capability = capabilities;
926 }
927 
930 {
931  return m_capability;
932 }
933 
934 void
936 {
937  m_extendedCapability = extendedCapabilities;
938 }
939 
942 {
943  return m_extendedCapability;
944 }
945 
946 void
948 {
949  m_htCapability = htCapabilities;
950 }
951 
954 {
955  return m_htCapability;
956 }
957 
958 void
960 {
961  m_htOperation = htOperation;
962 }
963 
966 {
967  return m_htOperation;
968 }
969 
970 void
972 {
973  m_vhtCapability = vhtCapabilities;
974 }
975 
978 {
979  return m_vhtCapability;
980 }
981 
982 void
984 {
985  m_vhtOperation = vhtOperation;
986 }
987 
990 {
991  return m_vhtOperation;
992 }
993 
994 void
996 {
997  m_heCapability = heCapabilities;
998 }
999 
1002 {
1003  return m_heCapability;
1004 }
1005 
1006 void
1008 {
1009  m_heOperation = heOperation;
1010 }
1011 
1014 {
1015  return m_heOperation;
1016 }
1017 
1018 void
1020 {
1021  m_aid = aid;
1022 }
1023 
1024 uint16_t
1026 {
1027  return m_aid;
1028 }
1029 
1030 void
1032 {
1033  m_erpInformation = erpInformation;
1034 }
1035 
1038 {
1039  return m_erpInformation;
1040 }
1041 
1042 void
1044 {
1045  m_edcaParameterSet = edcaparameters;
1046 }
1047 
1050 {
1051  return m_edcaParameterSet;
1052 }
1053 
1054 TypeId
1056 {
1057  static TypeId tid = TypeId ("ns3::MgtAssocResponseHeader")
1058  .SetParent<Header> ()
1059  .SetGroupName ("Wifi")
1060  .AddConstructor<MgtAssocResponseHeader> ()
1061  ;
1062  return tid;
1063 }
1064 
1065 TypeId
1067 {
1068  return GetTypeId ();
1069 }
1070 
1071 uint32_t
1073 {
1074  uint32_t size = 0;
1075  size += m_capability.GetSerializedSize ();
1076  size += m_code.GetSerializedSize ();
1077  size += 2; //aid
1078  size += m_rates.GetSerializedSize ();
1080  size += m_rates.extended.GetSerializedSize ();
1083  size += m_htCapability.GetSerializedSize ();
1084  size += m_htOperation.GetSerializedSize ();
1086  size += m_vhtOperation.GetSerializedSize ();
1087  size += m_heCapability.GetSerializedSize ();
1088  size += m_heOperation.GetSerializedSize ();
1089  return size;
1090 }
1091 
1092 void
1093 MgtAssocResponseHeader::Print (std::ostream &os) const
1094 {
1095  os << "status code=" << m_code << ", "
1096  << "aid=" << m_aid << ", "
1097  << "rates=" << m_rates << ", "
1098  << "ERP information=" << m_erpInformation << ", "
1099  << "Extended Capabilities=" << m_extendedCapability << " , "
1100  << "HT Capabilities=" << m_htCapability << " , "
1101  << "HT Operation=" << m_htOperation << " , "
1102  << "VHT Capabilities=" << m_vhtCapability << " , "
1103  << "VHT Operation=" << m_vhtOperation << " , "
1104  << "HE Capabilities=" << m_heCapability << " , "
1105  << "HE Operation=" << m_heOperation;
1106 }
1107 
1108 void
1110 {
1111  Buffer::Iterator i = start;
1112  i = m_capability.Serialize (i);
1113  i = m_code.Serialize (i);
1114  i.WriteHtolsbU16 (m_aid);
1115  i = m_rates.Serialize (i);
1116  i = m_erpInformation.Serialize (i);
1117  i = m_rates.extended.Serialize (i);
1118  i = m_edcaParameterSet.Serialize (i);
1120  i = m_htCapability.Serialize (i);
1121  i = m_htOperation.Serialize (i);
1122  i = m_vhtCapability.Serialize (i);
1123  i = m_vhtOperation.Serialize (i);
1124  i = m_heCapability.Serialize (i);
1125  i = m_heOperation.Serialize (i);
1126 }
1127 
1128 uint32_t
1130 {
1131  Buffer::Iterator i = start;
1132  i = m_capability.Deserialize (i);
1133  i = m_code.Deserialize (i);
1134  m_aid = i.ReadLsbtohU16 ();
1135  i = m_rates.Deserialize (i);
1146  return i.GetDistanceFrom (start);
1147 }
1148 
1149 
1150 /**********************************************************
1151  * ActionFrame
1152  **********************************************************/
1154 {
1155 }
1156 
1158 {
1159 }
1160 
1161 void
1164 {
1165  m_category = static_cast<uint8_t> (type);
1166  switch (type)
1167  {
1168  case BLOCK_ACK:
1169  {
1170  m_actionValue = static_cast<uint8_t> (action.blockAck);
1171  break;
1172  }
1173  case MESH:
1174  {
1175  m_actionValue = static_cast<uint8_t> (action.meshAction);
1176  break;
1177  }
1178  case MULTIHOP:
1179  {
1180  m_actionValue = static_cast<uint8_t> (action.multihopAction);
1181  break;
1182  }
1183  case SELF_PROTECTED:
1184  {
1185  m_actionValue = static_cast<uint8_t> (action.selfProtectedAction);
1186  break;
1187  }
1189  {
1190  break;
1191  }
1192  }
1193 }
1194 
1197 {
1198  switch (m_category)
1199  {
1200  case BLOCK_ACK:
1201  return BLOCK_ACK;
1202  case MESH:
1203  return MESH;
1204  case MULTIHOP:
1205  return MULTIHOP;
1206  case SELF_PROTECTED:
1207  return SELF_PROTECTED;
1209  return VENDOR_SPECIFIC_ACTION;
1210  default:
1211  NS_FATAL_ERROR ("Unknown action value");
1212  return SELF_PROTECTED;
1213  }
1214 }
1215 
1218 {
1219  ActionValue retval;
1220  retval.selfProtectedAction = PEER_LINK_OPEN; //Needs to be initialized to something to quiet valgrind in default cases
1221  switch (m_category)
1222  {
1223  case BLOCK_ACK:
1224  switch (m_actionValue)
1225  {
1228  break;
1231  break;
1232  case BLOCK_ACK_DELBA:
1233  retval.blockAck = BLOCK_ACK_DELBA;
1234  break;
1235  }
1236  break;
1237 
1238  case SELF_PROTECTED:
1239  switch (m_actionValue)
1240  {
1241  case PEER_LINK_OPEN:
1243  break;
1244  case PEER_LINK_CONFIRM:
1246  break;
1247  case PEER_LINK_CLOSE:
1249  break;
1250  case GROUP_KEY_INFORM:
1252  break;
1253  case GROUP_KEY_ACK:
1255  break;
1256  default:
1257  NS_FATAL_ERROR ("Unknown mesh peering management action code");
1258  retval.selfProtectedAction = PEER_LINK_OPEN; /* quiet compiler */
1259  }
1260  break;
1261 
1262  case MESH:
1263  switch (m_actionValue)
1264  {
1265  case LINK_METRIC_REPORT:
1266  retval.meshAction = LINK_METRIC_REPORT;
1267  break;
1268  case PATH_SELECTION:
1269  retval.meshAction = PATH_SELECTION;
1270  break;
1271  case PORTAL_ANNOUNCEMENT:
1273  break;
1276  break;
1277  case MDA_SETUP_REQUEST:
1278  retval.meshAction = MDA_SETUP_REQUEST;
1279  break;
1280  case MDA_SETUP_REPLY:
1281  retval.meshAction = MDA_SETUP_REPLY;
1282  break;
1285  break;
1286  case MDAOP_ADVERTISMENTS:
1288  break;
1289  case MDAOP_SET_TEARDOWN:
1290  retval.meshAction = MDAOP_SET_TEARDOWN;
1291  break;
1294  break;
1297  break;
1298  default:
1299  NS_FATAL_ERROR ("Unknown mesh peering management action code");
1300  retval.selfProtectedAction = PEER_LINK_OPEN; /* quiet compiler */
1301  }
1302  break;
1303 
1304  case MULTIHOP: //not yet supported
1305  switch (m_actionValue)
1306  {
1307  case PROXY_UPDATE: //not used so far
1308  retval.multihopAction = PROXY_UPDATE;
1309  break;
1310  case PROXY_UPDATE_CONFIRMATION: //not used so far
1311  retval.multihopAction = PROXY_UPDATE;
1312  break;
1313  default:
1314  NS_FATAL_ERROR ("Unknown mesh peering management action code");
1315  retval.selfProtectedAction = PEER_LINK_OPEN; /* quiet compiler */
1316  }
1317  break;
1318  default:
1319  NS_FATAL_ERROR ("Unsupported mesh action");
1320  retval.selfProtectedAction = PEER_LINK_OPEN; /* quiet compiler */
1321  }
1322  return retval;
1323 }
1324 
1325 TypeId
1327 {
1328  static TypeId tid = TypeId ("ns3::WifiActionHeader")
1329  .SetParent<Header> ()
1330  .SetGroupName ("Wifi")
1331  .AddConstructor<WifiActionHeader> ()
1332  ;
1333  return tid;
1334 }
1335 
1336 TypeId
1338 {
1339  return GetTypeId ();
1340 }
1341 
1342 std::string
1344 {
1345  if (value == BLOCK_ACK)
1346  {
1347  return "BlockAck";
1348  }
1349  else if (value == MESH)
1350  {
1351  return "Mesh";
1352  }
1353  else if (value == SELF_PROTECTED)
1354  {
1355  return "SelfProtected";
1356  }
1357  else if (value == VENDOR_SPECIFIC_ACTION)
1358  {
1359  return "VendorSpecificAction";
1360  }
1361  else
1362  {
1363  std::ostringstream convert;
1364  convert << value;
1365  return convert.str ();
1366  }
1367 }
1368 std::string
1370 {
1371  if (value == PEER_LINK_OPEN)
1372  {
1373  return "PeerLinkOpen";
1374  }
1375  else if (value == PEER_LINK_CONFIRM)
1376  {
1377  return "PeerLinkConfirm";
1378  }
1379  else if (value == PEER_LINK_CLOSE)
1380  {
1381  return "PeerLinkClose";
1382  }
1383  else if (value == GROUP_KEY_INFORM)
1384  {
1385  return "GroupKeyInform";
1386  }
1387  else if (value == GROUP_KEY_ACK)
1388  {
1389  return "GroupKeyAck";
1390  }
1391  else
1392  {
1393  std::ostringstream convert;
1394  convert << value;
1395  return convert.str ();
1396  }
1397 }
1398 
1399 void
1400 WifiActionHeader::Print (std::ostream &os) const
1401 {
1402  os << "category=" << CategoryValueToString ((CategoryValue) m_category)
1404 }
1405 
1406 uint32_t
1408 {
1409  return 2;
1410 }
1411 
1412 void
1414 {
1415  start.WriteU8 (m_category);
1416  start.WriteU8 (m_actionValue);
1417 }
1418 
1419 uint32_t
1421 {
1422  Buffer::Iterator i = start;
1423  m_category = i.ReadU8 ();
1424  m_actionValue = i.ReadU8 ();
1425  return i.GetDistanceFrom (start);
1426 }
1427 
1428 
1429 /***************************************************
1430 * ADDBARequest
1431 ****************************************************/
1432 
1434 
1436  : m_dialogToken (1),
1437  m_amsduSupport (1),
1438  m_bufferSize (0)
1439 {
1440 }
1441 
1442 TypeId
1444 {
1445  static TypeId tid = TypeId ("ns3::MgtAddBaRequestHeader")
1446  .SetParent<Header> ()
1447  .SetGroupName ("Wifi")
1448  .AddConstructor<MgtAddBaRequestHeader> ()
1449  ;
1450  return tid;
1451 }
1452 
1453 TypeId
1455 {
1456  return GetTypeId ();
1457 }
1458 
1459 void
1460 MgtAddBaRequestHeader::Print (std::ostream &os) const
1461 {
1462 }
1463 
1464 uint32_t
1466 {
1467  uint32_t size = 0;
1468  size += 1; //Dialog token
1469  size += 2; //Block ack parameter set
1470  size += 2; //Block ack timeout value
1471  size += 2; //Starting sequence control
1472  return size;
1473 }
1474 
1475 void
1477 {
1478  Buffer::Iterator i = start;
1479  i.WriteU8 (m_dialogToken);
1483 }
1484 
1485 uint32_t
1487 {
1488  Buffer::Iterator i = start;
1489  m_dialogToken = i.ReadU8 ();
1493  return i.GetDistanceFrom (start);
1494 }
1495 
1496 void
1498 {
1499  m_policy = 0;
1500 }
1501 
1502 void
1504 {
1505  m_policy = 1;
1506 }
1507 
1508 void
1510 {
1511  NS_ASSERT (tid < 16);
1512  m_tid = tid;
1513 }
1514 
1515 void
1517 {
1519 }
1520 
1521 void
1523 {
1524  m_bufferSize = size;
1525 }
1526 
1527 void
1529 {
1530  m_startingSeq = seq;
1531 }
1532 
1533 void
1535 {
1536  m_startingSeq = (seqControl >> 4) & 0x0fff;
1537 }
1538 
1539 void
1541 {
1542  m_amsduSupport = supported;
1543 }
1544 
1545 uint8_t
1547 {
1548  return m_tid;
1549 }
1550 
1551 bool
1553 {
1554  return (m_policy == 1) ? true : false;
1555 }
1556 
1557 uint16_t
1559 {
1560  return m_timeoutValue;
1561 }
1562 
1563 uint16_t
1565 {
1566  return m_bufferSize;
1567 }
1568 
1569 bool
1571 {
1572  return (m_amsduSupport == 1) ? true : false;
1573 }
1574 
1575 uint16_t
1577 {
1578  return m_startingSeq;
1579 }
1580 
1581 uint16_t
1583 {
1584  return (m_startingSeq << 4) & 0xfff0;
1585 }
1586 
1587 uint16_t
1589 {
1590  uint16_t res = 0;
1591  res |= m_amsduSupport;
1592  res |= m_policy << 1;
1593  res |= m_tid << 2;
1594  res |= m_bufferSize << 6;
1595  return res;
1596 }
1597 
1598 void
1600 {
1601  m_amsduSupport = (params) & 0x01;
1602  m_policy = (params >> 1) & 0x01;
1603  m_tid = (params >> 2) & 0x0f;
1604  m_bufferSize = (params >> 6) & 0x03ff;
1605 }
1606 
1607 
1608 /***************************************************
1609 * ADDBAResponse
1610 ****************************************************/
1611 
1613 
1615  : m_dialogToken (1),
1616  m_amsduSupport (1),
1617  m_bufferSize (0)
1618 {
1619 }
1620 
1621 TypeId
1623 {
1624  static TypeId tid = TypeId ("ns3::MgtAddBaResponseHeader")
1625  .SetParent<Header> ()
1626  .SetGroupName ("Wifi")
1627  .AddConstructor<MgtAddBaResponseHeader> ()
1628  ;
1629  return tid;
1630 }
1631 
1632 TypeId
1634 {
1635  return GetTypeId ();
1636 }
1637 
1638 void
1639 MgtAddBaResponseHeader::Print (std::ostream &os) const
1640 {
1641  os << "status code=" << m_code;
1642 }
1643 
1644 uint32_t
1646 {
1647  uint32_t size = 0;
1648  size += 1; //Dialog token
1649  size += m_code.GetSerializedSize (); //Status code
1650  size += 2; //Block ack parameter set
1651  size += 2; //Block ack timeout value
1652  return size;
1653 }
1654 
1655 void
1657 {
1658  Buffer::Iterator i = start;
1659  i.WriteU8 (m_dialogToken);
1660  i = m_code.Serialize (i);
1663 }
1664 
1665 uint32_t
1667 {
1668  Buffer::Iterator i = start;
1669  m_dialogToken = i.ReadU8 ();
1670  i = m_code.Deserialize (i);
1673  return i.GetDistanceFrom (start);
1674 }
1675 
1676 void
1678 {
1679  m_policy = 0;
1680 }
1681 
1682 void
1684 {
1685  m_policy = 1;
1686 }
1687 
1688 void
1690 {
1691  NS_ASSERT (tid < 16);
1692  m_tid = tid;
1693 }
1694 
1695 void
1697 {
1699 }
1700 
1701 void
1703 {
1704  m_bufferSize = size;
1705 }
1706 
1707 void
1709 {
1710  m_code = code;
1711 }
1712 
1713 void
1715 {
1716  m_amsduSupport = supported;
1717 }
1718 
1719 StatusCode
1721 {
1722  return m_code;
1723 }
1724 
1725 uint8_t
1727 {
1728  return m_tid;
1729 }
1730 
1731 bool
1733 {
1734  return (m_policy == 1) ? true : false;
1735 }
1736 
1737 uint16_t
1739 {
1740  return m_timeoutValue;
1741 }
1742 
1743 uint16_t
1745 {
1746  return m_bufferSize;
1747 }
1748 
1749 bool
1751 {
1752  return (m_amsduSupport == 1) ? true : false;
1753 }
1754 
1755 uint16_t
1757 {
1758  uint16_t res = 0;
1759  res |= m_amsduSupport;
1760  res |= m_policy << 1;
1761  res |= m_tid << 2;
1762  res |= m_bufferSize << 6;
1763  return res;
1764 }
1765 
1766 void
1768 {
1769  m_amsduSupport = (params) & 0x01;
1770  m_policy = (params >> 1) & 0x01;
1771  m_tid = (params >> 2) & 0x0f;
1772  m_bufferSize = (params >> 6) & 0x03ff;
1773 }
1774 
1775 
1776 /***************************************************
1777 * DelBa
1778 ****************************************************/
1779 
1781 
1783  : m_reasonCode (1)
1784 {
1785 }
1786 
1787 TypeId
1789 {
1790  static TypeId tid = TypeId ("ns3::MgtDelBaHeader")
1791  .SetParent<Header> ()
1792  .SetGroupName ("Wifi")
1793  .AddConstructor<MgtDelBaHeader> ()
1794  ;
1795  return tid;
1796 }
1797 
1798 TypeId
1800 {
1801  return GetTypeId ();
1802 }
1803 
1804 void
1805 MgtDelBaHeader::Print (std::ostream &os) const
1806 {
1807 }
1808 
1809 uint32_t
1811 {
1812  uint32_t size = 0;
1813  size += 2; //DelBa parameter set
1814  size += 2; //Reason code
1815  return size;
1816 }
1817 
1818 void
1820 {
1821  Buffer::Iterator i = start;
1824 }
1825 
1826 uint32_t
1828 {
1829  Buffer::Iterator i = start;
1831  m_reasonCode = i.ReadLsbtohU16 ();
1832  return i.GetDistanceFrom (start);
1833 }
1834 
1835 bool
1837 {
1838  return (m_initiator == 1) ? true : false;
1839 }
1840 
1841 uint8_t
1843 {
1844  NS_ASSERT (m_tid < 16);
1845  uint8_t tid = static_cast<uint8_t> (m_tid);
1846  return tid;
1847 }
1848 
1849 void
1851 {
1852  m_initiator = 1;
1853 }
1854 
1855 void
1857 {
1858  m_initiator = 0;
1859 }
1860 
1861 void
1863 {
1864  NS_ASSERT (tid < 16);
1865  m_tid = static_cast<uint16_t> (tid);
1866 }
1867 
1868 uint16_t
1870 {
1871  uint16_t res = 0;
1872  res |= m_initiator << 11;
1873  res |= m_tid << 12;
1874  return res;
1875 }
1876 
1877 void
1879 {
1880  m_initiator = (params >> 11) & 0x01;
1881  m_tid = (params >> 12) & 0x0f;
1882 }
1883 
1884 } //namespace ns3
Protocol header serialization and deserialization.
Definition: header.h:42
void SetSupportedRates(SupportedRates rates)
Set the supported rates.
Definition: mgt-headers.cc:708
static TypeId GetTypeId(void)
Register this type.
uint32_t Deserialize(Buffer::Iterator start)
SupportedRates GetSupportedRates(void) const
Return the supported rates.
Definition: mgt-headers.cc:786
TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Definition: mgt-headers.cc:622
uint16_t GetParameterSet(void) const
Return the raw parameter set.
TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
StatusCode m_code
Status code.
Definition: mgt-headers.h:1229
Buffer::Iterator Serialize(Buffer::Iterator start) const
uint16_t GetTimeout(void) const
Return the timeout.
Buffer::Iterator Serialize(Buffer::Iterator start) const
void SetVhtCapabilities(VhtCapabilities vhtCapabilities)
Set the VHT capabilities.
Definition: mgt-headers.cc:971
void SetVhtCapabilities(VhtCapabilities vhtCapabilities)
Set the VHT capabilities.
Definition: mgt-headers.cc:82
ExtendedCapabilities GetExtendedCapabilities(void) const
Return the extended capabilities.
Definition: mgt-headers.cc:738
Implement the header for management frames of type association request.
Definition: mgt-headers.h:48
uint16_t GetSerializedSize() const
void SetHeCapabilities(HeCapabilities heCapabilities)
Set the HE capabilities.
Definition: mgt-headers.cc:768
DsssParameterSet m_dsssParameterSet
DSSS Parameter Set.
Definition: mgt-headers.h:816
void SetCapabilities(CapabilityInformation capabilities)
Set the Capability information.
Definition: mgt-headers.cc:533
uint8_t m_policy
Block ACK policy.
Definition: mgt-headers.h:1231
Buffer::Iterator Serialize(Buffer::Iterator i) const
Serialize entire IE including Element ID and length fields.
uint16_t GetSerializedSize() const
void Print(std::ostream &os) const
Definition: mgt-headers.cc:410
Ssid m_ssid
Service Set ID (SSID)
Definition: mgt-headers.h:302
Buffer::Iterator Deserialize(Buffer::Iterator start)
Deserialize capability information from the given buffer.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition: object-base.h:45
uint32_t GetSerializedSize(void) const
Definition: mgt-headers.cc:821
SupportedRates m_rates
List of supported rates.
Definition: mgt-headers.h:493
static TypeId GetTypeId(void)
Register this type.
Definition: mgt-headers.cc:611
uint32_t GetSerializedSize(void) const
uint16_t m_timeoutValue
Timeout.
Definition: mgt-headers.h:1112
uint16_t GetSerializedSize() const
CapabilityInformation GetCapabilities(void) const
Return the Capability information.
Definition: mgt-headers.cc:929
See IEEE 802.11 chapter 7.3.1.11 Header format: | category: 1 | action value: 1 |.
Definition: mgt-headers.h:856
SupportedRates GetSupportedRates(void) const
Return the supported rates.
Definition: mgt-headers.cc:106
HtCapabilities m_htCapability
HT capabilities.
Definition: mgt-headers.h:607
SupportedRates m_rates
List of supported rates.
Definition: mgt-headers.h:165
static TypeId GetTypeId(void)
Register this type.
Definition: mgt-headers.cc:126
void SetImmediateBlockAck()
Enable immediate BlockAck.
bool IsAmsduSupported(void) const
Return whether A-MSDU capability is supported.
SupportedRates m_rates
List of supported rates.
Definition: mgt-headers.h:814
static TypeId GetTypeId(void)
Register this type.
Definition: mgt-headers.cc:804
VhtCapabilities m_vhtCapability
VHT capabilities.
Definition: mgt-headers.h:307
uint8_t m_dialogToken
Not used for now.
Definition: mgt-headers.h:1107
void ReadFrom(Buffer::Iterator &i, Ipv4Address &ad)
Read an Ipv4Address from a Buffer.
def start()
Definition: core.py:1855
CapabilityInformation m_capability
Capability information.
Definition: mgt-headers.h:494
CapabilityInformation m_capability
Capability information.
Definition: mgt-headers.h:815
void SetBufferSize(uint16_t size)
Set buffer size.
void SetHeCapabilities(HeCapabilities heCapabilities)
Set the HE capabilities.
Definition: mgt-headers.cc:995
Implement the header for management frames of type Add Block Ack request.
Definition: mgt-headers.h:989
void SetAssociationId(uint16_t aid)
Set the association ID.
HtCapabilities m_htCapability
HT capabilities.
Definition: mgt-headers.h:168
HeCapabilities m_heCapability
HE capabilities.
Definition: mgt-headers.h:609
The Extended Capabilities Information ElementThis class knows how to serialise and deserialise the Ex...
The VHT Operation Information ElementThis class knows how to serialise and deserialise the VHT Operat...
Definition: vht-operation.h:35
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
Definition: assert.h:67
VhtCapabilities m_vhtCapability
VHT capabilities.
Definition: mgt-headers.h:608
void WriteTo(Buffer::Iterator &i, Ipv4Address ad)
Write an Ipv4Address to a Buffer.
uint16_t GetStartingSequenceControl(void) const
Return the raw sequence control.
void SetListenInterval(uint16_t interval)
Set the listen interval.
Definition: mgt-headers.cc:714
The HT Capabilities Information ElementThis class knows how to serialise and deserialise the HT Capab...
uint16_t GetBufferSize(void) const
Return the buffer size.
void SetCapabilities(CapabilityInformation capabilities)
Set the Capability information.
Definition: mgt-headers.cc:220
void SetSsid(Ssid ssid)
Set the Service Set Identifier (SSID).
Definition: mgt-headers.cc:515
void SetSsid(Ssid ssid)
Set the Service Set Identifier (SSID).
Definition: mgt-headers.cc:702
uint32_t GetSerializedSize(void) const
Definition: status-code.cc:48
HeCapabilities GetHeCapabilities(void) const
Return the HE capabilities.
Definition: mgt-headers.cc:774
VhtOperation GetVhtOperation(void) const
Return the VHT operation.
Definition: mgt-headers.cc:989
Buffer::Iterator Serialize(Buffer::Iterator start) const
uint16_t m_startingSeq
Starting sequence number.
Definition: mgt-headers.h:1113
The HT Operation Information ElementThis class knows how to serialise and deserialise the HT Operatio...
Definition: ht-operation.h:50
CategoryValue
CategoryValue enumeration.
Definition: mgt-headers.h:868
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
Definition: fatal-error.h:165
VhtOperation m_vhtOperation
VHT operation.
Definition: mgt-headers.h:821
HtCapabilities GetHtCapabilities(void) const
Return the HT capabilities.
Definition: mgt-headers.cc:76
uint16_t GetBufferSize(void) const
Return the buffer size.
HtOperation GetHtOperation(void) const
Return the HT operation.
Definition: mgt-headers.cc:262
CategoryValue GetCategory()
Return the category value.
HeCapabilities GetHeCapabilities(void) const
Return the HE capabilities.
Definition: mgt-headers.cc:100
void SetDelayedBlockAck()
Enable delayed BlockAck.
ns3::Time timeout
ExtendedCapabilities m_extendedCapability
extended capabilities
Definition: mgt-headers.h:817
Buffer::Iterator Serialize(Buffer::Iterator start) const
void Print(std::ostream &os) const
HeCapabilities m_heCapability
HE capabilities.
Definition: mgt-headers.h:308
CapabilityInformation GetCapabilities(void) const
Return the Capability information.
Definition: mgt-headers.cc:726
void SetStatusCode(StatusCode code)
Set the status code.
The Supported Rates Information ElementThis class knows how to serialise and deserialise the Supporte...
CapabilityInformation m_capability
Capability information.
Definition: mgt-headers.h:166
Buffer::Iterator Serialize(Buffer::Iterator start) const
Buffer::Iterator Serialize(Buffer::Iterator start) const
Serialize capability information to the given buffer.
uint16_t GetTimeout(void) const
Return the timeout.
uint16_t m_bufferSize
Buffer size.
Definition: mgt-headers.h:1111
ErpInformation m_erpInformation
ERP information.
Definition: mgt-headers.h:502
void SetTimeout(uint16_t timeout)
Set timeout.
Buffer::Iterator Deserialize(Buffer::Iterator i)
Deserialize entire IE, which must be present.
ExtendedCapabilities GetExtendedCapabilities(void) const
Return the extended capabilities.
Definition: mgt-headers.cc:551
Capability information.
void SetSupportedRates(SupportedRates rates)
Set the supported rates.
Definition: mgt-headers.cc:52
void SetAmsduSupport(bool supported)
Enable or disable A-MSDU support.
iterator in a Buffer instance
Definition: buffer.h:98
HeOperation GetHeOperation(void) const
Return the HE operation.
void SetSupportedRates(SupportedRates rates)
Set the supported rates.
Definition: mgt-headers.cc:521
uint32_t GetSerializedSize(void) const
Definition: mgt-headers.cc:387
void SetDsssParameterSet(DsssParameterSet dsssParameterSet)
Set the DSSS Parameter Set.
Definition: mgt-headers.cc:334
Mac48Address m_currentApAddr
Address of the current access point.
Definition: mgt-headers.h:301
uint16_t GetParameterSet(void) const
Return the raw parameter set.
TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Definition: mgt-headers.cc:137
TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Buffer::Iterator Serialize(Buffer::Iterator start) const
Definition: status-code.cc:54
uint16_t m_reasonCode
Not used for now.
Definition: mgt-headers.h:1304
uint32_t GetDistanceFrom(Iterator const &o) const
Definition: buffer.cc:783
void Serialize(Buffer::Iterator start) const
void SetTid(uint8_t tid)
Set Traffic ID (TID).
ExtendedSupportedRatesIE extended
extended supported rates info element
uint8_t GetTid(void) const
Return the Traffic ID (TID).
void SetListenInterval(uint16_t interval)
Set the listen interval.
Definition: mgt-headers.cc:527
static TypeId GetTypeId(void)
Register this type.
void SetHeCapabilities(HeCapabilities heCapabilities)
Set the HE capabilities.
Definition: mgt-headers.cc:292
uint8_t m_amsduSupport
Flag if A-MSDU is supported.
Definition: mgt-headers.h:1230
bool IsByOriginator(void) const
Check if the initiator bit in the DELBA is set.
void SetErpInformation(ErpInformation erpInformation)
Set the ERP information.
Definition: mgt-headers.cc:346
EdcaParameterSet GetEdcaParameterSet(void) const
Return the EDCA Parameter Set.
Definition: mgt-headers.cc:364
uint32_t GetSerializedSize() const
uint16_t m_initiator
initiator
Definition: mgt-headers.h:1302
uint16_t GetSerializedSize() const
uint16_t GetSerializedSize() const
bool IsImmediateBlockAck(void) const
Return whether the Block Ack policy is immediate Block Ack.
Buffer::Iterator Serialize(Buffer::Iterator start) const
std::string CategoryValueToString(CategoryValue value) const
Category value to string function.
void SetParameterSet(uint16_t params)
Set the parameter set from the given raw value.
VhtCapabilities GetVhtCapabilities(void) const
Return the VHT capabilities.
Definition: mgt-headers.cc:575
ExtendedCapabilities m_extendedCapability
Extended capabilities.
Definition: mgt-headers.h:167
uint8_t m_tid
Traffic ID.
Definition: mgt-headers.h:1110
ErpInformation GetErpInformation(void) const
Return the ERP information.
Definition: mgt-headers.cc:352
SupportedRates m_rates
List of supported rates.
Definition: mgt-headers.h:605
void SetHtCapabilities(HtCapabilities htCapabilities)
Set the HT capabilities.
Definition: mgt-headers.cc:947
void SetHeOperation(HeOperation heOperation)
Set the HE operation.
Definition: mgt-headers.cc:304
Ssid GetSsid(void) const
Return the Service Set Identifier (SSID).
Definition: mgt-headers.cc:780
The IEEE 802.11ac VHT Capabilities.
void SetStartingSequenceControl(uint16_t seqControl)
Set sequence control with the given raw value.
void SetErpInformation(ErpInformation erpInformation)
Set the ERP information.
void Print(std::ostream &os) const
void SetImmediateBlockAck()
Enable immediate BlockAck.
TypeId GetInstanceTypeId() const
Get the most derived TypeId for this Object.
void SetExtendedCapabilities(ExtendedCapabilities extendedCapabilities)
Set the extended capabilities.
Definition: mgt-headers.cc:58
void SetHeOperation(HeOperation heOperation)
Set the HE operation.
void SetTid(uint8_t tid)
Set Traffic ID (TID).
void SetParameterSet(uint16_t params)
Set the parameter set from the given raw value.
ssid
Definition: third.py:100
SupportedRates GetSupportedRates(void) const
Return the supported rates.
Definition: mgt-headers.cc:214
HeCapabilities m_heCapability
HE capabilities.
Definition: mgt-headers.h:504
SupportedRates GetSupportedRates(void) const
Return the supported rates.
Definition: mgt-headers.cc:599
uint32_t Deserialize(Buffer::Iterator start)
Definition: mgt-headers.cc:167
MeshActionValue meshAction
mesh action
Definition: mgt-headers.h:929
HtOperation GetHtOperation(void) const
Return the HT operation.
Definition: mgt-headers.cc:965
ExtendedCapabilities m_extendedCapability
extended capabilities
Definition: mgt-headers.h:606
void SetVhtCapabilities(VhtCapabilities vhtCapabilities)
Set the VHT capabilities.
Definition: mgt-headers.cc:569
uint8_t m_amsduSupport
Flag if A-MSDU is supported.
Definition: mgt-headers.h:1108
void SetVhtOperation(VhtOperation vhtOperation)
Set the VHT operation.
Definition: mgt-headers.cc:280
Buffer::Iterator DeserializeIfPresent(Buffer::Iterator i)
Deserialize entire IE if it is present.
HeOperation m_heOperation
HE operation.
Definition: mgt-headers.h:505
Buffer::Iterator Serialize(Buffer::Iterator start) const
VhtOperation m_vhtOperation
VHT operation.
Definition: mgt-headers.h:501
void SetStartingSequence(uint16_t seq)
Set the starting sequence number.
uint16_t GetSerializedSize() const
void Serialize(Buffer::Iterator start) const
ExtendedCapabilities GetExtendedCapabilities(void) const
Return the extended capabilities.
Definition: mgt-headers.cc:238
void Serialize(Buffer::Iterator start) const
Definition: mgt-headers.cc:850
VhtCapabilities GetVhtCapabilities(void) const
Return the VHT capabilities.
Definition: mgt-headers.cc:88
void SetVhtCapabilities(VhtCapabilities vhtCapabilities)
Set the VHT capabilities.
Definition: mgt-headers.cc:756
void SetExtendedCapabilities(ExtendedCapabilities extendedCapabilities)
Set the extended capabilities.
Definition: mgt-headers.cc:232
void SetHtOperation(HtOperation htOperation)
Set the HT operation.
Definition: mgt-headers.cc:256
ErpInformation m_erpInformation
ERP information.
Definition: mgt-headers.h:824
void SetEdcaParameterSet(EdcaParameterSet edcaParameterSet)
Set the EDCA Parameter Set.
Definition: mgt-headers.cc:358
uint32_t GetSerializedSize(void) const
uint64_t GetBeaconIntervalUs(void) const
Return the beacon interval in microseconds unit.
Definition: mgt-headers.cc:208
void Serialize(Buffer::Iterator start) const
SupportedRates GetSupportedRates(void)
Return the supported rates.
Definition: mgt-headers.cc:905
DsssParameterSet GetDsssParameterSet(void) const
Return the DSSS Parameter Set.
Definition: mgt-headers.cc:340
EdcaParameterSet GetEdcaParameterSet(void) const
Return the EDCA Parameter Set.
ErpInformation GetErpInformation(void) const
Return the ERP information.
uint64_t m_timestamp
Timestamp.
Definition: mgt-headers.h:811
EdcaParameterSet m_edcaParameterSet
EDCA Parameter Set.
Definition: mgt-headers.h:825
uint16_t m_listenInterval
listen interval
Definition: mgt-headers.h:171
uint64_t GetTimestamp()
Return the time stamp.
Definition: mgt-headers.cc:196
ExtendedCapabilities GetExtendedCapabilities(void) const
Return the extended capabilities.
Definition: mgt-headers.cc:64
void SetByOriginator(void)
Set the initiator bit in the DELBA.
void Print(std::ostream &os) const
Definition: mgt-headers.cc:644
void Print(std::ostream &os) const
Status code for association response.
Definition: status-code.h:31
void SetSsid(Ssid ssid)
Set the Service Set Identifier (SSID).
Definition: mgt-headers.cc:316
HeCapabilities GetHeCapabilities(void) const
Return the HE capabilities.
Definition: mgt-headers.cc:587
void SetByRecipient(void)
Un-set the initiator bit in the DELBA.
static TypeId GetTypeId(void)
Register this type.
uint16_t GetSerializedSize() const
uint16_t GetSerializedSize() const
VhtCapabilities m_vhtCapability
VHT capabilities.
Definition: mgt-headers.h:820
Every class exported by the ns3 library is enclosed in the ns3 namespace.
HtCapabilities GetHtCapabilities(void) const
Return the HT capabilities.
Definition: mgt-headers.cc:250
StatusCode GetStatusCode(void) const
Return the status code.
void SetBeaconIntervalUs(uint64_t us)
Set the beacon interval in microseconds unit.
Definition: mgt-headers.cc:322
The EDCA Parameter SetThis class knows how to serialise and deserialise the EDCA Parameter Set...
void Print(std::ostream &os) const
Definition: mgt-headers.cc:143
static TypeId GetTypeId(void)
Register this type.
Definition: mgt-headers.cc:370
TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Definition: mgt-headers.cc:815
void SetBufferSize(uint16_t size)
Set buffer size.
Buffer::Iterator Deserialize(Buffer::Iterator start)
Definition: status-code.cc:61
CapabilityInformation GetCapabilities(void) const
Return the Capability information.
Definition: mgt-headers.cc:539
uint32_t Deserialize(Buffer::Iterator start)
uint16_t GetSerializedSize() const
Get the size of the serialized IE including Element ID and length fields.
an EUI-48 address
Definition: mac48-address.h:43
Buffer::Iterator Serialize(Buffer::Iterator start) const
VhtCapabilities m_vhtCapability
VHT capabilities.
Definition: mgt-headers.h:169
void SetExtendedCapabilities(ExtendedCapabilities extendedCapabilities)
Set the Extended Capabilities.
Definition: mgt-headers.cc:732
HtCapabilities m_htCapability
HT capabilities.
Definition: mgt-headers.h:818
void SetTid(uint8_t tid)
Set Traffic ID (TID).
uint32_t Deserialize(Buffer::Iterator start)
Definition: mgt-headers.cc:456
static Time Now(void)
Return the current simulation virtual time.
Definition: simulator.cc:195
Ssid GetSsid(void) const
Return the Service Set Identifier (SSID).
Definition: mgt-headers.cc:202
static TypeId GetTypeId(void)
Register this type.
Definition: mgt-headers.cc:488
uint32_t Deserialize(Buffer::Iterator start)
Definition: mgt-headers.cc:866
uint8_t m_tid
Traffic ID.
Definition: mgt-headers.h:1232
uint8_t m_actionValue
Action value.
Definition: mgt-headers.h:981
The IEEE 802.11 SSID Information Element.
Definition: ssid.h:35
void SetVhtCapabilities(VhtCapabilities vhtCapabilities)
Set the VHT capabilities.
Definition: mgt-headers.cc:268
void SetVhtOperation(VhtOperation vhtOperation)
Set the VHT operation.
Definition: mgt-headers.cc:983
uint16_t GetParameterSet(void) const
Return the raw parameter set.
Implement the header for management frames of type probe request.
Definition: mgt-headers.h:513
void SetHtOperation(HtOperation htOperation)
Set the HT operation.
Definition: mgt-headers.cc:959
void SetExtendedCapabilities(ExtendedCapabilities extendedCapabilities)
Set the Extended Capabilities.
Definition: mgt-headers.cc:545
void WriteHtolsbU16(uint16_t data)
Definition: buffer.cc:910
uint32_t GetSerializedSize(void) const
Return the serialized size of capability information.
Implement the header for management frames of type association and reassociation response.
Definition: mgt-headers.h:317
uint8_t GetTid(void) const
Return the Traffic ID (TID).
ExtendedCapabilities GetExtendedCapabilities(void) const
Return the extended capabilities.
Definition: mgt-headers.cc:941
uint32_t Deserialize(Buffer::Iterator start)
StatusCode m_code
Status code.
Definition: mgt-headers.h:495
The DSSS Parameter SetThis class knows how to serialise and deserialise the DSSS Parameter Set...
SelfProtectedActionValue selfProtectedAction
self protected action
Definition: mgt-headers.h:931
ExtendedCapabilities m_extendedCapability
extended capabilities
Definition: mgt-headers.h:497
void SetCapabilities(CapabilityInformation capabilities)
Set the Capability information.
Definition: mgt-headers.cc:923
void SetEdcaParameterSet(EdcaParameterSet edcaParameterSet)
Set the EDCA Parameter Set.
uint16_t m_tid
Traffic ID.
Definition: mgt-headers.h:1303
static TypeId GetTypeId(void)
Register this type.
void WriteU8(uint8_t data)
Definition: buffer.h:869
HtOperation m_htOperation
HT operation.
Definition: mgt-headers.h:819
void SetHtCapabilities(HtCapabilities htCapabilities)
Set the HT capabilities.
Definition: mgt-headers.cc:70
ExtendedCapabilities m_extendedCapability
Extended capabilities.
Definition: mgt-headers.h:305
void SetCurrentApAddress(Mac48Address currentApAddr)
Set the address of the current access point.
Definition: mgt-headers.cc:798
void SetExtendedCapabilities(ExtendedCapabilities extendedCapabilities)
Set the extended capabilities.
Definition: mgt-headers.cc:935
Ssid GetSsid(void) const
Return the Service Set Identifier (SSID).
Definition: mgt-headers.cc:46
void Print(std::ostream &os) const
BlockAckActionValue blockAck
block ack
Definition: mgt-headers.h:932
bool IsAmsduSupported(void) const
Return whether A-MSDU capability is supported.
void WriteHtolsbU64(uint64_t data)
Definition: buffer.cc:926
static TypeId GetTypeId(void)
Register this type.
void SetSupportedRates(SupportedRates rates)
Set the supported rates.
Definition: mgt-headers.cc:917
uint8_t m_dialogToken
Not used for now.
Definition: mgt-headers.h:1228
uint16_t m_listenInterval
listen interval
Definition: mgt-headers.h:309
HeCapabilities GetHeCapabilities(void) const
Return the HE capabilities.
MultihopActionValue multihopAction
multi hop action
Definition: mgt-headers.h:930
Implement the header for management frames of type Add Block Ack response.
Definition: mgt-headers.h:1121
Implement the header for management frames of type Delete Block Ack.
Definition: mgt-headers.h:1242
HeOperation GetHeOperation(void) const
Return the HE operation.
Definition: mgt-headers.cc:310
std::string SelfProtectedActionValueToString(SelfProtectedActionValue value) const
Self protected action value to string function.
VhtCapabilities GetVhtCapabilities(void) const
Return the VHT capabilities.
Definition: mgt-headers.cc:762
HtCapabilities GetHtCapabilities(void) const
Return the HT capabilities.
Definition: mgt-headers.cc:953
typedef for union of different ActionValues
Definition: mgt-headers.h:927
EdcaParameterSet m_edcaParameterSet
EDCA Parameter Set.
Definition: mgt-headers.h:503
TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
HeCapabilities m_heCapability
HE capabilities.
Definition: mgt-headers.h:822
void Serialize(Buffer::Iterator start) const
Definition: mgt-headers.cc:154
uint16_t GetSerializedSize() const
HtCapabilities m_htCapability
HT capabilities.
Definition: mgt-headers.h:306
uint8_t ReadU8(void)
Definition: buffer.h:1021
VhtOperation GetVhtOperation(void) const
Return the VHT operation.
Definition: mgt-headers.cc:286
VhtCapabilities GetVhtCapabilities(void) const
Return the VHT capabilities.
Definition: mgt-headers.cc:977
void Serialize(Buffer::Iterator start) const
Definition: mgt-headers.cc:655
uint8_t m_policy
Block Ack policy.
Definition: mgt-headers.h:1109
HtCapabilities m_htCapability
HT capabilities.
Definition: mgt-headers.h:498
void SetSupportedRates(SupportedRates rates)
Set the supported rates.
Definition: mgt-headers.cc:328
Ssid m_ssid
Service Set ID (SSID)
Definition: mgt-headers.h:604
void SetHeCapabilities(HeCapabilities heCapabilities)
Set the HE capabilities.
Definition: mgt-headers.cc:581
TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
uint16_t GetStartingSequence(void) const
Return the starting sequence number.
void Serialize(Buffer::Iterator start) const
void SetHeCapabilities(HeCapabilities heCapabilities)
Set the HE capabilities.
Definition: mgt-headers.cc:94
Buffer::Iterator Serialize(Buffer::Iterator start) const
uint16_t ReadLsbtohU16(void)
Definition: buffer.cc:1065
The ErpInformation Information ElementThis class knows how to serialise and deserialise the ErpInform...
void SetSsid(Ssid ssid)
Set the Service Set Identifier (SSID).
Definition: mgt-headers.cc:40
void SetHtCapabilities(HtCapabilities htCapabilities)
Set the HT capabilities.
Definition: mgt-headers.cc:557
void SetStatusCode(StatusCode code)
Set the status code.
Definition: mgt-headers.cc:911
void Print(std::ostream &os) const
Definition: mgt-headers.cc:838
void SetHtCapabilities(HtCapabilities htCapabilities)
Set the HT capabilities.
Definition: mgt-headers.cc:244
CapabilityInformation GetCapabilities(void) const
Return the Capability information.
Definition: mgt-headers.cc:226
void SetParameterSet(uint16_t params)
Set the parameter set from the given raw value.
uint32_t GetSerializedSize(void) const
Definition: mgt-headers.cc:112
void SetAmsduSupport(bool supported)
Enable or disable A-MSDU support.
uint8_t GetTid(void) const
Return the Traffic ID (TID).
HtOperation m_htOperation
HT operation.
Definition: mgt-headers.h:499
HtCapabilities GetHtCapabilities(void) const
Return the HT capabilities.
Definition: mgt-headers.cc:563
void SetCapabilities(CapabilityInformation capabilities)
Set the Capability information.
Definition: mgt-headers.cc:720
uint8_t m_category
Category of the action.
Definition: mgt-headers.h:980
void SetDelayedBlockAck()
Enable delayed BlockAck.
uint32_t Deserialize(Buffer::Iterator start)
Definition: mgt-headers.cc:670
void SetTimeout(uint16_t timeout)
Set timeout.
The HE Operation Information ElementThis class knows how to serialise and deserialise the HE Operatio...
Definition: he-operation.h:35
Buffer::Iterator Serialize(Buffer::Iterator start) const
void Serialize(Buffer::Iterator start) const
Definition: mgt-headers.cc:425
Implement the header for management frames of type probe response.
Definition: mgt-headers.h:617
uint64_t ReadLsbtohU64(void)
Definition: buffer.cc:1093
VhtCapabilities m_vhtCapability
VHT capabilities.
Definition: mgt-headers.h:500
ActionValue GetAction()
Return the action value.
SelfProtectedActionValue
SelfProtectedActionValue enumeration.
Definition: mgt-headers.h:880
SupportedRates m_rates
List of supported rates.
Definition: mgt-headers.h:303
uint16_t m_bufferSize
Buffer size.
Definition: mgt-headers.h:1233
uint64_t m_beaconInterval
Beacon interval.
Definition: mgt-headers.h:813
The IEEE 802.11ax HE Capabilities.
uint16_t GetListenInterval(void) const
Return the listen interval.
Definition: mgt-headers.cc:792
HeCapabilities m_heCapability
HE capabilities.
Definition: mgt-headers.h:170
uint32_t GetSerializedSize(void) const
Definition: mgt-headers.cc:628
uint16_t m_timeoutValue
Timeout.
Definition: mgt-headers.h:1234
Buffer::Iterator Serialize(Buffer::Iterator start) const
Ssid m_ssid
Service Set ID (SSID)
Definition: mgt-headers.h:164
void SetAction(CategoryValue type, ActionValue action)
Set action for this Action header.
a unique identifier for an interface.
Definition: type-id.h:58
bool IsImmediateBlockAck(void) const
Return whether the Block Ack policy is immediate Block Ack.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition: type-id.cc:923
uint32_t GetSerializedSize(void) const
void Serialize(Buffer::Iterator start) const
Implement the header for management frames of type beacon.
Definition: mgt-headers.h:833
Ssid GetSsid(void) const
Return the Service Set Identifier (SSID).
Definition: mgt-headers.cc:593
TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Definition: mgt-headers.cc:381
Implement the header for management frames of type reassociation request.
Definition: mgt-headers.h:179
void Print(std::ostream &os) const
uint32_t Deserialize(Buffer::Iterator start)
StatusCode GetStatusCode(void)
Return the status code.
Definition: mgt-headers.cc:899
CapabilityInformation m_capability
Capability information.
Definition: mgt-headers.h:304
HtCapabilities GetHtCapabilities(void) const
Return the HT capabilities.
Definition: mgt-headers.cc:750
VhtCapabilities GetVhtCapabilities(void) const
Return the VHT capabilities.
Definition: mgt-headers.cc:274
Ssid m_ssid
Service set ID (SSID)
Definition: mgt-headers.h:812
void SetHtCapabilities(HtCapabilities htCapabilities)
Set the HT capabilities.
Definition: mgt-headers.cc:744
HeOperation m_heOperation
HE operation.
Definition: mgt-headers.h:823
uint32_t Deserialize(Buffer::Iterator start)
uint16_t GetAssociationId(void) const
Return the association ID.
HeCapabilities GetHeCapabilities(void) const
Return the HE capabilities.
Definition: mgt-headers.cc:298
uint16_t GetListenInterval(void) const
Return the listen interval.
Definition: mgt-headers.cc:605
uint32_t GetSerializedSize(void) const