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 
35 {
36 }
37 
38 void
40 {
41  m_ssid = ssid;
42 }
43 Ssid
45 {
46  return m_ssid;
47 }
48 void
50 {
51  m_rates = rates;
52 }
53 void
55 {
56  m_htCapability=htcapabilities;
57 }
58 
61 {
62  return m_htCapability;
63 }
66 {
67  return m_rates;
68 }
69 uint32_t
71 {
72  uint32_t size = 0;
73  size += m_ssid.GetSerializedSize ();
74  size += m_rates.GetSerializedSize ();
77  return size;
78 }
79 TypeId
81 {
82  static TypeId tid = TypeId ("ns3::MgtProbeRequestHeader")
83  .SetParent<Header> ()
84  .AddConstructor<MgtProbeRequestHeader> ()
85  ;
86  return tid;
87 }
88 TypeId
90 {
91  return GetTypeId ();
92 }
93 void
94 MgtProbeRequestHeader::Print (std::ostream &os) const
95 {
96  os << "ssid=" << m_ssid << ", "
97  << "rates=" << m_rates << ", "
98  << "HT Capabilities=" << m_htCapability;
99 }
100 void
102 {
104  i = m_ssid.Serialize (i);
105  i = m_rates.Serialize (i);
106  i = m_rates.extended.Serialize (i);
107  i = m_htCapability.Serialize(i);
108 }
109 uint32_t
111 {
113  i = m_ssid.Deserialize (i);
114  i = m_rates.Deserialize (i);
117  return i.GetDistanceFrom (start);
118 }
119 
120 
121 /***********************************************************
122  * Probe Response
123  ***********************************************************/
124 
126 
128 {
129 }
131 {
132 }
133 uint64_t
135 {
136  return m_timestamp;
137 }
138 Ssid
140 {
141  return m_ssid;
142 }
143 uint64_t
145 {
146  return m_beaconInterval;
147 }
150 {
151  return m_rates;
152 }
153 void
155 {
156  m_htCapability=htcapabilities;
157 }
158 
161 {
162  return m_htCapability;
163 }
164 void
166 {
167  m_ssid = ssid;
168 }
169 void
171 {
172  m_beaconInterval = us;
173 }
174 void
176 {
177  m_rates = rates;
178 }
179 TypeId
181 {
182  static TypeId tid = TypeId ("ns3::MgtProbeResponseHeader")
183  .SetParent<Header> ()
184  .AddConstructor<MgtProbeResponseHeader> ()
185  ;
186  return tid;
187 }
188 TypeId
190 {
191  return GetTypeId ();
192 }
193 uint32_t
195 {
196  uint32_t size = 0;
197  size += 8; // timestamp
198  size += 2; // beacon interval
199  size += m_capability.GetSerializedSize ();
200  size += m_ssid.GetSerializedSize ();
201  size += m_rates.GetSerializedSize ();
202  //size += 3; // ds parameter set
205  // xxx
206  return size;
207 }
208 void
209 MgtProbeResponseHeader::Print (std::ostream &os) const
210 {
211  os << "ssid=" << m_ssid << ", "
212  << "rates=" << m_rates << ", "
213  << "HT Capabilities=" << m_htCapability;
214 }
215 void
217 {
218  // timestamp
219  // beacon interval
220  // capability information
221  // ssid
222  // supported rates
223  // fh parameter set
224  // ds parameter set
225  // cf parameter set
226  // ibss parameter set
227  //XXX
229  i.WriteHtolsbU64 (Simulator::Now ().GetMicroSeconds ());
230  i.WriteHtolsbU16 (m_beaconInterval / 1024);
231  i = m_capability.Serialize (i);
232  i = m_ssid.Serialize (i);
233  i = m_rates.Serialize (i);
234  //i.WriteU8 (0, 3); // ds parameter set.
235  i = m_rates.extended.Serialize (i);
236  i = m_htCapability.Serialize(i);
237 }
238 uint32_t
240 {
242  m_timestamp = i.ReadLsbtohU64 ();
244  m_beaconInterval *= 1024;
245  i = m_capability.Deserialize (i);
246  i = m_ssid.Deserialize (i);
247  i = m_rates.Deserialize (i);
248  //i.Next (3); // ds parameter set
251  return i.GetDistanceFrom (start);
252 }
253 
254 /***********************************************************
255  * Assoc Request
256  ***********************************************************/
257 
259 
261  : m_listenInterval (0)
262 {
263 }
265 {
266 }
267 
268 void
270 {
271  m_ssid = ssid;
272 }
273 void
275 {
276  m_rates = rates;
277 }
278 void
280 {
281  m_htCapability = htcapabilities;
282 }
283 void
285 {
286  m_listenInterval = interval;
287 }
290 {
291  return m_htCapability;
292 }
293 Ssid
295 {
296  return m_ssid;
297 }
300 {
301  return m_rates;
302 }
303 uint16_t
305 {
306  return m_listenInterval;
307 }
308 
309 TypeId
311 {
312  static TypeId tid = TypeId ("ns3::MgtAssocRequestHeader")
313  .SetParent<Header> ()
314  .AddConstructor<MgtAssocRequestHeader> ()
315  ;
316  return tid;
317 }
318 TypeId
320 {
321  return GetTypeId ();
322 }
323 uint32_t
325 {
326  uint32_t size = 0;
327  size += m_capability.GetSerializedSize ();
328  size += 2;
329  size += m_ssid.GetSerializedSize ();
330  size += m_rates.GetSerializedSize ();
333  return size;
334 }
335 void
336 MgtAssocRequestHeader::Print (std::ostream &os) const
337 {
338  os << "ssid=" << m_ssid << ", "
339  << "rates=" << m_rates<< ", "
340  << "HT Capabilities=" << m_htCapability;
341 }
342 void
344 {
346  i = m_capability.Serialize (i);
348  i = m_ssid.Serialize (i);
349  i = m_rates.Serialize (i);
350  i = m_rates.extended.Serialize (i);
351  i = m_htCapability.Serialize(i);
352 }
353 uint32_t
355 {
357  i = m_capability.Deserialize (i);
359  i = m_ssid.Deserialize (i);
360  i = m_rates.Deserialize (i);
363  return i.GetDistanceFrom (start);
364 }
365 
366 /***********************************************************
367  * Assoc Response
368  ***********************************************************/
369 
371 
373  : m_aid (0)
374 {
375 }
377 {
378 }
379 
382 {
383  return m_code;
384 }
387 {
388  return m_rates;
389 }
390 void
392 {
393  m_code = code;
394 }
395 void
397 {
398  m_rates = rates;
399 }
400 void
402 {
403  m_htCapability=htcapabilities;
404 }
405 
408 {
409  return m_htCapability;
410 }
411 TypeId
413 {
414  static TypeId tid = TypeId ("ns3::MgtAssocResponseHeader")
415  .SetParent<Header> ()
416  .AddConstructor<MgtAssocResponseHeader> ()
417  ;
418  return tid;
419 }
420 TypeId
422 {
423  return GetTypeId ();
424 }
425 uint32_t
427 {
428  uint32_t size = 0;
429  size += m_capability.GetSerializedSize ();
430  size += m_code.GetSerializedSize ();
431  size += 2; // aid
432  size += m_rates.GetSerializedSize ();
435  return size;
436 }
437 
438 void
439 MgtAssocResponseHeader::Print (std::ostream &os) const
440 {
441  os << "status code=" << m_code << ", "
442  << "rates=" << m_rates << ", "
443  << "HT Capabilities=" << m_htCapability;
444 }
445 void
447 {
449  i = m_capability.Serialize (i);
450  i = m_code.Serialize (i);
451  i.WriteHtolsbU16 (m_aid);
452  i = m_rates.Serialize (i);
453  i = m_rates.extended.Serialize (i);
454  i = m_htCapability.Serialize(i);
455 }
456 uint32_t
458 {
460  i = m_capability.Deserialize (i);
461  i = m_code.Deserialize (i);
462  m_aid = i.ReadLsbtohU16 ();
463  i = m_rates.Deserialize (i);
466  return i.GetDistanceFrom (start);
467 }
468 /**********************************************************
469  * ActionFrame
470  **********************************************************/
472 {
473 }
475 {
476 }
477 void
480 {
481  m_category = type;
482 
483  switch (type)
484  {
485  case BLOCK_ACK:
486  {
487  m_actionValue = action.blockAck;
488  break;
489  }
490  case MESH_PEERING_MGT:
491  {
492  m_actionValue = action.peerLink;
493  break;
494  }
495  case MESH_PATH_SELECTION:
496  {
497  m_actionValue = action.pathSelection;
498  break;
499  }
500  case MESH_LINK_METRIC:
501  case MESH_INTERWORKING:
505  break;
506  }
507 }
510 {
511  switch (m_category)
512  {
513  case BLOCK_ACK:
514  return BLOCK_ACK;
515  case MESH_PEERING_MGT:
516  return MESH_PEERING_MGT;
517  case MESH_LINK_METRIC:
518  return MESH_LINK_METRIC;
519  case MESH_PATH_SELECTION:
520  return MESH_PATH_SELECTION;
521  case MESH_INTERWORKING:
522  return MESH_INTERWORKING;
526  return MESH_PROXY_FORWARDING;
528  return VENDOR_SPECIFIC_ACTION;
529  default:
530  NS_FATAL_ERROR ("Unknown action value");
531  return MESH_PEERING_MGT;
532  }
533 }
536 {
537  ActionValue retval;
538  retval.peerLink = PEER_LINK_OPEN; // Needs to be initialized to something to quiet valgrind in default cases
539  switch (m_category)
540  {
541  case BLOCK_ACK:
542  switch (m_actionValue)
543  {
546  break ;
549  break ;
550  case BLOCK_ACK_DELBA:
551  retval.blockAck = BLOCK_ACK_DELBA;
552  break ;
553  }
554  break ;
555 
556  case MESH_PEERING_MGT:
557  switch (m_actionValue)
558  {
559  case PEER_LINK_OPEN:
560  retval.peerLink = PEER_LINK_OPEN;
561  break ;
562  case PEER_LINK_CONFIRM:
563  retval.peerLink = PEER_LINK_CONFIRM;
564  break ;
565  case PEER_LINK_CLOSE:
566  retval.peerLink = PEER_LINK_CLOSE;
567  break ;
568  default:
569  NS_FATAL_ERROR ("Unknown mesh peering management action code");
570  retval.peerLink = PEER_LINK_OPEN; /* quiet compiler */
571  }
572  break ;
573 
574  case MESH_PATH_SELECTION:
575  switch (m_actionValue)
576  {
577  case PATH_SELECTION:
578  retval.pathSelection = PATH_SELECTION;
579  break ;
580  default:
581  NS_FATAL_ERROR ("Unknown mesh path selection action code");
582  retval.peerLink = PEER_LINK_OPEN; /* quiet compiler */
583  }
584  break ;
586  break ;
587  case MESH_LINK_METRIC:
588  // not yet supported
589  case MESH_INTERWORKING:
590  // not yet supported
592  // not yet supported
593  default:
594  NS_FATAL_ERROR ("Unsupported mesh action");
595  retval.peerLink = PEER_LINK_OPEN; /* quiet compiler */
596  }
597  return retval;
598 }
599 TypeId
601 {
602  static TypeId tid = TypeId ("ns3::WifiActionHeader")
603  .SetParent<Header> ()
604  .AddConstructor<WifiActionHeader> ();
605  return tid;
606 }
607 TypeId
609 {
610  return GetTypeId ();
611 }
612 void
613 WifiActionHeader::Print (std::ostream &os) const
614 {
615 }
616 uint32_t
618 {
619  return 2;
620 }
621 void
623 {
624  start.WriteU8 (m_category);
625  start.WriteU8 (m_actionValue);
626 }
627 uint32_t
629 {
631  m_category = i.ReadU8 ();
632  m_actionValue = i.ReadU8 ();
633  return i.GetDistanceFrom (start);
634 }
635 
636 /***************************************************
637 * ADDBARequest
638 ****************************************************/
639 
641 
643  : m_dialogToken (1),
644  m_amsduSupport (1),
645  m_bufferSize (0)
646 {
647 }
648 
649 TypeId
651 {
652  static TypeId tid = TypeId ("ns3::MgtAddBaRequestHeader")
653  .SetParent<Header> ()
654  .AddConstructor<MgtAddBaRequestHeader> ();
655  return tid;
656 }
657 
658 TypeId
660 {
661  return GetTypeId ();
662 }
663 
664 void
665 MgtAddBaRequestHeader::Print (std::ostream &os) const
666 {
667 }
668 
669 uint32_t
671 {
672  uint32_t size = 0;
673  size += 1; //Dialog token
674  size += 2; //Block ack parameter set
675  size += 2; //Block ack timeout value
676  size += 2; //Starting sequence control
677  return size;
678 }
679 
680 void
682 {
688 }
689 
690 uint32_t
692 {
694  m_dialogToken = i.ReadU8 ();
698  return i.GetDistanceFrom (start);
699 }
700 
701 void
703 {
704  m_policy = 0;
705 }
706 
707 void
709 {
710  m_policy = 1;
711 }
712 
713 void
715 {
716  NS_ASSERT (tid < 16);
717  m_tid = tid;
718 }
719 
720 void
722 {
724 }
725 
726 void
728 {
729  m_bufferSize = size;
730 }
731 
732 void
734 {
735  m_startingSeq = seq;
736 }
737 
738 void
740 {
741  m_amsduSupport = supported;
742 }
743 
744 uint8_t
746 {
747  return m_tid;
748 }
749 
750 bool
752 {
753  return (m_policy == 1) ? true : false;
754 }
755 
756 uint16_t
758 {
759  return m_timeoutValue;
760 }
761 
762 uint16_t
764 {
765  return m_bufferSize;
766 }
767 
768 bool
770 {
771  return (m_amsduSupport == 1) ? true : false;
772 }
773 
774 uint16_t
776 {
777  return m_startingSeq;
778 }
779 
780 uint16_t
782 {
783  return (m_startingSeq << 4) & 0xfff0;
784 }
785 
786 void
788 {
789  m_startingSeq = (seqControl >> 4) & 0x0fff;
790 }
791 
792 uint16_t
794 {
795  uint16_t res = 0;
796  res |= m_amsduSupport;
797  res |= m_policy << 1;
798  res |= m_tid << 2;
799  res |= m_bufferSize << 6;
800  return res;
801 }
802 
803 void
805 {
806  m_amsduSupport = (params) & 0x01;
807  m_policy = (params >> 1) & 0x01;
808  m_tid = (params >> 2) & 0x0f;
809  m_bufferSize = (params >> 6) & 0x03ff;
810 }
811 
812 /***************************************************
813 * ADDBAResponse
814 ****************************************************/
815 
817 
819  : m_dialogToken (1),
820  m_amsduSupport (1),
821  m_bufferSize (0)
822 {
823 }
824 
825 TypeId
827 {
828  static TypeId tid = TypeId ("ns3::MgtAddBaResponseHeader")
829  .SetParent<Header> ()
830  .AddConstructor<MgtAddBaResponseHeader> ()
831  ;
832  return tid;
833 }
834 
835 TypeId
837 {
838  return GetTypeId ();
839 }
840 
841 void
842 MgtAddBaResponseHeader::Print (std::ostream &os) const
843 {
844  os << "status code=" << m_code;
845 }
846 
847 uint32_t
849 {
850  uint32_t size = 0;
851  size += 1; //Dialog token
852  size += m_code.GetSerializedSize (); //Status code
853  size += 2; //Block ack parameter set
854  size += 2; //Block ack timeout value
855  return size;
856 }
857 
858 void
860 {
863  i = m_code.Serialize (i);
866 }
867 
868 uint32_t
870 {
872  m_dialogToken = i.ReadU8 ();
873  i = m_code.Deserialize (i);
876  return i.GetDistanceFrom (start);
877 }
878 
879 void
881 {
882  m_policy = 0;
883 }
884 
885 void
887 {
888  m_policy = 1;
889 }
890 
891 void
893 {
894  NS_ASSERT (tid < 16);
895  m_tid = tid;
896 }
897 
898 void
900 {
902 }
903 
904 void
906 {
907  m_bufferSize = size;
908 }
909 
910 void
912 {
913  m_code = code;
914 }
915 
916 void
918 {
919  m_amsduSupport = supported;
920 }
921 
924 {
925  return m_code;
926 }
927 
928 uint8_t
930 {
931  return m_tid;
932 }
933 
934 bool
936 {
937  return (m_policy == 1) ? true : false;
938 }
939 
940 uint16_t
942 {
943  return m_timeoutValue;
944 }
945 
946 uint16_t
948 {
949  return m_bufferSize;
950 }
951 
952 bool
954 {
955  return (m_amsduSupport == 1) ? true : false;
956 }
957 
958 uint16_t
960 {
961  uint16_t res = 0;
962  res |= m_amsduSupport;
963  res |= m_policy << 1;
964  res |= m_tid << 2;
965  res |= m_bufferSize << 6;
966  return res;
967 }
968 
969 void
971 {
972  m_amsduSupport = (params) & 0x01;
973  m_policy = (params >> 1) & 0x01;
974  m_tid = (params >> 2) & 0x0f;
975  m_bufferSize = (params >> 6) & 0x03ff;
976 }
977 
978 /***************************************************
979 * DelBa
980 ****************************************************/
981 
983 
985  : m_reasonCode (1)
986 {
987 }
988 
989 TypeId
991 {
992  static TypeId tid = TypeId ("ns3::MgtDelBaHeader")
993  .SetParent<Header> ()
994  .AddConstructor<MgtDelBaHeader> ()
995  ;
996  return tid;
997 }
998 
999 TypeId
1001 {
1002  return GetTypeId ();
1003 }
1004 
1005 void
1006 MgtDelBaHeader::Print (std::ostream &os) const
1007 {
1008 }
1009 
1010 uint32_t
1012 {
1013  uint32_t size = 0;
1014  size += 2; //DelBa parameter set
1015  size += 2; //Reason code
1016  return size;
1017 }
1018 
1019 void
1021 {
1022  Buffer::Iterator i = start;
1025 }
1026 
1027 uint32_t
1029 {
1030  Buffer::Iterator i = start;
1032  m_reasonCode = i.ReadLsbtohU16 ();
1033  return i.GetDistanceFrom (start);
1034 }
1035 
1036 bool
1038 {
1039  return (m_initiator == 1) ? true : false;
1040 }
1041 
1042 uint8_t
1044 {
1045  NS_ASSERT (m_tid < 16);
1046  uint8_t tid = static_cast<uint8_t> (m_tid);
1047  return tid;
1048 }
1049 
1050 void
1052 {
1053  m_initiator = 1;
1054 }
1055 
1056 void
1058 {
1059  m_initiator = 0;
1060 }
1061 
1062 void
1064 {
1065  NS_ASSERT (tid < 16);
1066  m_tid = static_cast<uint16_t> (tid);
1067 }
1068 
1069 uint16_t
1071 {
1072  uint16_t res = 0;
1073  res |= m_initiator << 11;
1074  res |= m_tid << 12;
1075  return res;
1076 }
1077 
1078 void
1080 {
1081  m_initiator = (params >> 11) & 0x01;
1082  m_tid = (params >> 12) & 0x0f;
1083 }
1084 
1085 } // namespace ns3
Protocol header serialization and deserialization.
Definition: header.h:42
static TypeId GetTypeId(void)
Definition: mgt-headers.cc:826
virtual uint32_t Deserialize(Buffer::Iterator start)
Definition: mgt-headers.cc:691
SupportedRates GetSupportedRates(void) const
Return the supported rates.
Definition: mgt-headers.cc:65
uint16_t GetBufferSize(void) const
Return the buffer size.
Definition: mgt-headers.cc:947
virtual void Serialize(Buffer::Iterator start) const
Definition: mgt-headers.cc:446
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:149
virtual TypeId GetInstanceTypeId(void) const
Definition: mgt-headers.cc:319
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:613
Buffer::Iterator Deserialize(Buffer::Iterator start)
Deserialize capability information from the given buffer.
virtual TypeId GetInstanceTypeId(void) const
Definition: mgt-headers.cc:189
Ssid GetSsid(void) const
Return the Service Set Identifier (SSID).
Definition: mgt-headers.cc:139
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register the class in the ns-3 factory.
Definition: object-base.h:38
SupportedRates m_rates
List of supported rates.
Definition: mgt-headers.h:168
static TypeId GetTypeId(void)
Definition: mgt-headers.cc:310
uint16_t m_timeoutValue
Timeout.
Definition: mgt-headers.h:573
virtual void Print(std::ostream &os) const
Definition: mgt-headers.cc:665
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:144
SupportedRates m_rates
List of supported rates.
Definition: mgt-headers.h:105
static TypeId GetTypeId(void)
Definition: mgt-headers.cc:80
void SetImmediateBlockAck()
Enable immediate Block ACK.
Definition: mgt-headers.cc:708
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:727
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:935
HtCapabilities m_htCapability
HT capabilities.
Definition: mgt-headers.h:107
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
Definition: assert.h:61
virtual uint32_t GetSerializedSize(void) const
Definition: mgt-headers.cc:324
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:279
void SetSsid(Ssid ssid)
Set the Service Set Identifier (SSID).
Definition: mgt-headers.cc:269
uint32_t GetSerializedSize(void) const
Definition: status-code.cc:47
virtual void Print(std::ostream &os) const
Definition: mgt-headers.cc:842
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:478
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
#define NS_FATAL_ERROR(msg)
fatal error handling
Definition: fatal-error.h:95
uint16_t GetBufferSize(void) const
Return the buffer size.
Definition: mgt-headers.cc:763
virtual TypeId GetInstanceTypeId(void) const
Definition: mgt-headers.cc:836
CategoryValue GetCategory()
Return the category value.
Definition: mgt-headers.cc:509
void SetDelayedBlockAck()
Enable delayed Block ACK.
Definition: mgt-headers.cc:880
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:911
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:89
void SetTimeout(uint16_t timeout)
Set timeout.
Definition: mgt-headers.cc:899
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:44
void SetSupportedRates(SupportedRates rates)
Set the supported rates.
Definition: mgt-headers.cc:49
void SetAmsduSupport(bool supported)
Enable or disable A-MSDU support.
Definition: mgt-headers.cc:739
uint32_t GetDistanceFrom(Iterator const &o) const
Definition: buffer.cc:811
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:294
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:274
bool IsAmsduSupported(void) const
Return whether A-MSDU capability is supported.
Definition: mgt-headers.cc:953
uint16_t GetStartingSequenceControl(void) const
Return the raw sequence control.
Definition: mgt-headers.cc:781
virtual void Serialize(Buffer::Iterator start) const
Definition: mgt-headers.cc:859
void SetTid(uint8_t tid)
Set Traffic ID (TID).
Definition: mgt-headers.cc:892
virtual void Print(std::ostream &os) const
Definition: mgt-headers.cc:209
virtual void Serialize(Buffer::Iterator start) const
Definition: mgt-headers.cc:216
ExtendedSupportedRatesIE extended
SupportedRates GetSupportedRates(void) const
Return the supported rates.
Definition: mgt-headers.cc:299
void SetListenInterval(uint16_t interval)
Set the listen interval.
Definition: mgt-headers.cc:284
static TypeId GetTypeId(void)
Definition: mgt-headers.cc:600
uint8_t m_amsduSupport
Flag if A-MSDU is supported.
Definition: mgt-headers.h:686
virtual TypeId GetInstanceTypeId(void) const
Definition: mgt-headers.cc:659
virtual TypeId GetInstanceTypeId() const
Definition: mgt-headers.cc:608
void SetParameterSet(uint16_t params)
Set the parameter set from the given raw value.
Definition: mgt-headers.cc:804
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:617
void SetStartingSequenceControl(uint16_t seqControl)
Set sequence control with the given raw value.
Definition: mgt-headers.cc:787
void SetImmediateBlockAck()
Enable immediate Block ACK.
Definition: mgt-headers.cc:886
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:714
uint16_t GetListenInterval(void) const
Return the listen interval.
Definition: mgt-headers.cc:304
void SetParameterSet(uint16_t params)
Set the parameter set from the given raw value.
Definition: mgt-headers.cc:970
virtual void Print(std::ostream &os) const
Definition: mgt-headers.cc:94
virtual uint32_t Deserialize(Buffer::Iterator start)
Definition: mgt-headers.cc:110
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:733
virtual void Serialize(Buffer::Iterator start) const
Definition: mgt-headers.cc:681
uint8_t GetTid(void) const
Return the Traffic ID (TID).
Definition: mgt-headers.cc:745
SupportedRates GetSupportedRates(void)
Return the supported rates.
Definition: mgt-headers.cc:386
uint64_t m_timestamp
Timestamp.
Definition: mgt-headers.h:308
void SetHtCapabilities(HtCapabilities htcapabilities)
Set the HT capabilities.
Definition: mgt-headers.cc:54
virtual TypeId GetInstanceTypeId(void) const
Definition: mgt-headers.cc:421
uint64_t GetTimestamp()
Return the time stamp.
Definition: mgt-headers.cc:134
virtual uint32_t GetSerializedSize(void) const
Definition: mgt-headers.cc:670
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:165
virtual void Print(std::ostream &os) const
Definition: mgt-headers.cc:336
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:769
static TypeId GetTypeId(void)
Definition: mgt-headers.cc:990
virtual uint32_t GetSerializedSize(void) const
Definition: mgt-headers.cc:848
void SetBeaconIntervalUs(uint64_t us)
Set the beacon interval in microseconds unit.
Definition: mgt-headers.cc:170
static TypeId GetTypeId(void)
Definition: mgt-headers.cc:180
void SetBufferSize(uint16_t size)
Set buffer size.
Definition: mgt-headers.cc:905
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:628
HtCapabilities GetHtCapabilities(void) const
Return the HT capabilities.
Definition: mgt-headers.cc:160
StatusCode GetStatusCode(void) const
Return the status code.
Definition: mgt-headers.cc:923
HtCapabilities GetHtCapabilities(void) const
Return the HT capabilities.
Definition: mgt-headers.cc:60
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:239
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:439
uint16_t GetTimeout(void) const
Return the timeout.
Definition: mgt-headers.cc:941
uint8_t GetTid(void) const
Return the Traffic ID (TID).
Definition: mgt-headers.cc:929
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:751
void WriteHtolsbU16(uint16_t data)
Definition: buffer.cc:939
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:869
StatusCode m_code
Status code.
Definition: mgt-headers.h:170
uint16_t GetStartingSequence(void) const
Return the starting sequence number.
Definition: mgt-headers.cc:775
uint16_t m_tid
Traffic ID.
Definition: mgt-headers.h:753
static TypeId GetTypeId(void)
Definition: mgt-headers.cc:650
void WriteU8(uint8_t data)
Definition: buffer.h:876
void WriteHtolsbU64(uint64_t data)
Definition: buffer.cc:955
static TypeId GetTypeId(void)
Definition: mgt-headers.cc:412
void SetSupportedRates(SupportedRates rates)
Set the supported rates.
Definition: mgt-headers.cc:396
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:1028
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:175
Ssid m_ssid
Service Set ID (SSID)
Definition: mgt-headers.h:229
void SetHtCapabilities(HtCapabilities htcapabilities)
Set the HT capabilities.
Definition: mgt-headers.cc:401
uint16_t ReadLsbtohU16(void)
Definition: buffer.cc:1094
void SetSsid(Ssid ssid)
Set the Service Set Identifier (SSID).
Definition: mgt-headers.cc:39
void SetStatusCode(StatusCode code)
Set the status code.
Definition: mgt-headers.cc:391
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:917
uint8_t m_category
Category of the action.
Definition: mgt-headers.h:446
void SetDelayedBlockAck()
Enable delayed Block ACK.
Definition: mgt-headers.cc:702
virtual uint32_t Deserialize(Buffer::Iterator start)
Definition: mgt-headers.cc:354
void SetTimeout(uint16_t timeout)
Set timeout.
Definition: mgt-headers.cc:721
Implement the header for management frames of type probe response.
Definition: mgt-headers.h:239
uint64_t ReadLsbtohU64(void)
Definition: buffer.cc:1122
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:793
ActionValue GetAction()
Return the action value.
Definition: mgt-headers.cc:535
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:959
uint64_t m_beaconInterval
Beacon interval.
Definition: mgt-headers.h:310
virtual uint32_t GetSerializedSize(void) const
Definition: mgt-headers.cc:70
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:289
virtual uint32_t GetSerializedSize(void) const
Definition: mgt-headers.cc:194
a unique identifier for an interface.
Definition: type-id.h:49
virtual void Serialize(Buffer::Iterator start) const
Definition: mgt-headers.cc:101
TypeId SetParent(TypeId tid)
Definition: type-id.cc:610
void SetHtCapabilities(HtCapabilities htcapabilities)
Set the HT capabilities.
Definition: mgt-headers.cc:154
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:457
virtual uint32_t GetSerializedSize(void) const
Definition: mgt-headers.cc:426
StatusCode GetStatusCode(void)
Return the status code.
Definition: mgt-headers.cc:381
Ssid m_ssid
Service set ID (SSID)
Definition: mgt-headers.h:309
virtual void Serialize(Buffer::Iterator start) const
Definition: mgt-headers.cc:622
virtual uint32_t Deserialize(Buffer::Iterator start)
uint16_t GetTimeout(void) const
Return the timeout.
Definition: mgt-headers.cc:757
HtCapabilities GetHtCapabilities(void) const
Return the HT capabilities.
Definition: mgt-headers.cc:407
virtual void Print(std::ostream &os) const
virtual void Serialize(Buffer::Iterator start) const
Definition: mgt-headers.cc:343