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));
140 static uint8_t type = 1;
149 return 1 + 1 +
m_len;
220 for (uint8_t i = 0; i < a.
GetLength (); i++)
236 os.setf (std::ios::hex, std::ios::basefield);
238 os << std::setw (2) << (uint32_t) address.
m_type <<
"-" << std::setw (2) << (uint32_t) address.
m_len <<
"-";
239 for (uint8_t i = 0; i < (address.
m_len-1); ++i)
241 os << std::setw (2) << (uint32_t)address.
m_data[i] <<
":";
244 os << std::setw (2) << (uint32_t) address.
m_data[address.
m_len-1];
245 os.setf (std::ios::dec, std::ios::basefield);
254 std::istringstream iss;
257 iss >> std::hex >> retval >> std::dec;
265 std::string::size_type firstDash, secondDash;
266 firstDash = v.find (
"-");
267 secondDash = v.find (
"-", firstDash+1);
268 std::string type = v.substr (0, firstDash-0);
269 std::string len = v.substr (firstDash+1, secondDash-(firstDash+1));
275 std::string::size_type col = secondDash + 1;
276 for (uint8_t i = 0; i < address.
m_len; ++i)
279 std::string::size_type next;
280 next = v.find (
":", col);
281 if (next == std::string::npos)
283 tmp = v.substr (col, v.size ()-col);
289 tmp = v.substr (col, next-col);