Public Types | Public Member Functions | Friends

ns3::Ipv4InterfaceAddress Class Reference
[Address]

a class to store IPv4 address information on an interface More...

#include <ipv4-interface-address.h>

Collaboration diagram for ns3::Ipv4InterfaceAddress:
Collaboration graph
[legend]

List of all members.

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)

Detailed Description

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.


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