NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
ndn::net::NetworkAddress Class Reference

Stores one IP address supported by a network interface. More...

#include <network-address.hpp>

Public Member Functions

 NetworkAddress (AddressFamily family, const boost::asio::ip::address &ip, const boost::asio::ip::address &broadcast, uint8_t prefixLength, AddressScope scope, uint32_t flags)
 
AddressFamily getFamily () const
 Returns the address family. More...
 
boost::asio::ip::address getIp () const
 Returns the IP address (v4 or v6) More...
 
boost::asio::ip::address getBroadcast () const
 Returns the IP broadcast address. More...
 
uint8_t getPrefixLength () const
 Returns the prefix length. More...
 
AddressScope getScope () const
 Returns the address scope. More...
 
uint32_t getFlags () const
 Returns a bitset of platform-specific flags enabled on the address. More...
 
bool isDeprecated () const
 Returns true if the address is deprecated. More...
 

Friends

bool operator< (const NetworkAddress &a, const NetworkAddress &b)
 

Detailed Description

Stores one IP address supported by a network interface.

Definition at line 53 of file network-address.hpp.

Constructor & Destructor Documentation

◆ NetworkAddress()

ndn::net::NetworkAddress::NetworkAddress ( AddressFamily  family,
const boost::asio::ip::address &  ip,
const boost::asio::ip::address &  broadcast,
uint8_t  prefixLength,
AddressScope  scope,
uint32_t  flags 
)

Definition at line 49 of file network-address.cpp.

Member Function Documentation

◆ getFamily()

AddressFamily ndn::net::NetworkAddress::getFamily ( ) const
inline

Returns the address family.

Definition at line 67 of file network-address.hpp.

Referenced by ndn::net::updateInterfaceState().

◆ getIp()

boost::asio::ip::address ndn::net::NetworkAddress::getIp ( ) const
inline

Returns the IP address (v4 or v6)

Definition at line 76 of file network-address.hpp.

Referenced by ndn::net::NetworkInterface::addNetworkAddress(), and ndn::net::operator<<().

◆ getBroadcast()

boost::asio::ip::address ndn::net::NetworkAddress::getBroadcast ( ) const
inline

Returns the IP broadcast address.

Definition at line 85 of file network-address.hpp.

◆ getPrefixLength()

uint8_t ndn::net::NetworkAddress::getPrefixLength ( ) const
inline

Returns the prefix length.

Definition at line 94 of file network-address.hpp.

Referenced by ndn::net::operator<<().

◆ getScope()

AddressScope ndn::net::NetworkAddress::getScope ( ) const
inline

Returns the address scope.

Definition at line 103 of file network-address.hpp.

◆ getFlags()

uint32_t ndn::net::NetworkAddress::getFlags ( ) const
inline

Returns a bitset of platform-specific flags enabled on the address.

Definition at line 112 of file network-address.hpp.

◆ isDeprecated()

bool ndn::net::NetworkAddress::isDeprecated ( ) const

Returns true if the address is deprecated.

See also
RFC 4862
Note
Currently implemented only on Linux. Always returns false on other platforms.

Definition at line 65 of file network-address.cpp.

Friends And Related Function Documentation

◆ operator<

bool operator< ( const NetworkAddress a,
const NetworkAddress b 
)
friend

Definition at line 126 of file network-address.hpp.


The documentation for this class was generated from the following files: