An Inet6 address class. More...
#include "inet6-socket-address.h"
Public Member Functions | |
Inet6SocketAddress (const char *ipv6) | |
Constructor. More... | |
Inet6SocketAddress (const char *ipv6, uint16_t port) | |
Constructor. More... | |
Inet6SocketAddress (Ipv6Address ipv6) | |
Constructor (the port is set to zero). More... | |
Inet6SocketAddress (Ipv6Address ipv6, uint16_t port) | |
Constructor. More... | |
Inet6SocketAddress (uint16_t port) | |
Constructor (the address is set to "any"). More... | |
Address | ConvertTo () const |
Convert to Address. More... | |
Ipv6Address | GetIpv6 () const |
Get the IPv6 address. More... | |
uint16_t | GetPort () const |
Get the port. More... | |
operator Address () const | |
Get an Address instance which represents this Inet6SocketAddress instance. More... | |
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... | |
Static Private Member Functions | |
static uint8_t | GetType () |
Get the type. More... | |
Private Attributes | |
Ipv6Address | m_ipv6 |
The IPv6 address. More... | |
uint16_t | m_port |
The port. More... | |
An Inet6 address class.
Definition at line 37 of file inet6-socket-address.h.
ns3::Inet6SocketAddress::Inet6SocketAddress | ( | Ipv6Address | ipv6, |
uint16_t | port | ||
) |
Constructor.
ipv6 | the IPv6 address |
port | the port |
Definition at line 30 of file inet6-socket-address.cc.
References NS_LOG_FUNCTION, and port.
Referenced by ConvertFrom().
ns3::Inet6SocketAddress::Inet6SocketAddress | ( | Ipv6Address | ipv6 | ) |
Constructor (the port is set to zero).
ipv6 | the 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").
port | the port |
Definition at line 58 of file inet6-socket-address.cc.
References NS_LOG_FUNCTION, and port.
ns3::Inet6SocketAddress::Inet6SocketAddress | ( | const char * | ipv6, |
uint16_t | port | ||
) |
Constructor.
ipv6 | string which represents an IPv6 address |
port | the port |
Definition at line 44 of file inet6-socket-address.cc.
References NS_LOG_FUNCTION, and port.
ns3::Inet6SocketAddress::Inet6SocketAddress | ( | const char * | ipv6 | ) |
Constructor.
ipv6 | string which represents an IPv6 address |
Definition at line 51 of file inet6-socket-address.cc.
References NS_LOG_FUNCTION.
|
static |
Convert the address to a InetSocketAddress.
addr | the address to convert |
Definition at line 117 of file inet6-socket-address.cc.
References Inet6SocketAddress(), ns3::Address::CheckCompatible(), ns3::Address::CopyTo(), ns3::Ipv6Address::Deserialize(), GetType(), NS_ASSERT, NS_LOG_FUNCTION, and port.
Referenced by ns3::Ipv6RawSocketImpl::Bind(), ns3::TcpSocketBase::Bind(), ns3::UdpSocketImpl::Bind(), ns3::TcpSocketBase::CompleteFork(), ns3::Ipv6RawSocketImpl::Connect(), ns3::TcpSocketBase::Connect(), ns3::UdpSocketImpl::Connect(), ns3::SinkTracer::FormatAddress(), ns3::PacketSink::HandleRead(), ns3::UdpEchoClient::HandleRead(), ns3::UdpEchoServer::HandleRead(), ns3::UdpServer::HandleRead(), ns3::PacketSink::AddressHash::operator()(), UanExperiment::PrintReceivedPacket(), ns3::TcpSocketBase::ProcessSynRcvd(), ns3::Ping::Receive(), ns3::RipNg::Receive(), ns3::ThreeGppHttpClient::ReceivedDataCallback(), ns3::ThreeGppHttpServer::ReceivedDataCallback(), ns3::UdpEchoClient::Send(), ns3::Radvd::Send(), ns3::OnOffApplication::SendPacket(), ns3::TcpL4Protocol::SendPacket(), ns3::UdpSocketImpl::SendTo(), ns3::Ipv6RawSocketImpl::SendTo(), ns3::PacketSink::StartApplication(), and ns3::UdpClient::StartApplication().
Address ns3::Inet6SocketAddress::ConvertTo | ( | ) | const |
Convert to Address.
Definition at line 106 of file inet6-socket-address.cc.
References GetType(), m_ipv6, m_port, NS_LOG_FUNCTION, and ns3::Ipv6Address::Serialize().
Ipv6Address ns3::Inet6SocketAddress::GetIpv6 | ( | ) | const |
Get the IPv6 address.
Definition at line 80 of file inet6-socket-address.cc.
References m_ipv6, and NS_LOG_FUNCTION.
Referenced by ns3::Ipv6RawSocketImpl::Bind(), ns3::TcpSocketBase::Bind(), ns3::UdpSocketImpl::Bind(), ns3::Ipv6RawSocketImpl::Connect(), ns3::TcpSocketBase::Connect(), ns3::UdpSocketImpl::Connect(), ns3::SinkTracer::FormatAddress(), ns3::PacketSink::HandleRead(), ns3::UdpEchoClient::HandleRead(), ns3::UdpEchoServer::HandleRead(), ns3::PacketSink::AddressHash::operator()(), ns3::Ping::PrintReport(), ns3::Ping::Receive(), ns3::RipNg::Receive(), ns3::ThreeGppHttpClient::ReceivedDataCallback(), ns3::ThreeGppHttpServer::ReceivedDataCallback(), Ipv6RawSocketImplTest::ReceivePkt2(), ns3::Radvd::Send(), ns3::OnOffApplication::SendPacket(), ns3::TcpL4Protocol::SendPacket(), ns3::UdpSocketImpl::SendTo(), ns3::Ipv6RawSocketImpl::SendTo(), ns3::UdpClient::StartApplication(), and ns3::Ping::StartApplication().
uint16_t ns3::Inet6SocketAddress::GetPort | ( | ) | const |
Get the port.
Definition at line 66 of file inet6-socket-address.cc.
References m_port, and NS_LOG_FUNCTION.
Referenced by ns3::TcpSocketBase::Bind(), ns3::UdpSocketImpl::Bind(), ns3::TcpSocketBase::Connect(), ns3::UdpSocketImpl::Connect(), ns3::SinkTracer::FormatAddress(), ns3::PacketSink::HandleRead(), ns3::UdpEchoClient::HandleRead(), ns3::UdpEchoServer::HandleRead(), ns3::RipNg::Receive(), ns3::ThreeGppHttpClient::ReceivedDataCallback(), ns3::ThreeGppHttpServer::ReceivedDataCallback(), ns3::OnOffApplication::SendPacket(), ns3::UdpSocketImpl::SendTo(), and ns3::PacketSink::StartApplication().
|
staticprivate |
Get the type.
Definition at line 129 of file inet6-socket-address.cc.
References NS_LOG_FUNCTION_NOARGS, ns3::Address::Register(), and check-style-clang-format::type.
Referenced by ConvertFrom(), ConvertTo(), and IsMatchingType().
|
static |
If the address match.
addr | the address to test |
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(), ns3::SinkTracer::FormatAddress(), ns3::PacketSink::HandleRead(), ns3::UdpEchoClient::HandleRead(), ns3::UdpEchoServer::HandleRead(), ns3::UdpServer::HandleRead(), ns3::Radvd::HandleRead(), ns3::PacketSink::AddressHash::operator()(), UanExperiment::PrintReceivedPacket(), ns3::Ping::Receive(), ns3::ThreeGppHttpClient::ReceivedDataCallback(), ns3::ThreeGppHttpServer::ReceivedDataCallback(), 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().
ns3::Inet6SocketAddress::operator Address | ( | ) | const |
Get an Address instance which represents this Inet6SocketAddress instance.
Definition at line 100 of file inet6-socket-address.cc.
void ns3::Inet6SocketAddress::SetIpv6 | ( | Ipv6Address | ipv6 | ) |
Set the IPv6 address.
ipv6 | the address |
Definition at line 87 of file inet6-socket-address.cc.
References m_ipv6, and NS_LOG_FUNCTION.
void ns3::Inet6SocketAddress::SetPort | ( | uint16_t | port | ) |
Set the port.
port | the port |
Definition at line 73 of file inet6-socket-address.cc.
References m_port, NS_LOG_FUNCTION, and port.
Referenced by Ipv6RawSocketImplTest::DoRun().
|
private |
The IPv6 address.
Definition at line 132 of file inet6-socket-address.h.
Referenced by ConvertTo(), GetIpv6(), and SetIpv6().
|
private |
The port.
Definition at line 137 of file inet6-socket-address.h.
Referenced by ConvertTo(), GetPort(), and SetPort().