📄 rib_base.hh
字号:
/* * Copyright (c) 2001-2007 International Computer Science Institute * See LICENSE file for licensing, conditions, and warranties on use. * * DO NOT EDIT THIS FILE - IT IS PROGRAMMATICALLY GENERATED * * Generated by 'tgt-gen'. * * $XORP: xorp/xrl/targets/rib_base.hh,v 1.42 2007/02/16 22:47:55 pavlin Exp $ */#ifndef __XRL_TARGETS_RIB_BASE_HH__#define __XRL_TARGETS_RIB_BASE_HH__#undef XORP_LIBRARY_NAME#define XORP_LIBRARY_NAME "XrlRibTarget"#include "libxorp/xlog.h"#include "libxipc/xrl_cmd_map.hh"class XrlRibTargetBase {protected: XrlCmdMap* _cmds;public: /** * Constructor. * * @param cmds an XrlCmdMap that the commands associated with the target * should be added to. This is typically the XrlRouter * associated with the target. */ XrlRibTargetBase(XrlCmdMap* cmds = 0); /** * Destructor. * * Dissociates instance commands from command map. */ virtual ~XrlRibTargetBase(); /** * Set command map. * * @param cmds pointer to command map to associate commands with. This * argument is typically a pointer to the XrlRouter associated with the * target. * * @return true on success, false if cmds is null or a command map has * already been supplied. */ bool set_command_map(XrlCmdMap* cmds); /** * Get Xrl instance name associated with command map. */ inline const string& name() const { return _cmds->name(); } /** * Get version string of instance. */ inline const char* version() const { return "rib/0.0"; }protected: /** * Pure-virtual function that needs to be implemented to: * * Get name of Xrl Target */ virtual XrlCmdError common_0_1_get_target_name( // Output values, string& name) = 0; /** * Pure-virtual function that needs to be implemented to: * * Get version string from Xrl Target */ virtual XrlCmdError common_0_1_get_version( // Output values, string& version) = 0; /** * Pure-virtual function that needs to be implemented to: * * Get status of Xrl Target */ virtual XrlCmdError common_0_1_get_status( // Output values, uint32_t& status, string& reason) = 0; /** * Pure-virtual function that needs to be implemented to: * * Request clean shutdown of Xrl Target */ virtual XrlCmdError common_0_1_shutdown() = 0; /** * Pure-virtual function that needs to be implemented to: * * Announce target birth to observer. * * @param target_class the target class name. * * @param target_instance the target instance name. */ virtual XrlCmdError finder_event_observer_0_1_xrl_target_birth( // Input values, const string& target_class, const string& target_instance) = 0; /** * Pure-virtual function that needs to be implemented to: * * Announce target death to observer. * * @param target_class the target class name. * * @param target_instance the target instance name. */ virtual XrlCmdError finder_event_observer_0_1_xrl_target_death( // Input values, const string& target_class, const string& target_instance) = 0; /** * Pure-virtual function that needs to be implemented to: * * Configure a policy filter. * * @param filter the identifier of the filter to configure. * * @param conf the configuration of the filter. */ virtual XrlCmdError policy_backend_0_1_configure( // Input values, const uint32_t& filter, const string& conf) = 0; /** * Pure-virtual function that needs to be implemented to: * * Reset a policy filter. * * @param filter the identifier of the filter to reset. */ virtual XrlCmdError policy_backend_0_1_reset( // Input values, const uint32_t& filter) = 0; /** * Pure-virtual function that needs to be implemented to: * * Push all available routes through all filters for re-filtering. */ virtual XrlCmdError policy_backend_0_1_push_routes() = 0; /** * Pure-virtual function that needs to be implemented to: * * Enable/disable/start/stop RIB. */ virtual XrlCmdError rib_0_1_enable_rib() = 0; virtual XrlCmdError rib_0_1_disable_rib() = 0; virtual XrlCmdError rib_0_1_start_rib() = 0; virtual XrlCmdError rib_0_1_stop_rib() = 0; /** * Pure-virtual function that needs to be implemented to: * * Make errors fatal; used to detect errors we'd normally mask */ virtual XrlCmdError rib_0_1_make_errors_fatal() = 0; /** * Pure-virtual function that needs to be implemented to: * * Get the list of registered protocols. * * @param ipv4 if true, then include the IPv4 protocols. * * @param ipv6 if true, then include the IPv6 protocols. * * @param unicast if true, then include the protocols registered with the * unicast RIB. * * @param multicast if true, then include the protocols registered with * the multicast RIB. * * @param ipv4_unicast_protocols the list of IPv4 protocols registered * with the unicast RIB. * * @param ipv6_unicast_protocols the list of IPv6 protocols registered * with the unicast RIB. * * @param ipv4_multicast_protocols the list of IPv4 protocols registered * with the multicast RIB. * * @param ipv6_multicast_protocols the list of IPv6 protocols registered * with the multicast RIB. */ virtual XrlCmdError rib_0_1_get_registered_protocols( // Input values, const bool& ipv4, const bool& ipv6, const bool& unicast, const bool& multicast, // Output values, XrlAtomList& ipv4_unicast_protocols, XrlAtomList& ipv6_unicast_protocols, XrlAtomList& ipv4_multicast_protocols, XrlAtomList& ipv6_multicast_protocols) = 0; /** * Pure-virtual function that needs to be implemented to: * * Add/delete an IGP or EGP table. * * @param protocol the name of the protocol. * * @param target_class the target class of the protocol. * * @param target_instance the target instance of the protocol. * * @param unicast true if the table is for the unicast RIB. * * @param multicast true if the table is for the multicast RIB. */ virtual XrlCmdError rib_0_1_add_igp_table4( // Input values, const string& protocol, const string& target_class, const string& target_instance, const bool& unicast, const bool& multicast) = 0; virtual XrlCmdError rib_0_1_add_igp_table6( // Input values, const string& protocol, const string& target_class, const string& target_instance, const bool& unicast, const bool& multicast) = 0; virtual XrlCmdError rib_0_1_delete_igp_table4( // Input values, const string& protocol, const string& target_class, const string& target_instance, const bool& unicast, const bool& multicast) = 0; virtual XrlCmdError rib_0_1_delete_igp_table6( // Input values, const string& protocol, const string& target_class, const string& target_instance, const bool& unicast, const bool& multicast) = 0; virtual XrlCmdError rib_0_1_add_egp_table4( // Input values, const string& protocol, const string& target_class, const string& target_instance, const bool& unicast, const bool& multicast) = 0; virtual XrlCmdError rib_0_1_add_egp_table6( // Input values, const string& protocol, const string& target_class, const string& target_instance, const bool& unicast, const bool& multicast) = 0; virtual XrlCmdError rib_0_1_delete_egp_table4( // Input values, const string& protocol, const string& target_class, const string& target_instance, const bool& unicast, const bool& multicast) = 0; virtual XrlCmdError rib_0_1_delete_egp_table6( // Input values, const string& protocol, const string& target_class, const string& target_instance, const bool& unicast, const bool& multicast) = 0; /** * Pure-virtual function that needs to be implemented to: * * Add/replace/delete a route. * * @param protocol the name of the protocol this route comes from. * * @param unicast true if the route is for the unicast RIB. * * @param multicast true if the route is for the multicast RIB. * * @param network the network address prefix of the route. * * @param nexthop the address of the next-hop router toward the * destination. * * @param metric the routing metric. * * @param policytags a set of policy tags used for redistribution. */ virtual XrlCmdError rib_0_1_add_route4( // Input values, const string& protocol, const bool& unicast, const bool& multicast, const IPv4Net& network, const IPv4& nexthop, const uint32_t& metric, const XrlAtomList& policytags) = 0; virtual XrlCmdError rib_0_1_add_route6( // Input values, const string& protocol, const bool& unicast, const bool& multicast, const IPv6Net& network, const IPv6& nexthop, const uint32_t& metric, const XrlAtomList& policytags) = 0; virtual XrlCmdError rib_0_1_replace_route4( // Input values, const string& protocol, const bool& unicast, const bool& multicast, const IPv4Net& network, const IPv4& nexthop, const uint32_t& metric, const XrlAtomList& policytags) = 0; virtual XrlCmdError rib_0_1_replace_route6( // Input values, const string& protocol, const bool& unicast, const bool& multicast, const IPv6Net& network, const IPv6& nexthop, const uint32_t& metric, const XrlAtomList& policytags) = 0;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -