|
xorp
|
Public Member Functions | |
| XrlOspfV2Target (XrlRouter *r, Ospf< IPv4 > &ospf, XrlIO< IPv4 > &io) | |
| XrlCmdError | common_0_1_get_target_name (string &name) |
| Get name of Xrl Target. | |
| XrlCmdError | common_0_1_get_version (string &version) |
| Get version string from Xrl Target. | |
| XrlCmdError | common_0_1_get_status (uint32_t &status, string &reason) |
| Get status of Xrl Target. | |
| XrlCmdError | common_0_1_shutdown () |
| Request clean shutdown of Xrl Target. | |
| XrlCmdError | common_0_1_startup () |
| Pure-virtual function that needs to be implemented to: | |
| 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) |
| Receive an IPv4 packet from a raw socket. | |
| XrlCmdError | policy_backend_0_1_configure (const uint32_t &filter, const string &conf) |
| Configure a policy filter. | |
| XrlCmdError | policy_backend_0_1_reset (const uint32_t &filter) |
| Reset a policy filter. | |
| XrlCmdError | policy_backend_0_1_push_routes () |
| Push all available routes through all filters for re-filtering. | |
| XrlCmdError | policy_redist4_0_1_add_route4 (const IPv4Net &network, const bool &unicast, const bool &multicast, const IPv4 &nexthop, const uint32_t &metric, const XrlAtomList &policytags) |
| Start route redistribution for an IPv4 route. | |
| XrlCmdError | policy_redist4_0_1_delete_route4 (const IPv4Net &network, const bool &unicast, const bool &multicast) |
| Terminate route redistribution for an IPv4 route. | |
| XrlCmdError | ospfv2_0_1_set_router_id (const IPv4 &id) |
| Set router id. | |
| XrlCmdError | ospfv2_0_1_set_rfc1583_compatibility (const bool &compatibility) |
| Set RFC 1583 compatibility. | |
| XrlCmdError | ospfv2_0_1_set_ip_router_alert (const bool &ip_router_alert) |
| Set the router alert in the IP options. | |
| XrlCmdError | ospfv2_0_1_create_area_router (const IPv4 &area, const string &type) |
| XrlCmdError | ospfv2_0_1_change_area_router_type (const IPv4 &area, const string &type) |
| Change area type. | |
| XrlCmdError | ospfv2_0_1_destroy_area_router (const IPv4 &area) |
| Destroy area. | |
| XrlCmdError | ospfv2_0_1_create_peer (const string &ifname, const string &vifname, const IPv4 &addr, const string &type, const IPv4 &area) |
| Create a binding to an interface. | |
| XrlCmdError | ospfv2_0_1_delete_peer (const string &ifname, const string &vifname) |
| Delete peer. | |
| XrlCmdError | ospfv2_0_1_set_peer_state (const string &ifname, const string &vifname, const bool &enable) |
| Set the peer state up or down. | |
| XrlCmdError | ospfv2_0_1_add_neighbour (const string &ifname, const string &vifname, const IPv4 &area, const IPv4 &neighbour_address, const IPv4 &neighbour_id) |
| Add a neighbour to the peer. | |
| XrlCmdError | ospfv2_0_1_remove_neighbour (const string &ifname, const string &vifname, const IPv4 &area, const IPv4 &neighbour_address, const IPv4 &neighbour_id) |
| Remove a neighbour from the peer. | |
| XrlCmdError | ospfv2_0_1_create_virtual_link (const IPv4 &neighbour_id, const IPv4 &area) |
| Create a virtual link. | |
| XrlCmdError | ospfv2_0_1_delete_virtual_link (const IPv4 &neighbour_id) |
| Delete virtual link. | |
| XrlCmdError | ospfv2_0_1_transit_area_virtual_link (const IPv4 &neighbour_id, const IPv4 &transit_area) |
| The area through which the virtual link transits. | |
| XrlCmdError | ospfv2_0_1_set_interface_cost (const string &ifname, const string &vifname, const IPv4 &area, const uint32_t &cost) |
| The edge cost of this interface. | |
| XrlCmdError | ospfv2_0_1_set_retransmit_interval (const string &ifname, const string &vifname, const IPv4 &area, const uint32_t &interval) |
| The RxmtInterval. | |
| XrlCmdError | ospfv2_0_1_set_inftransdelay (const string &ifname, const string &vifname, const IPv4 &area, const uint32_t &delay) |
| Update packet will have their age incremented by this amount before transmission. | |
| XrlCmdError | ospfv2_0_1_set_router_priority (const string &ifname, const string &vifname, const IPv4 &area, const uint32_t &interval) |
| Used in the designated router election. | |
| XrlCmdError | ospfv2_0_1_set_hello_interval (const string &ifname, const string &vifname, const IPv4 &area, const uint32_t &interval) |
| The interval between hello messages. | |
| XrlCmdError | ospfv2_0_1_set_router_dead_interval (const string &ifname, const string &vifname, const IPv4 &area, const uint32_t &interval) |
| The period to wait before considering a router dead. | |
| XrlCmdError | ospfv2_0_1_set_simple_authentication_key (const string &ifname, const string &vifname, const IPv4 &area, const string &password) |
| Set simple password authentication key. | |
| XrlCmdError | ospfv2_0_1_delete_simple_authentication_key (const string &ifname, const string &vifname, const IPv4 &area) |
| Delete simple password authentication key. | |
| XrlCmdError | ospfv2_0_1_set_md5_authentication_key (const string &ifname, const string &vifname, const IPv4 &area, const uint32_t &key_id, const string &password, const string &start_time, const string &end_time, const uint32_t &max_time_drift) |
| Set MD5 authentication key. | |
| XrlCmdError | ospfv2_0_1_delete_md5_authentication_key (const string &ifname, const string &vifname, const IPv4 &area, const uint32_t &key_id) |
| Delete MD5 authentication key. | |
| XrlCmdError | ospfv2_0_1_set_passive (const string &ifname, const string &vifname, const IPv4 &area, const bool &passive, const bool &host) |
| Toggle the passive status of an interface. | |
| XrlCmdError | ospfv2_0_1_originate_default_route (const IPv4 &area, const bool &enable) |
| If this is a "stub" or "nssa" area toggle the sending of a default route. | |
| XrlCmdError | ospfv2_0_1_stub_default_cost (const IPv4 &area, const uint32_t &cost) |
| Set the StubDefaultCost, the default cost sent in a default route in a "stub" or "nssa" area. | |
| XrlCmdError | ospfv2_0_1_summaries (const IPv4 &area, const bool &enable) |
| Toggle the sending of summaries into "stub" or "nssa" areas. | |
| XrlCmdError | ospfv2_0_1_area_range_add (const IPv4 &area, const IPv4Net &net, const bool &advertise) |
| Add area range. | |
| XrlCmdError | ospfv2_0_1_area_range_delete (const IPv4 &area, const IPv4Net &net) |
| Delete area range. | |
| XrlCmdError | ospfv2_0_1_area_range_change_state (const IPv4 &area, const IPv4Net &net, const bool &advertise) |
| Change the advertised state of this area. | |
| XrlCmdError | ospfv2_0_1_trace (const string &tvar, const bool &enable) |
| Enable/Disable tracing. | |
| XrlCmdError | ospfv2_0_1_get_lsa (const IPv4 &area, const uint32_t &index, bool &valid, bool &toohigh, bool &self, vector< uint8_t > &lsa) |
| Get a single lsa from an area. | |
| XrlCmdError | ospfv2_0_1_get_area_list (XrlAtomList &areas) |
| Get a list of all the configured areas. | |
| XrlCmdError | ospfv2_0_1_get_neighbour_list (XrlAtomList &areas) |
| Get the list of neighbours. | |
| XrlCmdError | ospfv2_0_1_get_neighbour_info (const uint32_t &nid, string &address, string &interface, string &state, IPv4 &rid, uint32_t &priority, uint32_t &deadtime, IPv4 &area, uint32_t &opt, IPv4 &dr, IPv4 &bdr, uint32_t &up, uint32_t &adjacent) |
| Get information on a neighbour. | |
| XrlCmdError | ospfv2_0_1_clear_database () |
| Clear the OSPF database. | |
Private Attributes | |
| Ospf< IPv4 > & | _ospf |
| XrlIO< IPv4 > & | _xrl_io |
| XrlCmdError XrlOspfV2Target::common_0_1_startup | ( | ) | [virtual] |
Pure-virtual function that needs to be implemented to:
Request a startup of Xrl Target
Implements XrlOspfv2TargetBase.
| XrlCmdError XrlOspfV2Target::ospfv2_0_1_change_area_router_type | ( | const IPv4 & | area, |
| const string & | type | ||
| ) | [virtual] |
Change area type.
| area | id of the area |
| type | of area "border", "stub", "nssa" |
Implements XrlOspfv2TargetBase.
| XrlCmdError XrlOspfV2Target::ospfv2_0_1_create_area_router | ( | const IPv4 & | area, |
| const string & | type | ||
| ) | [virtual] |
| type | of area "normal", "stub", "nssa" |
Implements XrlOspfv2TargetBase.
| XrlCmdError XrlOspfV2Target::ospfv2_0_1_create_peer | ( | const string & | ifname, |
| const string & | vifname, | ||
| const IPv4 & | addr, | ||
| const string & | type, | ||
| const IPv4 & | area | ||
| ) | [virtual] |
Create a binding to an interface.
| ifname | the interface that owns vif that has address. |
| vifname | virtual interface owning address. |
| addr | the address to be added. |
| type | of link "p2p", "broadcast", "nbma", "p2m", "vlink" |
Implements XrlOspfv2TargetBase.
| XrlCmdError XrlOspfV2Target::ospfv2_0_1_create_virtual_link | ( | const IPv4 & | neighbour_id, |
| const IPv4 & | area | ||
| ) | [virtual] |
| XrlCmdError XrlOspfV2Target::ospfv2_0_1_delete_md5_authentication_key | ( | const string & | ifname, |
| const string & | vifname, | ||
| const IPv4 & | area, | ||
| const uint32_t & | key_id | ||
| ) | [virtual] |
| XrlCmdError XrlOspfV2Target::ospfv2_0_1_delete_simple_authentication_key | ( | const string & | ifname, |
| const string & | vifname, | ||
| const IPv4 & | area | ||
| ) | [virtual] |
Delete simple password authentication key.
Implements XrlOspfv2TargetBase.
| XrlCmdError XrlOspfV2Target::ospfv2_0_1_delete_virtual_link | ( | const IPv4 & | neighbour_id | ) | [virtual] |
Delete virtual link.
Implements XrlOspfv2TargetBase.
| XrlCmdError XrlOspfV2Target::ospfv2_0_1_get_lsa | ( | const IPv4 & | area, |
| const uint32_t & | index, | ||
| bool & | valid, | ||
| bool & | toohigh, | ||
| bool & | self, | ||
| vector< uint8_t > & | lsa | ||
| ) | [virtual] |
Get a single lsa from an area.
A stateless mechanism to get LSAs. The client of this interface should start from zero and continue to request LSAs (incrementing index) until toohigh becomes true.
| area | database that is being searched. |
| index | into database starting from 0. |
| valid | true if a LSA has been returned. Some index values do not contain LSAs. This should not be considered an error. |
| toohigh | true if no more LSA exist after this index. |
| self | if true this LSA was originated by this router. |
| lsa | if valid is true the LSA at index. |
Implements XrlOspfv2TargetBase.
| XrlCmdError XrlOspfV2Target::ospfv2_0_1_get_neighbour_info | ( | const uint32_t & | nid, |
| string & | address, | ||
| string & | interface, | ||
| string & | state, | ||
| IPv4 & | rid, | ||
| uint32_t & | priority, | ||
| uint32_t & | deadtime, | ||
| IPv4 & | area, | ||
| uint32_t & | opt, | ||
| IPv4 & | dr, | ||
| IPv4 & | bdr, | ||
| uint32_t & | up, | ||
| uint32_t & | adjacent | ||
| ) | [virtual] |
Get information on a neighbour.
| nid | neighbour ID returned by the get_neighbour_list. |
| valid | true if valid information has been returned. |
| address | of neighbour in txt to allow IPv4 and IPv6. |
| interface | with which the neighbour forms the adjacency. |
| state | of the adjacency. |
| rid | router ID of the neighbour. |
| priority | of the neighbour (used for DR election). |
| area | the neighbour is in. |
| opt | value in the neighbours hello packet. |
| dr | designated router. |
| bdr | backup designated router. |
| up | time in seconds that the neigbour has been up. |
| adjacent | time in seconds that there has been an adjacency. |
Implements XrlOspfv2TargetBase.
| XrlCmdError XrlOspfV2Target::ospfv2_0_1_set_inftransdelay | ( | const string & | ifname, |
| const string & | vifname, | ||
| const IPv4 & | area, | ||
| const uint32_t & | delay | ||
| ) | [virtual] |
Update packet will have their age incremented by this amount before transmission.
This value should take into account transmission and propagation delays; it must be greater than zero.
Implements XrlOspfv2TargetBase.
| XrlCmdError XrlOspfV2Target::ospfv2_0_1_set_md5_authentication_key | ( | const string & | ifname, |
| const string & | vifname, | ||
| const IPv4 & | area, | ||
| const uint32_t & | key_id, | ||
| const string & | password, | ||
| const string & | start_time, | ||
| const string & | end_time, | ||
| const uint32_t & | max_time_drift | ||
| ) | [virtual] |
Set MD5 authentication key.
| ifname | the interface name. |
| vifname | the vif name. |
| area | the area ID. |
| key_id | the key ID (must be an integer in the interval [0, 255]). |
| password | the authentication password. |
| start_time | the authentication start time (YYYY-MM-DD.HH:MM). |
| end_time | the authentication end time (YYYY-MM-DD.HH:MM). |
| max_time_drift | the maximum time drift (in seconds) among all routers. Allowed values are [0--65534] seconds or 65535 for unlimited time drift. |
Implements XrlOspfv2TargetBase.
| XrlCmdError XrlOspfV2Target::ospfv2_0_1_set_simple_authentication_key | ( | const string & | ifname, |
| const string & | vifname, | ||
| const IPv4 & | area, | ||
| const string & | password | ||
| ) | [virtual] |
Set simple password authentication key.
| ifname | the interface name. |
| vifname | the vif name. |
| area | the area ID. |
| password | the authentication password. |
Implements XrlOspfv2TargetBase.
| XrlCmdError XrlOspfV2Target::ospfv2_0_1_trace | ( | const string & | tvar, |
| const bool & | enable | ||
| ) | [virtual] |
Enable/Disable tracing.
| tvar | trace variable. |
| enable | set to true to enable false to disable. |
Implements XrlOspfv2TargetBase.
| XrlCmdError XrlOspfV2Target::ospfv2_0_1_transit_area_virtual_link | ( | const IPv4 & | neighbour_id, |
| const IPv4 & | transit_area | ||
| ) | [virtual] |
| XrlCmdError XrlOspfV2Target::policy_backend_0_1_configure | ( | const uint32_t & | filter, |
| const string & | conf | ||
| ) | [virtual] |
Configure a policy filter.
Implements XrlOspfv2TargetBase.
| XrlCmdError XrlOspfV2Target::policy_backend_0_1_reset | ( | const uint32_t & | filter | ) | [virtual] |
Reset a policy filter.
Implements XrlOspfv2TargetBase.
| XrlCmdError XrlOspfV2Target::policy_redist4_0_1_add_route4 | ( | const IPv4Net & | network, |
| const bool & | unicast, | ||
| const bool & | multicast, | ||
| const IPv4 & | nexthop, | ||
| const uint32_t & | metric, | ||
| const XrlAtomList & | policytags | ||
| ) | [virtual] |
Start route redistribution for an IPv4 route.
| network | the route to advertise. |
| unicast | whether the route is unicast. |
| multicast | whether the route is multicast. |
| nexthop | the nexthop of the route. |
| metric | the metric of the route. |
| policytags | the set of policy-tags associated with the route. |
Implements XrlOspfv2TargetBase.
| XrlCmdError XrlOspfV2Target::policy_redist4_0_1_delete_route4 | ( | const IPv4Net & | network, |
| const bool & | unicast, | ||
| const bool & | multicast | ||
| ) | [virtual] |
Terminate route redistribution for an IPv4 route.
| network | the route for which advertisements should cease. |
| unicast | whether the route is unicast. |
| multicast | whether the route is multicast. |
Implements XrlOspfv2TargetBase.
| XrlCmdError XrlOspfV2Target::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 | ||
| ) | [virtual] |
Receive an IPv4 packet from a raw socket.
| 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. |
Implements XrlOspfv2TargetBase.