A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::Inet6SocketAddress Class Reference

An Inet6 address class. More...

#include "inet6-socket-address.h"

+ Collaboration diagram for ns3::Inet6SocketAddress:

Public Member Functions

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

Static Public Member Functions

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

Static Private Member Functions

static uint8_t GetType ()
 Get the type.
 

Private Attributes

Ipv6Address m_ipv6
 The IPv6 address.
 
uint16_t m_port
 The port.
 

Detailed Description

An Inet6 address class.

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

Constructor & Destructor Documentation

◆ Inet6SocketAddress() [1/5]

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, and port.

◆ Inet6SocketAddress() [2/5]

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.

◆ Inet6SocketAddress() [3/5]

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, and port.

◆ Inet6SocketAddress() [4/5]

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, and port.

◆ Inet6SocketAddress() [5/5]

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

◆ ConvertFrom()

Inet6SocketAddress ns3::Inet6SocketAddress::ConvertFrom ( const Address addr)
static

◆ ConvertTo()

Address ns3::Inet6SocketAddress::ConvertTo ( ) const

Convert to Address.

Returns
Address instance

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

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

+ Here is the call graph for this function:

◆ GetIpv6()

◆ GetPort()

◆ GetType()

uint8_t ns3::Inet6SocketAddress::GetType ( )
staticprivate

Get the type.

Returns
the type of Inet6SocketAddress

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

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

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

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

◆ IsMatchingType()

bool ns3::Inet6SocketAddress::IsMatchingType ( const Address addr)
static

If the address match.

Parameters
addrthe address to test
Returns
true if the address match, false otherwise

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

References ns3::Address::CheckCompatible(), GetType(), and NS_LOG_FUNCTION.

Referenced by ns3::Ipv6RawSocketImpl::Bind(), ns3::TcpSocketBase::Bind(), ns3::UdpSocketImpl::Bind(), ns3::TcpSocketBase::CompleteFork(), ns3::Ipv6RawSocketImpl::Connect(), ns3::TcpSocketBase::Connect(), ns3::UdpSocketImpl::Connect(), DualStackTestCase::DoRun(), ns3::SinkTracer::FormatAddress(), ns3::PacketSink::HandleRead(), ns3::UdpEchoClient::HandleRead(), ns3::UdpEchoServer::HandleRead(), ns3::UdpServer::HandleRead(), ns3::Radvd::HandleRead(), Ipv6FragmentationTest::HandleReadClient(), SixlowpanFragmentationTest::HandleReadClient(), Ipv6FragmentationTest::HandleReadServer(), SixlowpanFragmentationTest::HandleReadServer(), ns3::PacketSink::AddressHash::operator()(), UanExperiment::PrintReceivedPacket(), ns3::Ping::Receive(), ns3::ThreeGppHttpClient::ReceivedDataCallback(), ns3::ThreeGppHttpServer::ReceivedDataCallback(), IcmpV6EchoReplyTestCase::ReceivePkt(), IcmpV6TimeExceedTestCase::ReceivePkt(), ns3::UdpEchoClient::Send(), ns3::OnOffApplication::SendPacket(), ns3::TcpL4Protocol::SendPacket(), ns3::UdpSocketImpl::SendTo(), ns3::Ipv6RawSocketImpl::SendTo(), ns3::BulkSendApplication::StartApplication(), ns3::OnOffApplication::StartApplication(), ns3::PacketSink::StartApplication(), ns3::UdpClient::StartApplication(), ns3::UdpEchoClient::StartApplication(), and ns3::UdpTraceClient::StartApplication().

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

◆ operator Address()

ns3::Inet6SocketAddress::operator Address ( ) const

Get an Address instance which represents this Inet6SocketAddress instance.

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

◆ SetIpv6()

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

Set the IPv6 address.

Parameters
ipv6the address

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

References m_ipv6, and NS_LOG_FUNCTION.

◆ SetPort()

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

Set the port.

Parameters
portthe port

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

References m_port, NS_LOG_FUNCTION, and port.

Referenced by Ipv6RawSocketImplTest::DoRun().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_ipv6

Ipv6Address ns3::Inet6SocketAddress::m_ipv6
private

The IPv6 address.

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

Referenced by ConvertTo(), GetIpv6(), and SetIpv6().

◆ m_port

uint16_t ns3::Inet6SocketAddress::m_port
private

The port.

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

Referenced by ConvertTo(), GetPort(), and SetPort().


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