bgp_base.hh
来自「BCAST Implementation for NS2」· HH 代码 · 共 819 行 · 第 1/2 页
HH
819 行
/* * Copyright (c) 2001-2003 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/bgp_base.hh,v 1.24 2003/08/08 16:38:07 hodson Exp $ */#ifndef __XRL_INTERFACES_BGP_BASE_HH__#define __XRL_INTERFACES_BGP_BASE_HH__#undef XORP_LIBRARY_NAME#define XORP_LIBRARY_NAME "XrlBgpTarget"#include "libxorp/xlog.h"#include "libxipc/xrl_cmd_map.hh"class XrlBgpTargetBase {protected: XrlCmdMap* _cmds;public: XrlBgpTargetBase(XrlCmdMap* cmds) : _cmds(cmds) { add_handlers(); } virtual ~XrlBgpTargetBase() { remove_handlers(); } inline const string& name() const { return _cmds->name(); } inline const char* version() const { return "bgp/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: * * Get the BGP version currently running. */ virtual XrlCmdError bgp_0_2_get_bgp_version( // Output values, uint32_t& version) = 0; /** * Pure-virtual function that needs to be implemented to: * * Get local config * * @param id our BGP ID. */ virtual XrlCmdError bgp_0_2_local_config( // Input values, const uint32_t& as, const IPv4& id) = 0; /** * Pure-virtual function that needs to be implemented to: * * Set the local AS number. * * @param as our AS number. */ virtual XrlCmdError bgp_0_2_set_local_as( // Input values, const uint32_t& as) = 0; /** * Pure-virtual function that needs to be implemented to: * * Get the local AS number. */ virtual XrlCmdError bgp_0_2_get_local_as( // Output values, uint32_t& as) = 0; /** * Pure-virtual function that needs to be implemented to: * * Set the BGP id. * * @param id our BGP ID. */ virtual XrlCmdError bgp_0_2_set_bgp_id( // Input values, const IPv4& id) = 0; /** * Pure-virtual function that needs to be implemented to: * * Get the BGP id. */ virtual XrlCmdError bgp_0_2_get_bgp_id( // Output values, IPv4& id) = 0; /** * Pure-virtual function that needs to be implemented to: * * Add peer. * * @param as the peer's AS number. * * @param next_hop the local next hop. * * @param holdtime expects traffic in this time interval. */ virtual XrlCmdError bgp_0_2_add_peer( // Input values, const string& local_ip, const uint32_t& local_port, const string& peer_ip, const uint32_t& peer_port, const uint32_t& as, const IPv4& next_hop, const uint32_t& holdtime) = 0; /** * Pure-virtual function that needs to be implemented to: * * Delete peer. */ virtual XrlCmdError bgp_0_2_delete_peer( // Input values, const string& local_ip, const uint32_t& local_port, const string& peer_ip, const uint32_t& peer_port) = 0; /** * Pure-virtual function that needs to be implemented to: * * Enable this peer. */ virtual XrlCmdError bgp_0_2_enable_peer( // Input values, const string& local_ip, const uint32_t& local_port, const string& peer_ip, const uint32_t& peer_port) = 0; /** * Pure-virtual function that needs to be implemented to: * * Disable this peer. */ virtual XrlCmdError bgp_0_2_disable_peer( // Input values, const string& local_ip, const uint32_t& local_port, const string& peer_ip, const uint32_t& peer_port) = 0; /** * Pure-virtual function that needs to be implemented to: * * Set which parameters we support per peer */ virtual XrlCmdError bgp_0_2_set_parameter( // Input values, const string& local_ip, const uint32_t& local_port, const string& peer_ip, const uint32_t& peer_port, const string& parameter) = 0; /** * Pure-virtual function that needs to be implemented to: * * Set next hop rewrite filter. */ virtual XrlCmdError bgp_0_2_next_hop_rewrite_filter( // Input values, const string& local_ip, const uint32_t& local_port, const string& peer_ip, const uint32_t& peer_port, const IPv4& next_hop) = 0; /** * Pure-virtual function that needs to be implemented to: * * Set the peer state enabled or disabled. * * @param toggle enabled or disabled. */ virtual XrlCmdError bgp_0_2_set_peer_state( // Input values, const string& local_ip, const uint32_t& local_port, const string& peer_ip, const uint32_t& peer_port, const bool& toggle) = 0; /** * Pure-virtual function that needs to be implemented to: * * Get the first item of a list of BGP peers See RFC 1657 (BGP MIB) for * full definitions of return values. * * @param token returned token to be provided when calling * get_peer_list_next. * * @param more returned to indicate whether there are more list items * remaining. */ virtual XrlCmdError bgp_0_2_get_peer_list_start( // Output values, uint32_t& token, bool& more) = 0; /** * Pure-virtual function that needs to be implemented to: * * Get the next item of a list of BGP peers * * @param token token from prior call to get_peer_list * * @param more returned to indicate whether there are more list items * remaining. */ virtual XrlCmdError bgp_0_2_get_peer_list_next( // Input values, const uint32_t& token, // Output values, IPv4& local_ip, uint32_t& local_port, IPv4& peer_ip, uint32_t& peer_port, bool& more) = 0; virtual XrlCmdError bgp_0_2_get_peer_id( // Input values, const IPv4& local_ip, const uint32_t& local_port, const IPv4& peer_ip, const uint32_t& peer_port, // Output values, IPv4& peer_id) = 0; virtual XrlCmdError bgp_0_2_get_peer_status( // Input values, const IPv4& local_ip, const uint32_t& local_port, const IPv4& peer_ip, const uint32_t& peer_port, // Output values, uint32_t& peer_state, uint32_t& admin_status) = 0; virtual XrlCmdError bgp_0_2_get_peer_negotiated_version( // Input values, const IPv4& local_ip, const uint32_t& local_port, const IPv4& peer_ip, const uint32_t& peer_port, // Output values, int32_t& neg_version) = 0; virtual XrlCmdError bgp_0_2_get_peer_as( // Input values, const IPv4& local_ip, const uint32_t& local_port, const IPv4& peer_ip, const uint32_t& peer_port, // Output values, uint32_t& peer_as) = 0; virtual XrlCmdError bgp_0_2_get_peer_msg_stats( // Input values, const IPv4& local_ip, const uint32_t& local_port, const IPv4& peer_ip, const uint32_t& peer_port, // Output values, uint32_t& in_updates, uint32_t& out_updates, uint32_t& in_msgs, uint32_t& out_msgs, uint32_t& last_error, uint32_t& in_update_elapsed) = 0; virtual XrlCmdError bgp_0_2_get_peer_established_stats( // Input values, const IPv4& local_ip, const uint32_t& local_port, const IPv4& peer_ip, const uint32_t& peer_port, // Output values, uint32_t& transitions, uint32_t& established_time) = 0; virtual XrlCmdError bgp_0_2_get_peer_timer_config( // Input values, const IPv4& local_ip, const uint32_t& local_port, const IPv4& peer_ip, const uint32_t& peer_port, // Output values, uint32_t& retry_interval, uint32_t& hold_time, uint32_t& keep_alive, uint32_t& hold_time_conf, uint32_t& keep_alive_conf, uint32_t& min_as_orgination_interval, uint32_t& min_route_adv_interval) = 0; /** * Pure-virtual function that needs to be implemented to: * * Register rib. * * @param name rib name. */ virtual XrlCmdError bgp_0_2_register_rib( // Input values, const string& name) = 0; /** * Pure-virtual function that needs to be implemented to: * * add route * * @param origin the origin of the path information. * * @param next_hop the border router that should be used as a detination * for the nlri. * * @param nlri network level reachability information. */ virtual XrlCmdError bgp_0_2_add_route( // Input values, const int32_t& origin, const int32_t& asnum, const IPv4& next_hop, const IPv4Net& nlri) = 0; /** * Pure-virtual function that needs to be implemented to: * * delete route * * @param nlri network level reachability information. */ virtual XrlCmdError bgp_0_2_delete_route( // Input values, const IPv4Net& nlri) = 0; /** * Pure-virtual function that needs to be implemented to: * * Get the first item of a list of BGP routes See RFC 1657 (BGP MIB) for * full definitions of return values. * * @param token returned token to be provided when calling * get_route_list_next. */ virtual XrlCmdError bgp_0_2_get_v4_route_list_start( // Output values, uint32_t& token) = 0; /** * Pure-virtual function that needs to be implemented to: * * Get the first item of a list of BGP routes See RFC 1657 (BGP MIB) for * full definitions of return values. * * @param token returned token to be provided when calling * get_route_list_next. */ virtual XrlCmdError bgp_0_2_get_v6_route_list_start( // Output values, uint32_t& token) = 0; /** * Pure-virtual function that needs to be implemented to:
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?