21 #include "ns3/assert.h"
45 NS_LOG_FUNCTION (
this << static_cast<uint32_t> (type) << &buffer << static_cast<uint32_t> (len));
50 : m_type (address.m_type),
105 std::memcpy (
m_data, buffer, len);
124 NS_LOG_FUNCTION (
this << static_cast<uint32_t> (type) << static_cast<uint32_t> (len));
126 return m_len == len && (
m_type == type || m_type == 0);
139 static uint8_t type = 1;
148 return 1 + 1 +
m_len;
219 for (uint8_t i = 0; i < a.
GetLength (); i++)
235 os.setf (std::ios::hex, std::ios::basefield);
237 os << std::setw (2) << (uint32_t) address.
m_type <<
"-" << std::setw (2) << (uint32_t) address.
m_len <<
"-";
238 for (uint8_t i = 0; i < (address.
m_len-1); ++i)
240 os << std::setw (2) << (uint32_t)address.
m_data[i] <<
":";
243 os << std::setw (2) << (uint32_t) address.
m_data[address.
m_len-1];
244 os.setf (std::ios::dec, std::ios::basefield);
253 std::istringstream iss;
256 iss >> std::hex >> retval >> std::dec;
264 std::string::size_type firstDash, secondDash;
265 firstDash = v.find (
"-");
266 secondDash = v.find (
"-", firstDash+1);
267 std::string type = v.substr (0, firstDash-0);
268 std::string len = v.substr (firstDash+1, secondDash-(firstDash+1));
274 std::string::size_type col = secondDash + 1;
275 for (uint8_t i = 0; i < address.
m_len; ++i)
278 std::string::size_type next;
279 next = v.find (
":", col);
280 if (next == std::string::npos)
282 tmp = v.substr (col, v.size ()-col);
288 tmp = v.substr (col, next-col);