Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.6.0.3
Data Structures | Macros | Typedefs | Enumerations | Functions
openapi_bgp_config.h File Reference
#include <stdbool.h>
#include "openapi_common.h"

Go to the source code of this file.

Data Structures

struct  open_bgpDecProcHist_s
 Structure used to report BGP decision process history. More...
 
struct  open_bgpPeerRxAttrErrors_s
 Counters for BGP path attribute errors for received paths. More...
 
struct  open_bgpPeerStatus_s
 Structure used to report BGP peer status. More...
 

Macros

#define OPEN_BGP_AFI_MAX   3
 Maximum of BGP address family.
 
#define OPEN_BGP_ERR_STR_LEN   64
 String length of last Received/Sent error notification message from peer.
 
#define OPEN_BGP_MAX_DP_REASON_STR   16
 Maximum length of a reason (Why decision process was triggered) string.
 
#define OPEN_BGP_MAX_PASSWORD   25
 Maximum length of neighbor password.
 
#define OPEN_BGP_MAX_STATS_ENTRIES   20
 Number of decision process runs to keep in history.
 
#define OPEN_BGP_MAX_TEMPLATE_NAME   32
 Maximum length of template name.
 
#define OPEN_BGP_NBR_MAX_PFX_NOLIMIT   0xFFFFFFFFUL
 For neighbor maximum-prefixes command, indicates no limit. More...
 
#define OPEN_BGP_PEER_ADDR_STR_LENGTH   128
 Maximum length of peer address string.
 
#define OPEN_BGP_PEER_DESC_LENGTH   80
 Maximum length of peer description.
 
#define OPEN_BGP_UPD_GROUP_NONE   0xFFFF
 Outbound update group ID that indicates a group is inactive or a group ID is unassigned.
 

Typedefs

typedef struct open_bgpDecProcHist_s open_bgpDecProcHist_t
 Structure used to report BGP decision process history.
 
typedef struct open_bgpPeerRxAttrErrors_s open_bgpPeerRxAttrErrors_t
 Counters for BGP path attribute errors for received paths.
 
typedef struct open_bgpPeerStatus_s open_bgpPeerStatus_t
 Structure used to report BGP peer status.
 

Enumerations

enum  OPEN_BGP4_PEER_STATE_t {
  OPEN_BGP_PEER_STATE_ILG = 0, OPEN_BGP_PEER_STATE_IDLE = 1, OPEN_BGP_PEER_STATE_CONNECT = 2, OPEN_BGP_PEER_STATE_ACTIVE = 3,
  OPEN_BGP_PEER_STATE_OPENSENT = 4, OPEN_BGP_PEER_STATE_OPENCONFIRM = 5, OPEN_BGP_PEER_STATE_ESTABLISHED = 6
}
 
enum  OPEN_BGP4_PEER_TYPE_t { OPEN_BGP_PEER_TYPE_DYNAMIC = 0, OPEN_BGP_PEER_TYPE_STATIC = 1, OPEN_BGP_PEER_TYPE_UNSPECIFIED = 2 }
 
enum  OPEN_BGP_PARAM_TYPE { OPEN_BGP_GET_FINAL = 0, OPEN_BGP_GET_PEER = 1 }
 A peer can inherit parameter values from a peer template. More...
 
enum  OPEN_BGP_PEER_STATE_t { OPEN_BGP_STOP = 1, OPEN_BGP_START = 2 }
 Start or stop a BGP peer. More...
 
enum  OPEN_E_OPTCAPTYPES_t {
  OPEN_MULTI_PROTOCOL_CAP = 0x1, OPEN_ROUTE_REFLECT_CAP = 0x8, OPEN_COMMUNITIES_CAP = 0x10, OPEN_CONFEDERATION_CAP = 0x20,
  OPEN_ROUTE_REFRESH_CAP = 0x40
}
 
enum  OPEN_OSPF_METRIC_TYPES_t {
  OPEN_OSPF_METRIC_TYPE_INTERNAL = 1, OPEN_OSPF_METRIC_TYPE_EXT1 = 2, OPEN_OSPF_METRIC_TYPE_EXT2 = 4, OPEN_OSPF_METRIC_TYPE_NSSA_EXT1 = 8,
  OPEN_OSPF_METRIC_TYPE_NSSA_EXT2 = 16
}
 OSPF redistribution metric bits for match option. More...
 

Functions

open_error_t openapiBgpAdminModeGet (openapiClientHandle_t *client_handle, OPEN_CONTROL_t *adminMode)
 Gets the Bgp Admin Mode. More...
 
