📄 bgp_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/bgp_base.hh,v 1.60 2007/02/16 22:47:48 pavlin Exp $ */#ifndef __XRL_TARGETS_BGP_BASE_HH__#define __XRL_TARGETS_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: /** * 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. */ XrlBgpTargetBase(XrlCmdMap* cmds = 0); /** * Destructor. * * Dissociates instance commands from command map. */ virtual ~XrlBgpTargetBase(); /** * 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 "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: * * Confederation identifier. * * @param as externally visible AS number. * * @param disable true if confederations are disabled. */ virtual XrlCmdError bgp_0_2_set_confederation_identifier( // Input values, const uint32_t& as, const bool& disable) = 0; /** * Pure-virtual function that needs to be implemented to: * * Route reflection. * * @param cluster_id the route reflection cluster ID. * * @param disable if true this router is a router reflector. */ virtual XrlCmdError bgp_0_2_set_cluster_id( // Input values, const IPv4& cluster_id, const bool& disable) = 0; /** * Pure-virtual function that needs to be implemented to: * * Route Flap Damping. RFC 2439 * * @param half_life decay half life in minutes. * * @param max_suppress maximum time in minutes a route can be held down. * * @param reuse threshold, point at which a route can be reused. */ virtual XrlCmdError bgp_0_2_set_damping( // Input values, const uint32_t& half_life, const uint32_t& max_suppress, const uint32_t& reuse, const uint32_t& suppress, const bool& disable) = 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 if traffic is not received in holdtime seconds a * peering is considered down. */ 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: * * Change the local IP address. * * @param local_ip current IP address. * * @param local_port server port. * * @param peer_ip IP address. * * @param peer_port peer port. * * @param new_local_ip new IP address. */ virtual XrlCmdError bgp_0_2_change_local_ip( // Input values, const string& local_ip, const uint32_t& local_port, const string& peer_ip, const uint32_t& peer_port, const string& new_local_ip) = 0; /** * Pure-virtual function that needs to be implemented to: * * Change the local port. * * @param local_ip current IP address. * * @param local_port server port. * * @param peer_ip IP address. * * @param peer_port peer port. * * @param new_local_port new local port. */ virtual XrlCmdError bgp_0_2_change_local_port( // Input values, const string& local_ip, const uint32_t& local_port, const string& peer_ip, const uint32_t& peer_port, const uint32_t& new_local_port) = 0; /** * Pure-virtual function that needs to be implemented to: * * Change the peer port. * * @param local_ip current IP address. * * @param local_port server port. * * @param peer_ip IP address. * * @param peer_port peer port. */ virtual XrlCmdError bgp_0_2_change_peer_port( // Input values, const string& local_ip, const uint32_t& local_port, const string& peer_ip, const uint32_t& peer_port, const uint32_t& new_peer_port) = 0; /** * Pure-virtual function that needs to be implemented to: * * Set the peer's AS number. * * @param peer_as the peer's AS number. */ virtual XrlCmdError bgp_0_2_set_peer_as( // Input values, const string& local_ip, const uint32_t& local_port, const string& peer_ip, const uint32_t& peer_port, const uint32_t& peer_as) = 0; /** * Pure-virtual function that needs to be implemented to: * * Set the holdtime * * @param holdtime if traffic is not received in holdtime seconds a * peering is considered down. */ virtual XrlCmdError bgp_0_2_set_holdtime( // Input values, const string& local_ip, const uint32_t& local_port, const string& peer_ip, const uint32_t& peer_port, const uint32_t& holdtime) = 0; /** * Pure-virtual function that needs to be implemented to: * * Set the delay open time * * @param delay_open_time to wait is seconds before sending an open. */ virtual XrlCmdError bgp_0_2_set_delay_open_time( // Input values, const string& local_ip, const uint32_t& local_port, const string& peer_ip, const uint32_t& peer_port, const uint32_t& delay_open_time) = 0; /** * Pure-virtual function that needs to be implemented to: * * Set the route reflection client state. Is this peer a route reflector * client. * * @param state true if peer is a route reflector client. */ virtual XrlCmdError bgp_0_2_set_route_reflector_client( // Input values, const string& local_ip, const uint32_t& local_port, const string& peer_ip, const uint32_t& peer_port, const bool& state) = 0; /** * Pure-virtual function that needs to be implemented to: * * Is this peer a confederation member. * * @param state true if peer is a confederation member. */ virtual XrlCmdError bgp_0_2_set_confederation_member( // Input values, const string& local_ip, const uint32_t& local_port, const string& peer_ip, const uint32_t& peer_port, const bool& state) = 0; /** * Pure-virtual function that needs to be implemented to: * * Set the prefix limit. * * @param maximum number of prefixes * * @param state true if the prefix limit is being enforced */ virtual XrlCmdError bgp_0_2_set_prefix_limit( // Input values,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -