XrlCmdMap* _cmds | _cmds |
[protected]
XrlVrrpTargetBase (XrlCmdMap* cmds = 0)
| XrlVrrpTargetBase |
Constructor.
Parameters:
cmds | an XrlCmdMap that the commands associated with the target should be added to. This is typically the XrlRouter associated with the target. |
~XrlVrrpTargetBase ()
| ~XrlVrrpTargetBase |
[virtual]
Destructor.
Dissociates instance commands from command map.
bool set_command_map (XrlCmdMap* cmds)
| set_command_map |
Set command map.
Parameters:
cmds | pointer to command map to associate commands with. This argument is typically a pointer to the XrlRouter associated with the target. |
Returns: true on success, false if cmds is null or a command map has already been supplied.
const string& name ()
| name |
[const]
Get Xrl instance name associated with command map.
const char* version ()
| version |
[const]
Get version string of instance.
XrlCmdError common_0_1_get_target_name (
string& name)
| common_0_1_get_target_name |
[protected pure virtual]
Pure-virtual function that needs to be implemented to:
XrlCmdError common_0_1_get_version (
string& version)
| common_0_1_get_version |
[protected pure virtual]
Pure-virtual function that needs to be implemented to:
Get version string from Xrl Target
XrlCmdError common_0_1_get_status (
uint32_t& status,
string& reason)
| common_0_1_get_status |
[protected pure virtual]
Pure-virtual function that needs to be implemented to:
XrlCmdError common_0_1_shutdown ()
| common_0_1_shutdown |
[protected pure virtual]
Pure-virtual function that needs to be implemented to:
Request clean shutdown of Xrl Target
XrlCmdError vrrp_0_1_add_vrid (
const string& ifname,
const string& vifname,
const uint32_t& vrid)
| vrrp_0_1_add_vrid |
[protected pure virtual]
Pure-virtual function that needs to be implemented to:
Create a VRRP instance.
Parameters:
ifname | the interface name. |
vifname | the vif name. |
vrid | the VRRP router ID. |
XrlCmdError vrrp_0_1_delete_vrid (
const string& ifname,
const string& vifname,
const uint32_t& vrid)
| vrrp_0_1_delete_vrid |
[protected pure virtual]
Pure-virtual function that needs to be implemented to:
Remove a VRRP instance.
Parameters:
ifname | the interface name. |
vifname | the vif name. |
vrid | the VRRP router ID. |
XrlCmdError vrrp_0_1_set_priority (
const string& ifname,
const string& vifname,
const uint32_t& vrid,
const uint32_t& priority)
| vrrp_0_1_set_priority |
[protected pure virtual]
Pure-virtual function that needs to be implemented to:
Set the router's priority.
Parameters:
ifname | the interface on which VRRP is running. |
vifname | the vif on which VRRP is running. |
vrid | the VRRP router ID. |
priority | the new priority value. |
XrlCmdError vrrp_0_1_set_interval (
const string& ifname,
const string& vifname,
const uint32_t& vrid,
const uint32_t& interval)
| vrrp_0_1_set_interval |
[protected pure virtual]
Pure-virtual function that needs to be implemented to:
Set the advertisement interval.
Parameters:
ifname | the interface on which VRRP is running. |
vifname | the vif on which VRRP is running. |
vrid | the VRRP router ID. |
interval | the new advertisement interval. |
XrlCmdError vrrp_0_1_set_preempt (
const string& ifname,
const string& vifname,
const uint32_t& vrid,
const bool& preempt)
| vrrp_0_1_set_preempt |
[protected pure virtual]
Pure-virtual function that needs to be implemented to:
Set whether a high priority backup router should preempt a low priority router that is acting as a master.
Parameters:
ifname | the interface on which VRRP is running. |
vifname | the vif on which VRRP is running. |
vrid | the VRRP router ID. |
preempt | true if preemption should occur. |
XrlCmdError vrrp_0_1_set_disable (
const string& ifname,
const string& vifname,
const uint32_t& vrid,
const bool& disable)
| vrrp_0_1_set_disable |
[protected pure virtual]
Pure-virtual function that needs to be implemented to:
Start or stop a VRRP instance.
Parameters:
ifname | the interface on which VRRP is running. |
vifname | the vif on which VRRP is running. |
vrid | the VRRP router ID. |
disable | if true, stop VRRP. Start it otherwise. |
XrlCmdError vrrp_0_1_add_ip (
const string& ifname,
const string& vifname,
const uint32_t& vrid,
const IPv4& ip)
| vrrp_0_1_add_ip |
[protected pure virtual]
Pure-virtual function that needs to be implemented to:
Add an IP to the virtual router.
Parameters:
ifname | the interface on which VRRP is running. |
vifname | the vif on which VRRP is running. |
vrid | the VRRP router ID. |
ip | the IP address to add. |
XrlCmdError vrrp_0_1_delete_ip (
const string& ifname,
const string& vifname,
const uint32_t& vrid,
const IPv4& ip)
| vrrp_0_1_delete_ip |
[protected pure virtual]
Pure-virtual function that needs to be implemented to:
Remove an IP from the virtual router.
Parameters:
ifname | the interface on which VRRP is running. |
vifname | the vif on which VRRP is running. |
vrid | the VRRP router ID. |
ip | the IP address to remove. |
XrlCmdError vrrp_0_1_get_ifs (
XrlAtomList& ifs)
| vrrp_0_1_get_ifs |
[protected pure virtual]
Pure-virtual function that needs to be implemented to:
Get the physical interfaces on which VRRP is running.
Parameters:
ifs | a list of interface names (strings). |
XrlCmdError vrrp_0_1_get_vifs (
const string& ifname,
XrlAtomList& vifs)
| vrrp_0_1_get_vifs |
[protected pure virtual]
Pure-virtual function that needs to be implemented to:
For a given physical interface, get the virtual interfaces on which VRRP is running.
Parameters:
ifname | the physical interface name. |
vifs | a list of virtual interface names (strings). |
XrlCmdError vrrp_0_1_get_vrids (
const string& ifname,
const string& vifname,
XrlAtomList& vrids)
| vrrp_0_1_get_vrids |
[protected pure virtual]
Pure-virtual function that needs to be implemented to:
Get the virtual router IDs of all the VRRP instances running on a network interface.
Parameters:
ifname | the physical interface name. |
vifname | the logical interface name. |
vrids | a list of VRRP router IDs (integers). |
XrlCmdError vrrp_0_1_get_vrid_info (
const string& ifname,
const string& vifname,
const uint32_t& vrid,
string& state,
IPv4& master)
| vrrp_0_1_get_vrid_info |
[protected pure virtual]
Pure-virtual function that needs to be implemented to:
Get state information from a particular VRRP instance.
Parameters:
ifname | the interface on which the VRRP instance is running. |
vifname | the vif on which the instance is running. |
vrid | the virtual router ID of the VRRP instance. |
state | the state of the router (initialize, master, backup). |
master | the IP address of the master. Only valid when running. |
XrlCmdError raw_packet4_client_0_1_recv (
const string& if_name,
const string& vif_name,
const IPv4& src_address,
const IPv4& dst_address,
const uint32_t& ip_protocol,
const int32_t& ip_ttl,
const int32_t& ip_tos,
const bool& ip_router_alert,
const bool& ip_internet_control,
const vector<uint8_t>& payload)
| raw_packet4_client_0_1_recv |
[protected pure virtual]
Pure-virtual function that needs to be implemented to:
Receive an IPv4 packet from a raw socket.
Parameters:
if_name | the interface name the packet arrived on. |
vif_name | the vif name the packet arrived on. |
src_address | the IP source address. |
dst_address | the IP destination address. |
ip_protocol | the IP protocol number. |
ip_ttl | the IP TTL (hop-limit). If it has a negative value, then the received value is unknown. |
ip_tos | the Type of Service (Diffserv/ECN bits for IPv4). If it has a negative value, then the received value is unknown. |
ip_router_alert | if true, the IP Router Alert option was included in the IP packet. |
ip_internet_control | if true, then this is IP control traffic. |
payload | the payload, everything after the IP header and options. |
XrlCmdError raw_link_client_0_1_recv (
const string& if_name,
const string& vif_name,
const Mac& src_address,
const Mac& dst_address,
const uint32_t& ether_type,
const vector<uint8_t>& payload)
| raw_link_client_0_1_recv |
[protected pure virtual]
Pure-virtual function that needs to be implemented to:
Receive a raw link-level packet on an interface.
Parameters:
if_name | the interface name the packet arrived on. |
vif_name | the vif name the packet arrived on. |
src_address | the MAC source address. |
dst_address | the MAC destination address. |
ether_type | the EtherType protocol number or the Destination SAP. It must be between 1536 and 65535 to specify the EtherType, or between 1 and 255 to specify the Destination SAP for IEEE 802.2 LLC frames. |
payload | the payload, everything after the MAC header. |