open_error_t openapiBgpAdminModeSet (openapiClientHandle_t *client_handle, OPEN_CONTROL_t adminMode)
 Sets the Bgp Admin mode. More...
 
open_error_t openapiBgpGlobalHoldTimeConfiguredGet (openapiClientHandle_t *client_handle, uint32_t *holdTime)
 Get the configured hold time for all peers. More...
 
open_error_t openapiBgpGlobalHoldTimeConfiguredSet (openapiClientHandle_t *client_handle, uint32_t holdTime)
 Set the configured hold time for all peers. More...
 
open_error_t openapiBgpGlobalKeepAliveConfiguredGet (openapiClientHandle_t *client_handle, uint32_t *keepAlive)
 Get the configured keep alive time for all peers. More...
 
open_error_t openapiBgpGlobalKeepAliveConfiguredSet (openapiClientHandle_t *client_handle, uint32_t keepAlive)
 Set the configured keep alive time for all peers. More...
 
open_error_t openapiBgpIpv4RouteMax (openapiClientHandle_t *client_handle, uint32_t *maxRoutes)
 Get the (configured) maximum number of BGP IPv4 routes for this platform. More...
 
open_error_t openapiBgpIpv6RouteMax (openapiClientHandle_t *client_handle, uint32_t *maxRoutes)
 Get the (configured) maximum number of BGP IPv6 routes for this platform. More...
 
open_error_t openapiBgpLocalASGet (openapiClientHandle_t *client_handle, uint32_t *localAS)
 Get the Local Autonomous System (AS) number. More...
 
open_error_t openapiBgpLocalASSet (openapiClientHandle_t *client_handle, uint32_t localAS)
 Set the Local Autonomous System (AS) number. More...
 
open_error_t openapiBgpLocalIdGet (openapiClientHandle_t *client_handle, uint32_t *routerId)
 Get the BGP router ID. More...
 
open_error_t openapiBgpLocalIdSet (openapiClientHandle_t *client_handle, uint32_t routerId)
 Set the BGP router ID. More...
 
open_error_t openapiBgpLocalPrefGet (openapiClientHandle_t *client_handle, uint32_t *localPref)
 Get the value of local preference attribute. More...
 
open_error_t openapiBgpLocalPrefSet (openapiClientHandle_t *client_handle, uint32_t localPref)
 Set the value of local preference attribute. More...
 
open_error_t openapiBgpLogNeighborChangesGet (openapiClientHandle_t *client_handle, bool *log)
 Get the log neighbor changes parameter. More...
 
open_error_t openapiBgpLogNeighborChangesSet (openapiClientHandle_t *client_handle, bool log)
 Enable/Disable log neighbor changes. More...
 
open_error_t openapiBgpMapDecProcHistoryByIndexGet (openapiClientHandle_t *client_handle, OPEN_AF_t af, uint32_t index, open_bgpDecProcHist_t *pHist)
 Get Decision Process History information of BGP for a given index and address family. More...
 
open_error_t openapiBgpMapDecProcHistoryCountGet (openapiClientHandle_t *client_handle, OPEN_AF_t af, uint32_t *numEntries)
 Get Decision Process History count of BGP for a given address family. More...
 
open_error_t openapiBgpMapGlobalStatusInfoGet (openapiClientHandle_t *client_handle, OPEN_AF_t af, uint32_t *numNetworks, uint32_t *numAsPaths)
 Get BGP global status of number of network entries and number of AS paths. More...
 
open_error_t openapiBgpMapPeerConnRetryIntervalGet (openapiClientHandle_t *client_handle, OPEN_BGP_PARAM_TYPE pType, open_inet_addr_t remoteAddr, uint32_t scopeId, uint32_t *connRetryInterval)
 Get the connection retry interval for a given BGP peer. More...
 
open_error_t openapiBgpMapPeerFalloverBfdGet (openapiClientHandle_t *client_handle, open_inet_addr_t peerAddr, uint32_t scopeId, OPEN_BOOL_t *enableBfd)
 Get the BFD fast fallover setting to the peer. More...
 
open_error_t openapiBgpMapPeerFlapCountGet (openapiClientHandle_t *client_handle, open_inet_addr_t remoteAddr, uint32_t scopeId, OPEN_AF_t af, uint32_t *flapCount)
 Get flap count of given neighbor. More...
 
open_error_t openapiBgpMapPeerPasswordGet (openapiClientHandle_t *client_handle, OPEN_BGP_PARAM_TYPE pType, open_inet_addr_t remoteAddr, uint32_t scopeId, open_buffdesc *bufdName)
 Get the TCP MD5 password for a given peer. More...
 
