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));
141 static uint8_t type = 1;
150 return 1 + 1 +
m_len;
221 for (uint8_t i = 0; i < a.
GetLength (); i++)
237 os.setf (std::ios::hex, std::ios::basefield);
239 os << std::setw (2) << (uint32_t) address.
m_type <<
"-" << std::setw (2) << (uint32_t) address.
m_len <<
"-";
240 for (uint8_t i = 0; i < (address.
m_len-1); ++i)
242 os << std::setw (2) << (uint32_t)address.
m_data[i] <<
":";
245 os << std::setw (2) << (uint32_t) address.
m_data[address.
m_len-1];
246 os.setf (std::ios::dec, std::ios::basefield);
255 std::istringstream iss;
258 iss >> std::hex >> retval >> std::dec;
266 std::string::size_type firstDash, secondDash;
267 firstDash = v.find (
"-");
268 secondDash = v.find (
"-", firstDash+1);
269 std::string type = v.substr (0, firstDash-0);
270 std::string len = v.substr (firstDash+1, secondDash-(firstDash+1));
276 std::string::size_type col = secondDash + 1;
277 for (uint8_t i = 0; i < address.
m_len; ++i)
280 std::string::size_type next;
281 next = v.find (
":", col);
282 if (next == std::string::npos)
284 tmp = v.substr (col, v.size ()-col);
290 tmp = v.substr (col, next-col);