class VifAddr

Virtual interface address class. More...

Definition#include <vif.hh>
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods


Detailed Description

VifAddr holds information about an address of a virtual interface. A virtual interface may have more than one VifAddr.

explicit  VifAddr (const IPvX& ipvx_addr)

VifAddr

Constructor for a given address.

Parameters:
ipvx_addrthe 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_addrthe interface address.
ipvx_subnet_addrthe subnet address.
ipvx_broadcast_addrthe broadcast address (if the interface is broadcast-capable).
ipvx_peer_addrthe 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:
vthe interface address to set to the interface.

void  set_subnet_addr (const IPvXNet& v)

set_subnet_addr

Set the subnet address.

Parameters:
vthe subnet address to set to the interface.

void  set_broadcast_addr (const IPvX& v)

set_broadcast_addr

Set the broadcast address.

Parameters:
vthe broadcast address to set to the interface.

void  set_peer_addr (const IPvX& v)

set_peer_addr

Set the peer address.

Parameters:
vthe 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_addrthe 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:
ipvxnetthe 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_addrthe 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:
otherthe 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 Thu Nov 6 23:46:46 2003, using kdoc 2.0a54+XORP.