A Discrete-Event Network Simulator
API
mgt-headers.cc
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2006 INRIA
4  * Copyright (c) 2009 MIRKO BANCHI
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation;
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  *
19  * Authors: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
20  * Mirko Banchi <mk.banchi@gmail.com>
21  */
22 
23 #include "mgt-headers.h"
24 #include "ns3/simulator.h"
25 
26 namespace ns3 {
27 
28 /***********************************************************
29  * Probe Request
30  ***********************************************************/
31 
32 NS_OBJECT_ENSURE_REGISTERED (MgtProbeRequestHeader);
33 
35 {
36 }
37 
38 void
40 {
41  m_ssid = ssid;
42 }
43 
44 Ssid
46 {
47  return m_ssid;
48 }
49 
50 void
52 {
53  m_rates = rates;
54 }
55 
56 void
58 {
59  m_htCapability = htcapabilities;
60 }
61 
64 {
65  return m_htCapability;
66 }
67 
68 void
70 {
71  m_vhtCapability = vhtcapabilities;
72 }
73 
76 {
77  return m_vhtCapability;
78 }
79 
80 void
82 {
83  m_heCapability = hecapabilities;
84 }
85 
88 {
89  return m_heCapability;
90 }
91 
94 {
95  return m_rates;
96 }
97 
98 uint32_t
100 {
101  uint32_t size = 0;
102  size += m_ssid.GetSerializedSize ();
103  size += m_rates.GetSerializedSize ();
108  return size;
109 }
110 
111 TypeId
113 {
114  static TypeId tid = TypeId ("ns3::MgtProbeRequestHeader")
115  .SetParent<Header> ()
116  .SetGroupName ("Wifi")
117  .AddConstructor<MgtProbeRequestHeader> ()
118  ;
119  return tid;
120 }
121 
122 TypeId
124 {
125  return GetTypeId ();
126 }
127 
128 void
129 MgtProbeRequestHeader::Print (std::ostream &os) const
130 {
131  os << "ssid=" << m_ssid << ", "
132  << "rates=" << m_rates << ", "
133  << "HT Capabilities=" << m_htCapability << " , "
134  << "VHT Capabilities=" << m_vhtCapability << " , "
135  << "HE Capabilities= " << m_heCapability;
136 }
137 
138 void
140 {
142  i = m_ssid.Serialize (i);
143  i = m_rates.Serialize (i);
144  i = m_rates.extended.Serialize (i);
145  i = m_htCapability.Serialize (i);
146  i = m_vhtCapability.Serialize (i);
147  i = m_heCapability.Serialize (i);
148 }
149 
150 uint32_t
152 {
154  i = m_ssid.Deserialize (i);
155  i = m_rates.Deserialize (i);
160  return i.GetDistanceFrom (start);
161 }
162 
163 
164 /***********************************************************
165  * Probe Response
166  ***********************************************************/
167 
169 
171 {
172 }
173 
175 {
176 }
177 
178 uint64_t
180 {
181  return m_timestamp;
182 }
183 
184 Ssid
186 {
187  return m_ssid;
188 }
189 
190 uint64_t
192 {
193  return m_beaconInterval;
194 }
195 
198 {
199  return m_rates;
200 }
201 
202 void
204 {
205  m_capability = capabilities;
206 }
207 
210 {
211  return m_capability;
212 }
213 
214 void
216 {
217  m_htCapability = htcapabilities;
218 }
219 
222 {
223  return m_htCapability;
224 }
225 
226 void
228 {
229  m_htOperation = htoperation;
230 }
231 
234 {
235  return m_htOperation;
236 }
237 
238 void
240 {
241  m_vhtCapability = vhtcapabilities;
242 }
243 
246 {
247  return m_vhtCapability;
248 }
249 
250 void
252 {
253  m_vhtOperation = vhtoperation;
254 }
255 
258 {
259  return m_vhtOperation;
260 }
261 
262 void
264 {
265  m_heCapability = hecapabilities;
266 }
267 
270 {
271  return m_heCapability;
272 }
273 
274 void
276 {
277  m_ssid = ssid;
278 }
279 
280 void
282 {
283  m_beaconInterval = us;
284 }
285 
286 void
288 {
289  m_rates = rates;
290 }
291 
292 void
294 {
295  m_dsssParameterSet = dsssParameterSet;
296 }
297 
300 {
301  return m_dsssParameterSet;
302 }
303 
304 void
306 {
307  m_erpInformation = erpInformation;
308 }
309 
312 {
313  return m_erpInformation;
314 }
315 
316 void
318 {
319  m_edcaParameterSet = edcaparameters;
320 }
321 
324 {
325  return m_edcaParameterSet;
326 }
327 
328 TypeId
330 {
331  static TypeId tid = TypeId ("ns3::MgtProbeResponseHeader")
332  .SetParent<Header> ()
333  .SetGroupName ("Wifi")
334  .AddConstructor<MgtProbeResponseHeader> ()
335  ;
336  return tid;
337 }
338 
339 TypeId
341 {
342  return GetTypeId ();
343 }
344 
345 uint32_t
347 {
348  uint32_t size = 0;
349  size += 8; //timestamp
350  size += 2; //beacon interval
351  size += m_capability.GetSerializedSize ();
352  size += m_ssid.GetSerializedSize ();
353  size += m_rates.GetSerializedSize ();
359  size += m_htOperation.GetSerializedSize ();
363  return size;
364 }
365 
366 void
367 MgtProbeResponseHeader::Print (std::ostream &os) const
368 {
369  os << "ssid=" << m_ssid << ", "
370  << "rates=" << m_rates << ", "
371  << "DSSS Parameter Set=" << m_dsssParameterSet << " , "
372  << "ERP information=" << m_erpInformation << ", "
373  << "HT Capabilities=" << m_htCapability << " , "
374  << "HT Operation=" << m_htOperation << " , "
375  << "VHT Capabilities=" << m_vhtCapability << " , "
376  << "VHT Operation=" << m_vhtOperation << " , "
377  << "HE Capabilities= " << m_heCapability;
378 }
379 
380 void
382 {
383  //timestamp
384  //beacon interval
385  //capability information
386  //ssid
387  //supported rates
388  //fh parameter set
389  //ds parameter set
390  //cf parameter set
391  //ibss parameter set
393  i.WriteHtolsbU64 (Simulator::Now ().GetMicroSeconds ());
394  i.WriteHtolsbU16 (m_beaconInterval / 1024);
395  i = m_capability.Serialize (i);
396  i = m_ssid.Serialize (i);
397  i = m_rates.Serialize (i);
399  i = m_erpInformation.Serialize (i);
400  i = m_rates.extended.Serialize (i);
402  i = m_htCapability.Serialize (i);
403  i = m_htOperation.Serialize (i);
404  i = m_vhtCapability.Serialize (i);
405  i = m_vhtOperation.Serialize (i);
406  i = m_heCapability.Serialize (i);
407 }
408 
409 uint32_t
411 {
413  m_timestamp = i.ReadLsbtohU64 ();
415  m_beaconInterval *= 1024;
416  i = m_capability.Deserialize (i);
417  i = m_ssid.Deserialize (i);
418  i = m_rates.Deserialize (i);
427  return i.GetDistanceFrom (start);
428 }
429 
430 
431 /***********************************************************
432  * Beacons
433  ***********************************************************/
434 
436 
437 /* static */
438 TypeId
440 {
441  static TypeId tid = TypeId ("ns3::MgtBeaconHeader")
443  .SetGroupName ("Wifi")
444  .AddConstructor<MgtBeaconHeader> ()
445  ;
446  return tid;
447 }
448 
449 
450 /***********************************************************
451  * Assoc Request
452  ***********************************************************/
453 
455 
457  : m_listenInterval (0)
458 {
459 }
460 
462 {
463 }
464 
465 void
467 {
468  m_ssid = ssid;
469 }
470 
471 void
473 {
474  m_rates = rates;
475 }
476 
477 void
479 {
480  m_listenInterval = interval;
481 }
482 
483 void
485 {
486  m_capability = capabilities;
487 }
488 
491 {
492  return m_capability;
493 }
494 
495 void
497 {
498  m_htCapability = htcapabilities;
499 }
500 
503 {
504  return m_htCapability;
505 }
506 
507 void
509 {
510  m_vhtCapability = vhtcapabilities;
511 }
512 
515 {
516  return m_vhtCapability;
517 }
518 
519 void
521 {
522  m_heCapability = hecapabilities;
523 }
524 
527 {
528  return m_heCapability;
529 }
530 
531 Ssid
533 {
534  return m_ssid;
535 }
536 
539 {
540  return m_rates;
541 }
542 
543 uint16_t
545 {
546  return m_listenInterval;
547 }
548 
549 TypeId
551 {
552  static TypeId tid = TypeId ("ns3::MgtAssocRequestHeader")
553  .SetParent<Header> ()
554  .SetGroupName ("Wifi")
555  .AddConstructor<MgtAssocRequestHeader> ()
556  ;
557  return tid;
558 }
559 
560 TypeId
562 {
563  return GetTypeId ();
564 }
565 
566 uint32_t
568 {
569  uint32_t size = 0;
570  size += m_capability.GetSerializedSize ();
571  size += 2;
572  size += m_ssid.GetSerializedSize ();
573  size += m_rates.GetSerializedSize ();
578  return size;
579 }
580 
581 void
582 MgtAssocRequestHeader::Print (std::ostream &os) const
583 {
584  os << "ssid=" << m_ssid << ", "
585  << "rates=" << m_rates << ", "
586  << "HT Capabilities=" << m_htCapability << " , "
587  << "VHT Capabilities=" << m_vhtCapability << " , "
588  << "HE Capabilities= " << m_heCapability;
589 }
590 
591 void
593 {
595  i = m_capability.Serialize (i);
597  i = m_ssid.Serialize (i);
598  i = m_rates.Serialize (i);
599  i = m_rates.extended.Serialize (i);
600  i = m_htCapability.Serialize (i);
601  i = m_vhtCapability.Serialize (i);
602  i = m_heCapability.Serialize (i);
603 }
604 
605 uint32_t
607 {
609  i = m_capability.Deserialize (i);
611  i = m_ssid.Deserialize (i);
612  i = m_rates.Deserialize (i);
617  return i.GetDistanceFrom (start);
618 }
619 
620 
621 /***********************************************************
622  * Assoc Response
623  ***********************************************************/
624 
626 
628  : m_aid (0)
629 {
630 }
631 
633 {
634 }
635 
638 {
639  return m_code;
640 }
641 
644 {
645  return m_rates;
646 }
647 
648 void
650 {
651  m_code = code;
652 }
653 
654 void
656 {
657  m_rates = rates;
658 }
659 
660 void
662 {
663  m_capability = capabilities;
664 }
665 
668 {
669  return m_capability;
670 }
671 
672 void
674 {
675  m_htCapability = htcapabilities;
676 }
677 
680 {
681  return m_htCapability;
682 }
683 
684 void
686 {
687  m_htOperation = htoperation;
688 }
689 
692 {
693  return m_htOperation;
694 }
695 
696 void
698 {
699  m_vhtCapability = vhtcapabilities;
700 }
701 
704 {
705  return m_vhtCapability;
706 }
707 
708 void
710 {
711  m_vhtOperation = vhtoperation;
712 }
713 
716 {
717  return m_vhtOperation;
718 }
719 
720 void
722 {
723  m_heCapability = hecapabilities;
724 }
725 
728 {
729  return m_heCapability;
730 }
731 
732 void
734 {
735  m_erpInformation = erpInformation;
736 }
737 
740 {
741  return m_erpInformation;
742 }
743 
744 void
746 {
747  m_edcaParameterSet = edcaparameters;
748 }
749 
752 {
753  return m_edcaParameterSet;
754 }
755 
756 TypeId
758 {
759  static TypeId tid = TypeId ("ns3::MgtAssocResponseHeader")
760  .SetParent<Header> ()
761  .SetGroupName ("Wifi")
762  .AddConstructor<MgtAssocResponseHeader> ()
763  ;
764  return tid;
765 }
766 
767 TypeId
769 {
770  return GetTypeId ();
771 }
772 
773 uint32_t
775 {
776  uint32_t size = 0;
777  size += m_capability.GetSerializedSize ();
778  size += m_code.GetSerializedSize ();
779  size += 2; //aid
780  size += m_rates.GetSerializedSize ();
785  size += m_htOperation.GetSerializedSize ();
789  return size;
790 }
791 
792 void
793 MgtAssocResponseHeader::Print (std::ostream &os) const
794 {
795  os << "status code=" << m_code << ", "
796  << "rates=" << m_rates << ", "
797  << "ERP information=" << m_erpInformation << ", "
798  << "HT Capabilities=" << m_htCapability << " , "
799  << "HT Operation=" << m_htOperation << " , "
800  << "VHT Capabilities=" << m_vhtCapability << " , "
801  << "VHT Operation=" << m_vhtOperation << " , "
802  << "HE Capabilities= " << m_heCapability;
803 }
804 
805 void
807 {
809  i = m_capability.Serialize (i);
810  i = m_code.Serialize (i);
811  i.WriteHtolsbU16 (m_aid);
812  i = m_rates.Serialize (i);
813  i = m_erpInformation.Serialize (i);
814  i = m_rates.extended.Serialize (i);
816  i = m_htCapability.Serialize (i);
817  i = m_htOperation.Serialize (i);
818  i = m_vhtCapability.Serialize (i);
819  i = m_vhtOperation.Serialize (i);
820  i = m_heCapability.Serialize (i);
821 }
822 
823 uint32_t
825 {
827  i = m_capability.Deserialize (i);
828  i = m_code.Deserialize (i);
829  m_aid = i.ReadLsbtohU16 ();
830  i = m_rates.Deserialize (i);
838  return i.GetDistanceFrom (start);
839 }
840 
841 
842 /**********************************************************
843  * ActionFrame
844  **********************************************************/
846 {
847 }
848 
850 {
851 }
852 
853 void
856 {
857  m_category = type;
858  switch (type)
859  {
860  case BLOCK_ACK:
861  {
862  m_actionValue = action.blockAck;
863  break;
864  }
865  case MESH:
866  {
867  m_actionValue = action.meshAction;
868  break;
869  }
870  case MULTIHOP:
871  {
872  m_actionValue = action.multihopAction;
873  break;
874  }
875  case SELF_PROTECTED:
876  {
878  break;
879  }
881  {
882  break;
883  }
884  }
885 }
886 
889 {
890  switch (m_category)
891  {
892  case BLOCK_ACK:
893  return BLOCK_ACK;
894  case MESH:
895  return MESH;
896  case MULTIHOP:
897  return MULTIHOP;
898  case SELF_PROTECTED:
899  return SELF_PROTECTED;
901  return VENDOR_SPECIFIC_ACTION;
902  default:
903  NS_FATAL_ERROR ("Unknown action value");
904  return SELF_PROTECTED;
905  }
906 }
907 
910 {
911  ActionValue retval;
912  retval.selfProtectedAction = PEER_LINK_OPEN; //Needs to be initialized to something to quiet valgrind in default cases
913  switch (m_category)
914  {
915  case BLOCK_ACK:
916  switch (m_actionValue)
917  {
920  break;
923  break;
924  case BLOCK_ACK_DELBA:
925  retval.blockAck = BLOCK_ACK_DELBA;
926  break;
927  }
928  break;
929 
930  case SELF_PROTECTED:
931  switch (m_actionValue)
932  {
933  case PEER_LINK_OPEN:
935  break;
936  case PEER_LINK_CONFIRM:
938  break;
939  case PEER_LINK_CLOSE:
941  break;
942  case GROUP_KEY_INFORM:
944  break;
945  case GROUP_KEY_ACK:
947  break;
948  default:
949  NS_FATAL_ERROR ("Unknown mesh peering management action code");
950  retval.selfProtectedAction = PEER_LINK_OPEN; /* quiet compiler */
951  }
952  break;
953 
954  case MESH:
955  switch (m_actionValue)
956  {
957  case LINK_METRIC_REPORT:
959  break;
960  case PATH_SELECTION:
961  retval.meshAction = PATH_SELECTION;
962  break;
963  case PORTAL_ANNOUNCEMENT:
965  break;
968  break;
969  case MDA_SETUP_REQUEST:
970  retval.meshAction = MDA_SETUP_REQUEST;
971  break;
972  case MDA_SETUP_REPLY:
973  retval.meshAction = MDA_SETUP_REPLY;
974  break;
977  break;
978  case MDAOP_ADVERTISMENTS:
980  break;
981  case MDAOP_SET_TEARDOWN:
983  break;
986  break;
989  break;
990  default:
991  NS_FATAL_ERROR ("Unknown mesh peering management action code");
992  retval.selfProtectedAction = PEER_LINK_OPEN; /* quiet compiler */
993  }
994  break;
995 
996  case MULTIHOP: //not yet supported
997  switch (m_actionValue)
998  {
999  case PROXY_UPDATE: //not used so far
1000  retval.multihopAction = PROXY_UPDATE;
1001  break;
1002  case PROXY_UPDATE_CONFIRMATION: //not used so far
1003  retval.multihopAction = PROXY_UPDATE;
1004  break;
1005  default:
1006  NS_FATAL_ERROR ("Unknown mesh peering management action code");
1007  retval.selfProtectedAction = PEER_LINK_OPEN; /* quiet compiler */
1008  }
1009  break;
1010  default:
1011  NS_FATAL_ERROR ("Unsupported mesh action");
1012  retval.selfProtectedAction = PEER_LINK_OPEN; /* quiet compiler */
1013  }
1014  return retval;
1015 }
1016 
1017 TypeId
1019 {
1020  static TypeId tid = TypeId ("ns3::WifiActionHeader")
1021  .SetParent<Header> ()
1022  .SetGroupName ("Wifi")
1023  .AddConstructor<WifiActionHeader> ()
1024  ;
1025  return tid;
1026 }
1027 
1028 TypeId
1030 {
1031  return GetTypeId ();
1032 }
1033 
1034 std::string
1036 {
1037  if (value == BLOCK_ACK)
1038  {
1039  return "BlockAck";
1040  }
1041  else if (value == MESH)
1042  {
1043  return "Mesh";
1044  }
1045  else if (value == SELF_PROTECTED)
1046  {
1047  return "SelfProtected";
1048  }
1049  else if (value == VENDOR_SPECIFIC_ACTION)
1050  {
1051  return "VendorSpecificAction";
1052  }
1053  else
1054  {
1055  std::ostringstream convert;
1056  convert << value;
1057  return convert.str ();
1058  }
1059 }
1060 std::string
1062 {
1063  if (value == PEER_LINK_OPEN)
1064  {
1065  return "PeerLinkOpen";
1066  }
1067  else if (value == PEER_LINK_CONFIRM)
1068  {
1069  return "PeerLinkConfirm";
1070  }
1071  else if (value == PEER_LINK_CLOSE)
1072  {
1073  return "PeerLinkClose";
1074  }
1075  else if (value == GROUP_KEY_INFORM)
1076  {
1077  return "GroupKeyInform";
1078  }
1079  else if (value == GROUP_KEY_ACK)
1080  {
1081  return "GroupKeyAck";
1082  }
1083  else
1084  {
1085  std::ostringstream convert;
1086  convert << value;
1087  return convert.str ();
1088  }
1089 }
1090 
1091 void
1092 WifiActionHeader::Print (std::ostream &os) const
1093 {
1094  os << "category=" << CategoryValueToString ((CategoryValue) m_category)
1096 }
1097 
1098 uint32_t
1100 {
1101  return 2;
1102 }
1103 
1104 void
1106 {
1107  start.WriteU8 (m_category);
1108  start.WriteU8 (m_actionValue);
1109 }
1110 
1111 uint32_t
1113 {
1114  Buffer::Iterator i = start;
1115  m_category = i.ReadU8 ();
1116  m_actionValue = i.ReadU8 ();
1117  return i.GetDistanceFrom (start);
1118 }
1119 
1120 
1121 /***************************************************
1122 * ADDBARequest
1123 ****************************************************/
1124 
1126 
1128  : m_dialogToken (1),
1129  m_amsduSupport (1),
1130  m_bufferSize (0)
1131 {
1132 }
1133 
1134 TypeId
1136 {
1137  static TypeId tid = TypeId ("ns3::MgtAddBaRequestHeader")
1138  .SetParent<Header> ()
1139  .SetGroupName ("Wifi")
1140  .AddConstructor<MgtAddBaRequestHeader> ()
1141  ;
1142  return tid;
1143 }
1144 
1145 TypeId
1147 {
1148  return GetTypeId ();
1149 }
1150 
1151 void
1152 MgtAddBaRequestHeader::Print (std::ostream &os) const
1153 {
1154 }
1155 
1156 uint32_t
1158 {
1159  uint32_t size = 0;
1160  size += 1; //Dialog token
1161  size += 2; //Block ack parameter set
1162  size += 2; //Block ack timeout value
1163  size += 2; //Starting sequence control
1164  return size;
1165 }
1166 
1167 void
1169 {
1170  Buffer::Iterator i = start;
1171  i.WriteU8 (m_dialogToken);
1175 }
1176 
1177 uint32_t
1179 {
1180  Buffer::Iterator i = start;
1181  m_dialogToken = i.ReadU8 ();
1185  return i.GetDistanceFrom (start);
1186 }
1187 
1188 void
1190 {
1191  m_policy = 0;
1192 }
1193 
1194 void
1196 {
1197  m_policy = 1;
1198 }
1199 
1200 void
1202 {
1203  NS_ASSERT (tid < 16);
1204  m_tid = tid;
1205 }
1206 
1207 void
1209 {
1211 }
1212 
1213 void
1215 {
1216  m_bufferSize = size;
1217 }
1218 
1219 void
1221 {
1222  m_startingSeq = seq;
1223 }
1224 
1225 void
1227 {
1228  m_startingSeq = (seqControl >> 4) & 0x0fff;
1229 }
1230 
1231 void
1233 {
1234  m_amsduSupport = supported;
1235 }
1236 
1237 uint8_t
1239 {
1240  return m_tid;
1241 }
1242 
1243 bool
1245 {
1246  return (m_policy == 1) ? true : false;
1247 }
1248 
1249 uint16_t
1251 {
1252  return m_timeoutValue;
1253 }
1254 
1255 uint16_t
1257 {
1258  return m_bufferSize;
1259 }
1260 
1261 bool
1263 {
1264  return (m_amsduSupport == 1) ? true : false;
1265 }
1266 
1267 uint16_t
1269 {
1270  return m_startingSeq;
1271 }
1272 
1273 uint16_t
1275 {
1276  return (m_startingSeq << 4) & 0xfff0;
1277 }
1278 
1279 uint16_t
1281 {
1282  uint16_t res = 0;
1283  res |= m_amsduSupport;
1284  res |= m_policy << 1;
1285  res |= m_tid << 2;
1286  res |= m_bufferSize << 6;
1287  return res;
1288 }
1289 
1290 void
1292 {
1293  m_amsduSupport = (params) & 0x01;
1294  m_policy = (params >> 1) & 0x01;
1295  m_tid = (params >> 2) & 0x0f;
1296  m_bufferSize = (params >> 6) & 0x03ff;
1297 }
1298 
1299 
1300 /***************************************************
1301 * ADDBAResponse
1302 ****************************************************/
1303 
1305 
1307  : m_dialogToken (1),
1308  m_amsduSupport (1),
1309  m_bufferSize (0)
1310 {
1311 }
1312 
1313 TypeId
1315 {
1316  static TypeId tid = TypeId ("ns3::MgtAddBaResponseHeader")
1317  .SetParent<Header> ()
1318  .SetGroupName ("Wifi")
1319  .AddConstructor<MgtAddBaResponseHeader> ()
1320  ;
1321  return tid;
1322 }
1323 
1324 TypeId
1326 {
1327  return GetTypeId ();
1328 }
1329 
1330 void
1331 MgtAddBaResponseHeader::Print (std::ostream &os) const
1332 {
1333  os << "status code=" << m_code;
1334 }
1335 
1336 uint32_t
1338 {
1339  uint32_t size = 0;
1340  size += 1; //Dialog token
1341  size += m_code.GetSerializedSize (); //Status code
1342  size += 2; //Block ack parameter set
1343  size += 2; //Block ack timeout value
1344  return size;
1345 }
1346 
1347 void
1349 {
1350  Buffer::Iterator i = start;
1351  i.WriteU8 (m_dialogToken);
1352  i = m_code.Serialize (i);
1355 }
1356 
1357 uint32_t
1359 {
1360  Buffer::Iterator i = start;
1361  m_dialogToken = i.ReadU8 ();
1362  i = m_code.Deserialize (i);
1365  return i.GetDistanceFrom (start);
1366 }
1367 
1368 void
1370 {
1371  m_policy = 0;
1372 }
1373 
1374 void
1376 {
1377  m_policy = 1;
1378 }
1379 
1380 void
1382 {
1383  NS_ASSERT (tid < 16);
1384  m_tid = tid;
1385 }
1386 
1387 void
1389 {
1391 }
1392 
1393 void
1395 {
1396  m_bufferSize = size;
1397 }
1398 
1399 void
1401 {
1402  m_code = code;
1403 }
1404 
1405 void
1407 {
1408  m_amsduSupport = supported;
1409 }
1410 
1411 StatusCode
1413 {
1414  return m_code;
1415 }
1416 
1417 uint8_t
1419 {
1420  return m_tid;
1421 }
1422 
1423 bool
1425 {
1426  return (m_policy == 1) ? true : false;
1427 }
1428 
1429 uint16_t
1431 {
1432  return m_timeoutValue;
1433 }
1434 
1435 uint16_t
1437 {
1438  return m_bufferSize;
1439 }
1440 
1441 bool
1443 {
1444  return (m_amsduSupport == 1) ? true : false;
1445 }
1446 
1447 uint16_t
1449 {
1450  uint16_t res = 0;
1451  res |= m_amsduSupport;
1452  res |= m_policy << 1;
1453  res |= m_tid << 2;
1454  res |= m_bufferSize << 6;
1455  return res;
1456 }
1457 
1458 void
1460 {
1461  m_amsduSupport = (params) & 0x01;
1462  m_policy = (params >> 1) & 0x01;
1463  m_tid = (params >> 2) & 0x0f;
1464  m_bufferSize = (params >> 6) & 0x03ff;
1465 }
1466 
1467 
1468 /***************************************************
1469 * DelBa
1470 ****************************************************/
1471 
1473 
1475  : m_reasonCode (1)
1476 {
1477 }
1478 
1479 TypeId
1481 {
1482  static TypeId tid = TypeId ("ns3::MgtDelBaHeader")
1483  .SetParent<Header> ()
1484  .SetGroupName ("Wifi")
1485  .AddConstructor<MgtDelBaHeader> ()
1486  ;
1487  return tid;
1488 }
1489 
1490 TypeId
1492 {
1493  return GetTypeId ();
1494 }
1495 
1496 void
1497 MgtDelBaHeader::Print (std::ostream &os) const
1498 {
1499 }
1500 
1501 uint32_t
1503 {
1504  uint32_t size = 0;
1505  size += 2; //DelBa parameter set
1506  size += 2; //Reason code
1507  return size;
1508 }
1509 
1510 void
1512 {
1513  Buffer::Iterator i = start;
1516 }
1517 
1518 uint32_t
1520 {
1521  Buffer::Iterator i = start;
1523  m_reasonCode = i.ReadLsbtohU16 ();
1524  return i.GetDistanceFrom (start);
1525 }
1526 
1527 bool
1529 {
1530  return (m_initiator == 1) ? true : false;
1531 }
1532 
1533 uint8_t
1535 {
1536  NS_ASSERT (m_tid < 16);
1537  uint8_t tid = static_cast<uint8_t> (m_tid);
1538  return tid;
1539 }
1540 
1541 void
1543 {
1544  m_initiator = 1;
1545 }
1546 
1547 void
1549 {
1550  m_initiator = 0;
1551 }
1552 
1553 void
1555 {
1556  NS_ASSERT (tid < 16);
1557  m_tid = static_cast<uint16_t> (tid);
1558 }
1559 
1560 uint16_t
1562 {
1563  uint16_t res = 0;
1564  res |= m_initiator << 11;
1565  res |= m_tid << 12;
1566  return res;
1567 }
1568 
1569 void
1571 {
1572  m_initiator = (params >> 11) & 0x01;
1573  m_tid = (params >> 12) & 0x0f;
1574 }
1575 
1576 } //namespace ns3
Protocol header serialization and deserialization.
Definition: header.h:42
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:93
uint16_t GetBufferSize(void) const
Return the buffer size.
void Serialize(Buffer::Iterator start) const
Definition: mgt-headers.cc:806
StatusCode m_code
Status code.
Definition: mgt-headers.h:998
uint32_t GetSerializedSize(void) const
Buffer::Iterator Serialize(Buffer::Iterator start) const
This information element is a bit special in that it is only included if the STA is an ERP STA...
void SetHeCapabilities(HeCapabilities hecapabilities)
Set the HE capabilities.
Definition: mgt-headers.cc:81
SupportedRates GetSupportedRates(void) const
Return the supported rates.
Definition: mgt-headers.cc:197
TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Definition: mgt-headers.cc:561
Implement the header for management frames of type association request.
Definition: mgt-headers.h:45
DsssParameterSet m_dsssParameterSet
DSSS Parameter Set.
Definition: mgt-headers.h:587
void SetCapabilities(CapabilityInformation capabilities)
Set the Capability information.
Definition: mgt-headers.cc:484
uint8_t m_policy
Block ACK policy.
Definition: mgt-headers.h:1000
void Print(std::ostream &os) const
VhtCapabilities GetVhtCapabilities(void) const
Return the VHT capabilities.
Definition: mgt-headers.cc:75
Buffer::Iterator Deserialize(Buffer::Iterator start)
Deserialize capability information from the given buffer.
CapabilityInformation GetCapabilities(void) const
Return the Capability information.
Definition: mgt-headers.cc:667
TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Definition: mgt-headers.cc:340
Ssid GetSsid(void) const
Return the Service Set Identifier (SSID).
Definition: mgt-headers.cc:185
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition: object-base.h:45
SupportedRates m_rates
List of supported rates.
Definition: mgt-headers.h:303
CategoryValue
CategoryValue enumeration.
Definition: mgt-headers.h:637
static TypeId GetTypeId(void)
Register this type.
Definition: mgt-headers.cc:550
uint16_t m_timeoutValue
Timeout.
Definition: mgt-headers.h:881
HeCapabilities GetHeCapabilities(void) const
Return the HE capabilities.
Definition: mgt-headers.cc:727
See IEEE 802.11 chapter 7.3.1.11 Header format: | category: 1 | action value: 1 |.
Definition: mgt-headers.h:625
void Print(std::ostream &os) const
HtCapabilities m_htCapability
HT capabilities.
Definition: mgt-headers.h:402
uint64_t GetBeaconIntervalUs(void) const
Return the beacon interval in microseconds unit.
Definition: mgt-headers.cc:191
SupportedRates m_rates
List of supported rates.
Definition: mgt-headers.h:150
static TypeId GetTypeId(void)
Register this type.
Definition: mgt-headers.cc:112
void SetImmediateBlockAck()
Enable immediate Block ACK.
SupportedRates m_rates
List of supported rates.
Definition: mgt-headers.h:585
uint8_t m_dialogToken
Not used for now.
Definition: mgt-headers.h:876
def start()
Definition: core.py:1790
CapabilityInformation m_capability
Capability information.
Definition: mgt-headers.h:304
CapabilityInformation m_capability
Capability information.
Definition: mgt-headers.h:586
uint16_t GetSerializedSize() const
Return the serialized size of this supported rates information element.
void SetBufferSize(uint16_t size)
Set buffer size.
Implement the header for management frames of type add block ack request.
Definition: mgt-headers.h:758
bool IsImmediateBlockAck(void) const
Return whether the Block ACK policy is immediate Block ACK.
HtCapabilities m_htCapability
HT capabilities.
Definition: mgt-headers.h:152
HeCapabilities m_heCapability
HE capabilities.
Definition: mgt-headers.h:404
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:403
uint32_t GetSerializedSize(void) const
Definition: mgt-headers.cc:567
The HT Capabilities Information ElementThis class knows how to serialise and deserialise the HT Capab...
void SetHtCapabilities(HtCapabilities htcapabilities)
Set the HT capabilities.
Definition: mgt-headers.cc:496
void SetCapabilities(CapabilityInformation capabilities)
Set the Capability information.
Definition: mgt-headers.cc:203
void SetSsid(Ssid ssid)
Set the Service Set Identifier (SSID).
Definition: mgt-headers.cc:466
uint32_t GetSerializedSize(void) const
Definition: status-code.cc:48
void Print(std::ostream &os) const
uint16_t m_startingSeq
Starting sequence number.
Definition: mgt-headers.h:882
Buffer::Iterator Serialize(Buffer::Iterator start) const
Serialize capability information to the given buffer.
The HT Operation Information ElementThis class knows how to serialise and deserialise the HT Operatio...
Definition: ht-operation.h:52
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
Definition: fatal-error.h:162
std::string CategoryValueToString(CategoryValue value) const
Category value to string function.
VhtOperation m_vhtOperation
VHT operation.
Definition: mgt-headers.h:591
uint16_t GetBufferSize(void) const
Return the buffer size.
VhtCapabilities GetVhtCapabilities(void) const
Return the VHT capabilities.
Definition: mgt-headers.cc:703
TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
uint16_t GetSerializedSize() const
Return the serialized size of this DSSS Parameter Set.
CategoryValue GetCategory()
Return the category value.
Definition: mgt-headers.cc:888
void SetVhtOperation(VhtOperation vhtoperation)
Set the VHT operation.
Definition: mgt-headers.cc:709
void SetDelayedBlockAck()
Enable delayed Block ACK.
ns3::Time timeout
void SetTid(uint8_t)
Set Traffic ID (TID).
void SetHeCapabilities(HeCapabilities hecapabilities)
Set the HE capabilities.
Definition: mgt-headers.cc:520
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:151
void SetHtOperation(HtOperation htoperation)
Set the HT operation.
Definition: mgt-headers.cc:685
uint16_t m_bufferSize
Buffer size.
Definition: mgt-headers.h:880
ErpInformation m_erpInformation
ERP information.
Definition: mgt-headers.h:311
TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Definition: mgt-headers.cc:123
void SetTimeout(uint16_t timeout)
Set timeout.
Buffer::Iterator Deserialize(Buffer::Iterator i)
Deserialize entire IE, which must be present.
Ssid GetSsid(void) const
Return the Service Set Identifier (SSID).
Definition: mgt-headers.cc:45
Capability information.
void SetSupportedRates(SupportedRates rates)
Set the supported rates.
Definition: mgt-headers.cc:51
void SetAmsduSupport(bool supported)
Enable or disable A-MSDU support.
uint32_t GetDistanceFrom(Iterator const &o) const
Definition: buffer.cc:786
uint16_t GetSerializedSize() const
Get the size of the serialized IE including Element ID and length fields.
Ssid GetSsid(void) const
Return the Service Set Identifier (SSID).
Definition: mgt-headers.cc:532
iterator in a Buffer instance
Definition: buffer.h:98
TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
void SetSupportedRates(SupportedRates rates)
Set the supported rates.
Definition: mgt-headers.cc:472
ErpInformation GetErpInformation(void) const
Return the ERP information.
Definition: mgt-headers.cc:739
void SetDsssParameterSet(DsssParameterSet dsssParameterSet)
Set the DSSS Parameter Set.
Definition: mgt-headers.cc:293
bool IsAmsduSupported(void) const
Return whether A-MSDU capability is supported.
uint16_t GetStartingSequenceControl(void) const
Return the raw sequence control.
uint16_t m_reasonCode
Not used for now.
Definition: mgt-headers.h:1073
void Serialize(Buffer::Iterator start) const
void SetTid(uint8_t tid)
Set Traffic ID (TID).
void Print(std::ostream &os) const
Definition: mgt-headers.cc:367
void Serialize(Buffer::Iterator start) const
Definition: mgt-headers.cc:381
VhtCapabilities GetVhtCapabilities(void) const
Return the VHT capabilities.
Definition: mgt-headers.cc:245
ExtendedSupportedRatesIE extended
extended suppoted rates info element
SupportedRates GetSupportedRates(void) const
Return the supported rates.
Definition: mgt-headers.cc:538
void SetListenInterval(uint16_t interval)
Set the listen interval.
Definition: mgt-headers.cc:478
static TypeId GetTypeId(void)
Register this type.
uint8_t m_amsduSupport
Flag if A-MSDU is supported.
Definition: mgt-headers.h:999
void SetErpInformation(ErpInformation erpInformation)
Set the ERP information.
Definition: mgt-headers.cc:305
TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
uint16_t m_initiator
initiator
Definition: mgt-headers.h:1071
TypeId GetInstanceTypeId() const
Get the most derived TypeId for this Object.
uint16_t GetSerializedSize() const
Return the serialized size of this EDCA Parameter Set.
void SetParameterSet(uint16_t params)
Set the parameter set from the given raw value.
Buffer::Iterator Serialize(Buffer::Iterator start) const
This information element is a bit special in that it is only included if the STA is an HT STA...
uint8_t m_tid
Traffic ID.
Definition: mgt-headers.h:879
SupportedRates m_rates
List of supported rates.
Definition: mgt-headers.h:401
ErpInformation GetErpInformation(void) const
Return the ERP information.
Definition: mgt-headers.cc:311
CapabilityInformation GetCapabilities(void) const
Return the Capability information.
Definition: mgt-headers.cc:490
uint32_t GetSerializedSize() const
The IEEE 802.11ac VHT Capabilities.
void SetStartingSequenceControl(uint16_t seqControl)
Set sequence control with the given raw value.
void SetErpInformation(ErpInformation erpInformation)
Set the ERP information.
Definition: mgt-headers.cc:733
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 GetSerializedSize() const
Set serialize size function.
void SetImmediateBlockAck()
Enable immediate Block ACK.
Buffer::Iterator Serialize(Buffer::Iterator start) const
This information element is a bit special in that it is only included if there are more than 8 rates...
void SetTid(uint8_t tid)
Set Traffic ID (TID).
uint16_t GetListenInterval(void) const
Return the listen interval.
Definition: mgt-headers.cc:544
void SetParameterSet(uint16_t params)
Set the parameter set from the given raw value.
void Print(std::ostream &os) const
Definition: mgt-headers.cc:129
HeCapabilities m_heCapability
HE capabilities.
Definition: mgt-headers.h:313
uint32_t Deserialize(Buffer::Iterator start)
Definition: mgt-headers.cc:151
MeshActionValue meshAction
mesh action
Definition: mgt-headers.h:698
uint8_t m_amsduSupport
Flag if A-MSDU is supported.
Definition: mgt-headers.h:877
Buffer::Iterator DeserializeIfPresent(Buffer::Iterator i)
Deserialize entire IE if it is present.
VhtOperation m_vhtOperation
VHT operation.
Definition: mgt-headers.h:310
uint16_t GetSerializedSize() const
Return the serialized size of this HT Operation IE.
void SetStartingSequence(uint16_t seq)
Set the starting sequence number.
void Serialize(Buffer::Iterator start) const
uint8_t GetTid(void) const
Return the Traffic ID (TID).
void SetVhtCapabilities(VhtCapabilities vhtcapabilities)
Set the VHT capabilities.
Definition: mgt-headers.cc:697
ErpInformation m_erpInformation
ERP information.
Definition: mgt-headers.h:593
EdcaParameterSet GetEdcaParameterSet(void) const
Return the EDCA Parameter Set.
Definition: mgt-headers.cc:751
void SetEdcaParameterSet(EdcaParameterSet edcaParameterSet)
Set the EDCA Parameter Set.
Definition: mgt-headers.cc:317
VhtOperation GetVhtOperation(void) const
Return the VHT operation.
Definition: mgt-headers.cc:715
SupportedRates GetSupportedRates(void)
Return the supported rates.
Definition: mgt-headers.cc:643
uint64_t m_timestamp
Timestamp.
Definition: mgt-headers.h:582
EdcaParameterSet m_edcaParameterSet
EDCA Parameter Set.
Definition: mgt-headers.h:594
void SetHtCapabilities(HtCapabilities htcapabilities)
Set the HT capabilities.
Definition: mgt-headers.cc:57
Buffer::Iterator Serialize(Buffer::Iterator start) const
This information element is a bit special in that it is only included if the STA is a QoS STA...
uint16_t m_listenInterval
listen interval
Definition: mgt-headers.h:155
TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Definition: mgt-headers.cc:768
uint64_t GetTimestamp()
Return the time stamp.
Definition: mgt-headers.cc:179
uint32_t GetSerializedSize(void) const
void SetVhtOperation(VhtOperation vhtoperation)
Set the VHT operation.
Definition: mgt-headers.cc:251
Buffer::Iterator Serialize(Buffer::Iterator start) const
Definition: status-code.cc:54
void SetByOriginator(void)
Set the initiator bit in the DELBA.
Status code for association response.
Definition: status-code.h:31
void SetSsid(Ssid ssid)
Set the Service Set Identifier (SSID).
Definition: mgt-headers.cc:275
std::string SelfProtectedActionValueToString(SelfProtectedActionValue value) const
Self protected action value to string function.
void Print(std::ostream &os) const
Definition: mgt-headers.cc:582
void SetByRecipient(void)
Un-set the initiator bit in the DELBA.
bool IsAmsduSupported(void) const
Return whether A-MSDU capability is supported.
static TypeId GetTypeId(void)
Register this type.
VhtCapabilities GetVhtCapabilities(void) const
Return the VHT capabilities.
Definition: mgt-headers.cc:514
VhtCapabilities m_vhtCapability
VHT capabilities.
Definition: mgt-headers.h:590
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint32_t GetSerializedSize(void) const
void SetBeaconIntervalUs(uint64_t us)
Set the beacon interval in microseconds unit.
Definition: mgt-headers.cc:281
The EDCA Parameter SetThis class knows how to serialise and deserialise the EDCA Parameter Set...
static TypeId GetTypeId(void)
Register this type.
Definition: mgt-headers.cc:329
void SetBufferSize(uint16_t size)
Set buffer size.
Buffer::Iterator Deserialize(Buffer::Iterator start)
Definition: status-code.cc:61
uint8_t GetTid(void) const
Return the Traffic ID (TID).
void SetHtOperation(HtOperation htoperation)
Set the HT operation.
Definition: mgt-headers.cc:227
void Serialize(Buffer::Iterator start) const
uint32_t Deserialize(Buffer::Iterator start)
HtCapabilities GetHtCapabilities(void) const
Return the HT capabilities.
Definition: mgt-headers.cc:221
StatusCode GetStatusCode(void) const
Return the status code.
HtCapabilities GetHtCapabilities(void) const
Return the HT capabilities.
Definition: mgt-headers.cc:63
bool IsByOriginator(void) const
Check if the initiator bit in the DELBA is setted.
void SetHeCapabilities(HeCapabilities hecapabilities)
Set the HE capabilities.
Definition: mgt-headers.cc:263
HtOperation GetHtOperation(void) const
Return the HT operation.
Definition: mgt-headers.cc:691
void SetVhtCapabilities(VhtCapabilities vhtcapabilities)
Set the VHT capabilities.
Definition: mgt-headers.cc:508
tuple ssid
Definition: third.py:93
VhtCapabilities m_vhtCapability
VHT capabilities.
Definition: mgt-headers.h:153
HtCapabilities m_htCapability
HT capabilities.
Definition: mgt-headers.h:588
uint32_t Deserialize(Buffer::Iterator start)
Definition: mgt-headers.cc:410
static Time Now(void)
Return the current simulation virtual time.
Definition: simulator.cc:249
static TypeId GetTypeId(void)
Register this type.
Definition: mgt-headers.cc:439
uint8_t m_tid
Traffic ID.
Definition: mgt-headers.h:1001
void Print(std::ostream &os) const
Definition: mgt-headers.cc:793
Buffer::Iterator Serialize(Buffer::Iterator start) const
This information element is a bit special in that it is only included if the STA is an VHT STA...
uint16_t GetTimeout(void) const
Return the timeout.
uint8_t GetTid(void) const
Return the Traffic ID (TID).
uint8_t m_actionValue
Action value.
Definition: mgt-headers.h:750
The IEEE 802.11 SSID Information Element.
Definition: ssid.h:35
Implement the header for management frames of type probe request.
Definition: mgt-headers.h:321
void SetVhtCapabilities(VhtCapabilities vhtcapabilities)
Set the VHT capabilities.
Definition: mgt-headers.cc:239
bool IsImmediateBlockAck(void) const
Return whether the Block ACK policy is immediate Block ACK.
void WriteHtolsbU16(uint16_t data)
Definition: buffer.cc:913
Implement the header for management frames of type association response.
Definition: mgt-headers.h:163
uint32_t Deserialize(Buffer::Iterator start)
StatusCode m_code
Status code.
Definition: mgt-headers.h:305
The DSSS Parameter SetThis class knows how to serialise and deserialise the DSSS Parameter Set...
SelfProtectedActionValue selfProtectedAction
self protected action
Definition: mgt-headers.h:700
uint16_t GetStartingSequence(void) const
Return the starting sequence number.
void SetCapabilities(CapabilityInformation capabilities)
Set the Capability information.
Definition: mgt-headers.cc:661
HeCapabilities GetHeCapabilities(void) const
Return the HE capabilities.
Definition: mgt-headers.cc:87
void SetEdcaParameterSet(EdcaParameterSet edcaParameterSet)
Set the EDCA Parameter Set.
Definition: mgt-headers.cc:745
uint16_t m_tid
Traffic ID.
Definition: mgt-headers.h:1072
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:589
uint16_t GetSerializedSize() const
Get the serialized size.
BlockAckActionValue blockAck
block ack
Definition: mgt-headers.h:701
void WriteHtolsbU64(uint64_t data)
Definition: buffer.cc:929
static TypeId GetTypeId(void)
Register this type.
Definition: mgt-headers.cc:757
void SetSupportedRates(SupportedRates rates)
Set the supported rates.
Definition: mgt-headers.cc:655
uint8_t m_dialogToken
Not used for now.
Definition: mgt-headers.h:997
uint16_t GetParameterSet(void) const
Return the raw parameter set.
uint32_t GetSerializedSize(void) const
Return the serialized size of capability information.
MultihopActionValue multihopAction
multi hop action
Definition: mgt-headers.h:699
Implement the header for management frames of type add block ack response.
Definition: mgt-headers.h:890
EdcaParameterSet GetEdcaParameterSet(void) const
Return the EDCA Parameter Set.
Definition: mgt-headers.cc:323
Implement the header for management frames of type del block ack.
Definition: mgt-headers.h:1011
typedef for union of different ActionValues
Definition: mgt-headers.h:696
EdcaParameterSet m_edcaParameterSet
EDCA Parameter Set.
Definition: mgt-headers.h:312
HeCapabilities m_heCapability
HE capabilities.
Definition: mgt-headers.h:592
VhtOperation GetVhtOperation(void) const
Return the VHT operation.
Definition: mgt-headers.cc:257
HtOperation GetHtOperation(void) const
Return the HT operation.
Definition: mgt-headers.cc:233
uint8_t ReadU8(void)
Definition: buffer.h:1021
uint8_t m_policy
Block ACK policy.
Definition: mgt-headers.h:878
HtCapabilities m_htCapability
HT capabilities.
Definition: mgt-headers.h:307
void SetSupportedRates(SupportedRates rates)
Set the supported rates.
Definition: mgt-headers.cc:287
Ssid m_ssid
Service Set ID (SSID)
Definition: mgt-headers.h:400
void SetHtCapabilities(HtCapabilities htcapabilities)
Set the HT capabilities.
Definition: mgt-headers.cc:673
uint16_t ReadLsbtohU16(void)
Definition: buffer.cc:1068
The ErpInformation Information ElementThis class knows how to serialise and deserialise the ErpInform...
CapabilityInformation GetCapabilities(void) const
Return the Capability information.
Definition: mgt-headers.cc:209
void SetSsid(Ssid ssid)
Set the Service Set Identifier (SSID).
Definition: mgt-headers.cc:39
Buffer::Iterator Serialize(Buffer::Iterator start) const
Serialize function.
void SetStatusCode(StatusCode code)
Set the status code.
Definition: mgt-headers.cc:649
void SetParameterSet(uint16_t params)
Set the parameter set from the given raw value.
void SetAmsduSupport(bool supported)
Enable or disable A-MSDU support.
HtOperation m_htOperation
HT operation.
Definition: mgt-headers.h:308
uint8_t m_category
Category of the action.
Definition: mgt-headers.h:749
void SetDelayedBlockAck()
Enable delayed Block ACK.
uint32_t Deserialize(Buffer::Iterator start)
Definition: mgt-headers.cc:606
void SetTimeout(uint16_t timeout)
Set timeout.
Implement the header for management frames of type probe response.
Definition: mgt-headers.h:412
uint64_t ReadLsbtohU64(void)
Definition: buffer.cc:1096
uint16_t GetSerializedSize() const
Return the serialized size of this HT capability information element.
VhtCapabilities m_vhtCapability
VHT capabilities.
Definition: mgt-headers.h:309
uint16_t GetParameterSet(void) const
Return the raw parameter set.
ActionValue GetAction()
Return the action value.
Definition: mgt-headers.cc:909
uint16_t m_bufferSize
Buffer size.
Definition: mgt-headers.h:1002
uint16_t GetParameterSet(void) const
Return the raw parameter set.
uint64_t m_beaconInterval
Beacon interval.
Definition: mgt-headers.h:584
HeCapabilities GetHeCapabilities(void) const
Return the HE capabilities.
Definition: mgt-headers.cc:269
uint16_t GetSerializedSize() const
Return the serialized size of this HT Operations IE.
DsssParameterSet GetDsssParameterSet(void) const
Return the DSSS Parameter Set.
Definition: mgt-headers.cc:299
uint32_t GetSerializedSize(void) const
Definition: mgt-headers.cc:99
The IEEE 802.11ax HE Capabilities.
HeCapabilities m_heCapability
HE capabilities.
Definition: mgt-headers.h:154
Buffer::Iterator Serialize(Buffer::Iterator start) const
This information element is a bit special in that it is only included if the STA is an HT STA...
uint16_t m_timeoutValue
Timeout.
Definition: mgt-headers.h:1003
uint16_t GetSerializedSize() const
Return the serialized size of this ErpInformation information element.
Ssid m_ssid
Service Set ID (SSID)
Definition: mgt-headers.h:149
void SetAction(CategoryValue type, ActionValue action)
Set action for this Action header.
Definition: mgt-headers.cc:854
HtCapabilities GetHtCapabilities(void) const
Return the HT capabilities.
Definition: mgt-headers.cc:502
uint32_t GetSerializedSize(void) const
Definition: mgt-headers.cc:346
void SetHeCapabilities(HeCapabilities hecapabilities)
Set the HE capabilities.
Definition: mgt-headers.cc:721
a unique identifier for an interface.
Definition: type-id.h:58
void Serialize(Buffer::Iterator start) const
Definition: mgt-headers.cc:139
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition: type-id.cc:914
void SetHtCapabilities(HtCapabilities htcapabilities)
Set the HT capabilities.
Definition: mgt-headers.cc:215
Implement the header for management frames of type beacon.
Definition: mgt-headers.h:602
HeCapabilities GetHeCapabilities(void) const
Return the HE capabilities.
Definition: mgt-headers.cc:526
Buffer::Iterator Serialize(Buffer::Iterator i) const
Serialize entire IE including Element ID and length fields.
uint32_t Deserialize(Buffer::Iterator start)
Definition: mgt-headers.cc:824
uint32_t GetSerializedSize(void) const
Definition: mgt-headers.cc:774
StatusCode GetStatusCode(void)
Return the status code.
Definition: mgt-headers.cc:637
Ssid m_ssid
Service set ID (SSID)
Definition: mgt-headers.h:583
void SetVhtCapabilities(VhtCapabilities vhtcapabilities)
Set the VHT capabilities.
Definition: mgt-headers.cc:69
void Serialize(Buffer::Iterator start) const
uint32_t Deserialize(Buffer::Iterator start)
SelfProtectedActionValue
SelfProtectedActionValue enumeration.
Definition: mgt-headers.h:649
uint16_t GetTimeout(void) const
Return the timeout.
Buffer::Iterator Serialize(Buffer::Iterator start) const
This information element is a bit special in that it is only included if the STA does support DSSS...
HtCapabilities GetHtCapabilities(void) const
Return the HT capabilities.
Definition: mgt-headers.cc:679
void Print(std::ostream &os) const
void Serialize(Buffer::Iterator start) const
Definition: mgt-headers.cc:592