Fix printing of uint8_t data in NS_LOG_FUNCTION introduced by 9144:6a15c50388bc Clean up function logging of network module.
--- a/src/network/model/address.cc Sat Dec 01 14:00:18 2012 +0100
+++ b/src/network/model/address.cc Sat Dec 01 20:05:49 2012 +0100
@@ -42,7 +42,7 @@
: m_type (type),
m_len (len)
{
- NS_LOG_FUNCTION (this<< type << buffer << len);
+ NS_LOG_FUNCTION (this << static_cast<uint32_t> (type) << &buffer << static_cast<uint32_t> (len));
NS_ASSERT (m_len <= MAX_SIZE);
std::memcpy (m_data, buffer, m_len);
}
@@ -83,7 +83,7 @@
uint32_t
Address::CopyTo (uint8_t buffer[MAX_SIZE]) const
{
- NS_LOG_FUNCTION (this << buffer);
+ NS_LOG_FUNCTION (this << &buffer);
NS_ASSERT (m_len <= MAX_SIZE);
std::memcpy (buffer, m_data, m_len);
return m_len;
@@ -91,7 +91,7 @@
uint32_t
Address::CopyAllTo (uint8_t *buffer, uint8_t len) const
{
- NS_LOG_FUNCTION (this << buffer << len);
+ NS_LOG_FUNCTION (this << &buffer << static_cast<uint32_t> (len));
NS_ASSERT (len >= m_len + 2);
buffer[0] = m_type;
buffer[1] = m_len;
@@ -102,7 +102,7 @@
uint32_t
Address::CopyFrom (const uint8_t *buffer, uint8_t len)
{
- NS_LOG_FUNCTION (this << buffer << len);
+ NS_LOG_FUNCTION (this << &buffer << static_cast<uint32_t> (len));
NS_ASSERT (len <= MAX_SIZE);
std::memcpy (m_data, buffer, len);
m_len = len;
@@ -111,7 +111,7 @@
uint32_t
Address::CopyAllFrom (const uint8_t *buffer, uint8_t len)
{
- NS_LOG_FUNCTION (this << buffer << len);
+ NS_LOG_FUNCTION (this << &buffer << static_cast<uint32_t> (len));
NS_ASSERT (len >= 2);
m_type = buffer[0];
m_len = buffer[1];
@@ -123,14 +123,14 @@
bool
Address::CheckCompatible (uint8_t type, uint8_t len) const
{
- NS_LOG_FUNCTION (this << type << len);
+ NS_LOG_FUNCTION (this << static_cast<uint32_t> (type) << static_cast<uint32_t> (len));
NS_ASSERT (len <= MAX_SIZE);
return m_len == len && (m_type == type || m_type == 0);
}
bool
Address::IsMatchingType (uint8_t type) const
{
- NS_LOG_FUNCTION (this << type);
+ NS_LOG_FUNCTION (this << static_cast<uint32_t> (type));
return m_type == type;
}
--- a/src/network/model/buffer.cc Sat Dec 01 14:00:18 2012 +0100
+++ b/src/network/model/buffer.cc Sat Dec 01 20:05:49 2012 +0100
@@ -590,11 +590,10 @@
uint32_t
Buffer::Serialize (uint8_t* buffer, uint32_t maxSize) const
{
+ NS_LOG_FUNCTION (this << &buffer << maxSize);
uint32_t* p = reinterpret_cast<uint32_t *> (buffer);
uint32_t size = 0;
- NS_LOG_FUNCTION (this << buffer << maxSize);
-
// Add the zero data length
if (size + 4 <= maxSize)
{
@@ -661,7 +660,7 @@
uint32_t
Buffer::Deserialize (const uint8_t *buffer, uint32_t size)
{
- NS_LOG_FUNCTION (this << buffer << size);
+ NS_LOG_FUNCTION (this << &buffer << size);
const uint32_t* p = reinterpret_cast<const uint32_t *> (buffer);
uint32_t sizeCheck = size-4;
@@ -769,7 +768,7 @@
uint32_t
Buffer::CopyData (uint8_t *buffer, uint32_t size) const
{
- NS_LOG_FUNCTION (this << buffer << size);
+ NS_LOG_FUNCTION (this << &buffer << size);
uint32_t originalSize = size;
if (size > 0)
{
@@ -979,7 +978,7 @@
void
Buffer::Iterator::Write (uint8_t const*buffer, uint32_t size)
{
- NS_LOG_FUNCTION (this << buffer << size);
+ NS_LOG_FUNCTION (this << &buffer << size);
NS_ASSERT_MSG (CheckNoZero (m_current, size),
GetWriteErrorMessage ());
uint8_t *to;
@@ -1149,7 +1148,7 @@
void
Buffer::Iterator::Read (uint8_t *buffer, uint32_t size)
{
- NS_LOG_FUNCTION (this << buffer << size);
+ NS_LOG_FUNCTION (this << &buffer << size);
for (uint32_t i = 0; i < size; i++)
{
buffer[i] = ReadU8 ();
--- a/src/network/model/packet-metadata.cc Sat Dec 01 14:00:18 2012 +0100
+++ b/src/network/model/packet-metadata.cc Sat Dec 01 20:05:49 2012 +0100
@@ -186,7 +186,7 @@
uint32_t
PacketMetadata::ReadUleb128 (const uint8_t **pBuffer) const
{
- NS_LOG_FUNCTION (this << pBuffer);
+ NS_LOG_FUNCTION (this << &pBuffer);
const uint8_t *buffer = *pBuffer;
uint32_t result = 0;
uint8_t byte;
@@ -236,7 +236,7 @@
void
PacketMetadata::Append16 (uint16_t value, uint8_t *buffer)
{
- NS_LOG_FUNCTION (this << value << buffer);
+ NS_LOG_FUNCTION (this << value << &buffer);
buffer[0] = value & 0xff;
value >>= 8;
buffer[1] = value;
@@ -244,7 +244,7 @@
void
PacketMetadata::Append32 (uint32_t value, uint8_t *buffer)
{
- NS_LOG_FUNCTION (this << value << buffer);
+ NS_LOG_FUNCTION (this << value << &buffer);
buffer[0] = value & 0xff;
buffer[1] = (value >> 8) & 0xff;
buffer[2] = (value >> 16) & 0xff;
@@ -254,7 +254,7 @@
void
PacketMetadata::AppendValueExtra (uint32_t value, uint8_t *buffer)
{
- NS_LOG_FUNCTION (this << value << buffer);
+ NS_LOG_FUNCTION (this << value << &buffer);
if (value < 0x200000)
{
uint8_t byte = value & (~0x80);
@@ -301,7 +301,7 @@
void
PacketMetadata::AppendValue (uint32_t value, uint8_t *buffer)
{
- NS_LOG_FUNCTION (this << value << buffer);
+ NS_LOG_FUNCTION (this << value << &buffer);
if (value < 0x80)
{
buffer[0] = value;
@@ -1193,7 +1193,7 @@
uint32_t
PacketMetadata::Serialize (uint8_t* buffer, uint32_t maxSize) const
{
- NS_LOG_FUNCTION (this << buffer << maxSize);
+ NS_LOG_FUNCTION (this << &buffer << maxSize);
uint8_t* start = buffer;
buffer = AddToRawU64 (m_packetUid, start, buffer, maxSize);
@@ -1294,7 +1294,7 @@
uint32_t
PacketMetadata::Deserialize (const uint8_t* buffer, uint32_t size)
{
- NS_LOG_FUNCTION (this << buffer << size);
+ NS_LOG_FUNCTION (this << &buffer << size);
const uint8_t* start = buffer;
uint32_t desSize = size - 4;
@@ -1358,7 +1358,7 @@
uint8_t* current,
uint32_t maxSize)
{
- NS_LOG_FUNCTION (data << start << current << maxSize);
+ NS_LOG_FUNCTION (static_cast<uint32_t> (data) << &start << ¤t << maxSize);
// First check buffer overflow
if (static_cast<uint32_t> ((current + sizeof (uint8_t) - start)) > maxSize)
{
@@ -1374,7 +1374,7 @@
uint8_t* current,
uint32_t maxSize)
{
- NS_LOG_FUNCTION (data << start << current << maxSize);
+ NS_LOG_FUNCTION (data << &start << ¤t << maxSize);
// First check buffer overflow
if (static_cast<uint32_t> ((current + sizeof (uint16_t) - start)) > maxSize)
{
@@ -1390,7 +1390,7 @@
uint8_t* current,
uint32_t maxSize)
{
- NS_LOG_FUNCTION (data << start << current << maxSize);
+ NS_LOG_FUNCTION (data << &start << ¤t << maxSize);
// First check buffer overflow
if (static_cast<uint32_t> ((current + sizeof (uint32_t) - start)) > maxSize)
{
@@ -1406,7 +1406,7 @@
uint8_t* current,
uint32_t maxSize)
{
- NS_LOG_FUNCTION (data << start << current << maxSize);
+ NS_LOG_FUNCTION (data << &start << ¤t << maxSize);
// First check buffer overflow
if (static_cast<uint32_t> ((current + sizeof (uint64_t) - start)) > maxSize)
{
@@ -1423,7 +1423,7 @@
uint8_t* current,
uint32_t maxSize)
{
- NS_LOG_FUNCTION (data << dataSize << start << current << maxSize);
+ NS_LOG_FUNCTION (&data << dataSize << &start << ¤t << maxSize);
// First check buffer overflow
if (static_cast<uint32_t> ((current + dataSize - start)) > maxSize)
{
@@ -1439,7 +1439,7 @@
const uint8_t* current,
uint32_t maxSize)
{
- NS_LOG_FUNCTION (data << start << current << maxSize);
+ NS_LOG_FUNCTION (static_cast<uint32_t> (data) << &start << ¤t << maxSize);
// First check buffer underflow
if (static_cast<uint32_t> ((current + sizeof (uint8_t) - start)) > maxSize)
{
@@ -1455,7 +1455,7 @@
const uint8_t* current,
uint32_t maxSize)
{
- NS_LOG_FUNCTION (data << start << current << maxSize);
+ NS_LOG_FUNCTION (data << &start << ¤t << maxSize);
// First check buffer underflow
if (static_cast<uint32_t> ((current + sizeof (uint16_t) - start)) > maxSize)
{
@@ -1471,7 +1471,7 @@
const uint8_t* current,
uint32_t maxSize)
{
- NS_LOG_FUNCTION (data << start << current << maxSize);
+ NS_LOG_FUNCTION (data << &start << ¤t << maxSize);
// First check buffer underflow
if (static_cast<uint32_t> ((current + sizeof (uint32_t) - start)) > maxSize)
{
@@ -1487,7 +1487,7 @@
const uint8_t* current,
uint32_t maxSize)
{
- NS_LOG_FUNCTION (data << start << current << maxSize);
+ NS_LOG_FUNCTION (data << &start << ¤t << maxSize);
// First check buffer underflow
if ((uint32_t)((current + sizeof (uint64_t) - start)) > maxSize)
{
--- a/src/network/model/packet.cc Sat Dec 01 14:00:18 2012 +0100
+++ b/src/network/model/packet.cc Sat Dec 01 20:05:49 2012 +0100
@@ -205,7 +205,7 @@
m_metadata (0,0),
m_nixVector (0)
{
- NS_LOG_FUNCTION (this << buffer << size << magic);
+ NS_LOG_FUNCTION (this << &buffer << size << magic);
NS_ASSERT (magic);
Deserialize (buffer, size);
}
@@ -223,7 +223,7 @@
m_metadata (static_cast<uint64_t> (Simulator::GetSystemId ()) << 32 | m_globalUid, size),
m_nixVector (0)
{
- NS_LOG_FUNCTION (this << buffer << size);
+ NS_LOG_FUNCTION (this << &buffer << size);
m_globalUid++;
m_buffer.AddAtStart (size);
Buffer::Iterator i = m_buffer.Begin ();
@@ -399,7 +399,7 @@
uint32_t
Packet::CopyData (uint8_t *buffer, uint32_t size) const
{
- NS_LOG_FUNCTION (this << buffer << size);
+ NS_LOG_FUNCTION (this << &buffer << size);
return m_buffer.CopyData (buffer, size);
}
@@ -633,7 +633,7 @@
uint32_t
Packet::Serialize (uint8_t* buffer, uint32_t maxSize) const
{
- NS_LOG_FUNCTION (this << buffer << maxSize);
+ NS_LOG_FUNCTION (this << &buffer << maxSize);
uint32_t* p = reinterpret_cast<uint32_t *> (buffer);
uint32_t size = 0;
@@ -752,7 +752,7 @@
uint32_t
Packet::Deserialize (const uint8_t* buffer, uint32_t size)
{
- NS_LOG_FUNCTION (this << buffer << size);
+ NS_LOG_FUNCTION (this << &buffer << size);
const uint32_t* p = reinterpret_cast<const uint32_t *> (buffer);
--- a/src/network/model/socket.cc Sat Dec 01 14:00:18 2012 +0100
+++ b/src/network/model/socket.cc Sat Dec 01 20:05:49 2012 +0100
@@ -140,7 +140,7 @@
int
Socket::Send (const uint8_t* buf, uint32_t size, uint32_t flags)
{
- NS_LOG_FUNCTION (this << buf << size << flags);
+ NS_LOG_FUNCTION (this << &buf << size << flags);
Ptr<Packet> p;
if (buf)
{
@@ -157,7 +157,7 @@
Socket::SendTo (const uint8_t* buf, uint32_t size, uint32_t flags,
const Address &toAddress)
{
- NS_LOG_FUNCTION (this << buf << size << flags << &toAddress);
+ NS_LOG_FUNCTION (this << &buf << size << flags << &toAddress);
Ptr<Packet> p;
if(buf)
{
@@ -180,7 +180,7 @@
int
Socket::Recv (uint8_t* buf, uint32_t size, uint32_t flags)
{
- NS_LOG_FUNCTION (this << buf << size << flags);
+ NS_LOG_FUNCTION (this << &buf << size << flags);
Ptr<Packet> p = Recv (size, flags); // read up to "size" bytes
if (p == 0)
{
@@ -201,7 +201,7 @@
Socket::RecvFrom (uint8_t* buf, uint32_t size, uint32_t flags,
Address &fromAddress)
{
- NS_LOG_FUNCTION (this << buf << size << flags << &fromAddress);
+ NS_LOG_FUNCTION (this << &buf << size << flags << &fromAddress);
Ptr<Packet> p = RecvFrom (size, flags, fromAddress);
if (p == 0)
{
@@ -581,7 +581,7 @@
void
SocketIpTtlTag::SetTtl (uint8_t ttl)
{
- NS_LOG_FUNCTION (this << ttl);
+ NS_LOG_FUNCTION (this << static_cast<uint32_t> (ttl));
m_ttl = ttl;
}
--- a/src/network/model/tag-buffer.cc Sat Dec 01 14:00:18 2012 +0100
+++ b/src/network/model/tag-buffer.cc Sat Dec 01 20:05:49 2012 +0100
@@ -31,7 +31,7 @@
void
TagBuffer::WriteU8 (uint8_t v)
{
- NS_LOG_FUNCTION (this << v);
+ NS_LOG_FUNCTION (this << static_cast<uint32_t> (v));
NS_ASSERT (m_current + 1 <= m_end);
*m_current = v;
m_current++;
@@ -124,7 +124,7 @@
void
TagBuffer::Write (const uint8_t *buffer, uint32_t size)
{
- NS_LOG_FUNCTION (this << buffer << size);
+ NS_LOG_FUNCTION (this << &buffer << size);
for (uint32_t i = 0; i < size; ++i, ++buffer)
{
WriteU8 (*buffer);
@@ -175,7 +175,7 @@
void
TagBuffer::Read (uint8_t *buffer, uint32_t size)
{
- NS_LOG_FUNCTION (this << buffer << size);
+ NS_LOG_FUNCTION (this << &buffer << size);
for (uint32_t i = 0; i < size; ++i, ++buffer)
{
*buffer = ReadU8 ();
@@ -185,7 +185,7 @@
: m_current (start),
m_end (end)
{
- NS_LOG_FUNCTION (this << start << end);
+ NS_LOG_FUNCTION (this << &start << &end);
}
void
--- a/src/network/utils/ethernet-trailer.cc Sat Dec 01 14:00:18 2012 +0100
+++ b/src/network/utils/ethernet-trailer.cc Sat Dec 01 20:05:49 2012 +0100
@@ -156,7 +156,7 @@
uint32_t
EthernetTrailer::DoCalcFcs (uint8_t const *buffer, size_t len) const
{
- NS_LOG_FUNCTION (this << buffer << len);
+ NS_LOG_FUNCTION (this << &buffer << len);
uint32_t crc = 0xffffffff;
int i;
--- a/src/network/utils/ipv4-address.cc Sat Dec 01 14:00:18 2012 +0100
+++ b/src/network/utils/ipv4-address.cc Sat Dec 01 20:05:49 2012 +0100
@@ -279,7 +279,7 @@
void
Ipv4Address::Serialize (uint8_t buf[4]) const
{
- NS_LOG_FUNCTION (this << buf);
+ NS_LOG_FUNCTION (this << &buf);
buf[0] = (m_address >> 24) & 0xff;
buf[1] = (m_address >> 16) & 0xff;
buf[2] = (m_address >> 8) & 0xff;
@@ -288,7 +288,7 @@
Ipv4Address
Ipv4Address::Deserialize (const uint8_t buf[4])
{
- NS_LOG_FUNCTION (buf);
+ NS_LOG_FUNCTION (&buf);
Ipv4Address ipv4;
ipv4.m_address = 0;
ipv4.m_address |= buf[0];
--- a/src/network/utils/ipv6-address.cc Sat Dec 01 14:00:18 2012 +0100
+++ b/src/network/utils/ipv6-address.cc Sat Dec 01 20:05:49 2012 +0100
@@ -120,7 +120,7 @@
*/
static bool AsciiToIpv6Host (const char *address, uint8_t addr[16])
{
- NS_LOG_FUNCTION (address << addr);
+ NS_LOG_FUNCTION (address << &addr);
static const char xdigits_l[] = "0123456789abcdef";
static const char xdigits_u[] = "0123456789ABCDEF";
unsigned char tmp[16];
@@ -276,7 +276,7 @@
Ipv6Address::Ipv6Address (uint8_t address[16])
{
- NS_LOG_FUNCTION (this << address);
+ NS_LOG_FUNCTION (this << &address);
/* 128 bit => 16 bytes */
memcpy (m_address, address, 16);
}
@@ -296,19 +296,19 @@
void Ipv6Address::Set (uint8_t address[16])
{
/* 128 bit => 16 bytes */
- NS_LOG_FUNCTION (this << address);
+ NS_LOG_FUNCTION (this << &address);
memcpy (m_address, address, 16);
}
void Ipv6Address::Serialize (uint8_t buf[16]) const
{
- NS_LOG_FUNCTION (this << buf);
+ NS_LOG_FUNCTION (this << &buf);
memcpy (buf, m_address, 16);
}
Ipv6Address Ipv6Address::Deserialize (const uint8_t buf[16])
{
- NS_LOG_FUNCTION (buf);
+ NS_LOG_FUNCTION (&buf);
Ipv6Address ipv6 ((uint8_t*)buf);
return ipv6;
}
@@ -610,7 +610,7 @@
void Ipv6Address::GetBytes (uint8_t buf[16]) const
{
- NS_LOG_FUNCTION (this << buf);
+ NS_LOG_FUNCTION (this << &buf);
memcpy (buf, m_address, 16);
}
@@ -665,13 +665,13 @@
Ipv6Prefix::Ipv6Prefix (uint8_t prefix[16])
{
- NS_LOG_FUNCTION (this << prefix);
+ NS_LOG_FUNCTION (this << &prefix);
memcpy (m_prefix, prefix, 16);
}
Ipv6Prefix::Ipv6Prefix (uint8_t prefix)
{
- NS_LOG_FUNCTION (this << prefix);
+ NS_LOG_FUNCTION (this << static_cast<uint32_t> (prefix));
unsigned int nb=0;
unsigned int mod=0;
unsigned int i=0;
@@ -787,7 +787,7 @@
void Ipv6Prefix::GetBytes (uint8_t buf[16]) const
{
- NS_LOG_FUNCTION (this << buf);
+ NS_LOG_FUNCTION (this << &buf);
memcpy (buf, m_prefix, 16);
}
--- a/src/network/utils/mac48-address.cc Sat Dec 01 14:00:18 2012 +0100
+++ b/src/network/utils/mac48-address.cc Sat Dec 01 20:05:49 2012 +0100
@@ -91,13 +91,13 @@
void
Mac48Address::CopyFrom (const uint8_t buffer[6])
{
- NS_LOG_FUNCTION (this << buffer);
+ NS_LOG_FUNCTION (this << &buffer);
std::memcpy (m_address, buffer, 6);
}
void
Mac48Address::CopyTo (uint8_t buffer[6]) const
{
- NS_LOG_FUNCTION (this << buffer);
+ NS_LOG_FUNCTION (this << &buffer);
std::memcpy (buffer, m_address, 6);
}
--- a/src/network/utils/mac64-address.cc Sat Dec 01 14:00:18 2012 +0100
+++ b/src/network/utils/mac64-address.cc Sat Dec 01 20:05:49 2012 +0100
@@ -89,13 +89,13 @@
void
Mac64Address::CopyFrom (const uint8_t buffer[8])
{
- NS_LOG_FUNCTION (this << buffer);
+ NS_LOG_FUNCTION (this << &buffer);
std::memcpy (m_address, buffer, 8);
}
void
Mac64Address::CopyTo (uint8_t buffer[8]) const
{
- NS_LOG_FUNCTION (this << buffer);
+ NS_LOG_FUNCTION (this << &buffer);
std::memcpy (buffer, m_address, 8);
}
--- a/src/network/utils/packetbb.cc Sat Dec 01 14:00:18 2012 +0100
+++ b/src/network/utils/packetbb.cc Sat Dec 01 20:05:49 2012 +0100
@@ -1047,7 +1047,7 @@
void
PbbMessage::SetType (uint8_t type)
{
- NS_LOG_FUNCTION (this << type);
+ NS_LOG_FUNCTION (this << static_cast<uint32_t> (type));
m_type = type;
}
@@ -1091,7 +1091,7 @@
void
PbbMessage::SetHopLimit (uint8_t hopLimit)
{
- NS_LOG_FUNCTION (this << hopLimit);
+ NS_LOG_FUNCTION (this << static_cast<uint32_t> (hopLimit));
m_hopLimit = hopLimit;
m_hasHopLimit = true;
}
@@ -1114,7 +1114,7 @@
void
PbbMessage::SetHopCount (uint8_t hopCount)
{
- NS_LOG_FUNCTION (this << hopCount);
+ NS_LOG_FUNCTION (this << static_cast<uint32_t> (hopCount));
m_hopCount = hopCount;
m_hasHopCount = true;
}
@@ -1505,7 +1505,7 @@
Ptr<PbbMessage>
PbbMessage::DeserializeMessage (Buffer::Iterator &start)
{
- NS_LOG_FUNCTION_NOARGS ();
+ NS_LOG_FUNCTION (&start);
/* We need to read the msg-addr-len field to determine what kind of object to
* construct. */
start.Next ();
@@ -2021,7 +2021,7 @@
void
PbbAddressBlock::PrefixPushFront (uint8_t prefix)
{
- NS_LOG_FUNCTION (this << prefix);
+ NS_LOG_FUNCTION (this << static_cast<uint32_t> (prefix));
m_prefixList.push_front (prefix);
}
@@ -2035,7 +2035,7 @@
void
PbbAddressBlock::PrefixPushBack (uint8_t prefix)
{
- NS_LOG_FUNCTION (this << prefix);
+ NS_LOG_FUNCTION (this << static_cast<uint32_t> (prefix));
m_prefixList.push_back (prefix);
}
@@ -2049,7 +2049,7 @@
PbbAddressBlock::PrefixIterator
PbbAddressBlock::PrefixInsert (PbbAddressBlock::PrefixIterator position, const uint8_t value)
{
- NS_LOG_FUNCTION (this << &position << value);
+ NS_LOG_FUNCTION (this << &position << static_cast<uint32_t> (value));
return m_prefixList.insert (position, value);
}
@@ -2496,7 +2496,8 @@
PbbAddressBlock::GetHeadTail (uint8_t *head, uint8_t &headlen,
uint8_t *tail, uint8_t &taillen) const
{
- NS_LOG_FUNCTION (this << head << headlen << tail << taillen);
+ NS_LOG_FUNCTION (this << &head << static_cast<uint32_t> (headlen)
+ << &tail << static_cast<uint32_t> (taillen));
headlen = GetAddressLength ();
taillen = headlen;
@@ -2559,7 +2560,7 @@
bool
PbbAddressBlock::HasZeroTail (const uint8_t *tail, uint8_t taillen) const
{
- NS_LOG_FUNCTION (this << tail << taillen);
+ NS_LOG_FUNCTION (this << &tail << static_cast<uint32_t> (taillen));
int i;
for (i = 0; i < taillen; i++)
{
@@ -2593,14 +2594,14 @@
void
PbbAddressBlockIpv4::SerializeAddress (uint8_t *buffer, ConstAddressIterator iter) const
{
- NS_LOG_FUNCTION (this << buffer << &iter);
+ NS_LOG_FUNCTION (this << &buffer << &iter);
Ipv4Address::ConvertFrom (*iter).Serialize (buffer);
}
Address
PbbAddressBlockIpv4::DeserializeAddress (uint8_t *buffer) const
{
- NS_LOG_FUNCTION (this << buffer);
+ NS_LOG_FUNCTION (this << &buffer);
return Ipv4Address::Deserialize (buffer);
}
@@ -2633,14 +2634,14 @@
void
PbbAddressBlockIpv6::SerializeAddress (uint8_t *buffer, ConstAddressIterator iter) const
{
- NS_LOG_FUNCTION (this << buffer << &iter);
+ NS_LOG_FUNCTION (this << &buffer << &iter);
Ipv6Address::ConvertFrom (*iter).Serialize (buffer);
}
Address
PbbAddressBlockIpv6::DeserializeAddress (uint8_t *buffer) const
{
- NS_LOG_FUNCTION (this << buffer);
+ NS_LOG_FUNCTION (this << &buffer);
return Ipv6Address::Deserialize (buffer);
}
@@ -2672,7 +2673,7 @@
void
PbbTlv::SetType (uint8_t type)
{
- NS_LOG_FUNCTION (this << type);
+ NS_LOG_FUNCTION (this << static_cast<uint32_t> (type));
m_type = type;
}
@@ -2686,7 +2687,7 @@
void
PbbTlv::SetTypeExt (uint8_t typeExt)
{
- NS_LOG_FUNCTION (this << typeExt);
+ NS_LOG_FUNCTION (this << static_cast<uint32_t> (typeExt));
m_typeExt = typeExt;
m_hasTypeExt = true;
}
@@ -2709,7 +2710,7 @@
void
PbbTlv::SetIndexStart (uint8_t index)
{
- NS_LOG_FUNCTION (this << index);
+ NS_LOG_FUNCTION (this << static_cast<uint32_t> (index));
m_indexStart = index;
m_hasIndexStart = true;
}
@@ -2732,7 +2733,7 @@
void
PbbTlv::SetIndexStop (uint8_t index)
{
- NS_LOG_FUNCTION (this << index);
+ NS_LOG_FUNCTION (this << static_cast<uint32_t> (index));
m_indexStop = index;
m_hasIndexStop = true;
}
@@ -2777,7 +2778,7 @@
void
PbbTlv::SetValue (const uint8_t * buffer, uint32_t size)
{
- NS_LOG_FUNCTION (this << buffer << size);
+ NS_LOG_FUNCTION (this << &buffer << size);
m_hasValue = true;
m_value.AddAtStart (size);
m_value.Begin ().Write (buffer, size);
@@ -3041,7 +3042,7 @@
void
PbbAddressTlv::SetIndexStart (uint8_t index)
{
- NS_LOG_FUNCTION (this << index);
+ NS_LOG_FUNCTION (this << static_cast<uint32_t> (index));
PbbTlv::SetIndexStart (index);
}
@@ -3062,7 +3063,7 @@
void
PbbAddressTlv::SetIndexStop (uint8_t index)
{
- NS_LOG_FUNCTION (this << index);
+ NS_LOG_FUNCTION (this << static_cast<uint32_t> (index));
PbbTlv::SetIndexStop (index);
}
--- a/src/network/utils/pcap-file-wrapper.cc Sat Dec 01 14:00:18 2012 +0100
+++ b/src/network/utils/pcap-file-wrapper.cc Sat Dec 01 20:05:49 2012 +0100
@@ -133,7 +133,7 @@
void
PcapFileWrapper::Write (Time t, uint8_t const *buffer, uint32_t length)
{
- NS_LOG_FUNCTION (this << t << buffer << length);
+ NS_LOG_FUNCTION (this << t << &buffer << length);
uint64_t current = t.GetMicroSeconds ();
uint64_t s = current / 1000000;
uint64_t us = current % 1000000;
--- a/src/network/utils/pcap-file.cc Sat Dec 01 14:00:18 2012 +0100
+++ b/src/network/utils/pcap-file.cc Sat Dec 01 20:05:49 2012 +0100
@@ -149,7 +149,7 @@
uint8_t
PcapFile::Swap (uint8_t val)
{
- NS_LOG_FUNCTION (this << val);
+ NS_LOG_FUNCTION (this << static_cast<uint32_t> (val));
return val;
}
@@ -404,7 +404,7 @@
void
PcapFile::Write (uint32_t tsSec, uint32_t tsUsec, uint8_t const * const data, uint32_t totalLen)
{
- NS_LOG_FUNCTION (this << tsSec << tsUsec << data << totalLen);
+ NS_LOG_FUNCTION (this << tsSec << tsUsec << &data << totalLen);
uint32_t inclLen = WritePacketHeader (tsSec, tsUsec, totalLen);
m_file.write ((const char *)data, inclLen);
}
@@ -444,7 +444,7 @@
uint32_t &origLen,
uint32_t &readLen)
{
- NS_LOG_FUNCTION (this << data <<maxBytes << tsSec << tsUsec << inclLen << origLen << readLen);
+ NS_LOG_FUNCTION (this << &data <<maxBytes << tsSec << tsUsec << inclLen << origLen << readLen);
NS_ASSERT (m_file.good ());
PcapRecordHeader header;
@@ -498,7 +498,7 @@
uint32_t & sec, uint32_t & usec,
uint32_t snapLen)
{
- NS_LOG_FUNCTION_NOARGS ();
+ NS_LOG_FUNCTION (f1 << f2 << sec << usec << snapLen);
PcapFile pcap1, pcap2;
pcap1.Open (f1, std::ios::in);
pcap2.Open (f2, std::ios::in);
--- a/src/network/utils/radiotap-header.cc Sat Dec 01 14:00:18 2012 +0100
+++ b/src/network/utils/radiotap-header.cc Sat Dec 01 20:05:49 2012 +0100
@@ -251,7 +251,7 @@
void
RadiotapHeader::SetFrameFlags (uint8_t flags)
{
- NS_LOG_FUNCTION (this << flags);
+ NS_LOG_FUNCTION (this << static_cast<uint32_t> (flags));
m_flags = flags;
if (!(m_present & RADIOTAP_FLAGS))
@@ -273,7 +273,7 @@
void
RadiotapHeader::SetRate (uint8_t rate)
{
- NS_LOG_FUNCTION (this << rate);
+ NS_LOG_FUNCTION (this << static_cast<uint32_t> (rate));
m_rate = rate;
if (!(m_present & RADIOTAP_RATE))