Virtual interface address class.
More...
#include <vif.hh>
List of all members.
Detailed Description
Virtual interface address class.
VifAddr holds information about an address of a virtual interface. A virtual interface may have more than one VifAddr.
Constructor & Destructor Documentation
| VifAddr::VifAddr |
( |
const IPvX & |
ipvx_addr | ) |
[explicit] |
Constructor for a given address.
- Parameters:
-
| ipvx_addr | the interface address. |
| VifAddr::VifAddr |
( |
const IPvX & |
ipvx_addr, |
|
|
const IPvXNet & |
ipvx_subnet_addr, |
|
|
const IPvX & |
ipvx_broadcast_addr, |
|
|
const IPvX & |
ipvx_peer_addr |
|
) |
| |
Constructor for a given address, and its associated addresses.
- Parameters:
-
| ipvx_addr | the interface address. |
| ipvx_subnet_addr | the subnet address. |
| ipvx_broadcast_addr | the broadcast address (if the interface is broadcast-capable). |
| ipvx_peer_addr | the peer address (if the interface is point-to-point). |
Member Function Documentation
| const IPvX& VifAddr::addr |
( |
| ) |
const [inline] |
Get the interface address.
- Returns:
- the interface address.
| const IPvX& VifAddr::broadcast_addr |
( |
| ) |
const [inline] |
Get the broadcast address.
The broadcast address is valid only if the interface is broadcast capable.
- Returns:
- the broadcast address of the interface.
| bool VifAddr::is_my_addr |
( |
const IPvX & |
ipvx_addr | ) |
const [inline] |
Test whether if an IPvX address is same as my address.
- Parameters:
-
| ipvx_addr | the address to test whether is the same as my interface address. |
- Returns:
- true if ipvx_addr is same as my interface address, otherwise false.
| bool VifAddr::is_same_subnet |
( |
const IPvXNet & |
ipvxnet | ) |
const |
Test if a given subnet address is a subset of my subnet address.
- Parameters:
-
| ipvxnet | the subnet address to test whether is a subset of my subnet address. |
- Returns:
- true if ipvxnet is a subset of my subnet address, otherwise false.
| bool VifAddr::is_same_subnet |
( |
const IPvX & |
ipvx_addr | ) |
const |
Test whether an address belongs to my subnet address.
- Parameters:
-
| ipvx_addr | the address to test whether it belongs to my subnet address. |
- Returns:
- true if ipvx_addr belongs to my subnet address, otherwise false.
| bool VifAddr::operator== |
( |
const VifAddr & |
other | ) |
const |
Equality Operator.
- Parameters:
-
| other | the right-hand operand to compare against. |
- Returns:
- true if the left-hand operand is numerically same as the right-hand operand.
| const IPvX& VifAddr::peer_addr |
( |
| ) |
const [inline] |
Get the peer address.
The peer address is valid only if the interface is point-to-point.
- Returns:
- the peer address of the interface.
| void VifAddr::set_addr |
( |
const IPvX & |
v | ) |
[inline] |
Set the interface address.
- Parameters:
-
| v | the interface address to set to the interface. |
| void VifAddr::set_broadcast_addr |
( |
const IPvX & |
v | ) |
[inline] |
Set the broadcast address.
- Parameters:
-
| v | the broadcast address to set to the interface. |
| void VifAddr::set_peer_addr |
( |
const IPvX & |
v | ) |
[inline] |
Set the peer address.
- Parameters:
-
| v | the peer address to set to the interface. |
| void VifAddr::set_subnet_addr |
( |
const IPvXNet & |
v | ) |
[inline] |
Set the subnet address.
- Parameters:
-
| v | the subnet address to set to the interface. |
| string VifAddr::str |
( |
| ) |
const |
Convert this address from binary form to presentation format.
- Returns:
- C++ string with the human-readable ASCII representation of the address.
| const IPvXNet& VifAddr::subnet_addr |
( |
| ) |
const [inline] |
Get the subnet address.
- Returns:
- the subnet address of the interface.
The documentation for this class was generated from the following files:
- /home/greearb/git/xorp.ct.github/xorp/libxorp/vif.hh
- /home/greearb/git/xorp.ct.github/xorp/libxorp/vif.cc