diff --git a/src/internet-apps/model/dhcp-client.cc b/src/internet-apps/model/dhcp-client.cc index 6a39f1645..1b4d97c3e 100644 --- a/src/internet-apps/model/dhcp-client.cc +++ b/src/internet-apps/model/dhcp-client.cc @@ -75,7 +75,7 @@ DhcpClient::GetTypeId (void) DhcpClient::DhcpClient () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); m_server = Ipv4Address::GetAny (); m_socket = 0; m_refreshEvent = EventId (); @@ -88,7 +88,7 @@ DhcpClient::DhcpClient () DhcpClient::DhcpClient (Ptr netDevice) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this << netDevice); m_device = netDevice; m_server = Ipv4Address::GetAny (); m_socket = 0; @@ -102,7 +102,7 @@ DhcpClient::DhcpClient (Ptr netDevice) DhcpClient::~DhcpClient () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); } Ptr DhcpClient::GetDhcpClientNetDevice (void) diff --git a/src/internet-apps/model/ping6.cc b/src/internet-apps/model/ping6.cc index 8a289846e..ac8ce0cb6 100644 --- a/src/internet-apps/model/ping6.cc +++ b/src/internet-apps/model/ping6.cc @@ -78,7 +78,7 @@ TypeId Ping6::GetTypeId () Ping6::Ping6 () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); m_sent = 0; m_socket = 0; m_seq = 0; @@ -87,19 +87,19 @@ Ping6::Ping6 () Ping6::~Ping6 () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); m_socket = 0; } void Ping6::DoDispose () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); Application::DoDispose (); } void Ping6::StartApplication () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); if (!m_socket) { @@ -130,7 +130,7 @@ void Ping6::SetRemote (Ipv6Address ipv6) void Ping6::StopApplication () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); if (m_socket) { @@ -158,7 +158,7 @@ void Ping6::SetRouters (std::vector routers) void Ping6::Send () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); NS_ASSERT (m_sendEvent.IsExpired ()); Ipv6Address src; diff --git a/src/internet/model/icmpv6-header.cc b/src/internet/model/icmpv6-header.cc index 84e2d8d4f..48d4c30ff 100644 --- a/src/internet/model/icmpv6-header.cc +++ b/src/internet/model/icmpv6-header.cc @@ -758,7 +758,7 @@ uint32_t Icmpv6RS::GetSerializedSize () const void Icmpv6RS::Serialize (Buffer::Iterator start) const { NS_LOG_FUNCTION (this << &start); - NS_LOG_FUNCTION_NOARGS (); + uint16_t checksum = 0; Buffer::Iterator i = start; @@ -1494,7 +1494,7 @@ Icmpv6OptionHeader::~Icmpv6OptionHeader () uint8_t Icmpv6OptionHeader::GetType () const { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); return m_type; } diff --git a/src/internet/model/ipv4-address-generator.cc b/src/internet/model/ipv4-address-generator.cc index 096ab2d15..5d4997a1c 100644 --- a/src/internet/model/ipv4-address-generator.cc +++ b/src/internet/model/ipv4-address-generator.cc @@ -544,7 +544,7 @@ Ipv4AddressGenerator::Init ( const Ipv4Mask mask, const Ipv4Address addr) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (net << mask << addr); SimulationSingleton::Get () ->Init (net, mask, addr); @@ -553,7 +553,7 @@ Ipv4AddressGenerator::Init ( Ipv4Address Ipv4AddressGenerator::NextNetwork (const Ipv4Mask mask) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (mask); return SimulationSingleton::Get () ->NextNetwork (mask); @@ -562,7 +562,7 @@ Ipv4AddressGenerator::NextNetwork (const Ipv4Mask mask) Ipv4Address Ipv4AddressGenerator::GetNetwork (const Ipv4Mask mask) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (mask); return SimulationSingleton::Get () ->GetNetwork (mask); @@ -573,7 +573,7 @@ Ipv4AddressGenerator::InitAddress ( const Ipv4Address addr, const Ipv4Mask mask) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (addr << mask); SimulationSingleton::Get () ->InitAddress (addr, mask); @@ -582,7 +582,7 @@ Ipv4AddressGenerator::InitAddress ( Ipv4Address Ipv4AddressGenerator::GetAddress (const Ipv4Mask mask) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (mask); return SimulationSingleton::Get () ->GetAddress (mask); @@ -591,7 +591,7 @@ Ipv4AddressGenerator::GetAddress (const Ipv4Mask mask) Ipv4Address Ipv4AddressGenerator::NextAddress (const Ipv4Mask mask) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (mask); return SimulationSingleton::Get () ->NextAddress (mask); @@ -609,7 +609,7 @@ Ipv4AddressGenerator::Reset (void) bool Ipv4AddressGenerator::AddAllocated (const Ipv4Address addr) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (addr); return SimulationSingleton::Get () ->AddAllocated (addr); @@ -618,7 +618,7 @@ Ipv4AddressGenerator::AddAllocated (const Ipv4Address addr) bool Ipv4AddressGenerator::IsAddressAllocated (const Ipv4Address addr) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (addr); return SimulationSingleton::Get () ->IsAddressAllocated (addr); @@ -627,7 +627,7 @@ Ipv4AddressGenerator::IsAddressAllocated (const Ipv4Address addr) bool Ipv4AddressGenerator::IsNetworkAllocated (const Ipv4Address addr, const Ipv4Mask mask) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (addr << mask); return SimulationSingleton::Get () ->IsNetworkAllocated (addr, mask); diff --git a/src/internet/model/ipv4-list-routing.cc b/src/internet/model/ipv4-list-routing.cc index fe20d0f95..899313997 100644 --- a/src/internet/model/ipv4-list-routing.cc +++ b/src/internet/model/ipv4-list-routing.cc @@ -292,7 +292,7 @@ Ipv4ListRouting::GetRoutingProtocol (uint32_t index, int16_t& priority) const bool Ipv4ListRouting::Compare (const Ipv4RoutingProtocolEntry& a, const Ipv4RoutingProtocolEntry& b) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (a.first << a.second << b.first << b.second); return a.first > b.first; } diff --git a/src/internet/model/ipv4-routing-table-entry.cc b/src/internet/model/ipv4-routing-table-entry.cc index e873b2a0f..aa9f4b217 100644 --- a/src/internet/model/ipv4-routing-table-entry.cc +++ b/src/internet/model/ipv4-routing-table-entry.cc @@ -173,14 +173,14 @@ Ipv4RoutingTableEntry::CreateHostRouteTo (Ipv4Address dest, Ipv4Address nextHop, uint32_t interface) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (dest << nextHop << interface); return Ipv4RoutingTableEntry (dest, nextHop, interface); } Ipv4RoutingTableEntry Ipv4RoutingTableEntry::CreateHostRouteTo (Ipv4Address dest, uint32_t interface) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (dest << interface); return Ipv4RoutingTableEntry (dest, interface); } Ipv4RoutingTableEntry @@ -189,7 +189,7 @@ Ipv4RoutingTableEntry::CreateNetworkRouteTo (Ipv4Address network, Ipv4Address nextHop, uint32_t interface) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (network << networkMask << nextHop << interface); return Ipv4RoutingTableEntry (network, networkMask, nextHop, interface); } @@ -198,7 +198,7 @@ Ipv4RoutingTableEntry::CreateNetworkRouteTo (Ipv4Address network, Ipv4Mask networkMask, uint32_t interface) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (network << networkMask << interface); return Ipv4RoutingTableEntry (network, networkMask, interface); } @@ -206,7 +206,7 @@ Ipv4RoutingTableEntry Ipv4RoutingTableEntry::CreateDefaultRoute (Ipv4Address nextHop, uint32_t interface) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (nextHop << interface); return Ipv4RoutingTableEntry (Ipv4Address::GetZero (), Ipv4Mask::GetZero (), nextHop, interface); } @@ -351,13 +351,12 @@ Ipv4MulticastRoutingTableEntry::GetOutputInterfaces (void) const } Ipv4MulticastRoutingTableEntry -Ipv4MulticastRoutingTableEntry::CreateMulticastRoute ( - Ipv4Address origin, - Ipv4Address group, - uint32_t inputInterface, - std::vector outputInterfaces) +Ipv4MulticastRoutingTableEntry::CreateMulticastRoute (Ipv4Address origin, + Ipv4Address group, + uint32_t inputInterface, + std::vector outputInterfaces) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (origin << group << inputInterface << outputInterfaces); return Ipv4MulticastRoutingTableEntry (origin, group, inputInterface, outputInterfaces); } diff --git a/src/internet/model/ipv6-address-generator.cc b/src/internet/model/ipv6-address-generator.cc index 39ce39a2a..87cc59833 100644 --- a/src/internet/model/ipv6-address-generator.cc +++ b/src/internet/model/ipv6-address-generator.cc @@ -677,7 +677,7 @@ Ipv6AddressGenerator::Init ( const Ipv6Prefix prefix, const Ipv6Address interfaceId) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (net << prefix << interfaceId); SimulationSingleton::Get () ->Init (net, prefix, interfaceId); @@ -686,7 +686,7 @@ Ipv6AddressGenerator::Init ( Ipv6Address Ipv6AddressGenerator::NextNetwork (const Ipv6Prefix prefix) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (prefix); return SimulationSingleton::Get () ->NextNetwork (prefix); @@ -695,7 +695,7 @@ Ipv6AddressGenerator::NextNetwork (const Ipv6Prefix prefix) Ipv6Address Ipv6AddressGenerator::GetNetwork (const Ipv6Prefix prefix) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (prefix); return SimulationSingleton::Get () ->GetNetwork (prefix); @@ -706,7 +706,7 @@ Ipv6AddressGenerator::InitAddress ( const Ipv6Address interfaceId, const Ipv6Prefix prefix) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (interfaceId << prefix); SimulationSingleton::Get () ->InitAddress (interfaceId, prefix); @@ -715,7 +715,7 @@ Ipv6AddressGenerator::InitAddress ( Ipv6Address Ipv6AddressGenerator::GetAddress (const Ipv6Prefix prefix) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (prefix); return SimulationSingleton::Get () ->GetAddress (prefix); @@ -724,7 +724,7 @@ Ipv6AddressGenerator::GetAddress (const Ipv6Prefix prefix) Ipv6Address Ipv6AddressGenerator::NextAddress (const Ipv6Prefix prefix) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (prefix); return SimulationSingleton::Get () ->NextAddress (prefix); @@ -742,7 +742,7 @@ Ipv6AddressGenerator::Reset (void) bool Ipv6AddressGenerator::AddAllocated (const Ipv6Address addr) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (addr); return SimulationSingleton::Get () ->AddAllocated (addr); @@ -751,7 +751,7 @@ Ipv6AddressGenerator::AddAllocated (const Ipv6Address addr) bool Ipv6AddressGenerator::IsAddressAllocated (const Ipv6Address addr) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (addr); return SimulationSingleton::Get () ->IsAddressAllocated (addr); @@ -760,7 +760,7 @@ Ipv6AddressGenerator::IsAddressAllocated (const Ipv6Address addr) bool Ipv6AddressGenerator::IsNetworkAllocated (const Ipv6Address addr, const Ipv6Prefix prefix) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (addr << prefix); return SimulationSingleton::Get () ->IsNetworkAllocated (addr, prefix); diff --git a/src/internet/model/ipv6-end-point-demux.cc b/src/internet/model/ipv6-end-point-demux.cc index 250a1f4c2..ae0eb9858 100644 --- a/src/internet/model/ipv6-end-point-demux.cc +++ b/src/internet/model/ipv6-end-point-demux.cc @@ -31,12 +31,12 @@ Ipv6EndPointDemux::Ipv6EndPointDemux () m_portFirst (49152), m_portLast (65535) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); } Ipv6EndPointDemux::~Ipv6EndPointDemux () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); for (EndPointsI i = m_endPoints.begin (); i != m_endPoints.end (); i++) { Ipv6EndPoint *endPoint = *i; diff --git a/src/internet/model/ipv6-extension-header.cc b/src/internet/model/ipv6-extension-header.cc index 1eb0c7e71..b356b7fad 100644 --- a/src/internet/model/ipv6-extension-header.cc +++ b/src/internet/model/ipv6-extension-header.cc @@ -169,7 +169,7 @@ uint32_t OptionField::Deserialize (Buffer::Iterator start, uint32_t length) void OptionField::AddOption (Ipv6OptionHeader const& option) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (option); uint32_t pad = CalculatePad (option.GetAlignment ()); NS_LOG_LOGIC ("need " << pad << " bytes padding"); diff --git a/src/internet/model/ipv6-interface-address.cc b/src/internet/model/ipv6-interface-address.cc index f0551a976..5a12053cf 100644 --- a/src/internet/model/ipv6-interface-address.cc +++ b/src/internet/model/ipv6-interface-address.cc @@ -69,12 +69,12 @@ Ipv6InterfaceAddress::Ipv6InterfaceAddress (const Ipv6InterfaceAddress& o) Ipv6InterfaceAddress::~Ipv6InterfaceAddress () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); } Ipv6Address Ipv6InterfaceAddress::GetAddress () const { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); return m_address; } @@ -109,7 +109,7 @@ void Ipv6InterfaceAddress::SetAddress (Ipv6Address address) Ipv6Prefix Ipv6InterfaceAddress::GetPrefix () const { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); return m_prefix; } @@ -121,7 +121,7 @@ void Ipv6InterfaceAddress::SetState (Ipv6InterfaceAddress::State_e state) Ipv6InterfaceAddress::State_e Ipv6InterfaceAddress::GetState () const { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); return m_state; } @@ -133,13 +133,13 @@ void Ipv6InterfaceAddress::SetScope (Ipv6InterfaceAddress::Scope_e scope) Ipv6InterfaceAddress::Scope_e Ipv6InterfaceAddress::GetScope () const { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); return m_scope; } bool Ipv6InterfaceAddress::IsInSameSubnet (Ipv6Address b) const { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); Ipv6Address aAddr = m_address; aAddr = aAddr.CombinePrefix (m_prefix); @@ -183,7 +183,7 @@ std::ostream& operator<< (std::ostream& os, const Ipv6InterfaceAddress &addr) uint32_t Ipv6InterfaceAddress::GetNsDadUid () const { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); return m_nsDadUid; } @@ -205,7 +205,7 @@ void Ipv6InterfaceAddress::StartDadTimer (Ptr interface) void Ipv6InterfaceAddress::StopDadTimer () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); m_dadTimer.Cancel (); Simulator::Cancel (m_dadId); } diff --git a/src/internet/model/ipv6-l3-protocol.cc b/src/internet/model/ipv6-l3-protocol.cc index 68414d447..66f51b6c0 100644 --- a/src/internet/model/ipv6-l3-protocol.cc +++ b/src/internet/model/ipv6-l3-protocol.cc @@ -126,7 +126,7 @@ TypeId Ipv6L3Protocol::GetTypeId () Ipv6L3Protocol::Ipv6L3Protocol () : m_nInterfaces (0) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); m_pmtuCache = CreateObject (); Ptr rawFactoryImpl = CreateObject (); @@ -135,12 +135,12 @@ Ipv6L3Protocol::Ipv6L3Protocol () Ipv6L3Protocol::~Ipv6L3Protocol () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); } void Ipv6L3Protocol::DoDispose () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); /* clear protocol and interface list */ for (L4List_t::iterator it = m_protocols.begin (); it != m_protocols.end (); ++it) @@ -188,7 +188,7 @@ void Ipv6L3Protocol::SetRoutingProtocol (Ptr routingProtoco Ptr Ipv6L3Protocol::GetRoutingProtocol () const { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); return m_routingProtocol; } @@ -238,7 +238,7 @@ Ptr Ipv6L3Protocol::GetInterface (uint32_t index) const uint32_t Ipv6L3Protocol::GetNInterfaces () const { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); return m_nInterfaces; } @@ -561,7 +561,7 @@ void Ipv6L3Protocol::SetDown (uint32_t i) void Ipv6L3Protocol::SetupLoopback () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); Ptr interface = CreateObject (); Ptr device = 0; uint32_t i = 0; @@ -664,7 +664,7 @@ void Ipv6L3Protocol::SetIpForward (bool forward) bool Ipv6L3Protocol::GetIpForward () const { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); return m_ipForward; } @@ -688,13 +688,13 @@ void Ipv6L3Protocol::SetSendIcmpv6Redirect (bool sendIcmpv6Redirect) bool Ipv6L3Protocol::GetSendIcmpv6Redirect () const { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); return m_sendIcmpv6Redirect; } void Ipv6L3Protocol::NotifyNewAggregate () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); if (m_node == 0) { @@ -809,7 +809,7 @@ Ptr Ipv6L3Protocol::GetProtocol (int protocolNumber, int32_t inter Ptr Ipv6L3Protocol::CreateRawSocket () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); Ptr sock = CreateObject (); sock->SetNode (m_node); m_sockets.push_back (sock); @@ -832,7 +832,7 @@ void Ipv6L3Protocol::DeleteRawSocket (Ptr socket) Ptr Ipv6L3Protocol::GetIcmpv6 () const { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); Ptr protocol = GetProtocol (Icmpv6L4Protocol::GetStaticProtocolNumber ()); if (protocol) diff --git a/src/internet/model/ipv6-list-routing.cc b/src/internet/model/ipv6-list-routing.cc index ca7489e90..49117cdc8 100644 --- a/src/internet/model/ipv6-list-routing.cc +++ b/src/internet/model/ipv6-list-routing.cc @@ -46,18 +46,18 @@ Ipv6ListRouting::GetTypeId (void) Ipv6ListRouting::Ipv6ListRouting () : m_ipv6 (0) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); } Ipv6ListRouting::~Ipv6ListRouting () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); } void Ipv6ListRouting::DoDispose (void) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); for (Ipv6RoutingProtocolList::iterator rprotoIter = m_routingProtocols.begin (); rprotoIter != m_routingProtocols.end (); rprotoIter++) { diff --git a/src/internet/model/ipv6-option.cc b/src/internet/model/ipv6-option.cc index 82359088d..54405dcca 100644 --- a/src/internet/model/ipv6-option.cc +++ b/src/internet/model/ipv6-option.cc @@ -46,7 +46,7 @@ TypeId Ipv6Option::GetTypeId () Ipv6Option::~Ipv6Option () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); } void Ipv6Option::SetNode (Ptr node) @@ -70,17 +70,17 @@ TypeId Ipv6OptionPad1::GetTypeId () Ipv6OptionPad1::Ipv6OptionPad1 () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); } Ipv6OptionPad1::~Ipv6OptionPad1 () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); } uint8_t Ipv6OptionPad1::GetOptionNumber () const { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); return OPT_NUMBER; } @@ -115,17 +115,17 @@ TypeId Ipv6OptionPadn::GetTypeId () Ipv6OptionPadn::Ipv6OptionPadn () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); } Ipv6OptionPadn::~Ipv6OptionPadn () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); } uint8_t Ipv6OptionPadn::GetOptionNumber () const { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); return OPT_NUMBER; } @@ -160,17 +160,17 @@ TypeId Ipv6OptionJumbogram::GetTypeId () Ipv6OptionJumbogram::Ipv6OptionJumbogram () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); } Ipv6OptionJumbogram::~Ipv6OptionJumbogram () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); } uint8_t Ipv6OptionJumbogram::GetOptionNumber () const { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); return OPT_NUMBER; } @@ -205,17 +205,17 @@ TypeId Ipv6OptionRouterAlert::GetTypeId () Ipv6OptionRouterAlert::Ipv6OptionRouterAlert () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); } Ipv6OptionRouterAlert::~Ipv6OptionRouterAlert () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); } uint8_t Ipv6OptionRouterAlert::GetOptionNumber () const { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); return OPT_NUMBER; } diff --git a/src/internet/model/ipv6-raw-socket-impl.cc b/src/internet/model/ipv6-raw-socket-impl.cc index b5d7f4a1d..2b2518d59 100644 --- a/src/internet/model/ipv6-raw-socket-impl.cc +++ b/src/internet/model/ipv6-raw-socket-impl.cc @@ -57,7 +57,7 @@ TypeId Ipv6RawSocketImpl::GetTypeId () Ipv6RawSocketImpl::Ipv6RawSocketImpl () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); m_err = Socket::ERROR_NOTERROR; m_node = 0; m_src = Ipv6Address::GetAny (); @@ -74,7 +74,7 @@ Ipv6RawSocketImpl::~Ipv6RawSocketImpl () void Ipv6RawSocketImpl::DoDispose () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); m_node = 0; Socket::DoDispose (); } @@ -92,7 +92,7 @@ Ptr Ipv6RawSocketImpl::GetNode () const enum Socket::SocketErrno Ipv6RawSocketImpl::GetErrno () const { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); return m_err; } @@ -117,7 +117,7 @@ int Ipv6RawSocketImpl::Bind (const Address& address) int Ipv6RawSocketImpl::Bind () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); m_src = Ipv6Address::GetAny (); return 0; } @@ -129,7 +129,7 @@ int Ipv6RawSocketImpl::Bind6 () int Ipv6RawSocketImpl::GetSockName (Address& address) const { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); address = Inet6SocketAddress (m_src, 0); return 0; } @@ -152,7 +152,7 @@ Ipv6RawSocketImpl::GetPeerName (Address& address) const int Ipv6RawSocketImpl::Close () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); Ptr ipv6 = m_node->GetObject (); Ipv6LeaveGroup (); @@ -165,14 +165,14 @@ int Ipv6RawSocketImpl::Close () int Ipv6RawSocketImpl::ShutdownSend () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); m_shutdownSend = true; return 0; } int Ipv6RawSocketImpl::ShutdownRecv () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); m_shutdownRecv = true; return 0; } @@ -194,7 +194,7 @@ int Ipv6RawSocketImpl::Connect (const Address& address) int Ipv6RawSocketImpl::Listen () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); m_err = Socket::ERROR_OPNOTSUPP; return -1; } @@ -377,13 +377,13 @@ Ipv6RawSocketImpl::Ipv6JoinGroup (Ipv6Address address, Socket::Ipv6MulticastFilt uint32_t Ipv6RawSocketImpl::GetTxAvailable () const { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); return 0xffffffff; } uint32_t Ipv6RawSocketImpl::GetRxAvailable () const { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); uint32_t rx = 0; for (std::list::const_iterator it = m_data.begin (); it != m_data.end (); ++it) diff --git a/src/internet/model/ipv6-static-routing.cc b/src/internet/model/ipv6-static-routing.cc index 8f6e656cd..2649741a0 100644 --- a/src/internet/model/ipv6-static-routing.cc +++ b/src/internet/model/ipv6-static-routing.cc @@ -49,12 +49,12 @@ TypeId Ipv6StaticRouting::GetTypeId () Ipv6StaticRouting::Ipv6StaticRouting () : m_ipv6 (0) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); } Ipv6StaticRouting::~Ipv6StaticRouting () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); } void Ipv6StaticRouting::SetIpv6 (Ptr ipv6) @@ -201,7 +201,7 @@ void Ipv6StaticRouting::SetDefaultMulticastRoute (uint32_t outputInterface) uint32_t Ipv6StaticRouting::GetNMulticastRoutes () const { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); return m_multicastRoutes.size (); } @@ -373,7 +373,7 @@ Ptr Ipv6StaticRouting::LookupStatic (Ipv6Address dst, Ptr void Ipv6StaticRouting::DoDispose () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); for (NetworkRoutesI j = m_networkRoutes.begin (); j != m_networkRoutes.end (); j = m_networkRoutes.erase (j)) { @@ -447,7 +447,7 @@ uint32_t Ipv6StaticRouting::GetNRoutes () const Ipv6RoutingTableEntry Ipv6StaticRouting::GetDefaultRoute () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); Ipv6Address dst ("::"); uint32_t shortestMetric = 0xffffffff; Ipv6RoutingTableEntry* result = 0; @@ -503,7 +503,7 @@ Ipv6RoutingTableEntry Ipv6StaticRouting::GetRoute (uint32_t index) const uint32_t Ipv6StaticRouting::GetMetric (uint32_t index) const { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this << index); uint32_t tmp = 0; for (NetworkRoutesCI it = m_networkRoutes.begin (); it != m_networkRoutes.end (); it++) diff --git a/src/internet/model/loopback-net-device.cc b/src/internet/model/loopback-net-device.cc index d85f17d07..60dc71558 100644 --- a/src/internet/model/loopback-net-device.cc +++ b/src/internet/model/loopback-net-device.cc @@ -47,7 +47,7 @@ LoopbackNetDevice::LoopbackNetDevice () m_ifIndex (0), m_address (Mac48Address ("00:00:00:00:00:00")) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); } void diff --git a/src/internet/model/ndisc-cache.cc b/src/internet/model/ndisc-cache.cc index 51834e79f..6fa4f1afd 100644 --- a/src/internet/model/ndisc-cache.cc +++ b/src/internet/model/ndisc-cache.cc @@ -51,18 +51,18 @@ TypeId NdiscCache::GetTypeId () NdiscCache::NdiscCache () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); } NdiscCache::~NdiscCache () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); Flush (); } void NdiscCache::DoDispose () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); Flush (); m_device = 0; m_interface = 0; @@ -80,13 +80,13 @@ void NdiscCache::SetDevice (Ptr device, Ptr interface, Ptr NdiscCache::GetInterface () const { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); return m_interface; } Ptr NdiscCache::GetDevice () const { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); return m_device; } @@ -135,7 +135,7 @@ NdiscCache::Entry* NdiscCache::Add (Ipv6Address to) void NdiscCache::Remove (NdiscCache::Entry* entry) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this << entry); for (CacheI i = m_ndCache.begin (); i != m_ndCache.end (); i++) { @@ -151,7 +151,7 @@ void NdiscCache::Remove (NdiscCache::Entry* entry) void NdiscCache::Flush () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); for (CacheI i = m_ndCache.begin (); i != m_ndCache.end (); i++) { @@ -169,7 +169,7 @@ void NdiscCache::SetUnresQlen (uint32_t unresQlen) uint32_t NdiscCache::GetUnresQlen () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); return m_unresQlen; } @@ -232,7 +232,7 @@ NdiscCache::Entry::Entry (NdiscCache* nd) m_lastReachabilityConfirmation (Seconds (0.0)), m_nsRetransmit (0) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); } void NdiscCache::Entry::SetRouter (bool router) @@ -243,7 +243,7 @@ void NdiscCache::Entry::SetRouter (bool router) bool NdiscCache::Entry::IsRouter () const { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); return m_router; } @@ -262,20 +262,20 @@ void NdiscCache::Entry::AddWaitingPacket (Ipv6PayloadHeaderPair p) void NdiscCache::Entry::ClearWaitingPacket () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); /** \todo report packets as 'dropped' */ m_waiting.clear (); } void NdiscCache::Entry::FunctionReachableTimeout () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); this->MarkStale (); } void NdiscCache::Entry::FunctionRetransmitTimeout () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); Ipv6Address addr; /* determine source address */ @@ -324,7 +324,7 @@ void NdiscCache::Entry::FunctionRetransmitTimeout () void NdiscCache::Entry::FunctionDelayTimeout () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); Ipv6Address addr; this->MarkProbe (); @@ -359,7 +359,7 @@ void NdiscCache::Entry::FunctionDelayTimeout () void NdiscCache::Entry::FunctionProbeTimeout () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); if (m_nsRetransmit < m_ndCache->m_icmpv6->GetMaxUnicastSolicit ()) { @@ -410,13 +410,13 @@ void NdiscCache::Entry::SetIpv6Address (Ipv6Address ipv6Address) Time NdiscCache::Entry::GetLastReachabilityConfirmation () const { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); return m_lastReachabilityConfirmation; } void NdiscCache::Entry::StartReachableTimer () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); if (m_nudTimer.IsRunning ()) { m_nudTimer.Cancel (); @@ -430,7 +430,7 @@ void NdiscCache::Entry::StartReachableTimer () void NdiscCache::Entry::UpdateReachableTimer () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); if (m_state == REACHABLE) { @@ -445,7 +445,7 @@ void NdiscCache::Entry::UpdateReachableTimer () void NdiscCache::Entry::StartProbeTimer () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); if (m_nudTimer.IsRunning ()) { m_nudTimer.Cancel (); @@ -458,7 +458,7 @@ void NdiscCache::Entry::StartProbeTimer () void NdiscCache::Entry::StartDelayTimer () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); if (m_nudTimer.IsRunning ()) { m_nudTimer.Cancel (); @@ -471,7 +471,7 @@ void NdiscCache::Entry::StartDelayTimer () void NdiscCache::Entry::StartRetransmitTimer () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); if (m_nudTimer.IsRunning ()) { m_nudTimer.Cancel (); @@ -484,7 +484,7 @@ void NdiscCache::Entry::StartRetransmitTimer () void NdiscCache::Entry::StopNudTimer () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); m_nudTimer.Cancel (); m_nsRetransmit = 0; } @@ -510,19 +510,19 @@ std::list NdiscCache::Entry::MarkReachable (A void NdiscCache::Entry::MarkProbe () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); m_state = PROBE; } void NdiscCache::Entry::MarkStale () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); m_state = STALE; } void NdiscCache::Entry::MarkReachable () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); m_state = REACHABLE; } @@ -536,56 +536,56 @@ std::list NdiscCache::Entry::MarkStale (Addre void NdiscCache::Entry::MarkDelay () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); m_state = DELAY; } void NdiscCache::Entry::MarkPermanent () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); StopNudTimer (); m_state = PERMANENT; } bool NdiscCache::Entry::IsStale () const { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); return (m_state == STALE); } bool NdiscCache::Entry::IsReachable () const { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); return (m_state == REACHABLE); } bool NdiscCache::Entry::IsDelay () const { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); return (m_state == DELAY); } bool NdiscCache::Entry::IsIncomplete () const { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); return (m_state == INCOMPLETE); } bool NdiscCache::Entry::IsProbe () const { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); return (m_state == PROBE); } bool NdiscCache::Entry::IsPermanent () const { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); return (m_state == PERMANENT); } Address NdiscCache::Entry::GetMacAddress () const { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); return m_macAddress; } diff --git a/src/internet/model/nsc-tcp-socket-impl.cc b/src/internet/model/nsc-tcp-socket-impl.cc index 1d6607b86..afc70618b 100644 --- a/src/internet/model/nsc-tcp-socket-impl.cc +++ b/src/internet/model/nsc-tcp-socket-impl.cc @@ -124,7 +124,7 @@ NscTcpSocketImpl::NscTcpSocketImpl(const NscTcpSocketImpl& sock) m_nscTcpSocket (0), m_sndBufSize (sock.m_sndBufSize) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); NS_LOG_LOGIC ("Invoked the copy constructor"); //copy the pending data if necessary if(!sock.m_txBuffer.empty () ) @@ -178,7 +178,7 @@ NscTcpSocketImpl::SetTcp (Ptr tcp) enum Socket::SocketErrno NscTcpSocketImpl::GetErrno (void) const { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); return m_errno; } @@ -191,14 +191,14 @@ NscTcpSocketImpl::GetSocketType (void) const Ptr NscTcpSocketImpl::GetNode (void) const { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); return m_node; } void NscTcpSocketImpl::Destroy (void) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); m_node = 0; m_endPoint = 0; m_tcp = 0; @@ -206,7 +206,7 @@ NscTcpSocketImpl::Destroy (void) int NscTcpSocketImpl::FinishBind (void) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); if (m_endPoint == 0) { return -1; @@ -221,7 +221,7 @@ NscTcpSocketImpl::FinishBind (void) int NscTcpSocketImpl::Bind (void) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); m_endPoint = m_tcp->Allocate (); return FinishBind (); } @@ -284,14 +284,14 @@ NscTcpSocketImpl::BindToNetDevice (Ptr netdevice) int NscTcpSocketImpl::ShutdownSend (void) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); m_shutdownSend = true; return 0; } int NscTcpSocketImpl::ShutdownRecv (void) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); m_shutdownRecv = true; return 0; } @@ -399,7 +399,7 @@ NscTcpSocketImpl::SendTo (Ptr p, uint32_t flags, const Address &address) uint32_t NscTcpSocketImpl::GetTxAvailable (void) const { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); if (m_txBufferSize != 0) { NS_ASSERT (m_txBufferSize <= m_sndBufSize); @@ -456,9 +456,7 @@ NscTcpSocketImpl::NSCWakeup () } Ptr -NscTcpSocketImpl::Recv (uint32_t maxSize, uint32_t flags) -{ - NS_LOG_FUNCTION_NOARGS (); +NscTcpSocketImpl::Recv (uint32_t maxSize, uint32_tNS_LOG_FUNCTION (this)ON_NOARGS (); if (m_deliveryQueue.empty () ) { m_errno = ERROR_AGAIN; @@ -491,7 +489,7 @@ NscTcpSocketImpl::RecvFrom (uint32_t maxSize, uint32_t flags, int NscTcpSocketImpl::GetSockName (Address &address) const { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this << address); address = InetSocketAddress (m_localAddress, m_localPort); return 0; } @@ -514,7 +512,7 @@ NscTcpSocketImpl::GetPeerName (Address &address) const uint32_t NscTcpSocketImpl::GetRxAvailable (void) const { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); // We separately maintain this state to avoid walking the queue // every time this might be called return m_rxAvailable; diff --git a/src/internet/model/tcp-l4-protocol.cc b/src/internet/model/tcp-l4-protocol.cc index 8f9a2e82b..a72b4be16 100644 --- a/src/internet/model/tcp-l4-protocol.cc +++ b/src/internet/model/tcp-l4-protocol.cc @@ -97,8 +97,7 @@ TcpL4Protocol::GetTypeId (void) TcpL4Protocol::TcpL4Protocol () : m_endPoints (new Ipv4EndPointDemux ()), m_endPoints6 (new Ipv6EndPointDemux ()) { - NS_LOG_FUNCTION_NOARGS (); - NS_LOG_LOGIC ("Made a TcpL4Protocol " << this); + NS_LOG_FUNCTION (this); } TcpL4Protocol::~TcpL4Protocol () diff --git a/src/internet/model/tcp-socket-base.cc b/src/internet/model/tcp-socket-base.cc index 1e0a1f341..d83088b1f 100644 --- a/src/internet/model/tcp-socket-base.cc +++ b/src/internet/model/tcp-socket-base.cc @@ -4277,7 +4277,7 @@ TcpSocketBase::SafeSubtraction (uint32_t a, uint32_t b) void TcpSocketBase::NotifyPacingPerformed (void) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); NS_LOG_INFO ("Performing Pacing"); SendPendingData (m_connected); } diff --git a/src/internet/model/tcp-socket.cc b/src/internet/model/tcp-socket.cc index 6062e5148..441030cb1 100644 --- a/src/internet/model/tcp-socket.cc +++ b/src/internet/model/tcp-socket.cc @@ -125,12 +125,12 @@ TcpSocket::GetTypeId (void) TcpSocket::TcpSocket () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); } TcpSocket::~TcpSocket () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); } } // namespace ns3 diff --git a/src/internet/model/udp-l4-protocol.cc b/src/internet/model/udp-l4-protocol.cc index 962c47c7a..149562384 100644 --- a/src/internet/model/udp-l4-protocol.cc +++ b/src/internet/model/udp-l4-protocol.cc @@ -67,12 +67,12 @@ UdpL4Protocol::GetTypeId (void) UdpL4Protocol::UdpL4Protocol () : m_endPoints (new Ipv4EndPointDemux ()), m_endPoints6 (new Ipv6EndPointDemux ()) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); } UdpL4Protocol::~UdpL4Protocol () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); } void @@ -133,7 +133,7 @@ UdpL4Protocol::GetProtocolNumber (void) const void UdpL4Protocol::DoDispose (void) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); for (std::vector >::iterator i = m_sockets.begin (); i != m_sockets.end (); i++) { *i = 0; @@ -162,7 +162,7 @@ UdpL4Protocol::DoDispose (void) Ptr UdpL4Protocol::CreateSocket (void) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); Ptr socket = CreateObject (); socket->SetNode (m_node); socket->SetUdp (this); diff --git a/src/internet/model/udp-socket-impl.cc b/src/internet/model/udp-socket-impl.cc index 049166869..236d038cb 100644 --- a/src/internet/model/udp-socket-impl.cc +++ b/src/internet/model/udp-socket-impl.cc @@ -86,13 +86,13 @@ UdpSocketImpl::UdpSocketImpl () m_connected (false), m_rxAvailable (0) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); m_allowBroadcast = false; } UdpSocketImpl::~UdpSocketImpl () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); /// \todo leave any multicast groups that have been joined m_node = 0; @@ -137,14 +137,14 @@ UdpSocketImpl::~UdpSocketImpl () void UdpSocketImpl::SetNode (Ptr node) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this << node); m_node = node; } void UdpSocketImpl::SetUdp (Ptr udp) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this << udp); m_udp = udp; } @@ -152,7 +152,7 @@ UdpSocketImpl::SetUdp (Ptr udp) enum Socket::SocketErrno UdpSocketImpl::GetErrno (void) const { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); return m_errno; } @@ -165,21 +165,21 @@ UdpSocketImpl::GetSocketType (void) const Ptr UdpSocketImpl::GetNode (void) const { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); return m_node; } void UdpSocketImpl::Destroy (void) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); m_endPoint = 0; } void UdpSocketImpl::Destroy6 (void) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); m_endPoint6 = 0; } @@ -205,7 +205,7 @@ UdpSocketImpl::DeallocateEndPoint (void) int UdpSocketImpl::FinishBind (void) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); bool done = false; if (m_endPoint != 0) { @@ -231,7 +231,7 @@ UdpSocketImpl::FinishBind (void) int UdpSocketImpl::Bind (void) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); m_endPoint = m_udp->Allocate (); if (m_boundnetdevice) { @@ -243,7 +243,7 @@ UdpSocketImpl::Bind (void) int UdpSocketImpl::Bind6 (void) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); m_endPoint6 = m_udp->Allocate6 (); if (m_boundnetdevice) { @@ -355,7 +355,7 @@ UdpSocketImpl::Bind (const Address &address) int UdpSocketImpl::ShutdownSend (void) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); m_shutdownSend = true; return 0; } @@ -363,7 +363,7 @@ UdpSocketImpl::ShutdownSend (void) int UdpSocketImpl::ShutdownRecv (void) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); m_shutdownRecv = true; if (m_endPoint) { @@ -379,7 +379,7 @@ UdpSocketImpl::ShutdownRecv (void) int UdpSocketImpl::Close (void) { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); if (m_shutdownRecv == true && m_shutdownSend == true) { m_errno = Socket::ERROR_BADF; @@ -791,7 +791,7 @@ UdpSocketImpl::DoSendTo (Ptr p, Ipv6Address dest, uint16_t port) uint32_t UdpSocketImpl::GetTxAvailable (void) const { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); // No finite send buffer is modelled, but we must respect // the maximum size of an IP datagram (65535 bytes - headers). return MAX_IPV4_UDP_DATAGRAM_SIZE; @@ -822,7 +822,7 @@ UdpSocketImpl::SendTo (Ptr p, uint32_t flags, const Address &address) uint32_t UdpSocketImpl::GetRxAvailable (void) const { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); // We separately maintain this state to avoid walking the queue // every time this might be called return m_rxAvailable; @@ -867,7 +867,7 @@ UdpSocketImpl::RecvFrom (uint32_t maxSize, uint32_t flags, int UdpSocketImpl::GetSockName (Address &address) const { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this << address); if (m_endPoint != 0) { address = InetSocketAddress (m_endPoint->GetLocalAddress (), m_endPoint->GetLocalPort ()); diff --git a/src/internet/model/udp-socket.cc b/src/internet/model/udp-socket.cc index 2e7d798ca..eb657e40c 100644 --- a/src/internet/model/udp-socket.cc +++ b/src/internet/model/udp-socket.cc @@ -79,12 +79,12 @@ UdpSocket::GetTypeId (void) UdpSocket::UdpSocket () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); } UdpSocket::~UdpSocket () { - NS_LOG_FUNCTION_NOARGS (); + NS_LOG_FUNCTION (this); } } // namespace ns3