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