|
|
VifAddr holds information about an address of a virtual interface. A virtual interface may have more than one VifAddr.
VifAddr (const IPvX& ipvx_addr)
| VifAddr |
Constructor for a given address.
Parameters:
ipvx_addr | the interface address. |
VifAddr (const IPvX& ipvx_addr, const IPvXNet& ipvx_subnet_addr,
const IPvX& ipvx_broadcast_addr, const IPvX& ipvx_peer_addr)
| VifAddr |
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). |
const IPvX& addr ()
| addr |
[const]
Get the interface address.
Returns: the interface address.
const IPvXNet& subnet_addr ()
| subnet_addr |
[const]
Get the subnet address.
Returns: the subnet address of the interface.
const IPvX& broadcast_addr ()
| broadcast_addr |
[const]
Get the broadcast address.
The broadcast address is valid only if the interface is broadcast capable.
Returns: the broadcast address of the interface.
const IPvX& peer_addr ()
| peer_addr |
[const]
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 set_addr (const IPvX& v)
| set_addr |
Set the interface address.
Parameters:
v | the interface address to set to the interface. |
void set_subnet_addr (const IPvXNet& v)
| set_subnet_addr |
Set the subnet address.
Parameters:
v | the subnet address to set to the interface. |
void set_broadcast_addr (const IPvX& v)
| set_broadcast_addr |
Set the broadcast address.
Parameters:
v | the broadcast address to set to the interface. |
void set_peer_addr (const IPvX& v)
| set_peer_addr |
Set the peer address.
Parameters:
v | the peer address to set to the interface. |
bool is_same_addr (const IPvX& ipvx_addr)
| is_same_addr |
[const]
Test whether is the same interface 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 is_same_subnet (const IPvXNet& ipvxnet)
| is_same_subnet |
[const]
Test whether is the same subnet.
Parameters:
ipvxnet | the subnet address to test whether is the same as my subnet address. |
Returns: true if ipvxnet is same as my subnet address, otherwise false.
bool is_same_subnet (const IPvX& ipvx_addr)
| is_same_subnet |
[const]
Test whether an address belongs to my subnet.
Parameters:
ipvx_addr | the address to test whether it belongs to my subnet. |
Returns: true if ipvx_addr belongs to my subnet, otherwise false.
string str ()
| str |
[const]
Convert this address from binary form to presentation format.
Returns: C++ string with the human-readable ASCII representation of the address.
bool operator== (const VifAddr& other)
| operator== |
[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.
Generated by: pavlin on possum.icir.org on Wed Dec 11 16:50:31 2002, using kdoc 2.0a54+XORP. |