A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ns3::Inet6SocketAddress Class Reference

An Inet6 address class. More...

#include <inet6-socket-address.h>

Public Member Functions

 Inet6SocketAddress (Ipv6Address ipv6, uint16_t port)
 Constructor. More...
 
 Inet6SocketAddress (Ipv6Address ipv6)
 Constructor (the port is set to zero). More...
 
 Inet6SocketAddress (uint16_t port)
 Constructor (the address is set to "any"). More...
 
 Inet6SocketAddress (const char *ipv6, uint16_t port)
 Constructor. More...
 
 Inet6SocketAddress (const char *ipv6)
 Constructor. More...
 
Ipv6Address GetIpv6 (void) const
 Get the IPv6 address. More...
 
uint16_t GetPort (void) const
 Get the port. More...
 
 operator Address (void) const
 Get an Address instance which represents this Inet6SocketAddress instance.
 
void SetIpv6 (Ipv6Address ipv6)
 Set the IPv6 address. More...
 
void SetPort (uint16_t port)
 Set the port. More...
 

Static Public Member Functions

static Inet6SocketAddress ConvertFrom (const Address &addr)
 Convert the address to a InetSocketAddress. More...
 
static bool IsMatchingType (const Address &addr)
 If the address match. More...
 

Private Member Functions

Address ConvertTo (void) const
 Convert to Address. More...
 

Static Private Member Functions

static uint8_t GetType (void)
 Get the type. More...
 

Private Attributes

Ipv6Address m_ipv6
 The IPv6 address.
 
uint16_t m_port
 The port.
 

Detailed Description

An Inet6 address class.

Definition at line 36 of file inet6-socket-address.h.

Constructor & Destructor Documentation

ns3::Inet6SocketAddress::Inet6SocketAddress ( Ipv6Address  ipv6,
uint16_t  port 
)

Constructor.

Parameters
ipv6the IPv6 address
portthe port

Definition at line 30 of file inet6-socket-address.cc.

References NS_LOG_FUNCTION.

Referenced by ConvertFrom().

ns3::Inet6SocketAddress::Inet6SocketAddress ( Ipv6Address  ipv6)

Constructor (the port is set to zero).

Parameters
ipv6the IPv6 address

Definition at line 37 of file inet6-socket-address.cc.

References NS_LOG_FUNCTION.

ns3::Inet6SocketAddress::Inet6SocketAddress ( uint16_t  port)

Constructor (the address is set to "any").

Parameters
portthe port

Definition at line 58 of file inet6-socket-address.cc.

References NS_LOG_FUNCTION.

ns3::Inet6SocketAddress::Inet6SocketAddress ( const char *  ipv6,
uint16_t  port 
)

Constructor.

Parameters
ipv6string which represents an IPv6 address
portthe port

Definition at line 44 of file inet6-socket-address.cc.

References NS_LOG_FUNCTION.

ns3::Inet6SocketAddress::Inet6SocketAddress ( const char *  ipv6)

Constructor.

Parameters
ipv6string which represents an IPv6 address

Definition at line 51 of file inet6-socket-address.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

Address ns3::Inet6SocketAddress::ConvertTo ( void  ) const
private

Convert to Address.

Returns
Address instance

Definition at line 100 of file inet6-socket-address.cc.

References GetType(), m_ipv6, m_port, NS_LOG_FUNCTION, and ns3::Ipv6Address::Serialize().

uint16_t ns3::Inet6SocketAddress::GetPort ( void  ) const
uint8_t ns3::Inet6SocketAddress::GetType ( void  )
staticprivate

Get the type.

Returns
the type of Inet6SocketAddress

Definition at line 121 of file inet6-socket-address.cc.

References NS_LOG_FUNCTION_NOARGS, and ns3::Address::Register().

Referenced by ConvertFrom(), ConvertTo(), and IsMatchingType().

void ns3::Inet6SocketAddress::SetIpv6 ( Ipv6Address  ipv6)

Set the IPv6 address.

Parameters
ipv6the address

Definition at line 83 of file inet6-socket-address.cc.

References m_ipv6, and NS_LOG_FUNCTION.

void ns3::Inet6SocketAddress::SetPort ( uint16_t  port)

Set the port.

Parameters
portthe port

Definition at line 71 of file inet6-socket-address.cc.

References m_port, and NS_LOG_FUNCTION.


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