An IPv6 address and host_order_port, modeled on an SRV type for DNS.
More...
#include <IPSrv.h>
|
| static constexpr sa_family_t | family () |
| |
An IPv6 address and host_order_port, modeled on an SRV type for DNS.
Definition at line 123 of file IPSrv.h.
◆ IP6Srv() [1/4]
| swoc::IP6Srv::IP6Srv |
( |
IP6Addr | addr, |
|
|
in_port_t | port = 0 ) |
|
inlineexplicit |
— IPv6
Construct from address and host_order_port.
- Parameters
-
| addr | The address. |
| port | The port in host order, defaults to 0. |
Definition at line 476 of file IPSrv.h.
◆ IP6Srv() [2/4]
| swoc::IP6Srv::IP6Srv |
( |
IPSrv const & | that | ) |
|
|
inlineexplicit |
Construct from generic.
- Parameters
-
If that is not IPv6 the result is a default constructed instance.
Definition at line 477 of file IPSrv.h.
◆ IP6Srv() [3/4]
| swoc::IP6Srv::IP6Srv |
( |
sockaddr_in6 const * | s | ) |
|
|
inlineexplicit |
Construct from a socket address.
- Parameters
-
Definition at line 478 of file IPSrv.h.
◆ IP6Srv() [4/4]
Construct from a string.
- Parameters
-
If the port is not present it is set to zero.
Definition at line 764 of file swoc_ip.cc.
◆ addr()
| IP6Addr const & swoc::IP6Srv::addr |
( |
| ) |
const |
|
inlineconstexpr |
- Returns
- The address.
Definition at line 484 of file IPSrv.h.
◆ assign() [1/4]
| auto swoc::IP6Srv::assign |
( |
in_port_t | port | ) |
|
|
inline |
Assign a port.
- Parameters
-
- Returns
- this.
Definition at line 526 of file IPSrv.h.
◆ assign() [2/4]
| auto swoc::IP6Srv::assign |
( |
IP6Addr const & | addr | ) |
|
|
inline |
Change the address.
- Parameters
-
- Returns
- this
Definition at line 532 of file IPSrv.h.
◆ assign() [3/4]
| auto swoc::IP6Srv::assign |
( |
IP6Addr const & | addr, |
|
|
in_port_t | port ) |
|
inline |
Assign an address and port.
- Parameters
-
| addr | Address. |
| port | Port [host order]. |
- Returns
- this
Definition at line 538 of file IPSrv.h.
◆ assign() [4/4]
| auto swoc::IP6Srv::assign |
( |
sockaddr_in6 const * | s | ) |
|
|
inline |
Change the address and port.
- Parameters
-
- Returns
- this
Definition at line 545 of file IPSrv.h.
◆ family()
| sa_family_t swoc::IP6Srv::family |
( |
| ) |
|
|
inlinestaticconstexpr |
The protocol family.
- Returns
AF_INET6
- Note
- Useful primarily for template classes.
Definition at line 496 of file IPSrv.h.
◆ host_order_port()
| in_port_t swoc::IP6Srv::host_order_port |
( |
| ) |
const |
|
inline |
- Returns
- The port in host order.
Definition at line 488 of file IPSrv.h.
◆ load()
Load from a string.
- Parameters
-
- Returns
true if text in a valid format, false if not.
Definition at line 769 of file swoc_ip.cc.
◆ network_order_port()
| in_port_t swoc::IP6Srv::network_order_port |
( |
| ) |
const |
|
inline |
- Returns
- The port in network order.
Definition at line 492 of file IPSrv.h.
◆ operator IP6Addr const &()
| swoc::IP6Srv::operator IP6Addr const & |
( |
| ) |
const |
|
inlineconstexpr |
Implicit conversion to address.
Definition at line 480 of file IPSrv.h.
◆ operator!=()
◆ operator<()
◆ operator<=()
◆ operator==()
◆ operator>()
◆ operator>=()
◆ _addr
◆ _port
| in_port_t swoc::IP6Srv::_port = 0 |
|
protected |
Port [host order].
Definition at line 220 of file IPSrv.h.
The documentation for this class was generated from the following files: