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_cfParameterSet = cfParameterSet;
319 }
320 
323 {
324  return m_cfParameterSet;
325 }
326 
327 void
329 {
330  m_ssid = ssid;
331 }
332 
333 void
335 {
336  m_beaconInterval = us;
337 }
338 
339 void
341 {
342  m_rates = rates;
343 }
344 
345 void
347 {
348  m_dsssParameterSet = dsssParameterSet;
349 }
350 
353 {
354  return m_dsssParameterSet;
355 }
356 
357 void
359 {
360  m_erpInformation = erpInformation;
361 }
362 
365 {
366  return m_erpInformation;
367 }
368 
369 void
371 {
372  m_edcaParameterSet = edcaParameters;
373 }
374 
377 {
378  return m_edcaParameterSet;
379 }
380 
381 TypeId
383 {
384  static TypeId tid = TypeId ("ns3::MgtProbeResponseHeader")
385  .SetParent<Header> ()
386  .SetGroupName ("Wifi")
387  .AddConstructor<MgtProbeResponseHeader> ()
388  ;
389  return tid;
390 }
391 
392 TypeId
394 {
395  return GetTypeId ();
396 }
397 
398 uint32_t
400 {
401  uint32_t size = 0;
402  size += 8; //timestamp
403  size += 2; //beacon interval
404  size += m_capability.GetSerializedSize ();
405  size += m_ssid.GetSerializedSize ();
406  size += m_rates.GetSerializedSize ();
414  size += m_htOperation.GetSerializedSize ();
418  size += m_heOperation.GetSerializedSize ();
419  return size;
420 }
421 
422 void
423 MgtProbeResponseHeader::Print (std::ostream &os) const
424 {
425  os << "ssid=" << m_ssid << ", "
426  << "rates=" << m_rates << ", "
427  << "ERP information=" << m_erpInformation << ", "
428  << "Extended Capabilities=" << m_extendedCapability << " , "
429  << "HT Capabilities=" << m_htCapability << " , "
430  << "HT Operation=" << m_htOperation << " , "
431  << "VHT Capabilities=" << m_vhtCapability << " , "
432  << "VHT Operation=" << m_vhtOperation << " , "
433  << "HE Capabilities=" << m_heCapability << " , "
434  << "HE Operation=" << m_heOperation;
435 }
436 
437 void
439 {
440  //timestamp
441  //beacon interval
442  //capability information
443  //SSID
444  //supported rates
445  //FH parameter set
446  //DS parameter set
447  //CF parameter set
448  //IBSS parameter set
450  i.WriteHtolsbU64 (Simulator::Now ().GetMicroSeconds ());
451  i.WriteHtolsbU16 (static_cast<uint16_t> (m_beaconInterval / 1024));
452  i = m_capability.Serialize (i);
453  i = m_ssid.Serialize (i);
454  i = m_rates.Serialize (i);
455  i = m_cfParameterSet.Serialize (i);
457  i = m_erpInformation.Serialize (i);
458  i = m_rates.extended.Serialize (i);
461  i = m_htCapability.Serialize (i);
462  i = m_htOperation.Serialize (i);
463  i = m_vhtCapability.Serialize (i);
464  i = m_vhtOperation.Serialize (i);
465  i = m_heCapability.Serialize (i);
466  i = m_heOperation.Serialize (i);
467 }
468 
469 uint32_t
471 {
473  m_timestamp = i.ReadLsbtohU64 ();
475  m_beaconInterval *= 1024;
476  i = m_capability.Deserialize (i);
477  i = m_ssid.Deserialize (i);
478  i = m_rates.Deserialize (i);
491  return i.GetDistanceFrom (start);
492 }
493 
494 
495 /***********************************************************
496  * Beacons
497  ***********************************************************/
498 
500 
501 /* static */
502 TypeId
504 {
505  static TypeId tid = TypeId ("ns3::MgtBeaconHeader")
507  .SetGroupName ("Wifi")
508  .AddConstructor<MgtBeaconHeader> ()
509  ;
510  return tid;
511 }
512 
513 
514 /***********************************************************
515  * Assoc Request
516  ***********************************************************/
517 
519 
521  : m_listenInterval (0)
522 {
523 }
524 
526 {
527 }
528 
529 void
531 {
532  m_ssid = ssid;
533 }
534 
535 void
537 {
538  m_rates = rates;
539 }
540 
541 void
543 {
544  m_listenInterval = interval;
545 }
546 
547 void
549 {
550  m_capability = capabilities;
551 }
552 
555 {
556  return m_capability;
557 }
558 
559 void
561 {
562  m_extendedCapability = extendedCapabilities;
563 }
564 
567 {
568  return m_extendedCapability;
569 }
570 
571 void
573 {
574  m_htCapability = htCapabilities;
575 }
576 
579 {
580  return m_htCapability;
581 }
582 
583 void
585 {
586  m_vhtCapability = vhtCapabilities;
587 }
588 
591 {
592  return m_vhtCapability;
593 }
594 
595 void
597 {
598  m_heCapability = heCapabilities;
599 }
600 
603 {
604  return m_heCapability;
605 }
606 
607 Ssid
609 {
610  return m_ssid;
611 }
612 
615 {
616  return m_rates;
617 }
618 
619 uint16_t
621 {
622  return m_listenInterval;
623 }
624 
625 TypeId
627 {
628  static TypeId tid = TypeId ("ns3::MgtAssocRequestHeader")
629  .SetParent<Header> ()
630  .SetGroupName ("Wifi")
631  .AddConstructor<MgtAssocRequestHeader> ()
632  ;
633  return tid;
634 }
635 
636 TypeId
638 {
639  return GetTypeId ();
640 }
641 
642 uint32_t
644 {
645  uint32_t size = 0;
646  size += m_capability.GetSerializedSize ();
647  size += 2;
648  size += m_ssid.GetSerializedSize ();
649  size += m_rates.GetSerializedSize ();
655  return size;
656 }
657 
658 void
659 MgtAssocRequestHeader::Print (std::ostream &os) const
660 {
661  os << "ssid=" << m_ssid << ", "
662  << "rates=" << m_rates << ", "
663  << "Extended Capabilities=" << m_extendedCapability << " , "
664  << "HT Capabilities=" << m_htCapability << " , "
665  << "VHT Capabilities=" << m_vhtCapability << " , "
666  << "HE Capabilities=" << m_heCapability;
667 }
668 
669 void
671 {
673  i = m_capability.Serialize (i);
675  i = m_ssid.Serialize (i);
676  i = m_rates.Serialize (i);
677  i = m_rates.extended.Serialize (i);
679  i = m_htCapability.Serialize (i);
680  i = m_vhtCapability.Serialize (i);
681  i = m_heCapability.Serialize (i);
682 }
683 
684 uint32_t
686 {
688  i = m_capability.Deserialize (i);
690  i = m_ssid.Deserialize (i);
691  i = m_rates.Deserialize (i);
697  return i.GetDistanceFrom (start);
698 }
699 
700 
701 /***********************************************************
702  * Ressoc Request
703  ***********************************************************/
704 
706 
708  : m_currentApAddr (Mac48Address ())
709 {
710 }
711 
713 {
714 }
715 
716 void
718 {
719  m_ssid = ssid;
720 }
721 
722 void
724 {
725  m_rates = rates;
726 }
727 
728 void
730 {
731  m_listenInterval = interval;
732 }
733 
734 void
736 {
737  m_capability = capabilities;
738 }
739 
742 {
743  return m_capability;
744 }
745 
746 void
748 {
749  m_extendedCapability = extendedCapabilities;
750 }
751 
754 {
755  return m_extendedCapability;
756 }
757 
758 void
760 {
761  m_htCapability = htCapabilities;
762 }
763 
766 {
767  return m_htCapability;
768 }
769 
770 void
772 {
773  m_vhtCapability = vhtCapabilities;
774 }
775 
778 {
779  return m_vhtCapability;
780 }
781 
782 void
784 {
785  m_heCapability = heCapabilities;
786 }
787 
790 {
791  return m_heCapability;
792 }
793 
794 Ssid
796 {
797  return m_ssid;
798 }
799 
802 {
803  return m_rates;
804 }
805 
806 uint16_t
808 {
809  return m_listenInterval;
810 }
811 
812 void
814 {
815  m_currentApAddr = currentApAddr;
816 }
817 
818 TypeId
820 {
821  static TypeId tid = TypeId ("ns3::MgtReassocRequestHeader")
822  .SetParent<Header> ()
823  .SetGroupName ("Wifi")
824  .AddConstructor<MgtReassocRequestHeader> ()
825  ;
826  return tid;
827 }
828 
829 TypeId
831 {
832  return GetTypeId ();
833 }
834 
835 uint32_t
837 {
838  uint32_t size = 0;
839  size += m_capability.GetSerializedSize ();
840  size += 2; //listen interval
841  size += 6; //current AP address
842  size += m_ssid.GetSerializedSize ();
843  size += m_rates.GetSerializedSize ();
849  return size;
850 }
851 
852 void
853 MgtReassocRequestHeader::Print (std::ostream &os) const
854 {
855  os << "current AP address=" << m_currentApAddr << ", "
856  << "ssid=" << m_ssid << ", "
857  << "rates=" << m_rates << ", "
858  << "Extended Capabilities=" << m_extendedCapability << " , "
859  << "HT Capabilities=" << m_htCapability << " , "
860  << "VHT Capabilities=" << m_vhtCapability << " , "
861  << "HE Capabilities=" << m_heCapability;
862 }
863 
864 void
866 {
868  i = m_capability.Serialize (i);
871  i = m_ssid.Serialize (i);
872  i = m_rates.Serialize (i);
873  i = m_rates.extended.Serialize (i);
875  i = m_htCapability.Serialize (i);
876  i = m_vhtCapability.Serialize (i);
877  i = m_heCapability.Serialize (i);
878 }
879 
880 uint32_t
882 {
884  i = m_capability.Deserialize (i);
887  i = m_ssid.Deserialize (i);
888  i = m_rates.Deserialize (i);
894  return i.GetDistanceFrom (start);
895 }
896 
897 
898 /***********************************************************
899  * Assoc/Reassoc Response
900  ***********************************************************/
901 
903 
905  : m_aid (0)
906 {
907 }
908 
910 {
911 }
912 
915 {
916  return m_code;
917 }
918 
921 {
922  return m_rates;
923 }
924 
925 void
927 {
928  m_code = code;
929 }
930 
931 void
933 {
934  m_rates = rates;
935 }
936 
937 void
939 {
940  m_capability = capabilities;
941 }
942 
945 {
946  return m_capability;
947 }
948 
949 void
951 {
952  m_extendedCapability = extendedCapabilities;
953 }
954 
957 {
958  return m_extendedCapability;
959 }
960 
961 void
963 {
964  m_htCapability = htCapabilities;
965 }
966 
969 {
970  return m_htCapability;
971 }
972 
973 void
975 {
976  m_htOperation = htOperation;
977 }
978 
981 {
982  return m_htOperation;
983 }
984 
985 void
987 {
988  m_vhtCapability = vhtCapabilities;
989 }
990 
993 {
994  return m_vhtCapability;
995 }
996 
997 void
999 {
1000  m_vhtOperation = vhtOperation;
1001 }
1002 
1005 {
1006  return m_vhtOperation;
1007 }
1008 
1009 void
1011 {
1012  m_heCapability = heCapabilities;
1013 }
1014 
1017 {
1018  return m_heCapability;
1019 }
1020 
1021 void
1023 {
1024  m_heOperation = heOperation;
1025 }
1026 
1029 {
1030  return m_heOperation;
1031 }
1032 
1033 void
1035 {
1036  m_aid = aid;
1037 }
1038 
1039 uint16_t
1041 {
1042  return m_aid;
1043 }
1044 
1045 void
1047 {
1048  m_erpInformation = erpInformation;
1049 }
1050 
1053 {
1054  return m_erpInformation;
1055 }
1056 
1057 void
1059 {
1060  m_edcaParameterSet = edcaparameters;
1061 }
1062 
1065 {
1066  return m_edcaParameterSet;
1067 }
1068 
1069 TypeId
1071 {
1072  static TypeId tid = TypeId ("ns3::MgtAssocResponseHeader")
1073  .SetParent<Header> ()
1074  .SetGroupName ("Wifi")
1075  .AddConstructor<MgtAssocResponseHeader> ()
1076  ;
1077  return tid;
1078 }
1079 
1080 TypeId
1082 {
1083  return GetTypeId ();
1084 }
1085 
1086 uint32_t
1088 {
1089  uint32_t size = 0;
1090  size += m_capability.GetSerializedSize ();
1091  size += m_code.GetSerializedSize ();
1092  size += 2; //aid
1093  size += m_rates.GetSerializedSize ();
1095  size += m_rates.extended.GetSerializedSize ();
1098  size += m_htCapability.GetSerializedSize ();
1099  size += m_htOperation.GetSerializedSize ();
1101  size += m_vhtOperation.GetSerializedSize ();
1102  size += m_heCapability.GetSerializedSize ();
1103  size += m_heOperation.GetSerializedSize ();
1104  return size;
1105 }
1106 
1107 void
1108 MgtAssocResponseHeader::Print (std::ostream &os) const
1109 {
1110  os << "status code=" << m_code << ", "
1111  << "aid=" << m_aid << ", "
1112  << "rates=" << m_rates << ", "
1113  << "ERP information=" << m_erpInformation << ", "
1114  << "Extended Capabilities=" << m_extendedCapability << " , "
1115  << "HT Capabilities=" << m_htCapability << " , "
1116  << "HT Operation=" << m_htOperation << " , "
1117  << "VHT Capabilities=" << m_vhtCapability << " , "
1118  << "VHT Operation=" << m_vhtOperation << " , "
1119  << "HE Capabilities=" << m_heCapability << " , "
1120  << "HE Operation=" << m_heOperation;
1121 }
1122 
1123 void
1125 {
1126  Buffer::Iterator i = start;
1127  i = m_capability.Serialize (i);
1128  i = m_code.Serialize (i);
1129  i.WriteHtolsbU16 (m_aid);
1130  i = m_rates.Serialize (i);
1131  i = m_erpInformation.Serialize (i);
1132  i = m_rates.extended.Serialize (i);
1133  i = m_edcaParameterSet.Serialize (i);
1135  i = m_htCapability.Serialize (i);
1136  i = m_htOperation.Serialize (i);
1137  i = m_vhtCapability.Serialize (i);
1138  i = m_vhtOperation.Serialize (i);
1139  i = m_heCapability.Serialize (i);
1140  i = m_heOperation.Serialize (i);
1141 }
1142 
1143 uint32_t
1145 {
1146  Buffer::Iterator i = start;
1147  i = m_capability.Deserialize (i);
1148  i = m_code.Deserialize (i);
1149  m_aid = i.ReadLsbtohU16 ();
1150  i = m_rates.Deserialize (i);
1161  return i.GetDistanceFrom (start);
1162 }
1163 
1164 
1165 /**********************************************************
1166  * ActionFrame
1167  **********************************************************/
1169 {
1170 }
1171 
1173 {
1174 }
1175 
1176 void
1179 {
1180  m_category = static_cast<uint8_t> (type);
1181  switch (type)
1182  {
1183  case BLOCK_ACK:
1184  {
1185  m_actionValue = static_cast<uint8_t> (action.blockAck);
1186  break;
1187  }
1188  case MESH:
1189  {
1190  m_actionValue = static_cast<uint8_t> (action.meshAction);
1191  break;
1192  }
1193  case MULTIHOP:
1194  {
1195  m_actionValue = static_cast<uint8_t> (action.multihopAction);
1196  break;
1197  }
1198  case SELF_PROTECTED:
1199  {
1200  m_actionValue = static_cast<uint8_t> (action.selfProtectedAction);
1201  break;
1202  }
1204  {
1205  break;
1206  }
1207  }
1208 }
1209 
1212 {
1213  switch (m_category)
1214  {
1215  case BLOCK_ACK:
1216  return BLOCK_ACK;
1217  case MESH:
1218  return MESH;
1219  case MULTIHOP:
1220  return MULTIHOP;
1221  case SELF_PROTECTED:
1222  return SELF_PROTECTED;
1224  return VENDOR_SPECIFIC_ACTION;
1225  default:
1226  NS_FATAL_ERROR ("Unknown action value");
1227  return SELF_PROTECTED;
1228  }
1229 }
1230 
1233 {
1234  ActionValue retval;
1235  retval.selfProtectedAction = PEER_LINK_OPEN; //Needs to be initialized to something to quiet valgrind in default cases
1236  switch (m_category)
1237  {
1238  case BLOCK_ACK:
1239  switch (m_actionValue)
1240  {
1243  break;
1246  break;
1247  case BLOCK_ACK_DELBA:
1248  retval.blockAck = BLOCK_ACK_DELBA;
1249  break;
1250  }
1251  break;
1252 
1253  case SELF_PROTECTED:
1254  switch (m_actionValue)
1255  {
1256  case PEER_LINK_OPEN:
1258  break;
1259  case PEER_LINK_CONFIRM:
1261  break;
1262  case PEER_LINK_CLOSE:
1264  break;
1265  case GROUP_KEY_INFORM:
1267  break;
1268  case GROUP_KEY_ACK:
1270  break;
1271  default:
1272  NS_FATAL_ERROR ("Unknown mesh peering management action code");
1273  retval.selfProtectedAction = PEER_LINK_OPEN; /* quiet compiler */
1274  }
1275  break;
1276 
1277  case MESH:
1278  switch (m_actionValue)
1279  {
1280  case LINK_METRIC_REPORT:
1281  retval.meshAction = LINK_METRIC_REPORT;
1282  break;
1283  case PATH_SELECTION:
1284  retval.meshAction = PATH_SELECTION;
1285  break;
1286  case PORTAL_ANNOUNCEMENT:
1288  break;
1291  break;
1292  case MDA_SETUP_REQUEST:
1293  retval.meshAction = MDA_SETUP_REQUEST;
1294  break;
1295  case MDA_SETUP_REPLY:
1296  retval.meshAction = MDA_SETUP_REPLY;
1297  break;
1300  break;
1301  case MDAOP_ADVERTISMENTS:
1303  break;
1304  case MDAOP_SET_TEARDOWN:
1305  retval.meshAction = MDAOP_SET_TEARDOWN;
1306  break;
1309  break;
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 
1319  case MULTIHOP: //not yet supported
1320  switch (m_actionValue)
1321  {
1322  case PROXY_UPDATE: //not used so far
1323  retval.multihopAction = PROXY_UPDATE;
1324  break;
1325  case PROXY_UPDATE_CONFIRMATION: //not used so far
1326  retval.multihopAction = PROXY_UPDATE;
1327  break;
1328  default:
1329  NS_FATAL_ERROR ("Unknown mesh peering management action code");
1330  retval.selfProtectedAction = PEER_LINK_OPEN; /* quiet compiler */
1331  }
1332  break;
1333  default:
1334  NS_FATAL_ERROR ("Unsupported mesh action");
1335  retval.selfProtectedAction = PEER_LINK_OPEN; /* quiet compiler */
1336  }
1337  return retval;
1338 }
1339 
1340 TypeId
1342 {
1343  static TypeId tid = TypeId ("ns3::WifiActionHeader")
1344  .SetParent<Header> ()
1345  .SetGroupName ("Wifi")
1346  .AddConstructor<WifiActionHeader> ()
1347  ;
1348  return tid;
1349 }
1350 
1351 TypeId
1353 {
1354  return GetTypeId ();
1355 }
1356 
1357 std::string
1359 {
1360  if (value == BLOCK_ACK)
1361  {
1362  return "BlockAck";
1363  }
1364  else if (value == MESH)
1365  {
1366  return "Mesh";
1367  }
1368  else if (value == SELF_PROTECTED)
1369  {
1370  return "SelfProtected";
1371  }
1372  else if (value == VENDOR_SPECIFIC_ACTION)
1373  {
1374  return "VendorSpecificAction";
1375  }
1376  else
1377  {
1378  std::ostringstream convert;
1379  convert << value;
1380  return convert.str ();
1381  }
1382 }
1383 std::string
1385 {
1386  if (value == PEER_LINK_OPEN)
1387  {
1388  return "PeerLinkOpen";
1389  }
1390  else if (value == PEER_LINK_CONFIRM)
1391  {
1392  return "PeerLinkConfirm";
1393  }
1394  else if (value == PEER_LINK_CLOSE)
1395  {
1396  return "PeerLinkClose";
1397  }
1398  else if (value == GROUP_KEY_INFORM)
1399  {
1400  return "GroupKeyInform";
1401  }
1402  else if (value == GROUP_KEY_ACK)
1403  {
1404  return "GroupKeyAck";
1405  }
1406  else
1407  {
1408  std::ostringstream convert;
1409  convert << value;
1410  return convert.str ();
1411  }
1412 }
1413 
1414 void
1415 WifiActionHeader::Print (std::ostream &os) const
1416 {
1417  os << "category=" << CategoryValueToString ((CategoryValue) m_category)
1419 }
1420 
1421 uint32_t
1423 {
1424  return 2;
1425 }
1426 
1427 void
1429 {
1430  start.WriteU8 (m_category);
1431  start.WriteU8 (m_actionValue);
1432 }
1433 
1434 uint32_t
1436 {
1437  Buffer::Iterator i = start;
1438  m_category = i.ReadU8 ();
1439  m_actionValue = i.ReadU8 ();
1440  return i.GetDistanceFrom (start);
1441 }
1442 
1443 
1444 /***************************************************
1445 * ADDBARequest
1446 ****************************************************/
1447 
1449 
1451  : m_dialogToken (1),
1452  m_amsduSupport (1),
1453  m_bufferSize (0)
1454 {
1455 }
1456 
1457 TypeId
1459 {
1460  static TypeId tid = TypeId ("ns3::MgtAddBaRequestHeader")
1461  .SetParent<Header> ()
1462  .SetGroupName ("Wifi")
1463  .AddConstructor<MgtAddBaRequestHeader> ()
1464  ;
1465  return tid;
1466 }
1467 
1468 TypeId
1470 {
1471  return GetTypeId ();
1472 }
1473 
1474 void
1475 MgtAddBaRequestHeader::Print (std::ostream &os) const
1476 {
1477 }
1478 
1479 uint32_t
1481 {
1482  uint32_t size = 0;
1483  size += 1; //Dialog token
1484  size += 2; //Block ack parameter set
1485  size += 2; //Block ack timeout value
1486  size += 2; //Starting sequence control
1487  return size;
1488 }
1489 
1490 void
1492 {
1493  Buffer::Iterator i = start;
1494  i.WriteU8 (m_dialogToken);
1498 }
1499 
1500 uint32_t
1502 {
1503  Buffer::Iterator i = start;
1504  m_dialogToken = i.ReadU8 ();
1508  return i.GetDistanceFrom (start);
1509 }
1510 
1511 void
1513 {
1514  m_policy = 0;
1515 }
1516 
1517 void
1519 {
1520  m_policy = 1;
1521 }
1522 
1523 void
1525 {
1526  NS_ASSERT (tid < 16);
1527  m_tid = tid;
1528 }
1529 
1530 void
1532 {
1534 }
1535 
1536 void
1538 {
1539  m_bufferSize = size;
1540 }
1541 
1542 void
1544 {
1545  m_startingSeq = seq;
1546 }
1547 
1548 void
1550 {
1551  m_startingSeq = (seqControl >> 4) & 0x0fff;
1552 }
1553 
1554 void
1556 {
1557  m_amsduSupport = supported;
1558 }
1559 
1560 uint8_t
1562 {
1563  return m_tid;
1564 }
1565 
1566 bool
1568 {
1569  return (m_policy == 1) ? true : false;
1570 }
1571 
1572 uint16_t
1574 {
1575  return m_timeoutValue;
1576 }
1577 
1578 uint16_t
1580 {
1581  return m_bufferSize;
1582 }
1583 
1584 bool
1586 {
1587  return (m_amsduSupport == 1) ? true : false;
1588 }
1589 
1590 uint16_t
1592 {
1593  return m_startingSeq;
1594 }
1595 
1596 uint16_t
1598 {
1599  return (m_startingSeq << 4) & 0xfff0;
1600 }
1601 
1602 uint16_t
1604 {
1605  uint16_t res = 0;
1606  res |= m_amsduSupport;
1607  res |= m_policy << 1;
1608  res |= m_tid << 2;
1609  res |= m_bufferSize << 6;
1610  return res;
1611 }
1612 
1613 void
1615 {
1616  m_amsduSupport = (params) & 0x01;
1617  m_policy = (params >> 1) & 0x01;
1618  m_tid = (params >> 2) & 0x0f;
1619  m_bufferSize = (params >> 6) & 0x03ff;
1620 }
1621 
1622 
1623 /***************************************************
1624 * ADDBAResponse
1625 ****************************************************/
1626 
1628 
1630  : m_dialogToken (1),
1631  m_amsduSupport (1),
1632  m_bufferSize (0)
1633 {
1634 }
1635 
1636 TypeId
1638 {
1639  static TypeId tid = TypeId ("ns3::MgtAddBaResponseHeader")
1640  .SetParent<Header> ()
1641  .SetGroupName ("Wifi")
1642  .AddConstructor<MgtAddBaResponseHeader> ()
1643  ;
1644  return tid;
1645 }
1646 
1647 TypeId
1649 {
1650  return GetTypeId ();
1651 }
1652 
1653 void
1654 MgtAddBaResponseHeader::Print (std::ostream &os) const
1655 {
1656  os << "status code=" << m_code;
1657 }
1658 
1659 uint32_t
1661 {
1662  uint32_t size = 0;
1663  size += 1; //Dialog token
1664  size += m_code.GetSerializedSize (); //Status code
1665  size += 2; //Block ack parameter set
1666  size += 2; //Block ack timeout value
1667  return size;
1668 }
1669 
1670 void
1672 {
1673  Buffer::Iterator i = start;
1674  i.WriteU8 (m_dialogToken);
1675  i = m_code.Serialize (i);
1678 }
1679 
1680 uint32_t
1682 {
1683  Buffer::Iterator i = start;
1684  m_dialogToken = i.ReadU8 ();
1685  i = m_code.Deserialize (i);
1688  return i.GetDistanceFrom (start);
1689 }
1690 
1691 void
1693 {
1694  m_policy = 0;
1695 }
1696 
1697 void
1699 {
1700  m_policy = 1;
1701 }
1702 
1703 void
1705 {
1706  NS_ASSERT (tid < 16);
1707  m_tid = tid;
1708 }
1709 
1710 void
1712 {
1714 }
1715 
1716 void
1718 {
1719  m_bufferSize = size;
1720 }
1721 
1722 void
1724 {
1725  m_code = code;
1726 }
1727 
1728 void
1730 {
1731  m_amsduSupport = supported;
1732 }
1733 
1734 StatusCode
1736 {
1737  return m_code;
1738 }
1739 
1740 uint8_t
1742 {
1743  return m_tid;
1744 }
1745 
1746 bool
1748 {
1749  return (m_policy == 1) ? true : false;
1750 }
1751 
1752 uint16_t
1754 {
1755  return m_timeoutValue;
1756 }
1757 
1758 uint16_t
1760 {
1761  return m_bufferSize;
1762 }
1763 
1764 bool
1766 {
1767  return (m_amsduSupport == 1) ? true : false;
1768 }
1769 
1770 uint16_t
1772 {
1773  uint16_t res = 0;
1774  res |= m_amsduSupport;
1775  res |= m_policy << 1;
1776  res |= m_tid << 2;
1777  res |= m_bufferSize << 6;
1778  return res;
1779 }
1780 
1781 void
1783 {
1784  m_amsduSupport = (params) & 0x01;
1785  m_policy = (params >> 1) & 0x01;
1786  m_tid = (params >> 2) & 0x0f;
1787  m_bufferSize = (params >> 6) & 0x03ff;
1788 }
1789 
1790 
1791 /***************************************************
1792 * DelBa
1793 ****************************************************/
1794 
1796 
1798  : m_reasonCode (1)
1799 {
1800 }
1801 
1802 TypeId
1804 {
1805  static TypeId tid = TypeId ("ns3::MgtDelBaHeader")
1806  .SetParent<Header> ()
1807  .SetGroupName ("Wifi")
1808  .AddConstructor<MgtDelBaHeader> ()
1809  ;
1810  return tid;
1811 }
1812 
1813 TypeId
1815 {
1816  return GetTypeId ();
1817 }
1818 
1819 void
1820 MgtDelBaHeader::Print (std::ostream &os) const
1821 {
1822 }
1823 
1824 uint32_t
1826 {
1827  uint32_t size = 0;
1828  size += 2; //DelBa parameter set
1829  size += 2; //Reason code
1830  return size;
1831 }
1832 
1833 void
1835 {
1836  Buffer::Iterator i = start;
1839 }
1840 
1841 uint32_t
1843 {
1844  Buffer::Iterator i = start;
1846  m_reasonCode = i.ReadLsbtohU16 ();
1847  return i.GetDistanceFrom (start);
1848 }
1849 
1850 bool
1852 {
1853  return (m_initiator == 1) ? true : false;
1854 }
1855 
1856 uint8_t
1858 {
1859  NS_ASSERT (m_tid < 16);
1860  uint8_t tid = static_cast<uint8_t> (m_tid);
1861  return tid;
1862 }
1863 
1864 void
1866 {
1867  m_initiator = 1;
1868 }
1869 
1870 void
1872 {
1873  m_initiator = 0;
1874 }
1875 
1876 void
1878 {
1879  NS_ASSERT (tid < 16);
1880  m_tid = static_cast<uint16_t> (tid);
1881 }
1882 
1883 uint16_t
1885 {
1886  uint16_t res = 0;
1887  res |= m_initiator << 11;
1888  res |= m_tid << 12;
1889  return res;
1890 }
1891 
1892 void
1894 {
1895  m_initiator = (params >> 11) & 0x01;
1896  m_tid = (params >> 12) & 0x0f;
1897 }
1898 
1899 } //namespace ns3
Protocol header serialization and deserialization.
Definition: header.h:42
void SetSupportedRates(SupportedRates rates)
Set the supported rates.
Definition: mgt-headers.cc:723
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:801
TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Definition: mgt-headers.cc:637
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:1243
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:986
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:753
Implement the header for management frames of type association request.
Definition: mgt-headers.h:49
uint16_t GetSerializedSize() const
void SetHeCapabilities(HeCapabilities heCapabilities)
Set the HE capabilities.
Definition: mgt-headers.cc:783
DsssParameterSet m_dsssParameterSet
DSSS Parameter Set.
Definition: mgt-headers.h:829
void SetCapabilities(CapabilityInformation capabilities)
Set the Capability information.
Definition: mgt-headers.cc:548
uint8_t m_policy
Block ACK policy.
Definition: mgt-headers.h:1245
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:423
Ssid m_ssid
Service Set ID (SSID)
Definition: mgt-headers.h:303
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:836
SupportedRates m_rates
List of supported rates.
Definition: mgt-headers.h:494
static TypeId GetTypeId(void)
Register this type.
Definition: mgt-headers.cc:626
uint32_t GetSerializedSize(void) const
uint16_t m_timeoutValue
Timeout.
Definition: mgt-headers.h:1126
uint16_t GetSerializedSize() const
CapabilityInformation GetCapabilities(void) const
Return the Capability information.
Definition: mgt-headers.cc:944
See IEEE 802.11 chapter 7.3.1.11 Header format: | category: 1 | action value: 1 |.
Definition: mgt-headers.h:870
SupportedRates GetSupportedRates(void) const
Return the supported rates.
Definition: mgt-headers.cc:106
HtCapabilities m_htCapability
HT capabilities.
Definition: mgt-headers.h:608
SupportedRates m_rates
List of supported rates.
Definition: mgt-headers.h:166
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:827
static TypeId GetTypeId(void)
Register this type.
Definition: mgt-headers.cc:819
VhtCapabilities m_vhtCapability
VHT capabilities.
Definition: mgt-headers.h:308
uint8_t m_dialogToken
Not used for now.
Definition: mgt-headers.h:1121
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:495
CapabilityInformation m_capability
Capability information.
Definition: mgt-headers.h:828
uint16_t GetSerializedSize() const
void SetBufferSize(uint16_t size)
Set buffer size.
void SetHeCapabilities(HeCapabilities heCapabilities)
Set the HE capabilities.
Implement the header for management frames of type Add Block Ack request.
Definition: mgt-headers.h:1003
void SetAssociationId(uint16_t aid)
Set the association ID.
HtCapabilities m_htCapability
HT capabilities.
Definition: mgt-headers.h:169
HeCapabilities m_heCapability
HE capabilities.
Definition: mgt-headers.h:610
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:609
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:729
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:530
void SetSsid(Ssid ssid)
Set the Service Set Identifier (SSID).
Definition: mgt-headers.cc:717
uint32_t GetSerializedSize(void) const
Definition: status-code.cc:48
HeCapabilities GetHeCapabilities(void) const
Return the HE capabilities.
Definition: mgt-headers.cc:789
VhtOperation GetVhtOperation(void) const
Return the VHT operation.
Buffer::Iterator Serialize(Buffer::Iterator start) const
uint16_t m_startingSeq
Starting sequence number.
Definition: mgt-headers.h:1127
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:882
#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:834
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:830
Buffer::Iterator Serialize(Buffer::Iterator start) const
void Print(std::ostream &os) const
HeCapabilities m_heCapability
HE capabilities.
Definition: mgt-headers.h:309
CapabilityInformation GetCapabilities(void) const
Return the Capability information.
Definition: mgt-headers.cc:741
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:167
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:1125
ErpInformation m_erpInformation
ERP information.
Definition: mgt-headers.h:503
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:566
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:536
uint32_t GetSerializedSize(void) const
Definition: mgt-headers.cc:399
void SetDsssParameterSet(DsssParameterSet dsssParameterSet)
Set the DSSS Parameter Set.
Definition: mgt-headers.cc:346
Mac48Address m_currentApAddr
Address of the current access point.
Definition: mgt-headers.h:302
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:1318
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:542
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:1244
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:358
EdcaParameterSet GetEdcaParameterSet(void) const
Return the EDCA Parameter Set.
Definition: mgt-headers.cc:376
uint32_t GetSerializedSize() const
uint16_t m_initiator
initiator
Definition: mgt-headers.h:1316
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:590
ExtendedCapabilities m_extendedCapability
Extended capabilities.
Definition: mgt-headers.h:168
uint8_t m_tid
Traffic ID.
Definition: mgt-headers.h:1124
ErpInformation GetErpInformation(void) const
Return the ERP information.
Definition: mgt-headers.cc:364
SupportedRates m_rates
List of supported rates.
Definition: mgt-headers.h:606
void SetHtCapabilities(HtCapabilities htCapabilities)
Set the HT capabilities.
Definition: mgt-headers.cc:962
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:795
The IEEE 802.11ac VHT Capabilities.
void SetStartingSequenceControl(uint16_t seqControl)
Set sequence control with the given raw value.
CfParameterSet GetCfParameterSet(void) const
Return the CF parameter set.
Definition: mgt-headers.cc:322
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:505
SupportedRates GetSupportedRates(void) const
Return the supported rates.
Definition: mgt-headers.cc:614
The CF Parameter SetThis class knows how to serialise and deserialise the CF Parameter Set...
uint32_t Deserialize(Buffer::Iterator start)
Definition: mgt-headers.cc:167
MeshActionValue meshAction
mesh action
Definition: mgt-headers.h:943
HtOperation GetHtOperation(void) const
Return the HT operation.
Definition: mgt-headers.cc:980
ExtendedCapabilities m_extendedCapability
extended capabilities
Definition: mgt-headers.h:607
void SetVhtCapabilities(VhtCapabilities vhtCapabilities)
Set the VHT capabilities.
Definition: mgt-headers.cc:584
uint8_t m_amsduSupport
Flag if A-MSDU is supported.
Definition: mgt-headers.h:1122
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:506
Buffer::Iterator Serialize(Buffer::Iterator start) const
VhtOperation m_vhtOperation
VHT operation.
Definition: mgt-headers.h:502
void SetStartingSequence(uint16_t seq)
Set the starting sequence number.
CfParameterSet m_cfParameterSet
CF parameter set.
Definition: mgt-headers.h:839
uint16_t GetSerializedSize() const
void Serialize(Buffer::Iterator start) const
void SetCfParameterSet(CfParameterSet cfParameterSet)
Set the CF parameter set.
Definition: mgt-headers.cc:316
ExtendedCapabilities GetExtendedCapabilities(void) const
Return the extended capabilities.
Definition: mgt-headers.cc:238
void Serialize(Buffer::Iterator start) const
Definition: mgt-headers.cc:865
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:771
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:837
void SetEdcaParameterSet(EdcaParameterSet edcaParameterSet)
Set the EDCA Parameter Set.
Definition: mgt-headers.cc:370
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:920
DsssParameterSet GetDsssParameterSet(void) const
Return the DSSS Parameter Set.
Definition: mgt-headers.cc:352
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:824
EdcaParameterSet m_edcaParameterSet
EDCA Parameter Set.
Definition: mgt-headers.h:838
uint16_t m_listenInterval
listen interval
Definition: mgt-headers.h:172
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:659
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:328
HeCapabilities GetHeCapabilities(void) const
Return the HE capabilities.
Definition: mgt-headers.cc:602
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:833
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:334
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:382
TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Definition: mgt-headers.cc:830
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:554
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:170
void SetExtendedCapabilities(ExtendedCapabilities extendedCapabilities)
Set the Extended Capabilities.
Definition: mgt-headers.cc:747
HtCapabilities m_htCapability
HT capabilities.
Definition: mgt-headers.h:831
void SetTid(uint8_t tid)
Set Traffic ID (TID).
uint32_t Deserialize(Buffer::Iterator start)
Definition: mgt-headers.cc:470
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:503
uint32_t Deserialize(Buffer::Iterator start)
Definition: mgt-headers.cc:881
uint8_t m_tid
Traffic ID.
Definition: mgt-headers.h:1246
uint8_t m_actionValue
Action value.
Definition: mgt-headers.h:995
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:998
uint16_t GetParameterSet(void) const
Return the raw parameter set.
Implement the header for management frames of type probe request.
Definition: mgt-headers.h:514
void SetHtOperation(HtOperation htOperation)
Set the HT operation.
Definition: mgt-headers.cc:974
void SetExtendedCapabilities(ExtendedCapabilities extendedCapabilities)
Set the Extended Capabilities.
Definition: mgt-headers.cc:560
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:318
uint8_t GetTid(void) const
Return the Traffic ID (TID).
ExtendedCapabilities GetExtendedCapabilities(void) const
Return the extended capabilities.
Definition: mgt-headers.cc:956
uint32_t Deserialize(Buffer::Iterator start)
StatusCode m_code
Status code.
Definition: mgt-headers.h:496
The DSSS Parameter SetThis class knows how to serialise and deserialise the DSSS Parameter Set...
SelfProtectedActionValue selfProtectedAction
self protected action
Definition: mgt-headers.h:945
ExtendedCapabilities m_extendedCapability
extended capabilities
Definition: mgt-headers.h:498
void SetCapabilities(CapabilityInformation capabilities)
Set the Capability information.
Definition: mgt-headers.cc:938
void SetEdcaParameterSet(EdcaParameterSet edcaParameterSet)
Set the EDCA Parameter Set.
uint16_t m_tid
Traffic ID.
Definition: mgt-headers.h:1317
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:832
void SetHtCapabilities(HtCapabilities htCapabilities)
Set the HT capabilities.
Definition: mgt-headers.cc:70
ExtendedCapabilities m_extendedCapability
Extended capabilities.
Definition: mgt-headers.h:306
void SetCurrentApAddress(Mac48Address currentApAddr)
Set the address of the current access point.
Definition: mgt-headers.cc:813
void SetExtendedCapabilities(ExtendedCapabilities extendedCapabilities)
Set the extended capabilities.
Definition: mgt-headers.cc:950
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:946
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:932
uint8_t m_dialogToken
Not used for now.
Definition: mgt-headers.h:1242
uint16_t m_listenInterval
listen interval
Definition: mgt-headers.h:310
HeCapabilities GetHeCapabilities(void) const
Return the HE capabilities.
MultihopActionValue multihopAction
multi hop action
Definition: mgt-headers.h:944
Implement the header for management frames of type Add Block Ack response.
Definition: mgt-headers.h:1135
Implement the header for management frames of type Delete Block Ack.
Definition: mgt-headers.h:1256
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:777
HtCapabilities GetHtCapabilities(void) const
Return the HT capabilities.
Definition: mgt-headers.cc:968
typedef for union of different ActionValues
Definition: mgt-headers.h:941
EdcaParameterSet m_edcaParameterSet
EDCA Parameter Set.
Definition: mgt-headers.h:504
TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
HeCapabilities m_heCapability
HE capabilities.
Definition: mgt-headers.h:835
void Serialize(Buffer::Iterator start) const
Definition: mgt-headers.cc:154
uint16_t GetSerializedSize() const
HtCapabilities m_htCapability
HT capabilities.
Definition: mgt-headers.h:307
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:992
void Serialize(Buffer::Iterator start) const
Definition: mgt-headers.cc:670
uint8_t m_policy
Block Ack policy.
Definition: mgt-headers.h:1123
HtCapabilities m_htCapability
HT capabilities.
Definition: mgt-headers.h:499
void SetSupportedRates(SupportedRates rates)
Set the supported rates.
Definition: mgt-headers.cc:340
Ssid m_ssid
Service Set ID (SSID)
Definition: mgt-headers.h:605
void SetHeCapabilities(HeCapabilities heCapabilities)
Set the HE capabilities.
Definition: mgt-headers.cc:596
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:572
void SetStatusCode(StatusCode code)
Set the status code.
Definition: mgt-headers.cc:926
void Print(std::ostream &os) const
Definition: mgt-headers.cc:853
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:500
HtCapabilities GetHtCapabilities(void) const
Return the HT capabilities.
Definition: mgt-headers.cc:578
void SetCapabilities(CapabilityInformation capabilities)
Set the Capability information.
Definition: mgt-headers.cc:735
uint8_t m_category
Category of the action.
Definition: mgt-headers.h:994
void SetDelayedBlockAck()
Enable delayed BlockAck.
uint32_t Deserialize(Buffer::Iterator start)
Definition: mgt-headers.cc:685
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:438
Implement the header for management frames of type probe response.
Definition: mgt-headers.h:618
uint64_t ReadLsbtohU64(void)
Definition: buffer.cc:1093
VhtCapabilities m_vhtCapability
VHT capabilities.
Definition: mgt-headers.h:501
ActionValue GetAction()
Return the action value.
SelfProtectedActionValue
SelfProtectedActionValue enumeration.
Definition: mgt-headers.h:894
SupportedRates m_rates
List of supported rates.
Definition: mgt-headers.h:304
uint16_t m_bufferSize
Buffer size.
Definition: mgt-headers.h:1247
uint64_t m_beaconInterval
Beacon interval.
Definition: mgt-headers.h:826
The IEEE 802.11ax HE Capabilities.
uint16_t GetListenInterval(void) const
Return the listen interval.
Definition: mgt-headers.cc:807
HeCapabilities m_heCapability
HE capabilities.
Definition: mgt-headers.h:171
uint32_t GetSerializedSize(void) const
Definition: mgt-headers.cc:643
uint16_t m_timeoutValue
Timeout.
Definition: mgt-headers.h:1248
Buffer::Iterator Serialize(Buffer::Iterator start) const
Ssid m_ssid
Service Set ID (SSID)
Definition: mgt-headers.h:165
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:847
Ssid GetSsid(void) const
Return the Service Set Identifier (SSID).
Definition: mgt-headers.cc:608
TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Definition: mgt-headers.cc:393
Implement the header for management frames of type reassociation request.
Definition: mgt-headers.h:180
Buffer::Iterator Serialize(Buffer::Iterator start) const
void Print(std::ostream &os) const
uint32_t Deserialize(Buffer::Iterator start)
StatusCode GetStatusCode(void)
Return the status code.
Definition: mgt-headers.cc:914
CapabilityInformation m_capability
Capability information.
Definition: mgt-headers.h:305
HtCapabilities GetHtCapabilities(void) const
Return the HT capabilities.
Definition: mgt-headers.cc:765
VhtCapabilities GetVhtCapabilities(void) const
Return the VHT capabilities.
Definition: mgt-headers.cc:274
Ssid m_ssid
Service set ID (SSID)
Definition: mgt-headers.h:825
void SetHtCapabilities(HtCapabilities htCapabilities)
Set the HT capabilities.
Definition: mgt-headers.cc:759
HeOperation m_heOperation
HE operation.
Definition: mgt-headers.h:836
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:620
uint32_t GetSerializedSize(void) const