a class to store IPv4 address information on an interface More...
#include <ipv4-interface-address.h>
Public Types | |
enum | InterfaceAddressScope_e { HOST, LINK, GLOBAL } |
Public Member Functions | |
Ipv4InterfaceAddress (Ipv4Address local, Ipv4Mask mask) | |
Ipv4InterfaceAddress (const Ipv4InterfaceAddress &o) | |
void | SetLocal (Ipv4Address local) |
Ipv4Address | GetLocal (void) const |
void | SetMask (Ipv4Mask mask) |
Ipv4Mask | GetMask (void) const |
void | SetBroadcast (Ipv4Address broadcast) |
Ipv4Address | GetBroadcast (void) const |
void | SetScope (Ipv4InterfaceAddress::InterfaceAddressScope_e scope) |
Ipv4InterfaceAddress::InterfaceAddressScope_e | GetScope (void) const |
bool | IsSecondary (void) const |
void | SetSecondary (void) |
void | SetPrimary (void) |
Friends | |
bool | operator== (Ipv4InterfaceAddress const &a, Ipv4InterfaceAddress const &b) |
bool | operator!= (Ipv4InterfaceAddress const &a, Ipv4InterfaceAddress const &b) |
a class to store IPv4 address information on an interface
Corresponds to Linux struct in_ifaddr. A list of these addresses is stored in Ipv4Interface. This class is modelled after how current Linux handles IP aliasing for IPv4. Notably, aliasing of IPv4 interfaces (e.g., "eth0:1") is not used, and instead an interface is assigned possibly multiple addresses, with each address being classified as being primary and secondary. See the iproute2 documentation for this distinction.