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 "mgt-headers.h"
24 #include "ns3/simulator.h"
25 
26 namespace ns3 {
27 
28 /***********************************************************
29  * Probe Request
30  ***********************************************************/
31 
32 NS_OBJECT_ENSURE_REGISTERED (MgtProbeRequestHeader);
33 
35 {
36 }
37 
38 void
40 {
41  m_ssid = ssid;
42 }
43 
44 Ssid
46 {
47  return m_ssid;
48 }
49 
50 void
52 {
53  m_aid = aid;
54 }
55 
56 void
58 {
59  m_rates = rates;
60 }
61 
62 void
64 {
65  m_extendedCapability = extendedcapabilities;
66 }
67 
70 {
71  return m_extendedCapability;
72 }
73 
74 void
76 {
77  m_htCapability = htcapabilities;
78 }
79 
82 {
83  return m_htCapability;
84 }
85 
86 void
88 {
89  m_vhtCapability = vhtcapabilities;
90 }
91 
94 {
95  return m_vhtCapability;
96 }
97 
98 void
100 {
101  m_heCapability = hecapabilities;
102 }
103 
106 {
107  return m_heCapability;
108 }
109 
112 {
113  return m_rates;
114 }
115 
116 uint32_t
118 {
119  uint32_t size = 0;
120  size += m_ssid.GetSerializedSize ();
121  size += m_rates.GetSerializedSize ();
127  return size;
128 }
129 
130 TypeId
132 {
133  static TypeId tid = TypeId ("ns3::MgtProbeRequestHeader")
134  .SetParent<Header> ()
135  .SetGroupName ("Wifi")
136  .AddConstructor<MgtProbeRequestHeader> ()
137  ;
138  return tid;
139 }
140 
141 TypeId
143 {
144  return GetTypeId ();
145 }
146 
147 void
148 MgtProbeRequestHeader::Print (std::ostream &os) const
149 {
150  os << "ssid=" << m_ssid << ", "
151  << "rates=" << m_rates << ", "
152  << "HT Capabilities=" << m_htCapability << " , "
153  << "VHT Capabilities=" << m_vhtCapability << " , "
154  << "HE Capabilities=" << m_heCapability;
155 }
156 
157 void
159 {
161  i = m_ssid.Serialize (i);
162  i = m_rates.Serialize (i);
163  i = m_rates.extended.Serialize (i);
165  i = m_htCapability.Serialize (i);
166  i = m_vhtCapability.Serialize (i);
167  i = m_heCapability.Serialize (i);
168 }
169 
170 uint32_t
172 {
174  i = m_ssid.Deserialize (i);
175  i = m_rates.Deserialize (i);
181  return i.GetDistanceFrom (start);
182 }
183 
184 
185 /***********************************************************
186  * Probe Response
187  ***********************************************************/
188 
190 
192 {
193 }
194 
196 {
197 }
198 
199 uint64_t
201 {
202  return m_timestamp;
203 }
204 
205 Ssid
207 {
208  return m_ssid;
209 }
210 
211 uint64_t
213 {
214  return m_beaconInterval;
215 }
216 
219 {
220  return m_rates;
221 }
222 
223 void
225 {
226  m_capability = capabilities;
227 }
228 
231 {
232  return m_capability;
233 }
234 
235 void
237 {
238  m_extendedCapability = extendedcapabilities;
239 }
240 
243 {
244  return m_extendedCapability;
245 }
246 
247 void
249 {
250  m_htCapability = htcapabilities;
251 }
252 
255 {
256  return m_htCapability;
257 }
258 
259 void
261 {
262  m_htOperation = htoperation;
263 }
264 
267 {
268  return m_htOperation;
269 }
270 
271 void
273 {
274  m_vhtCapability = vhtcapabilities;
275 }
276 
279 {
280  return m_vhtCapability;
281 }
282 
283 void
285 {
286  m_vhtOperation = vhtoperation;
287 }
288 
291 {
292  return m_vhtOperation;
293 }
294 
295 void
297 {
298  m_heCapability = hecapabilities;
299 }
300 
303 {
304  return m_heCapability;
305 }
306 
307 void
309 {
310  m_heOperation = heoperation;
311 }
312 
315 {
316  return m_heOperation;
317 }
318 
319 void
321 {
322  m_ssid = ssid;
323 }
324 
325 void
327 {
328  m_beaconInterval = us;
329 }
330 
331 void
333 {
334  m_rates = rates;
335 }
336 
337 void
339 {
340  m_dsssParameterSet = dsssParameterSet;
341 }
342 
345 {
346  return m_dsssParameterSet;
347 }
348 
349 void
351 {
352  m_erpInformation = erpInformation;
353 }
354 
357 {
358  return m_erpInformation;
359 }
360 
361 void
363 {
364  m_edcaParameterSet = edcaparameters;
365 }
366 
369 {
370  return m_edcaParameterSet;
371 }
372 
373 TypeId
375 {
376  static TypeId tid = TypeId ("ns3::MgtProbeResponseHeader")
377  .SetParent<Header> ()
378  .SetGroupName ("Wifi")
379  .AddConstructor<MgtProbeResponseHeader> ()
380  ;
381  return tid;
382 }
383 
384 TypeId
386 {
387  return GetTypeId ();
388 }
389 
390 uint32_t
392 {
393  uint32_t size = 0;
394  size += 8; //timestamp
395  size += 2; //beacon interval
396  size += m_capability.GetSerializedSize ();
397  size += m_ssid.GetSerializedSize ();
398  size += m_rates.GetSerializedSize ();
405  size += m_htOperation.GetSerializedSize ();
409  size += m_heOperation.GetSerializedSize ();
410  return size;
411 }
412 
413 void
414 MgtProbeResponseHeader::Print (std::ostream &os) const
415 {
416  os << "ssid=" << m_ssid << ", "
417  << "rates=" << m_rates << ", "
418  << "ERP information=" << m_erpInformation << ", "
419  << "HT Capabilities=" << m_htCapability << " , "
420  << "HT Operation=" << m_htOperation << " , "
421  << "VHT Capabilities=" << m_vhtCapability << " , "
422  << "VHT Operation=" << m_vhtOperation << " , "
423  << "HE Capabilities=" << m_heCapability << " , "
424  << "HE Operation=" << m_heOperation;
425 }
426 
427 void
429 {
430  //timestamp
431  //beacon interval
432  //capability information
433  //ssid
434  //supported rates
435  //fh parameter set
436  //ds parameter set
437  //cf parameter set
438  //ibss parameter set
440  i.WriteHtolsbU64 (Simulator::Now ().GetMicroSeconds ());
441  i.WriteHtolsbU16 (m_beaconInterval / 1024);
442  i = m_capability.Serialize (i);
443  i = m_ssid.Serialize (i);
444  i = m_rates.Serialize (i);
446  i = m_erpInformation.Serialize (i);
447  i = m_rates.extended.Serialize (i);
450  i = m_htCapability.Serialize (i);
451  i = m_htOperation.Serialize (i);
452  i = m_vhtCapability.Serialize (i);
453  i = m_vhtOperation.Serialize (i);
454  i = m_heCapability.Serialize (i);
455  i = m_heOperation.Serialize (i);
456 }
457 
458 uint32_t
460 {
462  m_timestamp = i.ReadLsbtohU64 ();
464  m_beaconInterval *= 1024;
465  i = m_capability.Deserialize (i);
466  i = m_ssid.Deserialize (i);
467  i = m_rates.Deserialize (i);
479  return i.GetDistanceFrom (start);
480 }
481 
482 
483 /***********************************************************
484  * Beacons
485  ***********************************************************/
486 
488 
489 /* static */
490 TypeId
492 {
493  static TypeId tid = TypeId ("ns3::MgtBeaconHeader")
495  .SetGroupName ("Wifi")
496  .AddConstructor<MgtBeaconHeader> ()
497  ;
498  return tid;
499 }
500 
501 
502 /***********************************************************
503  * Assoc Request
504  ***********************************************************/
505 
507 
509  : m_listenInterval (0)
510 {
511 }
512 
514 {
515 }
516 
517 void
519 {
520  m_ssid = ssid;
521 }
522 
523 void
525 {
526  m_rates = rates;
527 }
528 
529 void
531 {
532  m_listenInterval = interval;
533 }
534 
535 void
537 {
538  m_capability = capabilities;
539 }
540 
543 {
544  return m_capability;
545 }
546 
547 void
549 {
550  m_extendedCapability = extendedcapabilities;
551 }
552 
555 {
556  return m_extendedCapability;
557 }
558 
559 void
561 {
562  m_htCapability = htcapabilities;
563 }
564 
567 {
568  return m_htCapability;
569 }
570 
571 void
573 {
574  m_vhtCapability = vhtcapabilities;
575 }
576 
579 {
580  return m_vhtCapability;
581 }
582 
583 void
585 {
586  m_heCapability = hecapabilities;
587 }
588 
591 {
592  return m_heCapability;
593 }
594 
595 Ssid
597 {
598  return m_ssid;
599 }
600 
603 {
604  return m_rates;
605 }
606 
607 uint16_t
609 {
610  return m_listenInterval;
611 }
612 
613 TypeId
615 {
616  static TypeId tid = TypeId ("ns3::MgtAssocRequestHeader")
617  .SetParent<Header> ()
618  .SetGroupName ("Wifi")
619  .AddConstructor<MgtAssocRequestHeader> ()
620  ;
621  return tid;
622 }
623 
624 TypeId
626 {
627  return GetTypeId ();
628 }
629 
630 uint32_t
632 {
633  uint32_t size = 0;
634  size += m_capability.GetSerializedSize ();
635  size += 2;
636  size += m_ssid.GetSerializedSize ();
637  size += m_rates.GetSerializedSize ();
643  return size;
644 }
645 
646 void
647 MgtAssocRequestHeader::Print (std::ostream &os) const
648 {
649  os << "ssid=" << m_ssid << ", "
650  << "rates=" << m_rates << ", "
651  << "HT Capabilities=" << m_htCapability << " , "
652  << "VHT Capabilities=" << m_vhtCapability << " , "
653  << "HE Capabilities=" << m_heCapability;
654 }
655 
656 void
658 {
660  i = m_capability.Serialize (i);
662  i = m_ssid.Serialize (i);
663  i = m_rates.Serialize (i);
664  i = m_rates.extended.Serialize (i);
666  i = m_htCapability.Serialize (i);
667  i = m_vhtCapability.Serialize (i);
668  i = m_heCapability.Serialize (i);
669 }
670 
671 uint32_t
673 {
675  i = m_capability.Deserialize (i);
677  i = m_ssid.Deserialize (i);
678  i = m_rates.Deserialize (i);
684  return i.GetDistanceFrom (start);
685 }
686 
687 
688 /***********************************************************
689  * Ressoc Request
690  ***********************************************************/
691 
693 
695  : m_currentApAddr (Mac48Address ())
696 {
697 }
698 
700 {
701 }
702 
703 void
705 {
706  m_ssid = ssid;
707 }
708 
709 void
711 {
712  m_rates = rates;
713 }
714 
715 void
717 {
718  m_listenInterval = interval;
719 }
720 
721 void
723 {
724  m_capability = capabilities;
725 }
726 
729 {
730  return m_capability;
731 }
732 
733 void
735 {
736  m_extendedCapability = extendedcapabilities;
737 }
738 
741 {
742  return m_extendedCapability;
743 }
744 
745 void
747 {
748  m_htCapability = htcapabilities;
749 }
750 
753 {
754  return m_htCapability;
755 }
756 
757 void
759 {
760  m_vhtCapability = vhtcapabilities;
761 }
762 
765 {
766  return m_vhtCapability;
767 }
768 
769 void
771 {
772  m_heCapability = hecapabilities;
773 }
774 
777 {
778  return m_heCapability;
779 }
780 
781 Ssid
783 {
784  return m_ssid;
785 }
786 
789 {
790  return m_rates;
791 }
792 
793 uint16_t
795 {
796  return m_listenInterval;
797 }
798 
799 void
801 {
802  m_currentApAddr = currentApAddr;
803 }
804 
805 TypeId
807 {
808  static TypeId tid = TypeId ("ns3::MgtReassocRequestHeader")
809  .SetParent<Header> ()
810  .SetGroupName ("Wifi")
811  .AddConstructor<MgtReassocRequestHeader> ()
812  ;
813  return tid;
814 }
815 
816 TypeId
818 {
819  return GetTypeId ();
820 }
821 
822 uint32_t
824 {
825  uint32_t size = 0;
826  size += m_capability.GetSerializedSize ();
827  size += 2; //listen interval
828  size += 6; //current AP address
829  size += m_ssid.GetSerializedSize ();
830  size += m_rates.GetSerializedSize ();
836  return size;
837 }
838 
839 void
840 MgtReassocRequestHeader::Print (std::ostream &os) const
841 {
842  os << "current AP address=" << m_currentApAddr << ", "
843  << "ssid=" << m_ssid << ", "
844  << "rates=" << m_rates << ", "
845  << "HT Capabilities=" << m_htCapability << " , "
846  << "VHT Capabilities=" << m_vhtCapability << " , "
847  << "HE Capabilities=" << m_heCapability;
848 }
849 
850 void
852 {
854  i = m_capability.Serialize (i);
857  i = m_ssid.Serialize (i);
858  i = m_rates.Serialize (i);
859  i = m_rates.extended.Serialize (i);
861  i = m_htCapability.Serialize (i);
862  i = m_vhtCapability.Serialize (i);
863  i = m_heCapability.Serialize (i);
864 }
865 
866 uint32_t
868 {
870  i = m_capability.Deserialize (i);
873  i = m_ssid.Deserialize (i);
874  i = m_rates.Deserialize (i);
880  return i.GetDistanceFrom (start);
881 }
882 
883 
884 /***********************************************************
885  * Assoc/Reassoc Response
886  ***********************************************************/
887 
889 
891  : m_aid (0)
892 {
893 }
894 
896 {
897 }
898 
901 {
902  return m_code;
903 }
904 
907 {
908  return m_rates;
909 }
910 
911 void
913 {
914  m_code = code;
915 }
916 
917 void
919 {
920  m_rates = rates;
921 }
922 
923 void
925 {
926  m_capability = capabilities;
927 }
928 
931 {
932  return m_capability;
933 }
934 
935 void
937 {
938  m_extendedCapability = extendedcapabilities;
939 }
940 
943 {
944  return m_extendedCapability;
945 }
946 
947 void
949 {
950  m_htCapability = htcapabilities;
951 }
952 
955 {
956  return m_htCapability;
957 }
958 
959 void
961 {
962  m_htOperation = htoperation;
963 }
964 
967 {
968  return m_htOperation;
969 }
970 
971 void
973 {
974  m_vhtCapability = vhtcapabilities;
975 }
976 
979 {
980  return m_vhtCapability;
981 }
982 
983 void
985 {
986  m_vhtOperation = vhtoperation;
987 }
988 
991 {
992  return m_vhtOperation;
993 }
994 
995 void
997 {
998  m_heCapability = hecapabilities;
999 }
1000 
1003 {
1004  return m_heCapability;
1005 }
1006 
1007 void
1009 {
1010  m_heOperation = heoperation;
1011 }
1012 
1015 {
1016  return m_heOperation;
1017 }
1018 
1019 void
1021 {
1022  m_erpInformation = erpInformation;
1023 }
1024 
1027 {
1028  return m_erpInformation;
1029 }
1030 
1031 void
1033 {
1034  m_edcaParameterSet = edcaparameters;
1035 }
1036 
1039 {
1040  return m_edcaParameterSet;
1041 }
1042 
1043 TypeId
1045 {
1046  static TypeId tid = TypeId ("ns3::MgtAssocResponseHeader")
1047  .SetParent<Header> ()
1048  .SetGroupName ("Wifi")
1049  .AddConstructor<MgtAssocResponseHeader> ()
1050  ;
1051  return tid;
1052 }
1053 
1054 TypeId
1056 {
1057  return GetTypeId ();
1058 }
1059 
1060 uint32_t
1062 {
1063  uint32_t size = 0;
1064  size += m_capability.GetSerializedSize ();
1065  size += m_code.GetSerializedSize ();
1066  size += 2; //aid
1067  size += m_rates.GetSerializedSize ();
1069  size += m_rates.extended.GetSerializedSize ();
1072  size += m_htCapability.GetSerializedSize ();
1073  size += m_htOperation.GetSerializedSize ();
1075  size += m_vhtOperation.GetSerializedSize ();
1076  size += m_heCapability.GetSerializedSize ();
1077  size += m_heOperation.GetSerializedSize ();
1078  return size;
1079 }
1080 
1081 void
1082 MgtAssocResponseHeader::Print (std::ostream &os) const
1083 {
1084  os << "status code=" << m_code << ", "
1085  << "aid=" << m_aid << ", "
1086  << "rates=" << m_rates << ", "
1087  << "ERP information=" << m_erpInformation << ", "
1088  << "HT Capabilities=" << m_htCapability << " , "
1089  << "HT Operation=" << m_htOperation << " , "
1090  << "VHT Capabilities=" << m_vhtCapability << " , "
1091  << "VHT Operation=" << m_vhtOperation << " , "
1092  << "HE Capabilities=" << m_heCapability << " , "
1093  << "HE Operation=" << m_heOperation;
1094 }
1095 
1096 void
1098 {
1099  Buffer::Iterator i = start;
1100  i = m_capability.Serialize (i);
1101  i = m_code.Serialize (i);
1102  i.WriteHtolsbU16 (m_aid);
1103  i = m_rates.Serialize (i);
1104  i = m_erpInformation.Serialize (i);
1105  i = m_rates.extended.Serialize (i);
1106  i = m_edcaParameterSet.Serialize (i);
1108  i = m_htCapability.Serialize (i);
1109  i = m_htOperation.Serialize (i);
1110  i = m_vhtCapability.Serialize (i);
1111  i = m_vhtOperation.Serialize (i);
1112  i = m_heCapability.Serialize (i);
1113  i = m_heOperation.Serialize (i);
1114 }
1115 
1116 uint32_t
1118 {
1119  Buffer::Iterator i = start;
1120  i = m_capability.Deserialize (i);
1121  i = m_code.Deserialize (i);
1122  m_aid = i.ReadLsbtohU16 ();
1123  i = m_rates.Deserialize (i);
1134  return i.GetDistanceFrom (start);
1135 }
1136 
1137 
1138 /**********************************************************
1139  * ActionFrame
1140  **********************************************************/
1142 {
1143 }
1144 
1146 {
1147 }
1148 
1149 void
1152 {
1153  m_category = type;
1154  switch (type)
1155  {
1156  case BLOCK_ACK:
1157  {
1158  m_actionValue = action.blockAck;
1159  break;
1160  }
1161  case MESH:
1162  {
1163  m_actionValue = action.meshAction;
1164  break;
1165  }
1166  case MULTIHOP:
1167  {
1168  m_actionValue = action.multihopAction;
1169  break;
1170  }
1171  case SELF_PROTECTED:
1172  {
1174  break;
1175  }
1177  {
1178  break;
1179  }
1180  }
1181 }
1182 
1185 {
1186  switch (m_category)
1187  {
1188  case BLOCK_ACK:
1189  return BLOCK_ACK;
1190  case MESH:
1191  return MESH;
1192  case MULTIHOP:
1193  return MULTIHOP;
1194  case SELF_PROTECTED:
1195  return SELF_PROTECTED;
1197  return VENDOR_SPECIFIC_ACTION;
1198  default:
1199  NS_FATAL_ERROR ("Unknown action value");
1200  return SELF_PROTECTED;
1201  }
1202 }
1203 
1206 {
1207  ActionValue retval;
1208  retval.selfProtectedAction = PEER_LINK_OPEN; //Needs to be initialized to something to quiet valgrind in default cases
1209  switch (m_category)
1210  {
1211  case BLOCK_ACK:
1212  switch (m_actionValue)
1213  {
1216  break;
1219  break;
1220  case BLOCK_ACK_DELBA:
1221  retval.blockAck = BLOCK_ACK_DELBA;
1222  break;
1223  }
1224  break;
1225 
1226  case SELF_PROTECTED:
1227  switch (m_actionValue)
1228  {
1229  case PEER_LINK_OPEN:
1231  break;
1232  case PEER_LINK_CONFIRM:
1234  break;
1235  case PEER_LINK_CLOSE:
1237  break;
1238  case GROUP_KEY_INFORM:
1240  break;
1241  case GROUP_KEY_ACK:
1243  break;
1244  default:
1245  NS_FATAL_ERROR ("Unknown mesh peering management action code");
1246  retval.selfProtectedAction = PEER_LINK_OPEN; /* quiet compiler */
1247  }
1248  break;
1249 
1250  case MESH:
1251  switch (m_actionValue)
1252  {
1253  case LINK_METRIC_REPORT:
1254  retval.meshAction = LINK_METRIC_REPORT;
1255  break;
1256  case PATH_SELECTION:
1257  retval.meshAction = PATH_SELECTION;
1258  break;
1259  case PORTAL_ANNOUNCEMENT:
1261  break;
1264  break;
1265  case MDA_SETUP_REQUEST:
1266  retval.meshAction = MDA_SETUP_REQUEST;
1267  break;
1268  case MDA_SETUP_REPLY:
1269  retval.meshAction = MDA_SETUP_REPLY;
1270  break;
1273  break;
1274  case MDAOP_ADVERTISMENTS:
1276  break;
1277  case MDAOP_SET_TEARDOWN:
1278  retval.meshAction = MDAOP_SET_TEARDOWN;
1279  break;
1282  break;
1285  break;
1286  default:
1287  NS_FATAL_ERROR ("Unknown mesh peering management action code");
1288  retval.selfProtectedAction = PEER_LINK_OPEN; /* quiet compiler */
1289  }
1290  break;
1291 
1292  case MULTIHOP: //not yet supported
1293  switch (m_actionValue)
1294  {
1295  case PROXY_UPDATE: //not used so far
1296  retval.multihopAction = PROXY_UPDATE;
1297  break;
1298  case PROXY_UPDATE_CONFIRMATION: //not used so far
1299  retval.multihopAction = PROXY_UPDATE;
1300  break;
1301  default:
1302  NS_FATAL_ERROR ("Unknown mesh peering management action code");
1303  retval.selfProtectedAction = PEER_LINK_OPEN; /* quiet compiler */
1304  }
1305  break;
1306  default:
1307  NS_FATAL_ERROR ("Unsupported mesh action");
1308  retval.selfProtectedAction = PEER_LINK_OPEN; /* quiet compiler */
1309  }
1310  return retval;
1311 }
1312 
1313 TypeId
1315 {
1316  static TypeId tid = TypeId ("ns3::WifiActionHeader")
1317  .SetParent<Header> ()
1318  .SetGroupName ("Wifi")
1319  .AddConstructor<WifiActionHeader> ()
1320  ;
1321  return tid;
1322 }
1323 
1324 TypeId
1326 {
1327  return GetTypeId ();
1328 }
1329 
1330 std::string
1332 {
1333  if (value == BLOCK_ACK)
1334  {
1335  return "BlockAck";
1336  }
1337  else if (value == MESH)
1338  {
1339  return "Mesh";
1340  }
1341  else if (value == SELF_PROTECTED)
1342  {
1343  return "SelfProtected";
1344  }
1345  else if (value == VENDOR_SPECIFIC_ACTION)
1346  {
1347  return "VendorSpecificAction";
1348  }
1349  else
1350  {
1351  std::ostringstream convert;
1352  convert << value;
1353  return convert.str ();
1354  }
1355 }
1356 std::string
1358 {
1359  if (value == PEER_LINK_OPEN)
1360  {
1361  return "PeerLinkOpen";
1362  }
1363  else if (value == PEER_LINK_CONFIRM)
1364  {
1365  return "PeerLinkConfirm";
1366  }
1367  else if (value == PEER_LINK_CLOSE)
1368  {
1369  return "PeerLinkClose";
1370  }
1371  else if (value == GROUP_KEY_INFORM)
1372  {
1373  return "GroupKeyInform";
1374  }
1375  else if (value == GROUP_KEY_ACK)
1376  {
1377  return "GroupKeyAck";
1378  }
1379  else
1380  {
1381  std::ostringstream convert;
1382  convert << value;
1383  return convert.str ();
1384  }
1385 }
1386 
1387 void
1388 WifiActionHeader::Print (std::ostream &os) const
1389 {
1390  os << "category=" << CategoryValueToString ((CategoryValue) m_category)
1392 }
1393 
1394 uint32_t
1396 {
1397  return 2;
1398 }
1399 
1400 void
1402 {
1403  start.WriteU8 (m_category);
1404  start.WriteU8 (m_actionValue);
1405 }
1406 
1407 uint32_t
1409 {
1410  Buffer::Iterator i = start;
1411  m_category = i.ReadU8 ();
1412  m_actionValue = i.ReadU8 ();
1413  return i.GetDistanceFrom (start);
1414 }
1415 
1416 
1417 /***************************************************
1418 * ADDBARequest
1419 ****************************************************/
1420 
1422 
1424  : m_dialogToken (1),
1425  m_amsduSupport (1),
1426  m_bufferSize (0)
1427 {
1428 }
1429 
1430 TypeId
1432 {
1433  static TypeId tid = TypeId ("ns3::MgtAddBaRequestHeader")
1434  .SetParent<Header> ()
1435  .SetGroupName ("Wifi")
1436  .AddConstructor<MgtAddBaRequestHeader> ()
1437  ;
1438  return tid;
1439 }
1440 
1441 TypeId
1443 {
1444  return GetTypeId ();
1445 }
1446 
1447 void
1448 MgtAddBaRequestHeader::Print (std::ostream &os) const
1449 {
1450 }
1451 
1452 uint32_t
1454 {
1455  uint32_t size = 0;
1456  size += 1; //Dialog token
1457  size += 2; //Block ack parameter set
1458  size += 2; //Block ack timeout value
1459  size += 2; //Starting sequence control
1460  return size;
1461 }
1462 
1463 void
1465 {
1466  Buffer::Iterator i = start;
1467  i.WriteU8 (m_dialogToken);
1471 }
1472 
1473 uint32_t
1475 {
1476  Buffer::Iterator i = start;
1477  m_dialogToken = i.ReadU8 ();
1481  return i.GetDistanceFrom (start);
1482 }
1483 
1484 void
1486 {
1487  m_policy = 0;
1488 }
1489 
1490 void
1492 {
1493  m_policy = 1;
1494 }
1495 
1496 void
1498 {
1499  NS_ASSERT (tid < 16);
1500  m_tid = tid;
1501 }
1502 
1503 void
1505 {
1507 }
1508 
1509 void
1511 {
1512  m_bufferSize = size;
1513 }
1514 
1515 void
1517 {
1518  m_startingSeq = seq;
1519 }
1520 
1521 void
1523 {
1524  m_startingSeq = (seqControl >> 4) & 0x0fff;
1525 }
1526 
1527 void
1529 {
1530  m_amsduSupport = supported;
1531 }
1532 
1533 uint8_t
1535 {
1536  return m_tid;
1537 }
1538 
1539 bool
1541 {
1542  return (m_policy == 1) ? true : false;
1543 }
1544 
1545 uint16_t
1547 {
1548  return m_timeoutValue;
1549 }
1550 
1551 uint16_t
1553 {
1554  return m_bufferSize;
1555 }
1556 
1557 bool
1559 {
1560  return (m_amsduSupport == 1) ? true : false;
1561 }
1562 
1563 uint16_t
1565 {
1566  return m_startingSeq;
1567 }
1568 
1569 uint16_t
1571 {
1572  return (m_startingSeq << 4) & 0xfff0;
1573 }
1574 
1575 uint16_t
1577 {
1578  uint16_t res = 0;
1579  res |= m_amsduSupport;
1580  res |= m_policy << 1;
1581  res |= m_tid << 2;
1582  res |= m_bufferSize << 6;
1583  return res;
1584 }
1585 
1586 void
1588 {
1589  m_amsduSupport = (params) & 0x01;
1590  m_policy = (params >> 1) & 0x01;
1591  m_tid = (params >> 2) & 0x0f;
1592  m_bufferSize = (params >> 6) & 0x03ff;
1593 }
1594 
1595 
1596 /***************************************************
1597 * ADDBAResponse
1598 ****************************************************/
1599 
1601 
1603  : m_dialogToken (1),
1604  m_amsduSupport (1),
1605  m_bufferSize (0)
1606 {
1607 }
1608 
1609 TypeId
1611 {
1612  static TypeId tid = TypeId ("ns3::MgtAddBaResponseHeader")
1613  .SetParent<Header> ()
1614  .SetGroupName ("Wifi")
1615  .AddConstructor<MgtAddBaResponseHeader> ()
1616  ;
1617  return tid;
1618 }
1619 
1620 TypeId
1622 {
1623  return GetTypeId ();
1624 }
1625 
1626 void
1627 MgtAddBaResponseHeader::Print (std::ostream &os) const
1628 {
1629  os << "status code=" << m_code;
1630 }
1631 
1632 uint32_t
1634 {
1635  uint32_t size = 0;
1636  size += 1; //Dialog token
1637  size += m_code.GetSerializedSize (); //Status code
1638  size += 2; //Block ack parameter set
1639  size += 2; //Block ack timeout value
1640  return size;
1641 }
1642 
1643 void
1645 {
1646  Buffer::Iterator i = start;
1647  i.WriteU8 (m_dialogToken);
1648  i = m_code.Serialize (i);
1651 }
1652 
1653 uint32_t
1655 {
1656  Buffer::Iterator i = start;
1657  m_dialogToken = i.ReadU8 ();
1658  i = m_code.Deserialize (i);
1661  return i.GetDistanceFrom (start);
1662 }
1663 
1664 void
1666 {
1667  m_policy = 0;
1668 }
1669 
1670 void
1672 {
1673  m_policy = 1;
1674 }
1675 
1676 void
1678 {
1679  NS_ASSERT (tid < 16);
1680  m_tid = tid;
1681 }
1682 
1683 void
1685 {
1687 }
1688 
1689 void
1691 {
1692  m_bufferSize = size;
1693 }
1694 
1695 void
1697 {
1698  m_code = code;
1699 }
1700 
1701 void
1703 {
1704  m_amsduSupport = supported;
1705 }
1706 
1707 StatusCode
1709 {
1710  return m_code;
1711 }
1712 
1713 uint8_t
1715 {
1716  return m_tid;
1717 }
1718 
1719 bool
1721 {
1722  return (m_policy == 1) ? true : false;
1723 }
1724 
1725 uint16_t
1727 {
1728  return m_timeoutValue;
1729 }
1730 
1731 uint16_t
1733 {
1734  return m_bufferSize;
1735 }
1736 
1737 bool
1739 {
1740  return (m_amsduSupport == 1) ? true : false;
1741 }
1742 
1743 uint16_t
1745 {
1746  uint16_t res = 0;
1747  res |= m_amsduSupport;
1748  res |= m_policy << 1;
1749  res |= m_tid << 2;
1750  res |= m_bufferSize << 6;
1751  return res;
1752 }
1753 
1754 void
1756 {
1757  m_amsduSupport = (params) & 0x01;
1758  m_policy = (params >> 1) & 0x01;
1759  m_tid = (params >> 2) & 0x0f;
1760  m_bufferSize = (params >> 6) & 0x03ff;
1761 }
1762 
1763 
1764 /***************************************************
1765 * DelBa
1766 ****************************************************/
1767 
1769 
1771  : m_reasonCode (1)
1772 {
1773 }
1774 
1775 TypeId
1777 {
1778  static TypeId tid = TypeId ("ns3::MgtDelBaHeader")
1779  .SetParent<Header> ()
1780  .SetGroupName ("Wifi")
1781  .AddConstructor<MgtDelBaHeader> ()
1782  ;
1783  return tid;
1784 }
1785 
1786 TypeId
1788 {
1789  return GetTypeId ();
1790 }
1791 
1792 void
1793 MgtDelBaHeader::Print (std::ostream &os) const
1794 {
1795 }
1796 
1797 uint32_t
1799 {
1800  uint32_t size = 0;
1801  size += 2; //DelBa parameter set
1802  size += 2; //Reason code
1803  return size;
1804 }
1805 
1806 void
1808 {
1809  Buffer::Iterator i = start;
1812 }
1813 
1814 uint32_t
1816 {
1817  Buffer::Iterator i = start;
1819  m_reasonCode = i.ReadLsbtohU16 ();
1820  return i.GetDistanceFrom (start);
1821 }
1822 
1823 bool
1825 {
1826  return (m_initiator == 1) ? true : false;
1827 }
1828 
1829 uint8_t
1831 {
1832  NS_ASSERT (m_tid < 16);
1833  uint8_t tid = static_cast<uint8_t> (m_tid);
1834  return tid;
1835 }
1836 
1837 void
1839 {
1840  m_initiator = 1;
1841 }
1842 
1843 void
1845 {
1846  m_initiator = 0;
1847 }
1848 
1849 void
1851 {
1852  NS_ASSERT (tid < 16);
1853  m_tid = static_cast<uint16_t> (tid);
1854 }
1855 
1856 uint16_t
1858 {
1859  uint16_t res = 0;
1860  res |= m_initiator << 11;
1861  res |= m_tid << 12;
1862  return res;
1863 }
1864 
1865 void
1867 {
1868  m_initiator = (params >> 11) & 0x01;
1869  m_tid = (params >> 12) & 0x0f;
1870 }
1871 
1872 } //namespace ns3
Protocol header serialization and deserialization.
Definition: header.h:42
void SetSupportedRates(SupportedRates rates)
Set the supported rates.
Definition: mgt-headers.cc:710
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:111
uint16_t GetBufferSize(void) const
Return the buffer size.
void Serialize(Buffer::Iterator start) const
StatusCode m_code
Status code.
Definition: mgt-headers.h:1223
uint32_t GetSerializedSize(void) const
Buffer::Iterator Serialize(Buffer::Iterator start) const
This information element is a bit special in that it is only included if the STA is an ERP STA...
CapabilityInformation GetCapabilities(void) const
Return the Capability information.
Definition: mgt-headers.cc:728
void SetHeCapabilities(HeCapabilities hecapabilities)
Set the HE capabilities.
Definition: mgt-headers.cc:99
SupportedRates GetSupportedRates(void) const
Return the supported rates.
Definition: mgt-headers.cc:218
TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Definition: mgt-headers.cc:625
Implement the header for management frames of type association request.
Definition: mgt-headers.h:48
DsssParameterSet m_dsssParameterSet
DSSS Parameter Set.
Definition: mgt-headers.h:810
void SetCapabilities(CapabilityInformation capabilities)
Set the Capability information.
Definition: mgt-headers.cc:536
uint8_t m_policy
Block ACK policy.
Definition: mgt-headers.h:1225
void Print(std::ostream &os) const
Ssid m_ssid
Service Set ID (SSID)
Definition: mgt-headers.h:302
VhtCapabilities GetVhtCapabilities(void) const
Return the VHT capabilities.
Definition: mgt-headers.cc:93
Buffer::Iterator Deserialize(Buffer::Iterator start)
Deserialize capability information from the given buffer.
CapabilityInformation GetCapabilities(void) const
Return the Capability information.
Definition: mgt-headers.cc:930
TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Definition: mgt-headers.cc:385
Ssid GetSsid(void) const
Return the Service Set Identifier (SSID).
Definition: mgt-headers.cc:206
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition: object-base.h:45
SupportedRates m_rates
List of supported rates.
Definition: mgt-headers.h:487
CategoryValue
CategoryValue enumeration.
Definition: mgt-headers.h:862
static TypeId GetTypeId(void)
Register this type.
Definition: mgt-headers.cc:614
Buffer::Iterator Serialize(Buffer::Iterator start) const
This information element is a bit special in that it is only included if the STA is an HT or a VHT ST...
uint16_t m_timeoutValue
Timeout.
Definition: mgt-headers.h:1106
HeCapabilities GetHeCapabilities(void) const
Return the HE capabilities.
SupportedRates GetSupportedRates(void) const
Return the supported rates.
Definition: mgt-headers.cc:788
See IEEE 802.11 chapter 7.3.1.11 Header format: | category: 1 | action value: 1 |.
Definition: mgt-headers.h:850
void Print(std::ostream &os) const
HtCapabilities m_htCapability
HT capabilities.
Definition: mgt-headers.h:601
uint64_t GetBeaconIntervalUs(void) const
Return the beacon interval in microseconds unit.
Definition: mgt-headers.cc:212
SupportedRates m_rates
List of supported rates.
Definition: mgt-headers.h:165
static TypeId GetTypeId(void)
Register this type.
Definition: mgt-headers.cc:131
void SetImmediateBlockAck()
Enable immediate Block ACK.
SupportedRates m_rates
List of supported rates.
Definition: mgt-headers.h:808
static TypeId GetTypeId(void)
Register this type.
Definition: mgt-headers.cc:806
VhtCapabilities m_vhtCapability
VHT capabilities.
Definition: mgt-headers.h:307
uint8_t m_dialogToken
Not used for now.
Definition: mgt-headers.h:1101
void ReadFrom(Buffer::Iterator &i, Ipv4Address &ad)
Read an Ipv4Address from a Buffer.
def start()
Definition: core.py:1790
CapabilityInformation m_capability
Capability information.
Definition: mgt-headers.h:488
ExtendedCapabilities GetExtendedCapabilities(void) const
Return the extended capabilities.
Definition: mgt-headers.cc:69
CapabilityInformation m_capability
Capability information.
Definition: mgt-headers.h:809
uint16_t GetSerializedSize() const
Return the serialized size of this supported rates information element.
void SetBufferSize(uint16_t size)
Set buffer size.
Implement the header for management frames of type add block ack request.
Definition: mgt-headers.h:983
bool IsImmediateBlockAck(void) const
Return whether the Block ACK policy is immediate Block ACK.
void SetAssociationId(uint16_t aid)
Set the association ID.
Definition: mgt-headers.cc:51
HtCapabilities m_htCapability
HT capabilities.
Definition: mgt-headers.h:168
HeCapabilities m_heCapability
HE capabilities.
Definition: mgt-headers.h:603
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:37
#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:602
uint32_t GetSerializedSize(void) const
Definition: mgt-headers.cc:631
void WriteTo(Buffer::Iterator &i, Ipv4Address ad)
Write an Ipv4Address to a Buffer.
void SetListenInterval(uint16_t interval)
Set the listen interval.
Definition: mgt-headers.cc:716
The HT Capabilities Information ElementThis class knows how to serialise and deserialise the HT Capab...
void SetHtCapabilities(HtCapabilities htcapabilities)
Set the HT capabilities.
Definition: mgt-headers.cc:560
void SetCapabilities(CapabilityInformation capabilities)
Set the Capability information.
Definition: mgt-headers.cc:224
void SetSsid(Ssid ssid)
Set the Service Set Identifier (SSID).
Definition: mgt-headers.cc:518
uint32_t GetSerializedSize(void) const
Definition: status-code.cc:48
void SetSsid(Ssid ssid)
Set the Service Set Identifier (SSID).
Definition: mgt-headers.cc:704
void SetExtendedCapabilities(ExtendedCapabilities extendedcapabilities)
Set the extended capabilities.
Definition: mgt-headers.cc:63
void Print(std::ostream &os) const
uint16_t m_startingSeq
Starting sequence number.
Definition: mgt-headers.h:1107
Buffer::Iterator Serialize(Buffer::Iterator start) const
Serialize capability information to the given buffer.
The HT Operation Information ElementThis class knows how to serialise and deserialise the HT Operatio...
Definition: ht-operation.h:52
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
Definition: fatal-error.h:162
std::string CategoryValueToString(CategoryValue value) const
Category value to string function.
VhtOperation m_vhtOperation
VHT operation.
Definition: mgt-headers.h:815
uint16_t GetBufferSize(void) const
Return the buffer size.
VhtCapabilities GetVhtCapabilities(void) const
Return the VHT capabilities.
Definition: mgt-headers.cc:978
TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
uint16_t GetSerializedSize() const
Return the serialized size of this DSSS Parameter Set.
CategoryValue GetCategory()
Return the category value.
void SetVhtOperation(VhtOperation vhtoperation)
Set the VHT operation.
Definition: mgt-headers.cc:984
void SetDelayedBlockAck()
Enable delayed Block ACK.
ns3::Time timeout
ExtendedCapabilities m_extendedCapability
extended capabilities
Definition: mgt-headers.h:811
HeCapabilities m_heCapability
HE capabilities.
Definition: mgt-headers.h:308
void SetHeCapabilities(HeCapabilities hecapabilities)
Set the HE capabilities.
Definition: mgt-headers.cc:584
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
void SetHtOperation(HtOperation htoperation)
Set the HT operation.
Definition: mgt-headers.cc:960
uint16_t GetSerializedSize() const
Return the serialized size of this extended capabilities information element.
uint16_t m_bufferSize
Buffer size.
Definition: mgt-headers.h:1105
ErpInformation m_erpInformation
ERP information.
Definition: mgt-headers.h:496
TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Definition: mgt-headers.cc:142
void SetTimeout(uint16_t timeout)
Set timeout.
Buffer::Iterator Deserialize(Buffer::Iterator i)
Deserialize entire IE, which must be present.
Ssid GetSsid(void) const
Return the Service Set Identifier (SSID).
Definition: mgt-headers.cc:45
Capability information.
void SetSupportedRates(SupportedRates rates)
Set the supported rates.
Definition: mgt-headers.cc:57
void SetAmsduSupport(bool supported)
Enable or disable A-MSDU support.
uint32_t GetDistanceFrom(Iterator const &o) const
Definition: buffer.cc:786
uint16_t GetSerializedSize() const
Get the size of the serialized IE including Element ID and length fields.
Ssid GetSsid(void) const
Return the Service Set Identifier (SSID).
Definition: mgt-headers.cc:596
iterator in a Buffer instance
Definition: buffer.h:98
TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
uint16_t GetListenInterval(void) const
Return the listen interval.
Definition: mgt-headers.cc:794
void SetSupportedRates(SupportedRates rates)
Set the supported rates.
Definition: mgt-headers.cc:524
ErpInformation GetErpInformation(void) const
Return the ERP information.
uint32_t GetSerializedSize(void) const
Definition: mgt-headers.cc:823
void SetDsssParameterSet(DsssParameterSet dsssParameterSet)
Set the DSSS Parameter Set.
Definition: mgt-headers.cc:338
Mac48Address m_currentApAddr
Address of the current access point.
Definition: mgt-headers.h:301
bool IsAmsduSupported(void) const
Return whether A-MSDU capability is supported.
uint16_t GetStartingSequenceControl(void) const
Return the raw sequence control.
uint16_t m_reasonCode
Not used for now.
Definition: mgt-headers.h:1298
void Serialize(Buffer::Iterator start) const
void SetTid(uint8_t tid)
Set Traffic ID (TID).
void Print(std::ostream &os) const
Definition: mgt-headers.cc:414
void Serialize(Buffer::Iterator start) const
Definition: mgt-headers.cc:428
VhtCapabilities GetVhtCapabilities(void) const
Return the VHT capabilities.
Definition: mgt-headers.cc:278
ExtendedSupportedRatesIE extended
extended suppoted rates info element
SupportedRates GetSupportedRates(void) const
Return the supported rates.
Definition: mgt-headers.cc:602
void SetListenInterval(uint16_t interval)
Set the listen interval.
Definition: mgt-headers.cc:530
static TypeId GetTypeId(void)
Register this type.
uint8_t m_amsduSupport
Flag if A-MSDU is supported.
Definition: mgt-headers.h:1224
void SetErpInformation(ErpInformation erpInformation)
Set the ERP information.
Definition: mgt-headers.cc:350
TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
HeCapabilities GetHeCapabilities(void) const
Return the HE capabilities.
Definition: mgt-headers.cc:776
uint16_t m_initiator
initiator
Definition: mgt-headers.h:1296
TypeId GetInstanceTypeId() const
Get the most derived TypeId for this Object.
void SetVhtCapabilities(VhtCapabilities vhtcapabilities)
Set the VHT capabilities.
Definition: mgt-headers.cc:758
TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Definition: mgt-headers.cc:817
uint16_t GetSerializedSize() const
Return the serialized size of this EDCA Parameter Set.
void SetParameterSet(uint16_t params)
Set the parameter set from the given raw value.
ExtendedCapabilities m_extendedCapability
Extended capabilities.
Definition: mgt-headers.h:167
Buffer::Iterator Serialize(Buffer::Iterator start) const
This information element is a bit special in that it is only included if the STA is an HT STA...
uint8_t m_tid
Traffic ID.
Definition: mgt-headers.h:1104
SupportedRates m_rates
List of supported rates.
Definition: mgt-headers.h:599
ErpInformation GetErpInformation(void) const
Return the ERP information.
Definition: mgt-headers.cc:356
CapabilityInformation GetCapabilities(void) const
Return the Capability information.
Definition: mgt-headers.cc:542
uint32_t GetSerializedSize() const
void SetHtCapabilities(HtCapabilities htcapabilities)
Set the HT capabilities.
Definition: mgt-headers.cc:746
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 SetExtendedCapabilities(ExtendedCapabilities extendedcapabilities)
Set the Extended Capabilities.
Definition: mgt-headers.cc:548
Buffer::Iterator Serialize(Buffer::Iterator start) const
This information element is a bit special in that it is only included if the STA is a VHT STA...
uint16_t GetSerializedSize() const
Set serialize size function.
void SetImmediateBlockAck()
Enable immediate Block ACK.
Buffer::Iterator Serialize(Buffer::Iterator start) const
This information element is a bit special in that it is only included if there are more than 8 rates...
void SetTid(uint8_t tid)
Set Traffic ID (TID).
uint16_t GetListenInterval(void) const
Return the listen interval.
Definition: mgt-headers.cc:608
void SetParameterSet(uint16_t params)
Set the parameter set from the given raw value.
ExtendedCapabilities GetExtendedCapabilities(void) const
Return the extended capabilities.
Definition: mgt-headers.cc:554
void Print(std::ostream &os) const
Definition: mgt-headers.cc:148
HeCapabilities m_heCapability
HE capabilities.
Definition: mgt-headers.h:498
uint32_t Deserialize(Buffer::Iterator start)
Definition: mgt-headers.cc:171
void SetExtendedCapabilities(ExtendedCapabilities extendedcapabilities)
Set the extended capabilities.
Definition: mgt-headers.cc:236
MeshActionValue meshAction
mesh action
Definition: mgt-headers.h:923
ExtendedCapabilities m_extendedCapability
extended capabilities
Definition: mgt-headers.h:600
uint8_t m_amsduSupport
Flag if A-MSDU is supported.
Definition: mgt-headers.h:1102
Buffer::Iterator DeserializeIfPresent(Buffer::Iterator i)
Deserialize entire IE if it is present.
HeOperation m_heOperation
HE operation.
Definition: mgt-headers.h:499
VhtOperation m_vhtOperation
VHT operation.
Definition: mgt-headers.h:495
uint16_t GetSerializedSize() const
Return the serialized size of this HT Operation IE.
void SetStartingSequence(uint16_t seq)
Set the starting sequence number.
void Serialize(Buffer::Iterator start) const
uint8_t GetTid(void) const
Return the Traffic ID (TID).
void SetVhtCapabilities(VhtCapabilities vhtcapabilities)
Set the VHT capabilities.
Definition: mgt-headers.cc:972
ErpInformation m_erpInformation
ERP information.
Definition: mgt-headers.h:818
EdcaParameterSet GetEdcaParameterSet(void) const
Return the EDCA Parameter Set.
void SetEdcaParameterSet(EdcaParameterSet edcaParameterSet)
Set the EDCA Parameter Set.
Definition: mgt-headers.cc:362
VhtOperation GetVhtOperation(void) const
Return the VHT operation.
Definition: mgt-headers.cc:990
SupportedRates GetSupportedRates(void)
Return the supported rates.
Definition: mgt-headers.cc:906
void Print(std::ostream &os) const
Definition: mgt-headers.cc:840
uint64_t m_timestamp
Timestamp.
Definition: mgt-headers.h:805
EdcaParameterSet m_edcaParameterSet
EDCA Parameter Set.
Definition: mgt-headers.h:819
void SetHtCapabilities(HtCapabilities htcapabilities)
Set the HT capabilities.
Definition: mgt-headers.cc:75
Buffer::Iterator Serialize(Buffer::Iterator start) const
This information element is a bit special in that it is only included if the STA is a QoS STA...
uint16_t m_listenInterval
listen interval
Definition: mgt-headers.h:171
void SetExtendedCapabilities(ExtendedCapabilities extendedcapabilities)
Set the extended capabilities.
Definition: mgt-headers.cc:936
TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
uint64_t GetTimestamp()
Return the time stamp.
Definition: mgt-headers.cc:200
uint32_t GetSerializedSize(void) const
void SetVhtOperation(VhtOperation vhtoperation)
Set the VHT operation.
Definition: mgt-headers.cc:284
Buffer::Iterator Serialize(Buffer::Iterator start) const
Definition: status-code.cc:54
void SetByOriginator(void)
Set the initiator bit in the DELBA.
Ssid GetSsid(void) const
Return the Service Set Identifier (SSID).
Definition: mgt-headers.cc:782
Status code for association response.
Definition: status-code.h:31
void SetSsid(Ssid ssid)
Set the Service Set Identifier (SSID).
Definition: mgt-headers.cc:320
std::string SelfProtectedActionValueToString(SelfProtectedActionValue value) const
Self protected action value to string function.
void Print(std::ostream &os) const
Definition: mgt-headers.cc:647
void SetByRecipient(void)
Un-set the initiator bit in the DELBA.
bool IsAmsduSupported(void) const
Return whether A-MSDU capability is supported.
static TypeId GetTypeId(void)
Register this type.
VhtCapabilities GetVhtCapabilities(void) const
Return the VHT capabilities.
Definition: mgt-headers.cc:578
VhtCapabilities m_vhtCapability
VHT capabilities.
Definition: mgt-headers.h:814
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint32_t GetSerializedSize(void) const
ExtendedCapabilities GetExtendedCapabilities(void) const
Return the extended capabilities.
Definition: mgt-headers.cc:242
void SetBeaconIntervalUs(uint64_t us)
Set the beacon interval in microseconds unit.
Definition: mgt-headers.cc:326
ExtendedCapabilities GetExtendedCapabilities(void) const
Return the extended capabilities.
Definition: mgt-headers.cc:942
The EDCA Parameter SetThis class knows how to serialise and deserialise the EDCA Parameter Set...
static TypeId GetTypeId(void)
Register this type.
Definition: mgt-headers.cc:374
HeOperation GetHeOperation(void) const
Return the HE operation.
void SetBufferSize(uint16_t size)
Set buffer size.
Buffer::Iterator Deserialize(Buffer::Iterator start)
Definition: status-code.cc:61
uint8_t GetTid(void) const
Return the Traffic ID (TID).
void SetHtOperation(HtOperation htoperation)
Set the HT operation.
Definition: mgt-headers.cc:260
void Serialize(Buffer::Iterator start) const
uint32_t Deserialize(Buffer::Iterator start)
HtCapabilities GetHtCapabilities(void) const
Return the HT capabilities.
Definition: mgt-headers.cc:254
StatusCode GetStatusCode(void) const
Return the status code.
HtCapabilities GetHtCapabilities(void) const
Return the HT capabilities.
Definition: mgt-headers.cc:81
an EUI-48 address
Definition: mac48-address.h:43
bool IsByOriginator(void) const
Check if the initiator bit in the DELBA is setted.
void SetHeCapabilities(HeCapabilities hecapabilities)
Set the HE capabilities.
Definition: mgt-headers.cc:296
HtOperation GetHtOperation(void) const
Return the HT operation.
Definition: mgt-headers.cc:966
void SetVhtCapabilities(VhtCapabilities vhtcapabilities)
Set the VHT capabilities.
Definition: mgt-headers.cc:572
tuple ssid
Definition: third.py:93
VhtCapabilities m_vhtCapability
VHT capabilities.
Definition: mgt-headers.h:169
HtCapabilities m_htCapability
HT capabilities.
Definition: mgt-headers.h:812
void SetTid(uint8_t tid)
Set Traffic ID (TID).
uint32_t Deserialize(Buffer::Iterator start)
Definition: mgt-headers.cc:459
static Time Now(void)
Return the current simulation virtual time.
Definition: simulator.cc:249
ExtendedCapabilities GetExtendedCapabilities(void) const
Return the extended capabilities.
Definition: mgt-headers.cc:740
static TypeId GetTypeId(void)
Register this type.
Definition: mgt-headers.cc:491
void SetHeCapabilities(HeCapabilities hecapabilities)
Set the HE capabilities.
Definition: mgt-headers.cc:770
uint32_t Deserialize(Buffer::Iterator start)
Definition: mgt-headers.cc:867
uint8_t m_tid
Traffic ID.
Definition: mgt-headers.h:1226
void Print(std::ostream &os) const
Buffer::Iterator Serialize(Buffer::Iterator start) const
This information element is a bit special in that it is only included if the STA is an VHT STA...
uint16_t GetTimeout(void) const
Return the timeout.
uint8_t GetTid(void) const
Return the Traffic ID (TID).
uint8_t m_actionValue
Action value.
Definition: mgt-headers.h:975
The IEEE 802.11 SSID Information Element.
Definition: ssid.h:35
Implement the header for management frames of type probe request.
Definition: mgt-headers.h:507
void SetVhtCapabilities(VhtCapabilities vhtcapabilities)
Set the VHT capabilities.
Definition: mgt-headers.cc:272
void SetHeOperation(HeOperation heoperation)
Set the HE operation.
bool IsImmediateBlockAck(void) const
Return whether the Block ACK policy is immediate Block ACK.
void WriteHtolsbU16(uint16_t data)
Definition: buffer.cc:913
Implement the header for management frames of type association and reassociation response.
Definition: mgt-headers.h:317
uint32_t Deserialize(Buffer::Iterator start)
Buffer::Iterator Serialize(Buffer::Iterator start) const
This information element is a bit special in that it is only included if the STA is a HE STA...
StatusCode m_code
Status code.
Definition: mgt-headers.h:489
The DSSS Parameter SetThis class knows how to serialise and deserialise the DSSS Parameter Set...
SelfProtectedActionValue selfProtectedAction
self protected action
Definition: mgt-headers.h:925
ExtendedCapabilities m_extendedCapability
extended capabilities
Definition: mgt-headers.h:491
uint16_t GetStartingSequence(void) const
Return the starting sequence number.
void SetCapabilities(CapabilityInformation capabilities)
Set the Capability information.
Definition: mgt-headers.cc:924
void Serialize(Buffer::Iterator start) const
Definition: mgt-headers.cc:851
HeCapabilities GetHeCapabilities(void) const
Return the HE capabilities.
Definition: mgt-headers.cc:105
void SetEdcaParameterSet(EdcaParameterSet edcaParameterSet)
Set the EDCA Parameter Set.
uint16_t m_tid
Traffic ID.
Definition: mgt-headers.h:1297
static TypeId GetTypeId(void)
Register this type.
void WriteU8(uint8_t data)
Definition: buffer.h:869
VhtCapabilities GetVhtCapabilities(void) const
Return the VHT capabilities.
Definition: mgt-headers.cc:764
HtOperation m_htOperation
HT operation.
Definition: mgt-headers.h:813
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:800
uint16_t GetSerializedSize() const
Get the serialized size.
BlockAckActionValue blockAck
block ack
Definition: mgt-headers.h:926
void WriteHtolsbU64(uint64_t data)
Definition: buffer.cc:929
static TypeId GetTypeId(void)
Register this type.
void SetSupportedRates(SupportedRates rates)
Set the supported rates.
Definition: mgt-headers.cc:918
uint8_t m_dialogToken
Not used for now.
Definition: mgt-headers.h:1222
uint16_t m_listenInterval
listen interval
Definition: mgt-headers.h:309
uint16_t GetParameterSet(void) const
Return the raw parameter set.
uint32_t GetSerializedSize(void) const
Return the serialized size of capability information.
MultihopActionValue multihopAction
multi hop action
Definition: mgt-headers.h:924
Implement the header for management frames of type add block ack response.
Definition: mgt-headers.h:1115
EdcaParameterSet GetEdcaParameterSet(void) const
Return the EDCA Parameter Set.
Definition: mgt-headers.cc:368
Implement the header for management frames of type del block ack.
Definition: mgt-headers.h:1236
typedef for union of different ActionValues
Definition: mgt-headers.h:921
EdcaParameterSet m_edcaParameterSet
EDCA Parameter Set.
Definition: mgt-headers.h:497
HeCapabilities m_heCapability
HE capabilities.
Definition: mgt-headers.h:816
void SetHeOperation(HeOperation heoperation)
Set the HE operation.
Definition: mgt-headers.cc:308
VhtOperation GetVhtOperation(void) const
Return the VHT operation.
Definition: mgt-headers.cc:290
HtOperation GetHtOperation(void) const
Return the HT operation.
Definition: mgt-headers.cc:266
HtCapabilities GetHtCapabilities(void) const
Return the HT capabilities.
Definition: mgt-headers.cc:752
HtCapabilities m_htCapability
HT capabilities.
Definition: mgt-headers.h:306
uint8_t ReadU8(void)
Definition: buffer.h:1021
uint8_t m_policy
Block ACK policy.
Definition: mgt-headers.h:1103
HtCapabilities m_htCapability
HT capabilities.
Definition: mgt-headers.h:492
void SetSupportedRates(SupportedRates rates)
Set the supported rates.
Definition: mgt-headers.cc:332
Ssid m_ssid
Service Set ID (SSID)
Definition: mgt-headers.h:598
void SetHtCapabilities(HtCapabilities htcapabilities)
Set the HT capabilities.
Definition: mgt-headers.cc:948
uint16_t ReadLsbtohU16(void)
Definition: buffer.cc:1068
The ErpInformation Information ElementThis class knows how to serialise and deserialise the ErpInform...
CapabilityInformation GetCapabilities(void) const
Return the Capability information.
Definition: mgt-headers.cc:230
void SetSsid(Ssid ssid)
Set the Service Set Identifier (SSID).
Definition: mgt-headers.cc:39
HeOperation GetHeOperation(void) const
Return the HE operation.
Definition: mgt-headers.cc:314
Buffer::Iterator Serialize(Buffer::Iterator start) const
Serialize function.
void SetStatusCode(StatusCode code)
Set the status code.
Definition: mgt-headers.cc:912
void SetParameterSet(uint16_t params)
Set the parameter set from the given raw value.
void SetAmsduSupport(bool supported)
Enable or disable A-MSDU support.
HtOperation m_htOperation
HT operation.
Definition: mgt-headers.h:493
void SetCapabilities(CapabilityInformation capabilities)
Set the Capability information.
Definition: mgt-headers.cc:722
uint8_t m_category
Category of the action.
Definition: mgt-headers.h:974
void SetDelayedBlockAck()
Enable delayed Block ACK.
uint32_t Deserialize(Buffer::Iterator start)
Definition: mgt-headers.cc:672
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:37
Implement the header for management frames of type probe response.
Definition: mgt-headers.h:611
uint64_t ReadLsbtohU64(void)
Definition: buffer.cc:1096
uint16_t GetSerializedSize() const
Return the serialized size of this HT capability information element.
VhtCapabilities m_vhtCapability
VHT capabilities.
Definition: mgt-headers.h:494
uint16_t GetParameterSet(void) const
Return the raw parameter set.
ActionValue GetAction()
Return the action value.
SupportedRates m_rates
List of supported rates.
Definition: mgt-headers.h:303
uint16_t m_bufferSize
Buffer size.
Definition: mgt-headers.h:1227
uint16_t GetSerializedSize() const
Return the serialized size of this HE Operations IE.
uint16_t GetParameterSet(void) const
Return the raw parameter set.
uint64_t m_beaconInterval
Beacon interval.
Definition: mgt-headers.h:807
HeCapabilities GetHeCapabilities(void) const
Return the HE capabilities.
Definition: mgt-headers.cc:302
uint16_t GetSerializedSize() const
Return the serialized size of this VHT Operations IE.
DsssParameterSet GetDsssParameterSet(void) const
Return the DSSS Parameter Set.
Definition: mgt-headers.cc:344
uint32_t GetSerializedSize(void) const
Definition: mgt-headers.cc:117
The IEEE 802.11ax HE Capabilities.
HeCapabilities m_heCapability
HE capabilities.
Definition: mgt-headers.h:170
Buffer::Iterator Serialize(Buffer::Iterator start) const
This information element is a bit special in that it is only included if the STA is an HT STA...
uint16_t m_timeoutValue
Timeout.
Definition: mgt-headers.h:1228
uint16_t GetSerializedSize() const
Return the serialized size of this ErpInformation information element.
Ssid m_ssid
Service Set ID (SSID)
Definition: mgt-headers.h:164
void SetExtendedCapabilities(ExtendedCapabilities extendedcapabilities)
Set the Extended Capabilities.
Definition: mgt-headers.cc:734
void SetAction(CategoryValue type, ActionValue action)
Set action for this Action header.
HtCapabilities GetHtCapabilities(void) const
Return the HT capabilities.
Definition: mgt-headers.cc:566
uint32_t GetSerializedSize(void) const
Definition: mgt-headers.cc:391
void SetHeCapabilities(HeCapabilities hecapabilities)
Set the HE capabilities.
Definition: mgt-headers.cc:996
a unique identifier for an interface.
Definition: type-id.h:58
void Serialize(Buffer::Iterator start) const
Definition: mgt-headers.cc:158
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition: type-id.cc:914
void SetHtCapabilities(HtCapabilities htcapabilities)
Set the HT capabilities.
Definition: mgt-headers.cc:248
Implement the header for management frames of type beacon.
Definition: mgt-headers.h:827
HeCapabilities GetHeCapabilities(void) const
Return the HE capabilities.
Definition: mgt-headers.cc:590
Buffer::Iterator Serialize(Buffer::Iterator i) const
Serialize entire IE including Element ID and length fields.
Implement the header for management frames of type reassociation request.
Definition: mgt-headers.h:179
uint32_t Deserialize(Buffer::Iterator start)
uint32_t GetSerializedSize(void) const
StatusCode GetStatusCode(void)
Return the status code.
Definition: mgt-headers.cc:900
CapabilityInformation m_capability
Capability information.
Definition: mgt-headers.h:304
Ssid m_ssid
Service set ID (SSID)
Definition: mgt-headers.h:806
void SetVhtCapabilities(VhtCapabilities vhtcapabilities)
Set the VHT capabilities.
Definition: mgt-headers.cc:87
void Serialize(Buffer::Iterator start) const
HeOperation m_heOperation
HE operation.
Definition: mgt-headers.h:817
uint32_t Deserialize(Buffer::Iterator start)
SelfProtectedActionValue
SelfProtectedActionValue enumeration.
Definition: mgt-headers.h:874
uint16_t GetTimeout(void) const
Return the timeout.
Buffer::Iterator Serialize(Buffer::Iterator start) const
This information element is a bit special in that it is only included if the STA does support DSSS...
HtCapabilities GetHtCapabilities(void) const
Return the HT capabilities.
Definition: mgt-headers.cc:954
void Print(std::ostream &os) const
void Serialize(Buffer::Iterator start) const
Definition: mgt-headers.cc:657