Public Types |
| enum | { VIF_INDEX_INVALID = ((uint32_t)~0),
VIF_INDEX_MAX = ((uint32_t)~0)
} |
| | Various vif_index related values.
|
Public Member Functions |
| | Vif (const string &vifname, const string &ifname=string("")) |
| | Constructor for a given virtual interface name.
|
| | Vif (const Vif &vif) |
| | Constructor to clone a Vif.
|
|
virtual | ~Vif () |
| | Destructor.
|
| string | str () const |
| | Convert this Vif from binary form to presentation format.
|
| bool | operator== (const Vif &other) const |
| | Equality Operator.
|
| const string & | name () const |
| | Get the vif name.
|
| const string & | ifname () const |
| | Get the name of the physical interface associated with vif.
|
| void | set_ifname (const string &ifname) |
| | Set the name of the physical interface associated with vif.
|
| uint32_t | pif_index () const |
| | Get the physical interface index.
|
| void | set_pif_index (uint32_t v) |
| | Set the physical interface index.
|
| uint32_t | vif_index () const |
| | Get the virtual interface index.
|
| void | set_vif_index (uint32_t v) |
| | Set the virtual interface index.
|
| bool | is_pim_register () const |
| | Test if this vif is a PIM Register interface.
|
| bool | is_p2p () const |
| | Test if this vif is a point-to-point interface.
|
| bool | is_loopback () const |
| | Test if this vif is a loopback interface.
|
| bool | is_discard () const |
| | Test if this vif is a discard interface.
|
| bool | is_unreachable () const |
| | Test if this vif is an unreachable interface.
|
| bool | is_management () const |
| | Test if this vif is a management interface.
|
| bool | is_multicast_capable () const |
| | Test if this vif is multicast capable.
|
| bool | is_broadcast_capable () const |
| | Test if this vif is broadcast capable.
|
| bool | is_underlying_vif_up () const |
| | Test if the underlying vif is UP.
|
| uint32_t | mtu () const |
| | Get the MTU of the vif.
|
| void | set_pim_register (bool v) |
| | Set/reset the vif as a PIM Register interface.
|
| void | set_p2p (bool v) |
| | Set/reset the vif as a point-to-point interface.
|
| void | set_loopback (bool v) |
| | Set/reset the vif as a loopback interface.
|
| void | set_discard (bool v) |
| | Set/reset the vif as a discard interface.
|
| void | set_unreachable (bool v) |
| | Set/reset the vif as an unreachable interface.
|
| void | set_management (bool v) |
| | Set/reset the vif as a management interface.
|
| void | set_multicast_capable (bool v) |
| | Set/reset the vif as multicast capable.
|
| void | set_broadcast_capable (bool v) |
| | Set/reset the vif as broadcast capable.
|
| void | set_underlying_vif_up (bool v) |
| | Set/reset the underlying vif status (when applicable).
|
| void | set_mtu (uint32_t v) |
| | Set the MTU of the vif.
|
| const list< VifAddr > & | addr_list () const |
| | Get the list of all addresses for this vif.
|
| const IPvX * | addr_ptr () const |
| | Get the first vif address.
|
| int | add_address (const VifAddr &vif_addr) |
| | Add a VifAddr address to the interface.
|
| int | add_address (const IPvX &ipvx_addr, const IPvXNet &ipvxnet_subnet_addr, const IPvX &ipvx_broadcast_addr, const IPvX &ipvx_peer_addr) |
| | Add an IPvX address and all related information to the interface.
|
| int | add_address (const IPvX &ipvx_addr) |
| | Add an IPvX address to the interface.
|
| int | delete_address (const IPvX &ipvx_addr) |
| | Delete an IPvX address from the interface.
|
| VifAddr * | find_address (const IPvX &ipvx_addr) |
| | Find a VifAddr that corresponds to an IPvX address.
|
| const VifAddr * | find_address (const IPvX &ipvx_addr) const |
| | Find a const VifAddr that corresponds to an IPvX address.
|
| bool | is_my_addr (const IPvX &ipvx_addr) const |
| | Test if an IPvX address belongs to this vif.
|
| bool | is_my_vif_addr (const VifAddr &vif_addr) const |
| | Test if an VifAddr is belongs to this vif.
|
| bool | is_same_subnet (const IPvXNet &ipvxnet) const |
| | Test if a given subnet address is a subset of one of the subnet addresses of this vif.
|
| bool | is_same_subnet (const IPvX &ipvx_addr) const |
| | Test if a given address belongs to one of the subnet addresses of this vif.
|
| bool | is_same_p2p (const IPvX &ipvx_addr) const |
| | Test if a given address belongs to the same point-to-point link as this vif.
|
Private Attributes |
|
string | _name |
|
string | _ifname |
|
uint32_t | _pif_index |
|
uint32_t | _vif_index |
|
bool | _is_pim_register |
|
bool | _is_p2p |
|
bool | _is_loopback |
|
bool | _is_discard |
|
bool | _is_unreachable |
|
bool | _is_management |
|
bool | _is_multicast_capable |
|
bool | _is_broadcast_capable |
|
bool | _is_underlying_vif_up |
|
uint32_t | _mtu |
|
list< VifAddr > | _addr_list |
Virtual Interface class.
Vif holds information about a virtual interface. A Vif may represent a physical interface, or may represent more abstract entities such as the Discard or Unreachable interface, or a VLAN on a physical interface.