A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::addressUtils Namespace Reference

Functions

Address ConvertToSocketAddress (const Address &address, uint16_t port)
 Convert IPv4/IPv6 address with port to a socket address.
 
bool IsMulticast (const Address &ad)
 Address family-independent test for a multicast address.
 

Function Documentation

◆ ConvertToSocketAddress()

Address ns3::addressUtils::ConvertToSocketAddress ( const Address & address,
uint16_t port )

Convert IPv4/IPv6 address with port to a socket address.

Parameters
addressthe address to convert
portthe port
Returns
the corresponding socket address

Definition at line 160 of file address-utils.cc.

References ns3::Ipv4Address::ConvertFrom(), ns3::Ipv6Address::ConvertFrom(), ns3::Ipv4Address::IsMatchingType(), ns3::Ipv6Address::IsMatchingType(), NS_FATAL_ERROR, NS_LOG_DEBUG, NS_LOG_FUNCTION, and port.

Referenced by ns3::ThreeGppHttpClient::SetPort(), ns3::ThreeGppHttpServer::SetPort(), ns3::UdpClient::SetPort(), ns3::UdpEchoClient::SetPort(), and ns3::UdpTraceClient::SetPort().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsMulticast()

bool ns3::addressUtils::IsMulticast ( const Address & ad)

Address family-independent test for a multicast address.

Parameters
adthe address to test
Returns
true if the address is a multicast address, false otherwise

Definition at line 130 of file address-utils.cc.

References ns3::Inet6SocketAddress::ConvertFrom(), ns3::InetSocketAddress::ConvertFrom(), ns3::Ipv4Address::ConvertFrom(), ns3::Ipv6Address::ConvertFrom(), ns3::InetSocketAddress::GetIpv4(), ns3::Inet6SocketAddress::GetIpv6(), ns3::Inet6SocketAddress::IsMatchingType(), ns3::InetSocketAddress::IsMatchingType(), ns3::Ipv4Address::IsMatchingType(), ns3::Ipv6Address::IsMatchingType(), ns3::Ipv6Address::IsMulticast(), and NS_LOG_FUNCTION.

Referenced by ns3::PacketSink::StartApplication(), and ns3::UdpEchoServer::StartApplication().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: