LEFT | RIGHT |
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2006 INRIA | 3 * Copyright (c) 2006 INRIA |
4 * Copyright (c) 2009 MIRKO BANCHI | 4 * Copyright (c) 2009 MIRKO BANCHI |
5 * | 5 * |
6 * This program is free software; you can redistribute it and/or modify | 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 | 7 * it under the terms of the GNU General Public License version 2 as |
8 * published by the Free Software Foundation; | 8 * published by the Free Software Foundation; |
9 * | 9 * |
10 * This program is distributed in the hope that it will be useful, | 10 * This program is distributed in the hope that it will be useful, |
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 * GNU General Public License for more details. | 13 * GNU General Public License for more details. |
14 * | 14 * |
15 * You should have received a copy of the GNU General Public License | 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 | 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 | 17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 * | 18 * |
19 * Authors: Mathieu Lacage <mathieu.lacage@sophia.inria.fr> | 19 * Authors: Mathieu Lacage <mathieu.lacage@sophia.inria.fr> |
20 * Mirko Banchi <mk.banchi@gmail.com> | 20 * Mirko Banchi <mk.banchi@gmail.com> |
21 */ | 21 */ |
22 | 22 |
| 23 #include "ns3/simulator.h" |
| 24 #include "ns3/address-utils.h" |
23 #include "mgt-headers.h" | 25 #include "mgt-headers.h" |
24 #include "ns3/simulator.h" | |
25 | 26 |
26 namespace ns3 { | 27 namespace ns3 { |
27 | 28 |
28 /*********************************************************** | 29 /*********************************************************** |
29 * Probe Request | 30 * Probe Request |
30 ***********************************************************/ | 31 ***********************************************************/ |
31 | 32 |
32 NS_OBJECT_ENSURE_REGISTERED (MgtProbeRequestHeader); | 33 NS_OBJECT_ENSURE_REGISTERED (MgtProbeRequestHeader); |
33 | 34 |
34 MgtProbeRequestHeader::~MgtProbeRequestHeader () | 35 MgtProbeRequestHeader::~MgtProbeRequestHeader () |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 MgtProbeRequestHeader::GetInstanceTypeId (void) const | 143 MgtProbeRequestHeader::GetInstanceTypeId (void) const |
143 { | 144 { |
144 return GetTypeId (); | 145 return GetTypeId (); |
145 } | 146 } |
146 | 147 |
147 void | 148 void |
148 MgtProbeRequestHeader::Print (std::ostream &os) const | 149 MgtProbeRequestHeader::Print (std::ostream &os) const |
149 { | 150 { |
150 os << "ssid=" << m_ssid << ", " | 151 os << "ssid=" << m_ssid << ", " |
151 << "rates=" << m_rates << ", " | 152 << "rates=" << m_rates << ", " |
| 153 << "Extended Capabilities=" << m_extendedCapability << " , " |
152 << "HT Capabilities=" << m_htCapability << " , " | 154 << "HT Capabilities=" << m_htCapability << " , " |
153 << "VHT Capabilities=" << m_vhtCapability << " , " | 155 << "VHT Capabilities=" << m_vhtCapability << " , " |
154 << "HE Capabilities=" << m_heCapability; | 156 << "HE Capabilities=" << m_heCapability; |
155 } | 157 } |
156 | 158 |
157 void | 159 void |
158 MgtProbeRequestHeader::Serialize (Buffer::Iterator start) const | 160 MgtProbeRequestHeader::Serialize (Buffer::Iterator start) const |
159 { | 161 { |
160 Buffer::Iterator i = start; | 162 Buffer::Iterator i = start; |
161 i = m_ssid.Serialize (i); | 163 i = m_ssid.Serialize (i); |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 size += m_heOperation.GetSerializedSize (); | 411 size += m_heOperation.GetSerializedSize (); |
410 return size; | 412 return size; |
411 } | 413 } |
412 | 414 |
413 void | 415 void |
414 MgtProbeResponseHeader::Print (std::ostream &os) const | 416 MgtProbeResponseHeader::Print (std::ostream &os) const |
415 { | 417 { |
416 os << "ssid=" << m_ssid << ", " | 418 os << "ssid=" << m_ssid << ", " |
417 << "rates=" << m_rates << ", " | 419 << "rates=" << m_rates << ", " |
418 << "ERP information=" << m_erpInformation << ", " | 420 << "ERP information=" << m_erpInformation << ", " |
| 421 << "Extended Capabilities=" << m_extendedCapability << " , " |
419 << "HT Capabilities=" << m_htCapability << " , " | 422 << "HT Capabilities=" << m_htCapability << " , " |
420 << "HT Operation=" << m_htOperation << " , " | 423 << "HT Operation=" << m_htOperation << " , " |
421 << "VHT Capabilities=" << m_vhtCapability << " , " | 424 << "VHT Capabilities=" << m_vhtCapability << " , " |
422 << "VHT Operation=" << m_vhtOperation << " , " | 425 << "VHT Operation=" << m_vhtOperation << " , " |
423 << "HE Capabilities=" << m_heCapability << " , " | 426 << "HE Capabilities=" << m_heCapability << " , " |
424 << "HE Operation=" << m_heOperation; | 427 << "HE Operation=" << m_heOperation; |
425 } | 428 } |
426 | 429 |
427 void | 430 void |
428 MgtProbeResponseHeader::Serialize (Buffer::Iterator start) const | 431 MgtProbeResponseHeader::Serialize (Buffer::Iterator start) const |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
641 size += m_vhtCapability.GetSerializedSize (); | 644 size += m_vhtCapability.GetSerializedSize (); |
642 size += m_heCapability.GetSerializedSize (); | 645 size += m_heCapability.GetSerializedSize (); |
643 return size; | 646 return size; |
644 } | 647 } |
645 | 648 |
646 void | 649 void |
647 MgtAssocRequestHeader::Print (std::ostream &os) const | 650 MgtAssocRequestHeader::Print (std::ostream &os) const |
648 { | 651 { |
649 os << "ssid=" << m_ssid << ", " | 652 os << "ssid=" << m_ssid << ", " |
650 << "rates=" << m_rates << ", " | 653 << "rates=" << m_rates << ", " |
| 654 << "Extended Capabilities=" << m_extendedCapability << " , " |
651 << "HT Capabilities=" << m_htCapability << " , " | 655 << "HT Capabilities=" << m_htCapability << " , " |
652 << "VHT Capabilities=" << m_vhtCapability << " , " | 656 << "VHT Capabilities=" << m_vhtCapability << " , " |
653 << "HE Capabilities=" << m_heCapability; | 657 << "HE Capabilities=" << m_heCapability; |
654 } | 658 } |
655 | 659 |
656 void | 660 void |
657 MgtAssocRequestHeader::Serialize (Buffer::Iterator start) const | 661 MgtAssocRequestHeader::Serialize (Buffer::Iterator start) const |
658 { | 662 { |
659 Buffer::Iterator i = start; | 663 Buffer::Iterator i = start; |
660 i = m_capability.Serialize (i); | 664 i = m_capability.Serialize (i); |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
835 size += m_heCapability.GetSerializedSize (); | 839 size += m_heCapability.GetSerializedSize (); |
836 return size; | 840 return size; |
837 } | 841 } |
838 | 842 |
839 void | 843 void |
840 MgtReassocRequestHeader::Print (std::ostream &os) const | 844 MgtReassocRequestHeader::Print (std::ostream &os) const |
841 { | 845 { |
842 os << "current AP address=" << m_currentApAddr << ", " | 846 os << "current AP address=" << m_currentApAddr << ", " |
843 << "ssid=" << m_ssid << ", " | 847 << "ssid=" << m_ssid << ", " |
844 << "rates=" << m_rates << ", " | 848 << "rates=" << m_rates << ", " |
| 849 << "Extended Capabilities=" << m_extendedCapability << " , " |
845 << "HT Capabilities=" << m_htCapability << " , " | 850 << "HT Capabilities=" << m_htCapability << " , " |
846 << "VHT Capabilities=" << m_vhtCapability << " , " | 851 << "VHT Capabilities=" << m_vhtCapability << " , " |
847 << "HE Capabilities=" << m_heCapability; | 852 << "HE Capabilities=" << m_heCapability; |
848 } | 853 } |
849 | 854 |
850 void | 855 void |
851 MgtReassocRequestHeader::Serialize (Buffer::Iterator start) const | 856 MgtReassocRequestHeader::Serialize (Buffer::Iterator start) const |
852 { | 857 { |
853 Buffer::Iterator i = start; | 858 Buffer::Iterator i = start; |
854 i = m_capability.Serialize (i); | 859 i = m_capability.Serialize (i); |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1078 return size; | 1083 return size; |
1079 } | 1084 } |
1080 | 1085 |
1081 void | 1086 void |
1082 MgtAssocResponseHeader::Print (std::ostream &os) const | 1087 MgtAssocResponseHeader::Print (std::ostream &os) const |
1083 { | 1088 { |
1084 os << "status code=" << m_code << ", " | 1089 os << "status code=" << m_code << ", " |
1085 << "aid=" << m_aid << ", " | 1090 << "aid=" << m_aid << ", " |
1086 << "rates=" << m_rates << ", " | 1091 << "rates=" << m_rates << ", " |
1087 << "ERP information=" << m_erpInformation << ", " | 1092 << "ERP information=" << m_erpInformation << ", " |
| 1093 << "Extended Capabilities=" << m_extendedCapability << " , " |
1088 << "HT Capabilities=" << m_htCapability << " , " | 1094 << "HT Capabilities=" << m_htCapability << " , " |
1089 << "HT Operation=" << m_htOperation << " , " | 1095 << "HT Operation=" << m_htOperation << " , " |
1090 << "VHT Capabilities=" << m_vhtCapability << " , " | 1096 << "VHT Capabilities=" << m_vhtCapability << " , " |
1091 << "VHT Operation=" << m_vhtOperation << " , " | 1097 << "VHT Operation=" << m_vhtOperation << " , " |
1092 << "HE Capabilities=" << m_heCapability << " , " | 1098 << "HE Capabilities=" << m_heCapability << " , " |
1093 << "HE Operation=" << m_heOperation; | 1099 << "HE Operation=" << m_heOperation; |
1094 } | 1100 } |
1095 | 1101 |
1096 void | 1102 void |
1097 MgtAssocResponseHeader::Serialize (Buffer::Iterator start) const | 1103 MgtAssocResponseHeader::Serialize (Buffer::Iterator start) const |
(...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1863 } | 1869 } |
1864 | 1870 |
1865 void | 1871 void |
1866 MgtDelBaHeader::SetParameterSet (uint16_t params) | 1872 MgtDelBaHeader::SetParameterSet (uint16_t params) |
1867 { | 1873 { |
1868 m_initiator = (params >> 11) & 0x01; | 1874 m_initiator = (params >> 11) & 0x01; |
1869 m_tid = (params >> 12) & 0x0f; | 1875 m_tid = (params >> 12) & 0x0f; |
1870 } | 1876 } |
1871 | 1877 |
1872 } //namespace ns3 | 1878 } //namespace ns3 |
LEFT | RIGHT |