scclib
Stable Cloud Computing C++ Library
Public Member Functions | List of all members
scc::net::NetIfAddr Class Reference

Named address within an interface. More...

#include <net_if.h>

Inheritance diagram for scc::net::NetIfAddr:
Inheritance graph
[legend]
Collaboration diagram for scc::net::NetIfAddr:
Collaboration graph
[legend]

Public Member Functions

 NetIfAddr (const std::string &name, const InetAddr &addr)
 
const std::string & if_addr_name () const
 The interface address name. More...
 
std::string str () const
 String representation of a network interface address.
 
- Public Member Functions inherited from scc::net::InetAddr
 InetAddr ()
 ipv6 internet address, initialized with "any" address
 
 InetAddr (unsigned)
 ipv6 internet address, with specified port (address set to any).
 
 InetAddr (const std::string &, unsigned)
 ipv6 internet address, with specified host address and port.
 
 InetAddr (const sockaddr *)
 ipv6 internet address, initialized with socket address.
 
 InetAddr (const InetAddr &)
 ipv6 internet address, copy constructed.
 
InetAddroperator= (const InetAddr &)
 ipv6 internet address, copy assigned.
 
 InetAddr (InetAddr &&)
 ipv6 internet address, move constructed. More...
 
InetAddroperator= (InetAddr &&)
 ipv6 internet address, move assigned. More...
 
virtual ~InetAddr ()
 ipv6 internet address destructor.
 
virtual operator const sockaddr * () const
 Socket address const pointer.
 
virtual operator sockaddr * ()
 Socket address pointer.
 
virtual unsigned len () const
 Socket address length in bytes.
 
virtual std::string host () const
 Get host.
 
 operator const sockaddr_in6 * () const
 IPv6 socket address pointer.
 
void any_host ()
 Set to "any" host address ::
 
void local_host ()
 Set to local (loopback) address ::1.
 
void host (const std::string &)
 Set the host address. More...
 
unsigned port () const
 Get the port.
 
void port (unsigned)
 Set the port.
 
void scope_id (uint32_t)
 Set the scope id of the address. More...
 
uint32_t scope_id () const
 Get the scope id of the address.
 
int flags () const
 Return the address flags. More...
 
bool test_flags (int f) const
 Test if flags are set in this address.
 

Detailed Description

Named address within an interface.

Examples
net/unittest/net_if.cc.

Definition at line 56 of file net_if.h.

Member Function Documentation

◆ if_addr_name()

const std::string& scc::net::NetIfAddr::if_addr_name ( ) const
inline

The interface address name.

May be a subclass of the interface name.

Definition at line 63 of file net_if.h.


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