open_error_t openapiBgpMapPeerPasswordMaxLengthGet (openapiClientHandle_t *client_handle, uint32_t *maxLen)
 Get maximum length of password. More...
 
open_error_t openapiBgpMapPeerPasswordSet (openapiClientHandle_t *client_handle, open_inet_addr_t remoteAddr, uint32_t scopeId, open_buffdesc *bufdName, bool defValue)
 Set the TCP MD5 password for a given peer. More...
 
open_error_t openapiBgpMapPeerRemoteAddrGetNext (openapiClientHandle_t *client_handle, OPEN_AF_t af, open_inet_addr_t prevRemoteAddr, uint32_t prevScopeId, open_inet_addr_t *remoteAddr, uint32_t *scopeId)
 Given the IP address of one peer, get the IP address of the next peer. More...
 
open_error_t openapiBgpMapPeerRemoteAddrVrfGetNext (openapiClientHandle_t *client_handle, OPEN_AF_t af, open_inet_addr_t prevRemoteAddr, uint32_t prevScopeId, open_buffdesc *vrf, open_inet_addr_t *remoteAddr, uint32_t *scopeId)
 Given the IP address of one peer, and a VRF name, get the IP address of the next peer. More...
 
open_error_t openapiBgpMapPeerStatusGet (openapiClientHandle_t *client_handle, open_inet_addr_t remoteAddr, uint32_t scopeId, OPEN_AF_t af, open_bgpPeerStatus_t *status)
 Get the status of a peer for a default VRF instance with a given IP address. More...
 
open_error_t openapiBgpMapPeerStatusVrfGet (openapiClientHandle_t *client_handle, open_buffdesc *vrf, open_inet_addr_t remoteAddr, uint32_t scopeId, OPEN_AF_t af, open_bgpPeerStatus_t *status)
 Get the status of a peer for the given VRF instance and IP address. More...
 
open_error_t openapiBgpMaxPathsGet (openapiClientHandle_t *client_handle, OPEN_AF_t af, bool isIbgp, uint32_t *maxPaths)
 Get the value of maximum Paths attribute. More...
 
open_error_t openapiBgpMaxPathsSet (openapiClientHandle_t *client_handle, OPEN_AF_t af, bool isIbgp, uint32_t maxPaths)
 Set the value of maximum Paths attribute. More...
 
open_error_t openapiBgpNetworkAddDelete (openapiClientHandle_t *client_handle, bool normalMode, bool useRm, open_inet_addr_t addr, uint32_t pfxLen, open_buffdesc *rmName)
 Add or Delete a logically originated network. More...
 
open_error_t openapiBgpPeerActivateGet (openapiClientHandle_t *client_handle, OPEN_BGP_PARAM_TYPE pType, open_inet_addr_t remoteAddr, uint32_t scopeId, OPEN_AF_t af, bool *activate)
 Determine whether a given peer is configured to exchange routes for a given address family. More...
 
open_error_t openapiBgpPeerActivateSet (openapiClientHandle_t *client_handle, open_inet_addr_t remoteAddr, uint32_t scopeId, OPEN_AF_t af, bool activate, bool defValue)
 Configure whether a given peer advertises and accepts routes for a given address family. More...
 
open_error_t openapiBgpPeerAddressStringMaxLengthGet (openapiClientHandle_t *client_handle, uint32_t *maxLen)
 Gets the BGP peer address name string length. More...
 
open_error_t openapiBgpPeerAddrScopeCat (openapiClientHandle_t *client_handle, open_buffdesc *bufdName, uint32_t scopeId)
 Utility to concatenate an address scope to a peer address. More...
 
open_error_t openapiBgpPeerAdminStatusGet (openapiClientHandle_t *client_handle, OPEN_BGP_PARAM_TYPE pType, open_inet_addr_t remoteAddr, uint32_t scopeId, OPEN_BGP_PEER_STATE_t *status)
 Get the administrative status (start/stop) of a given BGP peer. More...
 
open_error_t openapiBgpPeerAdminStatusSet (openapiClientHandle_t *client_handle, open_inet_addr_t remoteAddr, uint32_t scopeId, OPEN_BGP_PEER_STATE_t status, bool defValue)
 Set the administrative status (start/stop) of a given BGP peer. More...
 
open_error_t openapiBgpPeerAdminStatusVrfGet (openapiClientHandle_t *client_handle, open_buffdesc *vrf, OPEN_BGP_PARAM_TYPE pType, open_inet_addr_t remoteAddr, uint32_t scopeId, OPEN_BGP_PEER_STATE_t *status)
 Get the administrative status (start/stop) of a given BGP peer. More...
 
