|
ns-3
|
an Inet address class More...
#include <inet-socket-address.h>
Public Member Functions | |
| InetSocketAddress (Ipv4Address ipv4, uint16_t port) | |
| InetSocketAddress (Ipv4Address ipv4) | |
| InetSocketAddress (uint16_t port) | |
| InetSocketAddress (const char *ipv4, uint16_t port) | |
| InetSocketAddress (const char *ipv4) | |
| uint16_t | GetPort (void) const |
| Ipv4Address | GetIpv4 (void) const |
| void | SetPort (uint16_t port) |
| void | SetIpv4 (Ipv4Address address) |
| operator Address () const | |
Static Public Member Functions | |
| static bool | IsMatchingType (const Address &address) |
| static InetSocketAddress | ConvertFrom (const Address &address) |
an Inet address class
This class is similar to inet_sockaddr in the BSD socket API. i.e., this class holds an Ipv4Address and a port number to form an ipv4 transport endpoint.
| ns3::InetSocketAddress::InetSocketAddress | ( | Ipv4Address | ipv4, |
| uint16_t | port | ||
| ) |
| ipv4 | the ipv4 address |
| port | the port number |
Referenced by ConvertFrom().
| ipv4 | the ipv4 address |
The port number is set to zero by default.
| ns3::InetSocketAddress::InetSocketAddress | ( | uint16_t | port | ) |
| port | the port number |
The ipv4 address is set to the "Any" address by default.
| ns3::InetSocketAddress::InetSocketAddress | ( | const char * | ipv4, |
| uint16_t | port | ||
| ) |
| ipv4 | string which represents an ipv4 address |
| port | the port number |
| ns3::InetSocketAddress::InetSocketAddress | ( | const char * | ipv4 | ) |
| ipv4 | string which represents an ipv4 address |
The port number is set to zero.
| InetSocketAddress ns3::InetSocketAddress::ConvertFrom | ( | const Address & | address | ) | [static] |
| address | the Address instance to convert from. |
Returns an InetSocketAddress which corresponds to the input Address
References ns3::Address::CheckCompatible(), ns3::Address::CopyTo(), ns3::Ipv4Address::Deserialize(), InetSocketAddress(), and NS_ASSERT.
Referenced by ns3::Ipv4RawSocketImpl::Bind(), ns3::UdpSocketImpl::Bind(), ns3::NscTcpSocketImpl::Bind(), ns3::TcpSocketBase::Bind(), ns3::TcpSocketBase::CompleteFork(), ns3::Ipv4RawSocketImpl::Connect(), ns3::UdpSocketImpl::Connect(), ns3::NscTcpSocketImpl::Connect(), ns3::TcpSocketBase::Connect(), ns3::TcpSocketBase::ProcessSynRcvd(), ns3::Ipv4RawSocketImpl::SendTo(), and ns3::UdpSocketImpl::SendTo().
| Ipv4Address ns3::InetSocketAddress::GetIpv4 | ( | void | ) | const |
Referenced by ns3::Ipv4RawSocketImpl::Bind(), ns3::UdpSocketImpl::Bind(), ns3::NscTcpSocketImpl::Bind(), ns3::TcpSocketBase::Bind(), ns3::Ipv4RawSocketImpl::Connect(), ns3::UdpSocketImpl::Connect(), ns3::NscTcpSocketImpl::Connect(), ns3::TcpSocketBase::Connect(), ns3::Ipv4RawSocketImpl::SendTo(), and ns3::UdpSocketImpl::SendTo().
| uint16_t ns3::InetSocketAddress::GetPort | ( | void | ) | const |
Referenced by ns3::UdpSocketImpl::Bind(), ns3::NscTcpSocketImpl::Bind(), ns3::TcpSocketBase::Bind(), ns3::UdpSocketImpl::Connect(), ns3::NscTcpSocketImpl::Connect(), ns3::TcpSocketBase::Connect(), and ns3::UdpSocketImpl::SendTo().
| bool ns3::InetSocketAddress::IsMatchingType | ( | const Address & | address | ) | [static] |
| address | address to test |
References ns3::Address::CheckCompatible().
Referenced by ns3::Ipv4RawSocketImpl::Bind(), ns3::UdpSocketImpl::Bind(), ns3::NscTcpSocketImpl::Bind(), ns3::TcpSocketBase::Bind(), ns3::Ipv4RawSocketImpl::Connect(), and ns3::Ipv4RawSocketImpl::SendTo().
| ns3::InetSocketAddress::operator Address | ( | ) | const |
| void ns3::InetSocketAddress::SetIpv4 | ( | Ipv4Address | address | ) |
| address | the new ipv4 address |
| void ns3::InetSocketAddress::SetPort | ( | uint16_t | port | ) |
| port | the new port number. |