A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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  * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
20  * Author: Mirko Banchi <mk.banchi@gmail.com>
21  */
22 #include "mgt-headers.h"
23 #include "ns3/simulator.h"
24 #include "ns3/assert.h"
25 
26 namespace ns3 {
27 
28 /***********************************************************
29  * Probe Request
30  ***********************************************************/
31 
32 NS_OBJECT_ENSURE_REGISTERED (MgtProbeRequestHeader)
33  ;
34 
36 {
37 }
38 
39 void
41 {
42  m_ssid = ssid;
43 }
44 Ssid
46 {
47  return m_ssid;
48 }
49 void
51 {
52  m_rates = rates;
53 }
54 void
56 {
57  m_htCapability=htcapabilities;
58 }
59 
62 {
63  return m_htCapability;
64 }
67 {
68  return m_rates;
69 }
70 uint32_t
72 {
73  uint32_t size = 0;
74  size += m_ssid.GetSerializedSize ();
75  size += m_rates.GetSerializedSize ();
78  return size;
79 }
80 TypeId
82 {
83  static TypeId tid = TypeId ("ns3::MgtProbeRequestHeader")
84  .SetParent<Header> ()
85  .AddConstructor<MgtProbeRequestHeader> ()
86  ;
87  return tid;
88 }
89 TypeId
91 {
92  return GetTypeId ();
93 }
94 void
95 MgtProbeRequestHeader::Print (std::ostream &os) const
96 {
97  os << "ssid=" << m_ssid << ", "
98  << "rates=" << m_rates << ", "
99  << "HT Capabilities=" << m_htCapability;
100 }
101 void
103 {
105  i = m_ssid.Serialize (i);
106  i = m_rates.Serialize (i);
107  i = m_rates.extended.Serialize (i);
108  i = m_htCapability.Serialize(i);
109 }
110 uint32_t
112 {
114  i = m_ssid.Deserialize (i);
115  i = m_rates.Deserialize (i);
118  return i.GetDistanceFrom (start);
119 }
120 
121 
122 /***********************************************************
123  * Probe Response
124  ***********************************************************/
125 
127  ;
128 
130 {
131 }
133 {
134 }
135 uint64_t
137 {
138  return m_timestamp;
139 }
140 Ssid
142 {
143  return m_ssid;
144 }
145 uint64_t
147 {
148  return m_beaconInterval;
149 }
152 {
153  return m_rates;
154 }
155 void
157 {
158  m_htCapability=htcapabilities;
159 }
160 
163 {
164  return m_htCapability;
165 }
166 void
168 {
169  m_ssid = ssid;
170 }
171 void
173 {
174  m_beaconInterval = us;
175 }
176 void
178 {
179  m_rates = rates;
180 }
181 TypeId
183 {
184  static TypeId tid = TypeId ("ns3::MgtProbeResponseHeader")
185  .SetParent<Header> ()
186  .AddConstructor<MgtProbeResponseHeader> ()
187  ;
188  return tid;
189 }
190 TypeId
192 {
193  return GetTypeId ();
194 }
195 uint32_t
197 {
198  uint32_t size = 0;
199  size += 8; // timestamp
200  size += 2; // beacon interval
201  size += m_capability.GetSerializedSize ();
202  size += m_ssid.GetSerializedSize ();
203  size += m_rates.GetSerializedSize ();
204  //size += 3; // ds parameter set
207  // xxx
208  return size;
209 }
210 void
211 MgtProbeResponseHeader::Print (std::ostream &os) const
212 {
213  os << "ssid=" << m_ssid << ", "
214  << "rates=" << m_rates << ", "
215  << "HT Capabilities=" << m_htCapability;
216 }
217 void
219 {
220  // timestamp
221  // beacon interval
222  // capability information
223  // ssid
224  // supported rates
225  // fh parameter set
226  // ds parameter set
227  // cf parameter set
228  // ibss parameter set
229  //XXX
231  i.WriteHtolsbU64 (Simulator::Now ().GetMicroSeconds ());
232  i.WriteHtolsbU16 (m_beaconInterval / 1024);
233  i = m_capability.Serialize (i);
234  i = m_ssid.Serialize (i);
235  i = m_rates.Serialize (i);
236  //i.WriteU8 (0, 3); // ds parameter set.
237  i = m_rates.extended.Serialize (i);
238  i = m_htCapability.Serialize(i);
239 }
240 uint32_t
242 {
244  m_timestamp = i.ReadLsbtohU64 ();
246  m_beaconInterval *= 1024;
247  i = m_capability.Deserialize (i);
248  i = m_ssid.Deserialize (i);
249  i = m_rates.Deserialize (i);
250  //i.Next (3); // ds parameter set
253  return i.GetDistanceFrom (start);
254 }
255 
256 /***********************************************************
257  * Assoc Request
258  ***********************************************************/
259 
261  ;
262 
264  : m_listenInterval (0)
265 {
266 }
268 {
269 }
270 
271 void
273 {
274  m_ssid = ssid;
275 }
276 void
278 {
279  m_rates = rates;
280 }
281 void
283 {
284  m_htCapability = htcapabilities;
285 }
286 void
288 {
289  m_listenInterval = interval;
290 }
293 {
294  return m_htCapability;
295 }
296 Ssid
298 {
299  return m_ssid;
300 }
303 {
304  return m_rates;
305 }
306 uint16_t
308 {
309  return m_listenInterval;
310 }
311 
312 TypeId
314 {
315  static TypeId tid = TypeId ("ns3::MgtAssocRequestHeader")
316  .SetParent<Header> ()
317  .AddConstructor<MgtAssocRequestHeader> ()
318  ;
319  return tid;
320 }
321 TypeId
323 {
324  return GetTypeId ();
325 }
326 uint32_t
328 {
329  uint32_t size = 0;
330  size += m_capability.GetSerializedSize ();
331  size += 2;
332  size += m_ssid.GetSerializedSize ();
333  size += m_rates.GetSerializedSize ();
336  return size;
337 }
338 void
339 MgtAssocRequestHeader::Print (std::ostream &os) const
340 {
341  os << "ssid=" << m_ssid << ", "
342  << "rates=" << m_rates<< ", "
343  << "HT Capabilities=" << m_htCapability;
344 }
345 void
347 {
349  i = m_capability.Serialize (i);
351  i = m_ssid.Serialize (i);
352  i = m_rates.Serialize (i);
353  i = m_rates.extended.Serialize (i);
354  i = m_htCapability.Serialize(i);
355 }
356 uint32_t
358 {
360  i = m_capability.Deserialize (i);
362  i = m_ssid.Deserialize (i);
363  i = m_rates.Deserialize (i);
366  return i.GetDistanceFrom (start);
367 }
368 
369 /***********************************************************
370  * Assoc Response
371  ***********************************************************/
372 
374  ;
375 
377  : m_aid (0)
378 {
379 }
381 {
382 }
383 
386 {
387  return m_code;
388 }
391 {
392  return m_rates;
393 }
394 void
396 {
397  m_code = code;
398 }
399 void
401 {
402  m_rates = rates;
403 }
404 void
406 {
407  m_htCapability=htcapabilities;
408 }
409 
412 {
413  return m_htCapability;
414 }
415 TypeId
417 {
418  static TypeId tid = TypeId ("ns3::MgtAssocResponseHeader")
419  .SetParent<Header> ()
420  .AddConstructor<MgtAssocResponseHeader> ()
421  ;
422  return tid;
423 }
424 TypeId
426 {
427  return GetTypeId ();
428 }
429 uint32_t
431 {
432  uint32_t size = 0;
433  size += m_capability.GetSerializedSize ();
434  size += m_code.GetSerializedSize ();
435  size += 2; // aid
436  size += m_rates.GetSerializedSize ();
439  return size;
440 }
441 
442 void
443 MgtAssocResponseHeader::Print (std::ostream &os) const
444 {
445  os << "status code=" << m_code << ", "
446  << "rates=" << m_rates << ", "
447  << "HT Capabilities=" << m_htCapability;
448 }
449 void
451 {
453  i = m_capability.Serialize (i);
454  i = m_code.Serialize (i);
455  i.WriteHtolsbU16 (m_aid);
456  i = m_rates.Serialize (i);
457  i = m_rates.extended.Serialize (i);
458  i = m_htCapability.Serialize(i);
459 }
460 uint32_t
462 {
464  i = m_capability.Deserialize (i);
465  i = m_code.Deserialize (i);
466  m_aid = i.ReadLsbtohU16 ();
467  i = m_rates.Deserialize (i);
470  return i.GetDistanceFrom (start);
471 }
472 /**********************************************************
473  * ActionFrame
474  **********************************************************/
476 {
477 }
479 {
480 }
481 void
484 {
485  m_category = type;
486 
487  switch (type)
488  {
489  case BLOCK_ACK:
490  {
491  m_actionValue = action.blockAck;
492  break;
493  }
494  case MESH_PEERING_MGT:
495  {
496  m_actionValue = action.peerLink;
497  break;
498  }
499  case MESH_PATH_SELECTION:
500  {
501  m_actionValue = action.pathSelection;
502  break;
503  }
504  case MESH_LINK_METRIC:
505  case MESH_INTERWORKING:
509  break;
510  }
511 }
514 {
515  switch (m_category)
516  {
517  case BLOCK_ACK:
518  return BLOCK_ACK;
519  case MESH_PEERING_MGT:
520  return MESH_PEERING_MGT;
521  case MESH_LINK_METRIC:
522  return MESH_LINK_METRIC;
523  case MESH_PATH_SELECTION:
524  return MESH_PATH_SELECTION;
525  case MESH_INTERWORKING:
526  return MESH_INTERWORKING;
530  return MESH_PROXY_FORWARDING;
532  return VENDOR_SPECIFIC_ACTION;
533  default:
534  NS_FATAL_ERROR ("Unknown action value");
535  return MESH_PEERING_MGT;
536  }
537 }
540 {
541  ActionValue retval;
542  retval.peerLink = PEER_LINK_OPEN; // Needs to be initialized to something to quiet valgrind in default cases
543  switch (m_category)
544  {
545  case BLOCK_ACK:
546  switch (m_actionValue)
547  {
550  break ;
553  break ;
554  case BLOCK_ACK_DELBA:
555  retval.blockAck = BLOCK_ACK_DELBA;
556  break ;
557  }
558  break ;
559 
560  case MESH_PEERING_MGT:
561  switch (m_actionValue)
562  {
563  case PEER_LINK_OPEN:
564  retval.peerLink = PEER_LINK_OPEN;
565  break ;
566  case PEER_LINK_CONFIRM:
567  retval.peerLink = PEER_LINK_CONFIRM;
568  break ;
569  case PEER_LINK_CLOSE:
570  retval.peerLink = PEER_LINK_CLOSE;
571  break ;
572  default:
573  NS_FATAL_ERROR ("Unknown mesh peering management action code");
574  retval.peerLink = PEER_LINK_OPEN; /* quiet compiler */
575  }
576  break ;
577 
578  case MESH_PATH_SELECTION:
579  switch (m_actionValue)
580  {
581  case PATH_SELECTION:
582  retval.pathSelection = PATH_SELECTION;
583  break ;
584  default:
585  NS_FATAL_ERROR ("Unknown mesh path selection action code");
586  retval.peerLink = PEER_LINK_OPEN; /* quiet compiler */
587  }
588  break ;
590  break ;
591  case MESH_LINK_METRIC:
592  // not yet supported
593  case MESH_INTERWORKING:
594  // not yet supported
596  // not yet supported
597  default:
598  NS_FATAL_ERROR ("Unsupported mesh action");
599  retval.peerLink = PEER_LINK_OPEN; /* quiet compiler */
600  }
601  return retval;
602 }
603 TypeId
605 {
606  static TypeId tid = TypeId ("ns3::WifiActionHeader")
607  .SetParent<Header> ()
608  .AddConstructor<WifiActionHeader> ();
609  return tid;
610 }
611 TypeId
613 {
614  return GetTypeId ();
615 }
616 void
617 WifiActionHeader::Print (std::ostream &os) const
618 {
619 }
620 uint32_t
622 {
623  return 2;
624 }
625 void
627 {
628  start.WriteU8 (m_category);
629  start.WriteU8 (m_actionValue);
630 }
631 uint32_t
633 {
635  m_category = i.ReadU8 ();
636  m_actionValue = i.ReadU8 ();
637  return i.GetDistanceFrom (start);
638 }
639 
640 /***************************************************
641 * ADDBARequest
642 ****************************************************/
643 
645  ;
646 
648  : m_dialogToken (1),
649  m_amsduSupport (1),
650  m_bufferSize (0)
651 {
652 }
653 
654 TypeId
656 {
657  static TypeId tid = TypeId ("ns3::MgtAddBaRequestHeader")
658  .SetParent<Header> ()
659  .AddConstructor<MgtAddBaRequestHeader> ();
660  return tid;
661 }
662 
663 TypeId
665 {
666  return GetTypeId ();
667 }
668 
669 void
670 MgtAddBaRequestHeader::Print (std::ostream &os) const
671 {
672 }
673 
674 uint32_t
676 {
677  uint32_t size = 0;
678  size += 1; //Dialog token
679  size += 2; //Block ack parameter set
680  size += 2; //Block ack timeout value
681  size += 2; //Starting sequence control
682  return size;
683 }
684 
685 void
687 {
693 }
694 
695 uint32_t
697 {
699  m_dialogToken = i.ReadU8 ();
703  return i.GetDistanceFrom (start);
704 }
705 
706 void
708 {
709  m_policy = 0;
710 }
711 
712 void
714 {
715  m_policy = 1;
716 }
717 
718 void
720 {
721  NS_ASSERT (tid < 16);
722  m_tid = tid;
723 }
724 
725 void
727 {
729 }
730 
731 void
733 {
734  m_bufferSize = size;
735 }
736 
737 void
739 {
740  m_startingSeq = seq;
741 }
742 
743 void
745 {
746  m_amsduSupport = supported;
747 }
748 
749 uint8_t
751 {
752  return m_tid;
753 }
754 
755 bool
757 {
758  return (m_policy == 1) ? true : false;
759 }
760 
761 uint16_t
763 {
764  return m_timeoutValue;
765 }
766 
767 uint16_t
769 {
770  return m_bufferSize;
771 }
772 
773 bool
775 {
776  return (m_amsduSupport == 1) ? true : false;
777 }
778 
779 uint16_t
781 {
782  return m_startingSeq;
783 }
784 
785 uint16_t
787 {
788  return (m_startingSeq << 4) & 0xfff0;
789 }
790 
791 void
793 {
794  m_startingSeq = (seqControl >> 4) & 0x0fff;
795 }
796 
797 uint16_t
799 {
800  uint16_t res = 0;
801  res |= m_amsduSupport;
802  res |= m_policy << 1;
803  res |= m_tid << 2;
804  res |= m_bufferSize << 6;
805  return res;
806 }
807 
808 void
810 {
811  m_amsduSupport = (params) & 0x01;
812  m_policy = (params >> 1) & 0x01;
813  m_tid = (params >> 2) & 0x0f;
814  m_bufferSize = (params >> 6) & 0x03ff;
815 }
816 
817 /***************************************************
818 * ADDBAResponse
819 ****************************************************/
820 
822  ;
823 
825  : m_dialogToken (1),
826  m_amsduSupport (1),
827  m_bufferSize (0)
828 {
829 }
830 
831 TypeId
833 {
834  static TypeId tid = TypeId ("ns3::MgtAddBaResponseHeader")
835  .SetParent<Header> ()
836  .AddConstructor<MgtAddBaResponseHeader> ()
837  ;
838  return tid;
839 }
840 
841 TypeId
843 {
844  return GetTypeId ();
845 }
846 
847 void
848 MgtAddBaResponseHeader::Print (std::ostream &os) const
849 {
850  os << "status code=" << m_code;
851 }
852 
853 uint32_t
855 {
856  uint32_t size = 0;
857  size += 1; //Dialog token
858  size += m_code.GetSerializedSize (); //Status code
859  size += 2; //Block ack parameter set
860  size += 2; //Block ack timeout value
861  return size;
862 }
863 
864 void
866 {
869  i = m_code.Serialize (i);
872 }
873 
874 uint32_t
876 {
878  m_dialogToken = i.ReadU8 ();
879  i = m_code.Deserialize (i);
882  return i.GetDistanceFrom (start);
883 }
884 
885 void
887 {
888  m_policy = 0;
889 }
890 
891 void
893 {
894  m_policy = 1;
895 }
896 
897 void
899 {
900  NS_ASSERT (tid < 16);
901  m_tid = tid;
902 }
903 
904 void
906 {
908 }
909 
910 void
912 {
913  m_bufferSize = size;
914 }
915 
916 void
918 {
919  m_code = code;
920 }
921 
922 void
924 {
925  m_amsduSupport = supported;
926 }
927 
930 {
931  return m_code;
932 }
933 
934 uint8_t
936 {
937  return m_tid;
938 }
939 
940 bool
942 {
943  return (m_policy == 1) ? true : false;
944 }
945 
946 uint16_t
948 {
949  return m_timeoutValue;
950 }
951 
952 uint16_t
954 {
955  return m_bufferSize;
956 }
957 
958 bool
960 {
961  return (m_amsduSupport == 1) ? true : false;
962 }
963 
964 uint16_t
966 {
967  uint16_t res = 0;
968  res |= m_amsduSupport;
969  res |= m_policy << 1;
970  res |= m_tid << 2;
971  res |= m_bufferSize << 6;
972  return res;
973 }
974 
975 void
977 {
978  m_amsduSupport = (params) & 0x01;
979  m_policy = (params >> 1) & 0x01;
980  m_tid = (params >> 2) & 0x0f;
981  m_bufferSize = (params >> 6) & 0x03ff;
982 }
983 
984 /***************************************************
985 * DelBa
986 ****************************************************/
987 
989  ;
990 
992  : m_reasonCode (1)
993 {
994 }
995 
996 TypeId
998 {
999  static TypeId tid = TypeId ("ns3::MgtDelBaHeader")
1000  .SetParent<Header> ()
1001  .AddConstructor<MgtDelBaHeader> ()
1002  ;
1003  return tid;
1004 }
1005 
1006 TypeId
1008 {
1009  return GetTypeId ();
1010 }
1011 
1012 void
1013 MgtDelBaHeader::Print (std::ostream &os) const
1014 {
1015 }
1016 
1017 uint32_t
1019 {
1020  uint32_t size = 0;
1021  size += 2; //DelBa parameter set
1022  size += 2; //Reason code
1023  return size;
1024 }
1025 
1026 void
1028 {
1029  Buffer::Iterator i = start;
1032 }
1033 
1034 uint32_t
1036 {
1037  Buffer::Iterator i = start;
1039  m_reasonCode = i.ReadLsbtohU16 ();
1040  return i.GetDistanceFrom (start);
1041 }
1042 
1043 bool
1045 {
1046  return (m_initiator == 1) ? true : false;
1047 }
1048 
1049 uint8_t
1051 {
1052  NS_ASSERT (m_tid < 16);
1053  uint8_t tid = static_cast<uint8_t> (m_tid);
1054  return tid;
1055 }
1056 
1057 void
1059 {
1060  m_initiator = 1;
1061 }
1062 
1063 void
1065 {
1066  m_initiator = 0;
1067 }
1068 
1069 void
1071 {
1072  NS_ASSERT (tid < 16);
1073  m_tid = static_cast<uint16_t> (tid);
1074 }
1075 
1076 uint16_t
1078 {
1079  uint16_t res = 0;
1080  res |= m_initiator << 11;
1081  res |= m_tid << 12;
1082  return res;
1083 }
1084 
1085 void
1087 {
1088  m_initiator = (params >> 11) & 0x01;
1089  m_tid = (params >> 12) & 0x0f;
1090 }
1091 
1092 } // namespace ns3
Protocol header serialization and deserialization.
Definition: header.h:42
static TypeId GetTypeId(void)
Definition: mgt-headers.cc:832
virtual uint32_t Deserialize(Buffer::Iterator start)
Definition: mgt-headers.cc:696
SupportedRates GetSupportedRates(void) const
Return the supported rates.
Definition: mgt-headers.cc:66
uint16_t GetBufferSize(void) const
Return the buffer size.
Definition: mgt-headers.cc:953
virtual void Serialize(Buffer::Iterator start) const
Definition: mgt-headers.cc:450
StatusCode m_code
Status code.
Definition: mgt-headers.h:685
virtual uint32_t GetSerializedSize(void) const
SupportedRates GetSupportedRates(void) const
Return the supported rates.
Definition: mgt-headers.cc:151
virtual TypeId GetInstanceTypeId(void) const
Definition: mgt-headers.cc:322
Implement the header for management frames of type association request.
Definition: mgt-headers.h:40
uint8_t m_policy
Block ACK policy.
Definition: mgt-headers.h:687
virtual void Print(std::ostream &os) const
Definition: mgt-headers.cc:617
Buffer::Iterator Deserialize(Buffer::Iterator start)
Deserialize capability information from the given buffer.
virtual TypeId GetInstanceTypeId(void) const
Definition: mgt-headers.cc:191
Ssid GetSsid(void) const
Return the Service Set Identifier (SSID).
Definition: mgt-headers.cc:141
SupportedRates m_rates
List of supported rates.
Definition: mgt-headers.h:168
static TypeId GetTypeId(void)
Definition: mgt-headers.cc:313
uint16_t m_timeoutValue
Timeout.
Definition: mgt-headers.h:573
virtual void Print(std::ostream &os) const
Definition: mgt-headers.cc:670
HtCapabilities m_htCapability
HT capabilities.
Definition: mgt-headers.h:231
uint64_t GetBeaconIntervalUs(void) const
Return the beacon interval in microseconds unit.
Definition: mgt-headers.cc:146
SupportedRates m_rates
List of supported rates.
Definition: mgt-headers.h:105
static TypeId GetTypeId(void)
Definition: mgt-headers.cc:81
void SetImmediateBlockAck()
Enable immediate Block ACK.
Definition: mgt-headers.cc:713
SupportedRates m_rates
List of supported rates.
Definition: mgt-headers.h:311
CapabilityInformation m_capability
Capability information.
Definition: mgt-headers.h:169
CapabilityInformation m_capability
Capability information.
Definition: mgt-headers.h:312
uint16_t GetSerializedSize() const
Return the serialized size of this supported rates information element.
void SetBufferSize(uint16_t size)
Set buffer size.
Definition: mgt-headers.cc:732
Implement the header for management frames of type add block ack request.
Definition: mgt-headers.h:454
bool IsImmediateBlockAck(void) const
Return whether the Block ACK policy is immediate Block ACK.
Definition: mgt-headers.cc:941
HtCapabilities m_htCapability
HT capabilities.
Definition: mgt-headers.h:107
#define NS_ASSERT(condition)
Definition: assert.h:64
virtual uint32_t GetSerializedSize(void) const
Definition: mgt-headers.cc:327
NS_OBJECT_ENSURE_REGISTERED(NullMessageSimulatorImpl)
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:282
void SetSsid(Ssid ssid)
Set the Service Set Identifier (SSID).
Definition: mgt-headers.cc:272
uint32_t GetSerializedSize(void) const
Definition: status-code.cc:47
virtual void Print(std::ostream &os) const
Definition: mgt-headers.cc:848
uint16_t m_startingSeq
Starting sequence number.
Definition: mgt-headers.h:574
void SetAction(enum CategoryValue type, ActionValue action)
Set action for this Action header.
Definition: mgt-headers.cc:482
Buffer::Iterator Serialize(Buffer::Iterator start) const
Serialize capability information to the given buffer.
CategoryValue
Compatible with open80211s implementation Category values - see 802.11-2012 Table 8-38...
Definition: mgt-headers.h:346
uint16_t GetBufferSize(void) const
Return the buffer size.
Definition: mgt-headers.cc:768
virtual TypeId GetInstanceTypeId(void) const
Definition: mgt-headers.cc:842
CategoryValue GetCategory()
Return the category value.
Definition: mgt-headers.cc:513
void SetDelayedBlockAck()
Enable delayed Block ACK.
Definition: mgt-headers.cc:886
ns3::Time timeout
enum PathSelectionActionValue pathSelection
Definition: mgt-headers.h:414
void SetTid(uint8_t)
Set Traffic ID (TID).
void SetStatusCode(StatusCode code)
Set the status code.
Definition: mgt-headers.cc:917
The Supported Rates Information ElementThis class knows how to serialise and deserialise the Supporte...
CapabilityInformation m_capability
Capability information.
Definition: mgt-headers.h:106
uint16_t m_bufferSize
Buffer size.
Definition: mgt-headers.h:572
virtual TypeId GetInstanceTypeId(void) const
Definition: mgt-headers.cc:90
void SetTimeout(uint16_t timeout)
Set timeout.
Definition: mgt-headers.cc:905
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
void SetSupportedRates(SupportedRates rates)
Set the supported rates.
Definition: mgt-headers.cc:50
void SetAmsduSupport(bool supported)
Enable or disable A-MSDU support.
Definition: mgt-headers.cc:744
uint32_t GetDistanceFrom(Iterator const &o) const
Definition: buffer.cc:807
#define NS_FATAL_ERROR(msg)
fatal error handling
Definition: fatal-error.h:72
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:297
iterator in a Buffer instance
Definition: buffer.h:98
virtual TypeId GetInstanceTypeId(void) const
void SetSupportedRates(SupportedRates rates)
Set the supported rates.
Definition: mgt-headers.cc:277
bool IsAmsduSupported(void) const
Return whether A-MSDU capability is supported.
Definition: mgt-headers.cc:959
uint16_t GetStartingSequenceControl(void) const
Return the raw sequence control.
Definition: mgt-headers.cc:786
virtual void Serialize(Buffer::Iterator start) const
Definition: mgt-headers.cc:865
void SetTid(uint8_t tid)
Set Traffic ID (TID).
Definition: mgt-headers.cc:898
virtual void Print(std::ostream &os) const
Definition: mgt-headers.cc:211
virtual void Serialize(Buffer::Iterator start) const
Definition: mgt-headers.cc:218
ExtendedSupportedRatesIE extended
SupportedRates GetSupportedRates(void) const
Return the supported rates.
Definition: mgt-headers.cc:302
void SetListenInterval(uint16_t interval)
Set the listen interval.
Definition: mgt-headers.cc:287
static TypeId GetTypeId(void)
Definition: mgt-headers.cc:604
uint8_t m_amsduSupport
Flag if A-MSDU is supported.
Definition: mgt-headers.h:686
virtual TypeId GetInstanceTypeId(void) const
Definition: mgt-headers.cc:664
virtual TypeId GetInstanceTypeId() const
Definition: mgt-headers.cc:612
void SetParameterSet(uint16_t params)
Set the parameter set from the given raw value.
Definition: mgt-headers.cc:809
uint8_t m_tid
Traffic ID.
Definition: mgt-headers.h:571
SupportedRates m_rates
List of supported rates.
Definition: mgt-headers.h:230
virtual uint32_t GetSerializedSize() const
Definition: mgt-headers.cc:621
void SetStartingSequenceControl(uint16_t seqControl)
Set sequence control with the given raw value.
Definition: mgt-headers.cc:792
void SetImmediateBlockAck()
Enable immediate Block ACK.
Definition: mgt-headers.cc:892
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).
Definition: mgt-headers.cc:719
uint16_t GetListenInterval(void) const
Return the listen interval.
Definition: mgt-headers.cc:307
void SetParameterSet(uint16_t params)
Set the parameter set from the given raw value.
Definition: mgt-headers.cc:976
virtual void Print(std::ostream &os) const
Definition: mgt-headers.cc:95
virtual uint32_t Deserialize(Buffer::Iterator start)
Definition: mgt-headers.cc:111
enum BlockAckActionValue blockAck
Definition: mgt-headers.h:417
uint8_t m_amsduSupport
Flag if A-MSDU is supported.
Definition: mgt-headers.h:569
Buffer::Iterator DeserializeIfPresent(Buffer::Iterator i)
Deserialize entire IE if it is present.
void SetStartingSequence(uint16_t seq)
Set the starting sequence number.
Definition: mgt-headers.cc:738
virtual void Serialize(Buffer::Iterator start) const
Definition: mgt-headers.cc:686
uint8_t GetTid(void) const
Return the Traffic ID (TID).
Definition: mgt-headers.cc:750
SupportedRates GetSupportedRates(void)
Return the supported rates.
Definition: mgt-headers.cc:390
uint64_t m_timestamp
Timestamp.
Definition: mgt-headers.h:308
void SetHtCapabilities(HtCapabilities htcapabilities)
Set the HT capabilities.
Definition: mgt-headers.cc:55
virtual TypeId GetInstanceTypeId(void) const
Definition: mgt-headers.cc:425
uint64_t GetTimestamp()
Return the time stamp.
Definition: mgt-headers.cc:136
virtual uint32_t GetSerializedSize(void) const
Definition: mgt-headers.cc:675
Buffer::Iterator Serialize(Buffer::Iterator start) const
Definition: status-code.cc:52
void SetByOriginator(void)
Set the initiator bit in the DELBA.
Status code for association response.
Definition: status-code.h:32
void SetSsid(Ssid ssid)
Set the Service Set Identifier (SSID).
Definition: mgt-headers.cc:167
virtual void Print(std::ostream &os) const
Definition: mgt-headers.cc:339
void SetByRecipient(void)
Un-set the initiator bit in the DELBA.
bool IsAmsduSupported(void) const
Return whether A-MSDU capability is supported.
Definition: mgt-headers.cc:774
static TypeId GetTypeId(void)
Definition: mgt-headers.cc:997
virtual uint32_t GetSerializedSize(void) const
Definition: mgt-headers.cc:854
void SetBeaconIntervalUs(uint64_t us)
Set the beacon interval in microseconds unit.
Definition: mgt-headers.cc:172
static TypeId GetTypeId(void)
Definition: mgt-headers.cc:182
void SetBufferSize(uint16_t size)
Set buffer size.
Definition: mgt-headers.cc:911
Buffer::Iterator Deserialize(Buffer::Iterator start)
Definition: status-code.cc:58
uint8_t GetTid(void) const
Return the Traffic ID (TID).
virtual void Serialize(Buffer::Iterator start) const
virtual uint32_t Deserialize(Buffer::Iterator start)
Definition: mgt-headers.cc:632
HtCapabilities GetHtCapabilities(void) const
Return the HT capabilities.
Definition: mgt-headers.cc:162
StatusCode GetStatusCode(void) const
Return the status code.
Definition: mgt-headers.cc:929
HtCapabilities GetHtCapabilities(void) const
Return the HT capabilities.
Definition: mgt-headers.cc:61
bool IsByOriginator(void) const
Check if the initiator bit in the DELBA is setted.
HtCapabilities m_htCapability
HT capabilities.
Definition: mgt-headers.h:313
virtual uint32_t Deserialize(Buffer::Iterator start)
Definition: mgt-headers.cc:241
static Time Now(void)
Return the "current simulation time".
Definition: simulator.cc:180
uint8_t m_tid
Traffic ID.
Definition: mgt-headers.h:688
virtual void Print(std::ostream &os) const
Definition: mgt-headers.cc:443
uint16_t GetTimeout(void) const
Return the timeout.
Definition: mgt-headers.cc:947
uint8_t GetTid(void) const
Return the Traffic ID (TID).
Definition: mgt-headers.cc:935
uint8_t m_actionValue
Action value.
Definition: mgt-headers.h:447
The IEEE 802.11 SSID Information Element.
Definition: ssid.h:35
bool IsImmediateBlockAck(void) const
Return whether the Block ACK policy is immediate Block ACK.
Definition: mgt-headers.cc:756
void WriteHtolsbU16(uint16_t data)
Definition: buffer.cc:935
Implement the header for management frames of type association response.
Definition: mgt-headers.h:116
virtual uint32_t Deserialize(Buffer::Iterator start)
Definition: mgt-headers.cc:875
StatusCode m_code
Status code.
Definition: mgt-headers.h:170
uint16_t GetStartingSequence(void) const
Return the starting sequence number.
Definition: mgt-headers.cc:780
uint16_t m_tid
Traffic ID.
Definition: mgt-headers.h:753
static TypeId GetTypeId(void)
Definition: mgt-headers.cc:655
void WriteU8(uint8_t data)
Definition: buffer.h:690
void WriteHtolsbU64(uint64_t data)
Definition: buffer.cc:951
static TypeId GetTypeId(void)
Definition: mgt-headers.cc:416
void SetSupportedRates(SupportedRates rates)
Set the supported rates.
Definition: mgt-headers.cc:400
uint16_t GetParameterSet(void) const
Return the raw parameter set.
uint32_t GetSerializedSize(void) const
Return the serialized size of capability information.
Implement the header for management frames of type add block ack response.
Definition: mgt-headers.h:582
Implement the header for management frames of type del block ack.
Definition: mgt-headers.h:698
typedef for union of different ActionValues
Definition: mgt-headers.h:410
enum PeerLinkMgtActionValue peerLink
Definition: mgt-headers.h:412
uint8_t ReadU8(void)
Definition: buffer.h:819
uint8_t m_policy
Block ACK policy.
Definition: mgt-headers.h:570
HtCapabilities m_htCapability
HT capabilities.
Definition: mgt-headers.h:172
void SetSupportedRates(SupportedRates rates)
Set the supported rates.
Definition: mgt-headers.cc:177
Ssid m_ssid
Service Set ID (SSID)
Definition: mgt-headers.h:229
void SetHtCapabilities(HtCapabilities htcapabilities)
Set the HT capabilities.
Definition: mgt-headers.cc:405
uint16_t ReadLsbtohU16(void)
Definition: buffer.cc:1090
void SetSsid(Ssid ssid)
Set the Service Set Identifier (SSID).
Definition: mgt-headers.cc:40
void SetStatusCode(StatusCode code)
Set the status code.
Definition: mgt-headers.cc:395
void SetParameterSet(uint16_t params)
Set the parameter set from the given raw value.
void SetAmsduSupport(bool supported)
Enable or disable A-MSDU support.
Definition: mgt-headers.cc:923
uint8_t m_category
Category of the action.
Definition: mgt-headers.h:446
void SetDelayedBlockAck()
Enable delayed Block ACK.
Definition: mgt-headers.cc:707
virtual uint32_t Deserialize(Buffer::Iterator start)
Definition: mgt-headers.cc:357
void SetTimeout(uint16_t timeout)
Set timeout.
Definition: mgt-headers.cc:726
Implement the header for management frames of type probe response.
Definition: mgt-headers.h:239
uint64_t ReadLsbtohU64(void)
Definition: buffer.cc:1118
uint16_t GetSerializedSize() const
Return the serialized size of this HT capability information element.
uint16_t GetParameterSet(void) const
Return the raw parameter set.
Definition: mgt-headers.cc:798
ActionValue GetAction()
Return the action value.
Definition: mgt-headers.cc:539
uint16_t m_bufferSize
Buffer size.
Definition: mgt-headers.h:689
uint16_t GetParameterSet(void) const
Return the raw parameter set.
Definition: mgt-headers.cc:965
uint64_t m_beaconInterval
Beacon interval.
Definition: mgt-headers.h:310
virtual uint32_t GetSerializedSize(void) const
Definition: mgt-headers.cc:71
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:690
Ssid m_ssid
Service Set ID (SSID)
Definition: mgt-headers.h:104
HtCapabilities GetHtCapabilities(void) const
Return the HT capabilities.
Definition: mgt-headers.cc:292
virtual uint32_t GetSerializedSize(void) const
Definition: mgt-headers.cc:196
a unique identifier for an interface.
Definition: type-id.h:49
virtual void Serialize(Buffer::Iterator start) const
Definition: mgt-headers.cc:102
TypeId SetParent(TypeId tid)
Definition: type-id.cc:611
void SetHtCapabilities(HtCapabilities htcapabilities)
Set the HT capabilities.
Definition: mgt-headers.cc:156
Buffer::Iterator Serialize(Buffer::Iterator i) const
Serialize entire IE including Element ID and length fields.
virtual uint32_t Deserialize(Buffer::Iterator start)
Definition: mgt-headers.cc:461
virtual uint32_t GetSerializedSize(void) const
Definition: mgt-headers.cc:430
StatusCode GetStatusCode(void)
Return the status code.
Definition: mgt-headers.cc:385
Ssid m_ssid
Service set ID (SSID)
Definition: mgt-headers.h:309
virtual void Serialize(Buffer::Iterator start) const
Definition: mgt-headers.cc:626
virtual uint32_t Deserialize(Buffer::Iterator start)
uint16_t GetTimeout(void) const
Return the timeout.
Definition: mgt-headers.cc:762
HtCapabilities GetHtCapabilities(void) const
Return the HT capabilities.
Definition: mgt-headers.cc:411
virtual void Print(std::ostream &os) const
virtual void Serialize(Buffer::Iterator start) const
Definition: mgt-headers.cc:346