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_aid = aid;
55 }
56 
57 void
59 {
60  m_rates = rates;
61 }
62 
63 void
65 {
66  m_extendedCapability = extendedcapabilities;
67 }
68 
71 {
72  return m_extendedCapability;
73 }
74 
75 void
77 {
78  m_htCapability = htcapabilities;
79 }
80 
83 {
84  return m_htCapability;
85 }
86 
87 void
89 {
90  m_vhtCapability = vhtcapabilities;
91 }
92 
95 {
96  return m_vhtCapability;
97 }
98 
99 void
101 {
102  m_heCapability = hecapabilities;
103 }
104 
107 {
108  return m_heCapability;
109 }
110 
113 {
114  return m_rates;
115 }
116 
117 uint32_t
119 {
120  uint32_t size = 0;
121  size += m_ssid.GetSerializedSize ();
122  size += m_rates.GetSerializedSize ();
128  return size;
129 }
130 
131 TypeId
133 {
134  static TypeId tid = TypeId ("ns3::MgtProbeRequestHeader")
135  .SetParent<Header> ()
136  .SetGroupName ("Wifi")
137  .AddConstructor<MgtProbeRequestHeader> ()
138  ;
139  return tid;
140 }
141 
142 TypeId
144 {
145  return GetTypeId ();
146 }
147 
148 void
149 MgtProbeRequestHeader::Print (std::ostream &os) const
150 {
151  os << "ssid=" << m_ssid << ", "
152  << "rates=" << m_rates << ", "
153  << "Extended Capabilities=" << m_extendedCapability << " , "
154  << "HT Capabilities=" << m_htCapability << " , "
155  << "VHT Capabilities=" << m_vhtCapability << " , "
156  << "HE Capabilities=" << m_heCapability;
157 }
158 
159 void
161 {
163  i = m_ssid.Serialize (i);
164  i = m_rates.Serialize (i);
165  i = m_rates.extended.Serialize (i);
167  i = m_htCapability.Serialize (i);
168  i = m_vhtCapability.Serialize (i);
169  i = m_heCapability.Serialize (i);
170 }
171 
172 uint32_t
174 {
176  i = m_ssid.Deserialize (i);
177  i = m_rates.Deserialize (i);
183  return i.GetDistanceFrom (start);
184 }
185 
186 
187 /***********************************************************
188  * Probe Response
189  ***********************************************************/
190 
192 
194 {
195 }
196 
198 {
199 }
200 
201 uint64_t
203 {
204  return m_timestamp;
205 }
206 
207 Ssid
209 {
210  return m_ssid;
211 }
212 
213 uint64_t
215 {
216  return m_beaconInterval;
217 }
218 
221 {
222  return m_rates;
223 }
224 
225 void
227 {
228  m_capability = capabilities;
229 }
230 
233 {
234  return m_capability;
235 }
236 
237 void
239 {
240  m_extendedCapability = extendedcapabilities;
241 }
242 
245 {
246  return m_extendedCapability;
247 }
248 
249 void
251 {
252  m_htCapability = htcapabilities;
253 }
254 
257 {
258  return m_htCapability;
259 }
260 
261 void
263 {
264  m_htOperation = htoperation;
265 }
266 
269 {
270  return m_htOperation;
271 }
272 
273 void
275 {
276  m_vhtCapability = vhtcapabilities;
277 }
278 
281 {
282  return m_vhtCapability;
283 }
284 
285 void
287 {
288  m_vhtOperation = vhtoperation;
289 }
290 
293 {
294  return m_vhtOperation;
295 }
296 
297 void
299 {
300  m_heCapability = hecapabilities;
301 }
302 
305 {
306  return m_heCapability;
307 }
308 
309 void
311 {
312  m_heOperation = heoperation;
313 }
314 
317 {
318  return m_heOperation;
319 }
320 
321 void
323 {
324  m_cfParameterSet = cfparameterset;
325 }
326 
329 {
330  return m_cfParameterSet;
331 }
332 
333 void
335 {
336  m_ssid = ssid;
337 }
338 
339 void
341 {
342  m_beaconInterval = us;
343 }
344 
345 void
347 {
348  m_rates = rates;
349 }
350 
351 void
353 {
354  m_dsssParameterSet = dsssParameterSet;
355 }
356 
359 {
360  return m_dsssParameterSet;
361 }
362 
363 void
365 {
366  m_erpInformation = erpInformation;
367 }
368 
371 {
372  return m_erpInformation;
373 }
374 
375 void
377 {
378  m_edcaParameterSet = edcaparameters;
379 }
380 
383 {
384  return m_edcaParameterSet;
385 }
386 
387 TypeId
389 {
390  static TypeId tid = TypeId ("ns3::MgtProbeResponseHeader")
391  .SetParent<Header> ()
392  .SetGroupName ("Wifi")
393  .AddConstructor<MgtProbeResponseHeader> ()
394  ;
395  return tid;
396 }
397 
398 TypeId
400 {
401  return GetTypeId ();
402 }
403 
404 uint32_t
406 {
407  uint32_t size = 0;
408  size += 8; //timestamp
409  size += 2; //beacon interval
410  size += m_capability.GetSerializedSize ();
411  size += m_ssid.GetSerializedSize ();
412  size += m_rates.GetSerializedSize ();
420  size += m_htOperation.GetSerializedSize ();
424  size += m_heOperation.GetSerializedSize ();
425  return size;
426 }
427 
428 void
429 MgtProbeResponseHeader::Print (std::ostream &os) const
430 {
431  os << "ssid=" << m_ssid << ", "
432  << "rates=" << m_rates << ", "
433  << "ERP information=" << m_erpInformation << ", "
434  << "Extended Capabilities=" << m_extendedCapability << " , "
435  << "HT Capabilities=" << m_htCapability << " , "
436  << "HT Operation=" << m_htOperation << " , "
437  << "VHT Capabilities=" << m_vhtCapability << " , "
438  << "VHT Operation=" << m_vhtOperation << " , "
439  << "HE Capabilities=" << m_heCapability << " , "
440  << "HE Operation=" << m_heOperation;
441 }
442 
443 void
445 {
446  //timestamp
447  //beacon interval
448  //capability information
449  //ssid
450  //supported rates
451  //fh parameter set
452  //ds parameter set
453  //cf parameter set
454  //ibss parameter set
456  i.WriteHtolsbU64 (Simulator::Now ().GetMicroSeconds ());
457  i.WriteHtolsbU16 (static_cast<uint16_t> (m_beaconInterval / 1024));
458  i = m_capability.Serialize (i);
459  i = m_ssid.Serialize (i);
460  i = m_rates.Serialize (i);
461  i = m_cfParameterSet.Serialize (i);
463  i = m_erpInformation.Serialize (i);
464  i = m_rates.extended.Serialize (i);
467  i = m_htCapability.Serialize (i);
468  i = m_htOperation.Serialize (i);
469  i = m_vhtCapability.Serialize (i);
470  i = m_vhtOperation.Serialize (i);
471  i = m_heCapability.Serialize (i);
472  i = m_heOperation.Serialize (i);
473 }
474 
475 uint32_t
477 {
479  m_timestamp = i.ReadLsbtohU64 ();
481  m_beaconInterval *= 1024;
482  i = m_capability.Deserialize (i);
483  i = m_ssid.Deserialize (i);
484  i = m_rates.Deserialize (i);
497  return i.GetDistanceFrom (start);
498 }
499 
500 
501 /***********************************************************
502  * Beacons
503  ***********************************************************/
504 
506 
507 /* static */
508 TypeId
510 {
511  static TypeId tid = TypeId ("ns3::MgtBeaconHeader")
513  .SetGroupName ("Wifi")
514  .AddConstructor<MgtBeaconHeader> ()
515  ;
516  return tid;
517 }
518 
519 
520 /***********************************************************
521  * Assoc Request
522  ***********************************************************/
523 
525 
527  : m_listenInterval (0)
528 {
529 }
530 
532 {
533 }
534 
535 void
537 {
538  m_ssid = ssid;
539 }
540 
541 void
543 {
544  m_rates = rates;
545 }
546 
547 void
549 {
550  m_listenInterval = interval;
551 }
552 
553 void
555 {
556  m_capability = capabilities;
557 }
558 
561 {
562  return m_capability;
563 }
564 
565 void
567 {
568  m_extendedCapability = extendedcapabilities;
569 }
570 
573 {
574  return m_extendedCapability;
575 }
576 
577 void
579 {
580  m_htCapability = htcapabilities;
581 }
582 
585 {
586  return m_htCapability;
587 }
588 
589 void
591 {
592  m_vhtCapability = vhtcapabilities;
593 }
594 
597 {
598  return m_vhtCapability;
599 }
600 
601 void
603 {
604  m_heCapability = hecapabilities;
605 }
606 
609 {
610  return m_heCapability;
611 }
612 
613 Ssid
615 {
616  return m_ssid;
617 }
618 
621 {
622  return m_rates;
623 }
624 
625 uint16_t
627 {
628  return m_listenInterval;
629 }
630 
631 TypeId
633 {
634  static TypeId tid = TypeId ("ns3::MgtAssocRequestHeader")
635  .SetParent<Header> ()
636  .SetGroupName ("Wifi")
637  .AddConstructor<MgtAssocRequestHeader> ()
638  ;
639  return tid;
640 }
641 
642 TypeId
644 {
645  return GetTypeId ();
646 }
647 
648 uint32_t
650 {
651  uint32_t size = 0;
652  size += m_capability.GetSerializedSize ();
653  size += 2;
654  size += m_ssid.GetSerializedSize ();
655  size += m_rates.GetSerializedSize ();
661  return size;
662 }
663 
664 void
665 MgtAssocRequestHeader::Print (std::ostream &os) const
666 {
667  os << "ssid=" << m_ssid << ", "
668  << "rates=" << m_rates << ", "
669  << "Extended Capabilities=" << m_extendedCapability << " , "
670  << "HT Capabilities=" << m_htCapability << " , "
671  << "VHT Capabilities=" << m_vhtCapability << " , "
672  << "HE Capabilities=" << m_heCapability;
673 }
674 
675 void
677 {
679  i = m_capability.Serialize (i);
681  i = m_ssid.Serialize (i);
682  i = m_rates.Serialize (i);
683  i = m_rates.extended.Serialize (i);
685  i = m_htCapability.Serialize (i);
686  i = m_vhtCapability.Serialize (i);
687  i = m_heCapability.Serialize (i);
688 }
689 
690 uint32_t
692 {
694  i = m_capability.Deserialize (i);
696  i = m_ssid.Deserialize (i);
697  i = m_rates.Deserialize (i);
703  return i.GetDistanceFrom (start);
704 }
705 
706 
707 /***********************************************************
708  * Ressoc Request
709  ***********************************************************/
710 
712 
714  : m_currentApAddr (Mac48Address ())
715 {
716 }
717 
719 {
720 }
721 
722 void
724 {
725  m_ssid = ssid;
726 }
727 
728 void
730 {
731  m_rates = rates;
732 }
733 
734 void
736 {
737  m_listenInterval = interval;
738 }
739 
740 void
742 {
743  m_capability = capabilities;
744 }
745 
748 {
749  return m_capability;
750 }
751 
752 void
754 {
755  m_extendedCapability = extendedcapabilities;
756 }
757 
760 {
761  return m_extendedCapability;
762 }
763 
764 void
766 {
767  m_htCapability = htcapabilities;
768 }
769 
772 {
773  return m_htCapability;
774 }
775 
776 void
778 {
779  m_vhtCapability = vhtcapabilities;
780 }
781 
784 {
785  return m_vhtCapability;
786 }
787 
788 void
790 {
791  m_heCapability = hecapabilities;
792 }
793 
796 {
797  return m_heCapability;
798 }
799 
800 Ssid
802 {
803  return m_ssid;
804 }
805 
808 {
809  return m_rates;
810 }
811 
812 uint16_t
814 {
815  return m_listenInterval;
816 }
817 
818 void
820 {
821  m_currentApAddr = currentApAddr;
822 }
823 
824 TypeId
826 {
827  static TypeId tid = TypeId ("ns3::MgtReassocRequestHeader")
828  .SetParent<Header> ()
829  .SetGroupName ("Wifi")
830  .AddConstructor<MgtReassocRequestHeader> ()
831  ;
832  return tid;
833 }
834 
835 TypeId
837 {
838  return GetTypeId ();
839 }
840 
841 uint32_t
843 {
844  uint32_t size = 0;
845  size += m_capability.GetSerializedSize ();
846  size += 2; //listen interval
847  size += 6; //current AP address
848  size += m_ssid.GetSerializedSize ();
849  size += m_rates.GetSerializedSize ();
855  return size;
856 }
857 
858 void
859 MgtReassocRequestHeader::Print (std::ostream &os) const
860 {
861  os << "current AP address=" << m_currentApAddr << ", "
862  << "ssid=" << m_ssid << ", "
863  << "rates=" << m_rates << ", "
864  << "Extended Capabilities=" << m_extendedCapability << " , "
865  << "HT Capabilities=" << m_htCapability << " , "
866  << "VHT Capabilities=" << m_vhtCapability << " , "
867  << "HE Capabilities=" << m_heCapability;
868 }
869 
870 void
872 {
874  i = m_capability.Serialize (i);
877  i = m_ssid.Serialize (i);
878  i = m_rates.Serialize (i);
879  i = m_rates.extended.Serialize (i);
881  i = m_htCapability.Serialize (i);
882  i = m_vhtCapability.Serialize (i);
883  i = m_heCapability.Serialize (i);
884 }
885 
886 uint32_t
888 {
890  i = m_capability.Deserialize (i);
893  i = m_ssid.Deserialize (i);
894  i = m_rates.Deserialize (i);
900  return i.GetDistanceFrom (start);
901 }
902 
903 
904 /***********************************************************
905  * Assoc/Reassoc Response
906  ***********************************************************/
907 
909 
911  : m_aid (0)
912 {
913 }
914 
916 {
917 }
918 
921 {
922  return m_code;
923 }
924 
927 {
928  return m_rates;
929 }
930 
931 void
933 {
934  m_code = code;
935 }
936 
937 void
939 {
940  m_rates = rates;
941 }
942 
943 void
945 {
946  m_capability = capabilities;
947 }
948 
951 {
952  return m_capability;
953 }
954 
955 void
957 {
958  m_extendedCapability = extendedcapabilities;
959 }
960 
963 {
964  return m_extendedCapability;
965 }
966 
967 void
969 {
970  m_htCapability = htcapabilities;
971 }
972 
975 {
976  return m_htCapability;
977 }
978 
979 void
981 {
982  m_htOperation = htoperation;
983 }
984 
987 {
988  return m_htOperation;
989 }
990 
991 void
993 {
994  m_vhtCapability = vhtcapabilities;
995 }
996 
999 {
1000  return m_vhtCapability;
1001 }
1002 
1003 void
1005 {
1006  m_vhtOperation = vhtoperation;
1007 }
1008 
1011 {
1012  return m_vhtOperation;
1013 }
1014 
1015 void
1017 {
1018  m_heCapability = hecapabilities;
1019 }
1020 
1023 {
1024  return m_heCapability;
1025 }
1026 
1027 void
1029 {
1030  m_heOperation = heoperation;
1031 }
1032 
1035 {
1036  return m_heOperation;
1037 }
1038 
1039 void
1041 {
1042  m_erpInformation = erpInformation;
1043 }
1044 
1047 {
1048  return m_erpInformation;
1049 }
1050 
1051 void
1053 {
1054  m_edcaParameterSet = edcaparameters;
1055 }
1056 
1059 {
1060  return m_edcaParameterSet;
1061 }
1062 
1063 TypeId
1065 {
1066  static TypeId tid = TypeId ("ns3::MgtAssocResponseHeader")
1067  .SetParent<Header> ()
1068  .SetGroupName ("Wifi")
1069  .AddConstructor<MgtAssocResponseHeader> ()
1070  ;
1071  return tid;
1072 }
1073 
1074 TypeId
1076 {
1077  return GetTypeId ();
1078 }
1079 
1080 uint32_t
1082 {
1083  uint32_t size = 0;
1084  size += m_capability.GetSerializedSize ();
1085  size += m_code.GetSerializedSize ();
1086  size += 2; //aid
1087  size += m_rates.GetSerializedSize ();
1089  size += m_rates.extended.GetSerializedSize ();
1092  size += m_htCapability.GetSerializedSize ();
1093  size += m_htOperation.GetSerializedSize ();
1095  size += m_vhtOperation.GetSerializedSize ();
1096  size += m_heCapability.GetSerializedSize ();
1097  size += m_heOperation.GetSerializedSize ();
1098  return size;
1099 }
1100 
1101 void
1102 MgtAssocResponseHeader::Print (std::ostream &os) const
1103 {
1104  os << "status code=" << m_code << ", "
1105  << "aid=" << m_aid << ", "
1106  << "rates=" << m_rates << ", "
1107  << "ERP information=" << m_erpInformation << ", "
1108  << "Extended Capabilities=" << m_extendedCapability << " , "
1109  << "HT Capabilities=" << m_htCapability << " , "
1110  << "HT Operation=" << m_htOperation << " , "
1111  << "VHT Capabilities=" << m_vhtCapability << " , "
1112  << "VHT Operation=" << m_vhtOperation << " , "
1113  << "HE Capabilities=" << m_heCapability << " , "
1114  << "HE Operation=" << m_heOperation;
1115 }
1116 
1117 void
1119 {
1120  Buffer::Iterator i = start;
1121  i = m_capability.Serialize (i);
1122  i = m_code.Serialize (i);
1123  i.WriteHtolsbU16 (m_aid);
1124  i = m_rates.Serialize (i);
1125  i = m_erpInformation.Serialize (i);
1126  i = m_rates.extended.Serialize (i);
1127  i = m_edcaParameterSet.Serialize (i);
1129  i = m_htCapability.Serialize (i);
1130  i = m_htOperation.Serialize (i);
1131  i = m_vhtCapability.Serialize (i);
1132  i = m_vhtOperation.Serialize (i);
1133  i = m_heCapability.Serialize (i);
1134  i = m_heOperation.Serialize (i);
1135 }
1136 
1137 uint32_t
1139 {
1140  Buffer::Iterator i = start;
1141  i = m_capability.Deserialize (i);
1142  i = m_code.Deserialize (i);
1143  m_aid = i.ReadLsbtohU16 ();
1144  i = m_rates.Deserialize (i);
1155  return i.GetDistanceFrom (start);
1156 }
1157 
1158 
1159 /**********************************************************
1160  * ActionFrame
1161  **********************************************************/
1163 {
1164 }
1165 
1167 {
1168 }
1169 
1170 void
1173 {
1174  m_category = static_cast<uint8_t> (type);
1175  switch (type)
1176  {
1177  case BLOCK_ACK:
1178  {
1179  m_actionValue = static_cast<uint8_t> (action.blockAck);
1180  break;
1181  }
1182  case MESH:
1183  {
1184  m_actionValue = static_cast<uint8_t> (action.meshAction);
1185  break;
1186  }
1187  case MULTIHOP:
1188  {
1189  m_actionValue = static_cast<uint8_t> (action.multihopAction);
1190  break;
1191  }
1192  case SELF_PROTECTED:
1193  {
1194  m_actionValue = static_cast<uint8_t> (action.selfProtectedAction);
1195  break;
1196  }
1198  {
1199  break;
1200  }
1201  }
1202 }
1203 
1206 {
1207  switch (m_category)
1208  {
1209  case BLOCK_ACK:
1210  return BLOCK_ACK;
1211  case MESH:
1212  return MESH;
1213  case MULTIHOP:
1214  return MULTIHOP;
1215  case SELF_PROTECTED:
1216  return SELF_PROTECTED;
1218  return VENDOR_SPECIFIC_ACTION;
1219  default:
1220  NS_FATAL_ERROR ("Unknown action value");
1221  return SELF_PROTECTED;
1222  }
1223 }
1224 
1227 {
1228  ActionValue retval;
1229  retval.selfProtectedAction = PEER_LINK_OPEN; //Needs to be initialized to something to quiet valgrind in default cases
1230  switch (m_category)
1231  {
1232  case BLOCK_ACK:
1233  switch (m_actionValue)
1234  {
1237  break;
1240  break;
1241  case BLOCK_ACK_DELBA:
1242  retval.blockAck = BLOCK_ACK_DELBA;
1243  break;
1244  }
1245  break;
1246 
1247  case SELF_PROTECTED:
1248  switch (m_actionValue)
1249  {
1250  case PEER_LINK_OPEN:
1252  break;
1253  case PEER_LINK_CONFIRM:
1255  break;
1256  case PEER_LINK_CLOSE:
1258  break;
1259  case GROUP_KEY_INFORM:
1261  break;
1262  case GROUP_KEY_ACK:
1264  break;
1265  default:
1266  NS_FATAL_ERROR ("Unknown mesh peering management action code");
1267  retval.selfProtectedAction = PEER_LINK_OPEN; /* quiet compiler */
1268  }
1269  break;
1270 
1271  case MESH:
1272  switch (m_actionValue)
1273  {
1274  case LINK_METRIC_REPORT:
1275  retval.meshAction = LINK_METRIC_REPORT;
1276  break;
1277  case PATH_SELECTION:
1278  retval.meshAction = PATH_SELECTION;
1279  break;
1280  case PORTAL_ANNOUNCEMENT:
1282  break;
1285  break;
1286  case MDA_SETUP_REQUEST:
1287  retval.meshAction = MDA_SETUP_REQUEST;
1288  break;
1289  case MDA_SETUP_REPLY:
1290  retval.meshAction = MDA_SETUP_REPLY;
1291  break;
1294  break;
1295  case MDAOP_ADVERTISMENTS:
1297  break;
1298  case MDAOP_SET_TEARDOWN:
1299  retval.meshAction = MDAOP_SET_TEARDOWN;
1300  break;
1303  break;
1306  break;
1307  default:
1308  NS_FATAL_ERROR ("Unknown mesh peering management action code");
1309  retval.selfProtectedAction = PEER_LINK_OPEN; /* quiet compiler */
1310  }
1311  break;
1312 
1313  case MULTIHOP: //not yet supported
1314  switch (m_actionValue)
1315  {
1316  case PROXY_UPDATE: //not used so far
1317  retval.multihopAction = PROXY_UPDATE;
1318  break;
1319  case PROXY_UPDATE_CONFIRMATION: //not used so far
1320  retval.multihopAction = PROXY_UPDATE;
1321  break;
1322  default:
1323  NS_FATAL_ERROR ("Unknown mesh peering management action code");
1324  retval.selfProtectedAction = PEER_LINK_OPEN; /* quiet compiler */
1325  }
1326  break;
1327  default:
1328  NS_FATAL_ERROR ("Unsupported mesh action");
1329  retval.selfProtectedAction = PEER_LINK_OPEN; /* quiet compiler */
1330  }
1331  return retval;
1332 }
1333 
1334 TypeId
1336 {
1337  static TypeId tid = TypeId ("ns3::WifiActionHeader")
1338  .SetParent<Header> ()
1339  .SetGroupName ("Wifi")
1340  .AddConstructor<WifiActionHeader> ()
1341  ;
1342  return tid;
1343 }
1344 
1345 TypeId
1347 {
1348  return GetTypeId ();
1349 }
1350 
1351 std::string
1353 {
1354  if (value == BLOCK_ACK)
1355  {
1356  return "BlockAck";
1357  }
1358  else if (value == MESH)
1359  {
1360  return "Mesh";
1361  }
1362  else if (value == SELF_PROTECTED)
1363  {
1364  return "SelfProtected";
1365  }
1366  else if (value == VENDOR_SPECIFIC_ACTION)
1367  {
1368  return "VendorSpecificAction";
1369  }
1370  else
1371  {
1372  std::ostringstream convert;
1373  convert << value;
1374  return convert.str ();
1375  }
1376 }
1377 std::string
1379 {
1380  if (value == PEER_LINK_OPEN)
1381  {
1382  return "PeerLinkOpen";
1383  }
1384  else if (value == PEER_LINK_CONFIRM)
1385  {
1386  return "PeerLinkConfirm";
1387  }
1388  else if (value == PEER_LINK_CLOSE)
1389  {
1390  return "PeerLinkClose";
1391  }
1392  else if (value == GROUP_KEY_INFORM)
1393  {
1394  return "GroupKeyInform";
1395  }
1396  else if (value == GROUP_KEY_ACK)
1397  {
1398  return "GroupKeyAck";
1399  }
1400  else
1401  {
1402  std::ostringstream convert;
1403  convert << value;
1404  return convert.str ();
1405  }
1406 }
1407 
1408 void
1409 WifiActionHeader::Print (std::ostream &os) const
1410 {
1411  os << "category=" << CategoryValueToString ((CategoryValue) m_category)
1413 }
1414 
1415 uint32_t
1417 {
1418  return 2;
1419 }
1420 
1421 void
1423 {
1424  start.WriteU8 (m_category);
1425  start.WriteU8 (m_actionValue);
1426 }
1427 
1428 uint32_t
1430 {
1431  Buffer::Iterator i = start;
1432  m_category = i.ReadU8 ();
1433  m_actionValue = i.ReadU8 ();
1434  return i.GetDistanceFrom (start);
1435 }
1436 
1437 
1438 /***************************************************
1439 * ADDBARequest
1440 ****************************************************/
1441 
1443 
1445  : m_dialogToken (1),
1446  m_amsduSupport (1),
1447  m_bufferSize (0)
1448 {
1449 }
1450 
1451 TypeId
1453 {
1454  static TypeId tid = TypeId ("ns3::MgtAddBaRequestHeader")
1455  .SetParent<Header> ()
1456  .SetGroupName ("Wifi")
1457  .AddConstructor<MgtAddBaRequestHeader> ()
1458  ;
1459  return tid;
1460 }
1461 
1462 TypeId
1464 {
1465  return GetTypeId ();
1466 }
1467 
1468 void
1469 MgtAddBaRequestHeader::Print (std::ostream &os) const
1470 {
1471 }
1472 
1473 uint32_t
1475 {
1476  uint32_t size = 0;
1477  size += 1; //Dialog token
1478  size += 2; //Block ack parameter set
1479  size += 2; //Block ack timeout value
1480  size += 2; //Starting sequence control
1481  return size;
1482 }
1483 
1484 void
1486 {
1487  Buffer::Iterator i = start;
1488  i.WriteU8 (m_dialogToken);
1492 }
1493 
1494 uint32_t
1496 {
1497  Buffer::Iterator i = start;
1498  m_dialogToken = i.ReadU8 ();
1502  return i.GetDistanceFrom (start);
1503 }
1504 
1505 void
1507 {
1508  m_policy = 0;
1509 }
1510 
1511 void
1513 {
1514  m_policy = 1;
1515 }
1516 
1517 void
1519 {
1520  NS_ASSERT (tid < 16);
1521  m_tid = tid;
1522 }
1523 
1524 void
1526 {
1528 }
1529 
1530 void
1532 {
1533  m_bufferSize = size;
1534 }
1535 
1536 void
1538 {
1539  m_startingSeq = seq;
1540 }
1541 
1542 void
1544 {
1545  m_startingSeq = (seqControl >> 4) & 0x0fff;
1546 }
1547 
1548 void
1550 {
1551  m_amsduSupport = supported;
1552 }
1553 
1554 uint8_t
1556 {
1557  return m_tid;
1558 }
1559 
1560 bool
1562 {
1563  return (m_policy == 1) ? true : false;
1564 }
1565 
1566 uint16_t
1568 {
1569  return m_timeoutValue;
1570 }
1571 
1572 uint16_t
1574 {
1575  return m_bufferSize;
1576 }
1577 
1578 bool
1580 {
1581  return (m_amsduSupport == 1) ? true : false;
1582 }
1583 
1584 uint16_t
1586 {
1587  return m_startingSeq;
1588 }
1589 
1590 uint16_t
1592 {
1593  return (m_startingSeq << 4) & 0xfff0;
1594 }
1595 
1596 uint16_t
1598 {
1599  uint16_t res = 0;
1600  res |= m_amsduSupport;
1601  res |= m_policy << 1;
1602  res |= m_tid << 2;
1603  res |= m_bufferSize << 6;
1604  return res;
1605 }
1606 
1607 void
1609 {
1610  m_amsduSupport = (params) & 0x01;
1611  m_policy = (params >> 1) & 0x01;
1612  m_tid = (params >> 2) & 0x0f;
1613  m_bufferSize = (params >> 6) & 0x03ff;
1614 }
1615 
1616 
1617 /***************************************************
1618 * ADDBAResponse
1619 ****************************************************/
1620 
1622 
1624  : m_dialogToken (1),
1625  m_amsduSupport (1),
1626  m_bufferSize (0)
1627 {
1628 }
1629 
1630 TypeId
1632 {
1633  static TypeId tid = TypeId ("ns3::MgtAddBaResponseHeader")
1634  .SetParent<Header> ()
1635  .SetGroupName ("Wifi")
1636  .AddConstructor<MgtAddBaResponseHeader> ()
1637  ;
1638  return tid;
1639 }
1640 
1641 TypeId
1643 {
1644  return GetTypeId ();
1645 }
1646 
1647 void
1648 MgtAddBaResponseHeader::Print (std::ostream &os) const
1649 {
1650  os << "status code=" << m_code;
1651 }
1652 
1653 uint32_t
1655 {
1656  uint32_t size = 0;
1657  size += 1; //Dialog token
1658  size += m_code.GetSerializedSize (); //Status code
1659  size += 2; //Block ack parameter set
1660  size += 2; //Block ack timeout value
1661  return size;
1662 }
1663 
1664 void
1666 {
1667  Buffer::Iterator i = start;
1668  i.WriteU8 (m_dialogToken);
1669  i = m_code.Serialize (i);
1672 }
1673 
1674 uint32_t
1676 {
1677  Buffer::Iterator i = start;
1678  m_dialogToken = i.ReadU8 ();
1679  i = m_code.Deserialize (i);
1682  return i.GetDistanceFrom (start);
1683 }
1684 
1685 void
1687 {
1688  m_policy = 0;
1689 }
1690 
1691 void
1693 {
1694  m_policy = 1;
1695 }
1696 
1697 void
1699 {
1700  NS_ASSERT (tid < 16);
1701  m_tid = tid;
1702 }
1703 
1704 void
1706 {
1708 }
1709 
1710 void
1712 {
1713  m_bufferSize = size;
1714 }
1715 
1716 void
1718 {
1719  m_code = code;
1720 }
1721 
1722 void
1724 {
1725  m_amsduSupport = supported;
1726 }
1727 
1728 StatusCode
1730 {
1731  return m_code;
1732 }
1733 
1734 uint8_t
1736 {
1737  return m_tid;
1738 }
1739 
1740 bool
1742 {
1743  return (m_policy == 1) ? true : false;
1744 }
1745 
1746 uint16_t
1748 {
1749  return m_timeoutValue;
1750 }
1751 
1752 uint16_t
1754 {
1755  return m_bufferSize;
1756 }
1757 
1758 bool
1760 {
1761  return (m_amsduSupport == 1) ? true : false;
1762 }
1763 
1764 uint16_t
1766 {
1767  uint16_t res = 0;
1768  res |= m_amsduSupport;
1769  res |= m_policy << 1;
1770  res |= m_tid << 2;
1771  res |= m_bufferSize << 6;
1772  return res;
1773 }
1774 
1775 void
1777 {
1778  m_amsduSupport = (params) & 0x01;
1779  m_policy = (params >> 1) & 0x01;
1780  m_tid = (params >> 2) & 0x0f;
1781  m_bufferSize = (params >> 6) & 0x03ff;
1782 }
1783 
1784 
1785 /***************************************************
1786 * DelBa
1787 ****************************************************/
1788 
1790 
1792  : m_reasonCode (1)
1793 {
1794 }
1795 
1796 TypeId
1798 {
1799  static TypeId tid = TypeId ("ns3::MgtDelBaHeader")
1800  .SetParent<Header> ()
1801  .SetGroupName ("Wifi")
1802  .AddConstructor<MgtDelBaHeader> ()
1803  ;
1804  return tid;
1805 }
1806 
1807 TypeId
1809 {
1810  return GetTypeId ();
1811 }
1812 
1813 void
1814 MgtDelBaHeader::Print (std::ostream &os) const
1815 {
1816 }
1817 
1818 uint32_t
1820 {
1821  uint32_t size = 0;
1822  size += 2; //DelBa parameter set
1823  size += 2; //Reason code
1824  return size;
1825 }
1826 
1827 void
1829 {
1830  Buffer::Iterator i = start;
1833 }
1834 
1835 uint32_t
1837 {
1838  Buffer::Iterator i = start;
1840  m_reasonCode = i.ReadLsbtohU16 ();
1841  return i.GetDistanceFrom (start);
1842 }
1843 
1844 bool
1846 {
1847  return (m_initiator == 1) ? true : false;
1848 }
1849 
1850 uint8_t
1852 {
1853  NS_ASSERT (m_tid < 16);
1854  uint8_t tid = static_cast<uint8_t> (m_tid);
1855  return tid;
1856 }
1857 
1858 void
1860 {
1861  m_initiator = 1;
1862 }
1863 
1864 void
1866 {
1867  m_initiator = 0;
1868 }
1869 
1870 void
1872 {
1873  NS_ASSERT (tid < 16);
1874  m_tid = static_cast<uint16_t> (tid);
1875 }
1876 
1877 uint16_t
1879 {
1880  uint16_t res = 0;
1881  res |= m_initiator << 11;
1882  res |= m_tid << 12;
1883  return res;
1884 }
1885 
1886 void
1888 {
1889  m_initiator = (params >> 11) & 0x01;
1890  m_tid = (params >> 12) & 0x0f;
1891 }
1892 
1893 } //namespace ns3
Protocol header serialization and deserialization.
Definition: header.h:42
void SetSupportedRates(SupportedRates rates)
Set the supported rates.
Definition: mgt-headers.cc:729
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:807
TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Definition: mgt-headers.cc:643
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:1237
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 GetTimeout(void) const
Return the timeout.
void SetHeCapabilities(HeCapabilities hecapabilities)
Set the HE capabilities.
Definition: mgt-headers.cc:100
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...
ExtendedCapabilities GetExtendedCapabilities(void) const
Return the extended capabilities.
Definition: mgt-headers.cc:759
Implement the header for management frames of type association request.
Definition: mgt-headers.h:49
uint16_t GetSerializedSize() const
Return the serialized size of this HE Operations IE.
DsssParameterSet m_dsssParameterSet
DSSS Parameter Set.
Definition: mgt-headers.h:823
void SetCapabilities(CapabilityInformation capabilities)
Set the Capability information.
Definition: mgt-headers.cc:554
uint8_t m_policy
Block ACK policy.
Definition: mgt-headers.h:1239
Buffer::Iterator Serialize(Buffer::Iterator i) const
Serialize entire IE including Element ID and length fields.
uint16_t GetSerializedSize() const
Return the serialized size of this HT Operation IE.
void Print(std::ostream &os) const
Definition: mgt-headers.cc:429
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:842
SupportedRates m_rates
List of supported rates.
Definition: mgt-headers.h:488
static TypeId GetTypeId(void)
Register this type.
Definition: mgt-headers.cc:632
uint32_t GetSerializedSize(void) const
uint16_t m_timeoutValue
Timeout.
Definition: mgt-headers.h:1120
uint16_t GetSerializedSize() const
Return the serialized size of this ErpInformation information element.
CapabilityInformation GetCapabilities(void) const
Return the Capability information.
Definition: mgt-headers.cc:950
See IEEE 802.11 chapter 7.3.1.11 Header format: | category: 1 | action value: 1 |.
Definition: mgt-headers.h:864
SupportedRates GetSupportedRates(void) const
Return the supported rates.
Definition: mgt-headers.cc:112
HtCapabilities m_htCapability
HT capabilities.
Definition: mgt-headers.h:602
SupportedRates m_rates
List of supported rates.
Definition: mgt-headers.h:166
static TypeId GetTypeId(void)
Register this type.
Definition: mgt-headers.cc:132
void SetImmediateBlockAck()
Enable immediate Block ACK.
bool IsAmsduSupported(void) const
Return whether A-MSDU capability is supported.
SupportedRates m_rates
List of supported rates.
Definition: mgt-headers.h:821
static TypeId GetTypeId(void)
Register this type.
Definition: mgt-headers.cc:825
VhtCapabilities m_vhtCapability
VHT capabilities.
Definition: mgt-headers.h:308
uint8_t m_dialogToken
Not used for now.
Definition: mgt-headers.h:1115
void ReadFrom(Buffer::Iterator &i, Ipv4Address &ad)
Read an Ipv4Address from a Buffer.
def start()
Definition: core.py:1844
CapabilityInformation m_capability
Capability information.
Definition: mgt-headers.h:489
CapabilityInformation m_capability
Capability information.
Definition: mgt-headers.h:822
uint16_t GetSerializedSize() const
Return the serialized size of this EDCA Parameter Set.
void SetBufferSize(uint16_t size)
Set buffer size.
Implement the header for management frames of type add block ack request.
Definition: mgt-headers.h:997
void SetAssociationId(uint16_t aid)
Set the association ID.
Definition: mgt-headers.cc:52
HtCapabilities m_htCapability
HT capabilities.
Definition: mgt-headers.h:169
HeCapabilities m_heCapability
HE capabilities.
Definition: mgt-headers.h:604
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:603
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:735
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 SetHtCapabilities(HtCapabilities htcapabilities)
Set the HT capabilities.
Definition: mgt-headers.cc:578
void SetCapabilities(CapabilityInformation capabilities)
Set the Capability information.
Definition: mgt-headers.cc:226
void SetSsid(Ssid ssid)
Set the Service Set Identifier (SSID).
Definition: mgt-headers.cc:536
void SetSsid(Ssid ssid)
Set the Service Set Identifier (SSID).
Definition: mgt-headers.cc:723
uint32_t GetSerializedSize(void) const
Definition: status-code.cc:48
HeCapabilities GetHeCapabilities(void) const
Return the HE capabilities.
Definition: mgt-headers.cc:795
VhtOperation GetVhtOperation(void) const
Return the VHT operation.
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...
void SetExtendedCapabilities(ExtendedCapabilities extendedcapabilities)
Set the extended capabilities.
Definition: mgt-headers.cc:64
uint16_t m_startingSeq
Starting sequence number.
Definition: mgt-headers.h:1121
The HT Operation Information ElementThis class knows how to serialise and deserialise the HT Operatio...
Definition: ht-operation.h:52
CategoryValue
CategoryValue enumeration.
Definition: mgt-headers.h:876
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
Definition: fatal-error.h:162
VhtOperation m_vhtOperation
VHT operation.
Definition: mgt-headers.h:828
HtCapabilities GetHtCapabilities(void) const
Return the HT capabilities.
Definition: mgt-headers.cc:82
uint16_t GetBufferSize(void) const
Return the buffer size.
HtOperation GetHtOperation(void) const
Return the HT operation.
Definition: mgt-headers.cc:268
CategoryValue GetCategory()
Return the category value.
uint16_t GetSerializedSize() const
Return the serialized size of this supported rates information element.
void SetVhtOperation(VhtOperation vhtoperation)
Set the VHT operation.
HeCapabilities GetHeCapabilities(void) const
Return the HE capabilities.
Definition: mgt-headers.cc:106
void SetDelayedBlockAck()
Enable delayed Block ACK.
ns3::Time timeout
ExtendedCapabilities m_extendedCapability
extended capabilities
Definition: mgt-headers.h:824
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...
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:747
void SetHeCapabilities(HeCapabilities hecapabilities)
Set the HE capabilities.
Definition: mgt-headers.cc:602
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
This information element is a bit special in that it is only included if there are more than 8 rates...
Buffer::Iterator Serialize(Buffer::Iterator start) const
Serialize capability information to the given buffer.
uint16_t GetTimeout(void) const
Return the timeout.
void SetHtOperation(HtOperation htoperation)
Set the HT operation.
Definition: mgt-headers.cc:980
uint16_t m_bufferSize
Buffer size.
Definition: mgt-headers.h:1119
ErpInformation m_erpInformation
ERP information.
Definition: mgt-headers.h:497
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:572
Capability information.
void SetSupportedRates(SupportedRates rates)
Set the supported rates.
Definition: mgt-headers.cc:58
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:542
uint32_t GetSerializedSize(void) const
Definition: mgt-headers.cc:405
void SetDsssParameterSet(DsssParameterSet dsssParameterSet)
Set the DSSS Parameter Set.
Definition: mgt-headers.cc:352
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:143
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:1312
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:548
static TypeId GetTypeId(void)
Register this type.
uint8_t m_amsduSupport
Flag if A-MSDU is supported.
Definition: mgt-headers.h:1238
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:364
EdcaParameterSet GetEdcaParameterSet(void) const
Return the EDCA Parameter Set.
Definition: mgt-headers.cc:382
uint32_t GetSerializedSize() const
uint16_t m_initiator
initiator
Definition: mgt-headers.h:1310
uint16_t GetSerializedSize() const
Get the serialized size.
uint16_t GetSerializedSize() const
Set serialize size function.
bool IsImmediateBlockAck(void) const
Return whether the Block ACK policy is immediate Block ACK.
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...
std::string CategoryValueToString(CategoryValue value) const
Category value to string function.
void SetVhtCapabilities(VhtCapabilities vhtcapabilities)
Set the VHT capabilities.
Definition: mgt-headers.cc:777
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:596
ExtendedCapabilities m_extendedCapability
Extended capabilities.
Definition: mgt-headers.h:168
uint8_t m_tid
Traffic ID.
Definition: mgt-headers.h:1118
ErpInformation GetErpInformation(void) const
Return the ERP information.
Definition: mgt-headers.cc:370
SupportedRates m_rates
List of supported rates.
Definition: mgt-headers.h:600
Ssid GetSsid(void) const
Return the Service Set Identifier (SSID).
Definition: mgt-headers.cc:801
void SetHtCapabilities(HtCapabilities htcapabilities)
Set the HT capabilities.
Definition: mgt-headers.cc:765
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:328
void SetErpInformation(ErpInformation erpInformation)
Set the ERP information.
void Print(std::ostream &os) const
void SetExtendedCapabilities(ExtendedCapabilities extendedcapabilities)
Set the Extended Capabilities.
Definition: mgt-headers.cc:566
void SetImmediateBlockAck()
Enable immediate Block ACK.
TypeId GetInstanceTypeId() const
Get the most derived TypeId for this Object.
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:93
SupportedRates GetSupportedRates(void) const
Return the supported rates.
Definition: mgt-headers.cc:220
HeCapabilities m_heCapability
HE capabilities.
Definition: mgt-headers.h:499
SupportedRates GetSupportedRates(void) const
Return the supported rates.
Definition: mgt-headers.cc:620
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:173
void SetExtendedCapabilities(ExtendedCapabilities extendedcapabilities)
Set the extended capabilities.
Definition: mgt-headers.cc:238
MeshActionValue meshAction
mesh action
Definition: mgt-headers.h:937
HtOperation GetHtOperation(void) const
Return the HT operation.
Definition: mgt-headers.cc:986
ExtendedCapabilities m_extendedCapability
extended capabilities
Definition: mgt-headers.h:601
uint8_t m_amsduSupport
Flag if A-MSDU is supported.
Definition: mgt-headers.h:1116
Buffer::Iterator DeserializeIfPresent(Buffer::Iterator i)
Deserialize entire IE if it is present.
HeOperation m_heOperation
HE operation.
Definition: mgt-headers.h:500
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...
VhtOperation m_vhtOperation
VHT operation.
Definition: mgt-headers.h:496
void SetStartingSequence(uint16_t seq)
Set the starting sequence number.
CfParameterSet m_cfParameterSet
CF parameter set.
Definition: mgt-headers.h:833
uint16_t GetSerializedSize() const
Return the serialized size of this EDCA Parameter Set.
void Serialize(Buffer::Iterator start) const
ExtendedCapabilities GetExtendedCapabilities(void) const
Return the extended capabilities.
Definition: mgt-headers.cc:244
void Serialize(Buffer::Iterator start) const
Definition: mgt-headers.cc:871
VhtCapabilities GetVhtCapabilities(void) const
Return the VHT capabilities.
Definition: mgt-headers.cc:94
void SetVhtCapabilities(VhtCapabilities vhtcapabilities)
Set the VHT capabilities.
Definition: mgt-headers.cc:992
ErpInformation m_erpInformation
ERP information.
Definition: mgt-headers.h:831
void SetEdcaParameterSet(EdcaParameterSet edcaParameterSet)
Set the EDCA Parameter Set.
Definition: mgt-headers.cc:376
uint32_t GetSerializedSize(void) const
uint64_t GetBeaconIntervalUs(void) const
Return the beacon interval in microseconds unit.
Definition: mgt-headers.cc:214
void Serialize(Buffer::Iterator start) const
SupportedRates GetSupportedRates(void)
Return the supported rates.
Definition: mgt-headers.cc:926
DsssParameterSet GetDsssParameterSet(void) const
Return the DSSS Parameter Set.
Definition: mgt-headers.cc:358
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:818
EdcaParameterSet m_edcaParameterSet
EDCA Parameter Set.
Definition: mgt-headers.h:832
void SetHtCapabilities(HtCapabilities htcapabilities)
Set the HT capabilities.
Definition: mgt-headers.cc:76
uint16_t m_listenInterval
listen interval
Definition: mgt-headers.h:172
void SetExtendedCapabilities(ExtendedCapabilities extendedcapabilities)
Set the extended capabilities.
Definition: mgt-headers.cc:956
uint64_t GetTimestamp()
Return the time stamp.
Definition: mgt-headers.cc:202
void SetVhtOperation(VhtOperation vhtoperation)
Set the VHT operation.
Definition: mgt-headers.cc:286
ExtendedCapabilities GetExtendedCapabilities(void) const
Return the extended capabilities.
Definition: mgt-headers.cc:70
void SetByOriginator(void)
Set the initiator bit in the DELBA.
void Print(std::ostream &os) const
Definition: mgt-headers.cc:665
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:334
HeCapabilities GetHeCapabilities(void) const
Return the HE capabilities.
Definition: mgt-headers.cc:608
void SetByRecipient(void)
Un-set the initiator bit in the DELBA.
static TypeId GetTypeId(void)
Register this type.
uint16_t GetSerializedSize() const
Return the serialized size of this HT capability information element.
uint16_t GetSerializedSize() const
Return the serialized size of this DSSS Parameter Set.
VhtCapabilities m_vhtCapability
VHT capabilities.
Definition: mgt-headers.h:827
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:256
StatusCode GetStatusCode(void) const
Return the status code.
void SetBeaconIntervalUs(uint64_t us)
Set the beacon interval in microseconds unit.
Definition: mgt-headers.cc:340
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:149
static TypeId GetTypeId(void)
Register this type.
Definition: mgt-headers.cc:388
TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Definition: mgt-headers.cc:836
void SetBufferSize(uint16_t size)
Set buffer size.
Buffer::Iterator Deserialize(Buffer::Iterator start)
Definition: status-code.cc:61
void SetHtOperation(HtOperation htoperation)
Set the HT operation.
Definition: mgt-headers.cc:262
CapabilityInformation GetCapabilities(void) const
Return the Capability information.
Definition: mgt-headers.cc:560
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
void SetHeCapabilities(HeCapabilities hecapabilities)
Set the HE capabilities.
Definition: mgt-headers.cc:298
void SetVhtCapabilities(VhtCapabilities vhtcapabilities)
Set the VHT capabilities.
Definition: mgt-headers.cc:590
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...
VhtCapabilities m_vhtCapability
VHT capabilities.
Definition: mgt-headers.h:170
HtCapabilities m_htCapability
HT capabilities.
Definition: mgt-headers.h:825
void SetTid(uint8_t tid)
Set Traffic ID (TID).
uint32_t Deserialize(Buffer::Iterator start)
Definition: mgt-headers.cc:476
static Time Now(void)
Return the current simulation virtual time.
Definition: simulator.cc:249
Ssid GetSsid(void) const
Return the Service Set Identifier (SSID).
Definition: mgt-headers.cc:208
static TypeId GetTypeId(void)
Register this type.
Definition: mgt-headers.cc:509
void SetHeCapabilities(HeCapabilities hecapabilities)
Set the HE capabilities.
Definition: mgt-headers.cc:789
uint32_t Deserialize(Buffer::Iterator start)
Definition: mgt-headers.cc:887
uint8_t m_tid
Traffic ID.
Definition: mgt-headers.h:1240
uint8_t m_actionValue
Action value.
Definition: mgt-headers.h:989
The IEEE 802.11 SSID Information Element.
Definition: ssid.h:35
uint16_t GetParameterSet(void) const
Return the raw parameter set.
Implement the header for management frames of type probe request.
Definition: mgt-headers.h:508
void SetVhtCapabilities(VhtCapabilities vhtcapabilities)
Set the VHT capabilities.
Definition: mgt-headers.cc:274
void SetHeOperation(HeOperation heoperation)
Set the HE operation.
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
void SetCfParameterSet(CfParameterSet cfparameterset)
Set the CF parameter set.
Definition: mgt-headers.cc:322
uint8_t GetTid(void) const
Return the Traffic ID (TID).
ExtendedCapabilities GetExtendedCapabilities(void) const
Return the extended capabilities.
Definition: mgt-headers.cc:962
uint32_t Deserialize(Buffer::Iterator start)
StatusCode m_code
Status code.
Definition: mgt-headers.h:490
The DSSS Parameter SetThis class knows how to serialise and deserialise the DSSS Parameter Set...
SelfProtectedActionValue selfProtectedAction
self protected action
Definition: mgt-headers.h:939
ExtendedCapabilities m_extendedCapability
extended capabilities
Definition: mgt-headers.h:492
void SetCapabilities(CapabilityInformation capabilities)
Set the Capability information.
Definition: mgt-headers.cc:944
void SetEdcaParameterSet(EdcaParameterSet edcaParameterSet)
Set the EDCA Parameter Set.
uint16_t m_tid
Traffic ID.
Definition: mgt-headers.h:1311
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:826
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:819
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:940
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:938
uint8_t m_dialogToken
Not used for now.
Definition: mgt-headers.h:1236
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:938
Implement the header for management frames of type add block ack response.
Definition: mgt-headers.h:1129
Implement the header for management frames of type del block ack.
Definition: mgt-headers.h:1250
HeOperation GetHeOperation(void) const
Return the HE operation.
Definition: mgt-headers.cc:316
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:783
HtCapabilities GetHtCapabilities(void) const
Return the HT capabilities.
Definition: mgt-headers.cc:974
typedef for union of different ActionValues
Definition: mgt-headers.h:935
EdcaParameterSet m_edcaParameterSet
EDCA Parameter Set.
Definition: mgt-headers.h:498
TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
HeCapabilities m_heCapability
HE capabilities.
Definition: mgt-headers.h:829
void SetHeOperation(HeOperation heoperation)
Set the HE operation.
Definition: mgt-headers.cc:310
void Serialize(Buffer::Iterator start) const
Definition: mgt-headers.cc:160
uint16_t GetSerializedSize() const
Return the serialized size of this VHT Operations IE.
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:292
VhtCapabilities GetVhtCapabilities(void) const
Return the VHT capabilities.
Definition: mgt-headers.cc:998
void Serialize(Buffer::Iterator start) const
Definition: mgt-headers.cc:676
uint8_t m_policy
Block ACK policy.
Definition: mgt-headers.h:1117
HtCapabilities m_htCapability
HT capabilities.
Definition: mgt-headers.h:493
void SetSupportedRates(SupportedRates rates)
Set the supported rates.
Definition: mgt-headers.cc:346
Ssid m_ssid
Service Set ID (SSID)
Definition: mgt-headers.h:599
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 SetHtCapabilities(HtCapabilities htcapabilities)
Set the HT capabilities.
Definition: mgt-headers.cc:968
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 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 SetStatusCode(StatusCode code)
Set the status code.
Definition: mgt-headers.cc:932
void Print(std::ostream &os) const
Definition: mgt-headers.cc:859
CapabilityInformation GetCapabilities(void) const
Return the Capability information.
Definition: mgt-headers.cc:232
void SetParameterSet(uint16_t params)
Set the parameter set from the given raw value.
uint32_t GetSerializedSize(void) const
Definition: mgt-headers.cc:118
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:494
HtCapabilities GetHtCapabilities(void) const
Return the HT capabilities.
Definition: mgt-headers.cc:584
void SetCapabilities(CapabilityInformation capabilities)
Set the Capability information.
Definition: mgt-headers.cc:741
uint8_t m_category
Category of the action.
Definition: mgt-headers.h:988
void SetDelayedBlockAck()
Enable delayed Block ACK.
uint16_t GetSerializedSize() const
Return the serialized size of this extended capabilities information element.
uint32_t Deserialize(Buffer::Iterator start)
Definition: mgt-headers.cc:691
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
Buffer::Iterator Serialize(Buffer::Iterator start) const
Serialize function.
void Serialize(Buffer::Iterator start) const
Definition: mgt-headers.cc:444
Implement the header for management frames of type probe response.
Definition: mgt-headers.h:612
uint64_t ReadLsbtohU64(void)
Definition: buffer.cc:1093
VhtCapabilities m_vhtCapability
VHT capabilities.
Definition: mgt-headers.h:495
ActionValue GetAction()
Return the action value.
SelfProtectedActionValue
SelfProtectedActionValue enumeration.
Definition: mgt-headers.h:888
SupportedRates m_rates
List of supported rates.
Definition: mgt-headers.h:304
uint16_t m_bufferSize
Buffer size.
Definition: mgt-headers.h:1241
uint64_t m_beaconInterval
Beacon interval.
Definition: mgt-headers.h:820
The IEEE 802.11ax HE Capabilities.
uint16_t GetListenInterval(void) const
Return the listen interval.
Definition: mgt-headers.cc:813
HeCapabilities m_heCapability
HE capabilities.
Definition: mgt-headers.h:171
uint32_t GetSerializedSize(void) const
Definition: mgt-headers.cc:649
uint16_t m_timeoutValue
Timeout.
Definition: mgt-headers.h:1242
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...
Ssid m_ssid
Service Set ID (SSID)
Definition: mgt-headers.h:165
void SetExtendedCapabilities(ExtendedCapabilities extendedcapabilities)
Set the Extended Capabilities.
Definition: mgt-headers.cc:753
void SetAction(CategoryValue type, ActionValue action)
Set action for this Action header.
void SetHeCapabilities(HeCapabilities hecapabilities)
Set the HE capabilities.
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:915
void SetHtCapabilities(HtCapabilities htcapabilities)
Set the HT capabilities.
Definition: mgt-headers.cc:250
uint32_t GetSerializedSize(void) const
void Serialize(Buffer::Iterator start) const
Implement the header for management frames of type beacon.
Definition: mgt-headers.h:841
Ssid GetSsid(void) const
Return the Service Set Identifier (SSID).
Definition: mgt-headers.cc:614
TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Definition: mgt-headers.cc:399
Implement the header for management frames of type reassociation request.
Definition: mgt-headers.h:180
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...
void Print(std::ostream &os) const
uint32_t Deserialize(Buffer::Iterator start)
StatusCode GetStatusCode(void)
Return the status code.
Definition: mgt-headers.cc:920
CapabilityInformation m_capability
Capability information.
Definition: mgt-headers.h:305
HtCapabilities GetHtCapabilities(void) const
Return the HT capabilities.
Definition: mgt-headers.cc:771
VhtCapabilities GetVhtCapabilities(void) const
Return the VHT capabilities.
Definition: mgt-headers.cc:280
Ssid m_ssid
Service set ID (SSID)
Definition: mgt-headers.h:819
void SetVhtCapabilities(VhtCapabilities vhtcapabilities)
Set the VHT capabilities.
Definition: mgt-headers.cc:88
HeOperation m_heOperation
HE operation.
Definition: mgt-headers.h:830
uint32_t Deserialize(Buffer::Iterator start)
HeCapabilities GetHeCapabilities(void) const
Return the HE capabilities.
Definition: mgt-headers.cc:304
uint16_t GetListenInterval(void) const
Return the listen interval.
Definition: mgt-headers.cc:626
uint32_t GetSerializedSize(void) const