21 #include "ns3/assert.h"
44 : m_type (address.m_type),
94 memcpy (
m_data, buffer, len);
113 return m_len == len && (
m_type == type || m_type == 0);
124 static uint8_t type = 1;
132 return 1 + 1 +
m_len;
201 for (uint8_t i = 0; i < a.
GetLength (); i++)
217 os.setf (std::ios::hex, std::ios::basefield);
219 os << std::setw (2) << (uint32_t) address.
m_type <<
"-" << std::setw (2) << (uint32_t) address.
m_len <<
"-";
220 for (uint8_t i = 0; i < (address.
m_len-1); ++i)
222 os << std::setw (2) << (uint32_t)address.
m_data[i] <<
":";
225 os << std::setw (2) << (uint32_t) address.
m_data[address.
m_len-1];
226 os.setf (std::ios::dec, std::ios::basefield);
234 std::istringstream iss;
237 iss >> std::hex >> retval >> std::dec;
245 std::string::size_type firstDash, secondDash;
246 firstDash = v.find (
"-");
247 secondDash = v.find (
"-", firstDash+1);
248 std::string type = v.substr (0, firstDash-0);
249 std::string len = v.substr (firstDash+1, secondDash-(firstDash+1));
255 std::string::size_type col = secondDash + 1;
256 for (uint8_t i = 0; i < address.
m_len; ++i)
259 std::string::size_type next;
260 next = v.find (
":", col);
261 if (next == std::string::npos)
263 tmp = v.substr (col, v.size ()-col);
269 tmp = v.substr (col, next-col);