open_error_t openapiBgpPeerAdminStatusVrfSet (openapiClientHandle_t *client_handle, open_buffdesc *vrf, open_inet_addr_t remoteAddr, uint32_t scopeId, OPEN_BGP_PEER_STATE_t status, bool defValue)
 Set the administrative status (start/stop) of a given BGP peer. More...
 
open_error_t openapiBgpPeerAdvertisementIntervalGet (openapiClientHandle_t *client_handle, OPEN_BGP_PARAM_TYPE pType, open_inet_addr_t remoteAddr, uint32_t scopeId, OPEN_AF_t af, uint32_t *interval)
 Get the advertisement interval for a given BGP peer. More...
 
open_error_t openapiBgpPeerAdvertisementIntervalSet (openapiClientHandle_t *client_handle, open_inet_addr_t remoteAddr, uint32_t scopeId, OPEN_AF_t af, uint32_t interval, bool defValue)
 Set the advertisement interval for a given BGP peer. More...
 
open_error_t openapiBgpPeerAutodetectedIpGet (openapiClientHandle_t *client_handle, uint32_t scopeId, open_inet_addr_t *nbrPeerAddr)
 Get the IP address of autodetected peer on the specifed interface. More...
 
open_error_t openapiBgpPeerDescriptionGet (openapiClientHandle_t *client_handle, open_inet_addr_t remoteAddr, uint32_t scopeId, open_buffdesc *bufdName)
 Get the description for a given peer. More...
 
open_error_t openapiBgpPeerDescriptionNameMaxLengthGet (openapiClientHandle_t *client_handle, uint32_t *maxLen)
 Gets the description name maximum length. More...
 
open_error_t openapiBgpPeerDescriptionSet (openapiClientHandle_t *client_handle, open_inet_addr_t remoteAddr, uint32_t scopeId, open_buffdesc *bufdName, bool defValue)
 Set the description field for the specified peer. More...
 
open_error_t openapiBgpPeerDescriptionVrfGet (openapiClientHandle_t *client_handle, open_buffdesc *vrf, open_inet_addr_t remoteAddr, uint32_t scopeId, open_buffdesc *bufdName)
 Get the description for a given peer. More...
 
open_error_t openapiBgpPeerDescriptionVrfSet (openapiClientHandle_t *client_handle, open_buffdesc *vrf, open_inet_addr_t remoteAddr, uint32_t scopeId, open_buffdesc *bufdName, bool defValue)
 Set the description field for the specified peer. More...
 
open_error_t openapiBgpPeerHoldTimeConfiguredGet (openapiClientHandle_t *client_handle, OPEN_BGP_PARAM_TYPE pType, open_inet_addr_t remoteAddr, uint32_t scopeId, uint32_t *holdTime)
 Get the configured hold time for a given BGP peer. More...
 
open_error_t openapiBgpPeerHoldTimeConfiguredSet (openapiClientHandle_t *client_handle, open_inet_addr_t remoteAddr, uint32_t scopeId, uint32_t holdTime, bool defValue)
 Set the configured hold time for a given BGP peer. More...
 
open_error_t openapiBgpPeerInheritGet (openapiClientHandle_t *client_handle, open_inet_addr_t remoteAddr, uint32_t scopeId, open_buffdesc *bufdName)
 Get the template name for a given peer. More...
 
open_error_t openapiBgpPeerInheritSet (openapiClientHandle_t *client_handle, open_inet_addr_t remoteAddr, uint32_t scopeId, open_buffdesc *bufdName, bool defValue)
 Configure a given peer to inherit configuration parameters from a named peer template. More...
 
open_error_t openapiBgpPeerKeepAliveConfiguredGet (openapiClientHandle_t *client_handle, OPEN_BGP_PARAM_TYPE pType, open_inet_addr_t remoteAddr, uint32_t scopeId, uint32_t *keepAlive)
 Get the configured keep alive time for a given BGP peer. More...
 
open_error_t openapiBgpPeerKeepAliveConfiguredSet (openapiClientHandle_t *client_handle, open_inet_addr_t remoteAddr, uint32_t scopeId, uint32_t keepAlive, bool defValue)
 Set the configured keep alive time for a given BGP peer. More...
 
open_error_t openapiBgpPeerNextHopSelfModeGet (openapiClientHandle_t *client_handle, OPEN_BGP_PARAM_TYPE pType, open_inet_addr_t remoteAddr, uint32_t scopeId, OPEN_AF_t af, OPEN_CONTROL_t *enable)
 Determine whether BGP sets the BGP NEXT_HOP to a local address when forwarding external routes to a given internal peer. More...
 
