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) 2008,2009 IITP RAS | 3 * Copyright (c) 2008,2009 IITP RAS |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 5 * This program is free software; you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 2 as | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 size++; | 103 size++; |
104 } | 104 } |
105 } | 105 } |
106 uint8_t | 106 uint8_t |
107 IeMeshId::DeserializeInformationField (Buffer::Iterator start, uint8_t length) | 107 IeMeshId::DeserializeInformationField (Buffer::Iterator start, uint8_t length) |
108 { | 108 { |
109 Buffer::Iterator i = start; | 109 Buffer::Iterator i = start; |
110 NS_ASSERT (length <= 32); | 110 NS_ASSERT (length <= 32); |
111 i.Read (m_meshId, length); | 111 i.Read (m_meshId, length); |
112 m_meshId[length] = 0; | 112 m_meshId[length] = 0; |
113 return static_cast<uint8_t>(i.GetDistanceFrom (start)); | 113 return static_cast<uint8_t> (i.GetDistanceFrom (start)); |
114 } | 114 } |
115 void | 115 void |
116 IeMeshId::Print (std::ostream& os) const | 116 IeMeshId::Print (std::ostream& os) const |
117 { | 117 { |
118 os << "MeshId=(meshId=" << PeekString () << ")"; | 118 os << "MeshId=(meshId=" << PeekString () << ")"; |
119 } | 119 } |
120 bool | 120 bool |
121 operator== (const IeMeshId & a, const IeMeshId & b) | 121 operator== (const IeMeshId & a, const IeMeshId & b) |
122 { | 122 { |
123 bool result (true); | 123 bool result (true); |
(...skipping 23 matching lines...) Expand all Loading... |
147 is >> str; | 147 is >> str; |
148 a = IeMeshId (str.c_str ()); | 148 a = IeMeshId (str.c_str ()); |
149 return is; | 149 return is; |
150 } | 150 } |
151 | 151 |
152 ATTRIBUTE_HELPER_CPP (IeMeshId); | 152 ATTRIBUTE_HELPER_CPP (IeMeshId); |
153 | 153 |
154 | 154 |
155 } // namespace dot11s | 155 } // namespace dot11s |
156 } // namespace ns3 | 156 } // namespace ns3 |
LEFT | RIGHT |