NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
ndn::ip Namespace Reference

Classes

struct  ParsedAddress
 

Functions

optional< std::string > scopeNameFromId (unsigned int scopeId)
 Convert scope ID of IPv6 address into interface name. More...
 
static unsigned int scopeIdFromString (const std::string &scope)
 
static ParsedAddress parseAddressFromString (const std::string &address, boost::system::error_code &ec)
 
boost::asio::ip::address addressFromString (const std::string &str, boost::system::error_code &ec)
 parse and convert the input string into an IP address More...
 
boost::asio::ip::address addressFromString (const std::string &str)
 parse and convert the input string into an IP address More...
 
boost::asio::ip::address_v6 addressV6FromString (const std::string &str, boost::system::error_code &ec)
 parse and convert the input string into an IPv6 address More...
 
boost::asio::ip::address_v6 addressV6FromString (const std::string &str)
 parse and convert the input string into an IPv6 address More...
 

Function Documentation

optional< std::string > ndn::ip::scopeNameFromId ( unsigned int  scopeId)

Convert scope ID of IPv6 address into interface name.

Returns
interface name, or ndn::nullopt if scopeId cannot be converted

Definition at line 42 of file address-converter.cpp.

References ndn::nullopt.

static unsigned int ndn::ip::scopeIdFromString ( const std::string &  scope)
static

Definition at line 54 of file address-converter.cpp.

Referenced by addressFromString().

static ParsedAddress ndn::ip::parseAddressFromString ( const std::string &  address,
boost::system::error_code &  ec 
)
static

Definition at line 77 of file address-converter.cpp.

References ndn::ip::ParsedAddress::addr, and NDN_CXX_FALLTHROUGH.

Referenced by addressFromString().

boost::asio::ip::address ndn::ip::addressFromString ( const std::string &  str,
boost::system::error_code &  ec 
)

parse and convert the input string into an IP address

Parameters
strthe string to parse
ecthe error code of failure in conversion
Returns
the converted IP address, or a default-constructed boost::asio::ip::address in case of failure

Definition at line 101 of file address-converter.cpp.

References ndn::ip::ParsedAddress::addr, parseAddressFromString(), and scopeIdFromString().

Referenced by addressFromString(), addressV6FromString(), ndn::IpHostCanonizeProvider< boost::asio::ip::tcp >::canonize(), nfd::face::TcpFactory::createFace(), nfd::face::UdpFactory::createFace(), nfd::face::UdpFactory::createMulticastFace(), ndn::IpHostCanonizeProvider< boost::asio::ip::tcp >::isCanonical(), and nfd::operator>>().

boost::asio::ip::address ndn::ip::addressFromString ( const std::string &  str)

parse and convert the input string into an IP address

Parameters
strthe string to parse
Returns
the converted IP address
Exceptions
boost::system::system_errorin case of failure

Definition at line 118 of file address-converter.cpp.

References ndn::ip::ParsedAddress::addr, and addressFromString().

boost::asio::ip::address_v6 ndn::ip::addressV6FromString ( const std::string &  str,
boost::system::error_code &  ec 
)

parse and convert the input string into an IPv6 address

Parameters
strthe string to parse
ecthe error code of failure in conversion
Returns
the converted IPv6 address, or a default-constructed boost::asio::ip::address_v6 in case of failure

Definition at line 129 of file address-converter.cpp.

References ndn::ip::ParsedAddress::addr, and addressFromString().

Referenced by addressV6FromString().

boost::asio::ip::address_v6 ndn::ip::addressV6FromString ( const std::string &  str)

parse and convert the input string into an IPv6 address

Parameters
strthe string to parse
Returns
the converted IPv6 address
Exceptions
boost::system::system_errorin case of failure

Definition at line 140 of file address-converter.cpp.

References ndn::ip::ParsedAddress::addr, and addressV6FromString().