open_error_t openapiBgpPeerNextHopSelfModeSet (openapiClientHandle_t *client_handle, open_inet_addr_t remoteAddr, uint32_t scopeId, OPEN_AF_t af, OPEN_CONTROL_t enable, bool defValue)
 Configure BGP to use a local address when advertising routes to a given internal peer. More...
 
open_error_t openapiBgpPeerPfxLimitGet (openapiClientHandle_t *client_handle, OPEN_BGP_PARAM_TYPE pType, open_inet_addr_t remoteAddr, uint32_t scopeId, OPEN_AF_t af, uint32_t *pfxLimit, uint32_t *threshold, bool *warningOnly)
 Get the prefix limit configured for a given peer. More...
 
open_error_t openapiBgpPeerPfxLimitSet (openapiClientHandle_t *client_handle, open_inet_addr_t remoteAddr, uint32_t scopeId, OPEN_AF_t af, uint32_t pfxLimit, uint32_t threshold, bool warningOnly, bool defValue)
 Set the prefix limit configured for a given peer. More...
 
open_error_t openapiBgpPeerRemoteASGet (openapiClientHandle_t *client_handle, open_inet_addr_t remoteAddr, uint32_t scopeId, uint32_t *remoteAS)
 Return a remote Autonomous System (AS) number that this peer belongs to. More...
 
open_error_t openapiBgpPeerRemoteASSet (openapiClientHandle_t *client_handle, open_inet_addr_t remoteAddr, uint32_t scopeId, uint32_t remoteAS)
 Create a peer with a given IP address and Autonomous System (AS) number. More...
 
open_error_t openapiBgpPeerRemoteASVrfGet (openapiClientHandle_t *client_handle, open_buffdesc *vrf, open_inet_addr_t remoteAddr, uint32_t scopeId, uint32_t *remoteAS)
 Return a remote Autonomous System (AS) number that this peer belongs to. More...
 
open_error_t openapiBgpPeerRemoteASVrfSet (openapiClientHandle_t *client_handle, open_buffdesc *vrf, open_inet_addr_t remoteAddr, uint32_t scopeId, uint32_t remoteAS)
 Create a peer with a given IP address and Autonomous System (AS) number. More...
 
open_error_t openapiBgpPeerUpdateSourceGet (openapiClientHandle_t *client_handle, OPEN_BGP_PARAM_TYPE pType, open_inet_addr_t remoteAddr, uint32_t scopeId, uint32_t *source)
 Get the interface whose IP address that BGP uses as the source IP address in packets sent to a given peer. More...
 
open_error_t openapiBgpPeerUpdateSourceSet (openapiClientHandle_t *client_handle, open_inet_addr_t remoteAddr, uint32_t scopeId, uint32_t source, bool defValue)
 Set the interface whose IP address that BGP uses as the source IP address in packets sent to a given peer. More...
 
open_error_t openapiBgpRedistributionSet (openapiClientHandle_t *client_handle, bool add, open_buffdesc *protoName, bool matchSet, uint32_t matchBits, bool metricSet, bool metricValueSet, uint32_t metricValue, bool routeMapSet, OPEN_AF_t af, open_buffdesc *rmName)
 Set route redistribution options for routes learned from a specific source. More...
 
open_error_t openapiBgpTemplateAFClear (openapiClientHandle_t *client_handle, open_buffdesc *bufdName, OPEN_AF_t af)
 Clear the address-family of given template. More...
 
open_error_t openapiBgpTemplateAFSet (openapiClientHandle_t *client_handle, open_buffdesc *bufdName, OPEN_AF_t af)
 Set the address-family of given template. More...
 
open_error_t openapiBgpTemplateDelete (openapiClientHandle_t *client_handle, open_buffdesc *bufdName)
 Clear the template name and inuse flag. More...
 
open_error_t openapiBgpTemplateNameMaxLengthGet (openapiClientHandle_t *client_handle, uint32_t *maxLen)
 Gets the Template Name string length. More...
 
open_error_t openapiBgpTemplateSendCommunitySet (openapiClientHandle_t *client_handle, open_buffdesc *bufdName, OPEN_AF_t af, OPEN_CONTROL_t enable)
 Clear the address-family of given template. More...
 
open_error_t openapiBgpTemplateSet (openapiClientHandle_t *client_handle, open_buffdesc *bufdName)
 Set the template name and inuse flag. More...