Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.6.0.3
Data Structures | Macros | Typedefs | Enumerations | Functions
Border Gateway Protocol Configuration And Status [OPENAPI_BGP_CONFIG]

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...
 

Detailed Description

Macro Definition Documentation

#define OPEN_BGP_NBR_MAX_PFX_NOLIMIT   0xFFFFFFFFUL

For neighbor maximum-prefixes command, indicates no limit.

Examples:
bgp_example.c.

Definition at line 44 of file openapi_bgp_config.h.

Enumeration Type Documentation

Enumerator
OPEN_BGP_PEER_STATE_ILG 

ILG.

OPEN_BGP_PEER_STATE_IDLE 

idle

OPEN_BGP_PEER_STATE_CONNECT 

connect

OPEN_BGP_PEER_STATE_ACTIVE 

active

OPEN_BGP_PEER_STATE_OPENSENT 

opensent

OPEN_BGP_PEER_STATE_OPENCONFIRM 

openconfirm

OPEN_BGP_PEER_STATE_ESTABLISHED 

established

Definition at line 87 of file openapi_bgp_config.h.

Enumerator
OPEN_BGP_PEER_TYPE_DYNAMIC 

Dynamic.

OPEN_BGP_PEER_TYPE_STATIC 

Static.

OPEN_BGP_PEER_TYPE_UNSPECIFIED 

Unspecified or IPv6.

Definition at line 98 of file openapi_bgp_config.h.

A peer can inherit parameter values from a peer template.

When we query the value of a configuration parameter for a peer, sometimes we want the value configured on the peer itself, even if that is just the default value. In other contexts, we want to get the actual value in use for the peer, whether that is configured on the peer or inherited from a template. This enumeration is used to indicate which value we want when we get a configuration parameter for a peer.

Enumerator
OPEN_BGP_GET_FINAL 

peer or inherited value from template

OPEN_BGP_GET_PEER 

peer value

Definition at line 74 of file openapi_bgp_config.h.

Start or stop a BGP peer.

Enumerator
OPEN_BGP_STOP 

Shutdown.

OPEN_BGP_START 

Startup.

Definition at line 81 of file openapi_bgp_config.h.

Enumerator
OPEN_MULTI_PROTOCOL_CAP 

Multi-protocol.

OPEN_ROUTE_REFLECT_CAP 

Route Reflect.

OPEN_COMMUNITIES_CAP 

Communities.

OPEN_CONFEDERATION_CAP 

Confederation.

OPEN_ROUTE_REFRESH_CAP 

Route Refresh.

Definition at line 105 of file openapi_bgp_config.h.

OSPF redistribution metric bits for match option.

Enumerator
OPEN_OSPF_METRIC_TYPE_INTERNAL 

Intra-Area.

OPEN_OSPF_METRIC_TYPE_EXT1 

External Type 1.

OPEN_OSPF_METRIC_TYPE_EXT2 

External Type 2.

OPEN_OSPF_METRIC_TYPE_NSSA_EXT1 

NSSA Type 1.

OPEN_OSPF_METRIC_TYPE_NSSA_EXT2 

NSSA Type 2.

Definition at line 58 of file openapi_bgp_config.h.

Function Documentation

open_error_t openapiBgpAdminModeGet ( openapiClientHandle_t client_handle,
OPEN_CONTROL_t adminMode 
)

Gets the Bgp Admin Mode.

Parameters
[in]client_handleclient handle from registration API
[out]adminModestatus of admin mode
Return values
OPEN_E_NONESet successful.
OPEN_E_PARAMError in parameter passed.
OPEN_E_FAILSet failed if the api failed to get admin mode.
Note
Get Bgp admin mode OPEN_ENABLE if the admin mode is enabled OPEN_DISABLE if the admin mode is disabled

OpEN API Version: 1.6

open_error_t openapiBgpAdminModeSet ( openapiClientHandle_t client_handle,
OPEN_CONTROL_t  adminMode 
)

Sets the Bgp Admin mode.

Parameters
[in]client_handleclient handle from registration API
[in]adminModestatus of admin mode
Return values
OPEN_E_NONESet successful.
OPEN_E_PARAMError in parameter passed.
OPEN_E_FAILSet failed if the api failed to set admin mode.
Note
Calling this API will change the running configuration of the switch. Sets the Bgp Admin mode OPEN_ENABLE to enable and OPEN_DISABLE to disable admin mode

OpEN API Version: 1.6

open_error_t openapiBgpGlobalHoldTimeConfiguredGet ( openapiClientHandle_t client_handle,
uint32_t *  holdTime 
)

Get the configured hold time for all peers.

Parameters
[in]client_handleclient handle from registration API
[out]holdTimehold time (secs)
Return values
OPEN_E_NONEGet successful.
OPEN_E_FAILGet failed.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.2

Examples:
bgp_example.c.
open_error_t openapiBgpGlobalHoldTimeConfiguredSet ( openapiClientHandle_t client_handle,
uint32_t  holdTime 
)

Set the configured hold time for all peers.

Parameters
[in]client_handleclient handle from registration API
[in]holdTimehold time (secs)
-Minimum value OPENAPI_BGP4_HOLD_TIME_MIN
-Maximum value OPENAPI_BGP4_HOLD_TIME_MAX
Return values
OPEN_E_NONESet successful.
OPEN_E_FAILSet failed.
OPEN_E_PARAMError in parameter passed.
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.2

Examples:
bgp_example.c.
open_error_t openapiBgpGlobalKeepAliveConfiguredGet ( openapiClientHandle_t client_handle,
uint32_t *  keepAlive 
)

Get the configured keep alive time for all peers.

Parameters
[in]client_handleclient handle from registration API
[out]keepAlivekeep alive time (secs)
Return values
OPEN_E_NONEGet successful.
OPEN_E_FAILGet failed.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.2

Examples:
bgp_example.c.
open_error_t openapiBgpGlobalKeepAliveConfiguredSet ( openapiClientHandle_t client_handle,
uint32_t  keepAlive 
)

Set the configured keep alive time for all peers.

Parameters
[in]client_handleclient handle from registration API
[in]keepAlivekeep alive time (secs)
-Minimum value OPENAPI_BGP4_KEEP_ALIVE_TIME_MIN
-Maximum value OPENAPI_BGP4_KEEP_ALIVE_TIME_MAX
Return values
OPEN_E_NONESet successful.
OPEN_E_FAILSet failed.
OPEN_E_PARAMError in parameter passed.
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.2

Examples:
bgp_example.c.
open_error_t openapiBgpIpv4RouteMax ( openapiClientHandle_t client_handle,
uint32_t *  maxRoutes 
)

Get the (configured) maximum number of BGP IPv4 routes for this platform.

Parameters
[in]client_handleclient handle from registration API
[out]maxRoutesmaximum number of routes
Return values
OPEN_E_NONEGet successful.
OPEN_E_FAILGet failed.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.2

Examples:
bgp_example.c.
open_error_t openapiBgpIpv6RouteMax ( openapiClientHandle_t client_handle,
uint32_t *  maxRoutes 
)

Get the (configured) maximum number of BGP IPv6 routes for this platform.

Parameters
[in]client_handleclient handle from registration API
[out]maxRoutesmaximum number of routes
Return values
OPEN_E_NONEGet successful.
OPEN_E_FAILGet failed.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.2

open_error_t openapiBgpLocalASGet ( openapiClientHandle_t client_handle,
uint32_t *  localAS 
)

Get the Local Autonomous System (AS) number.

Parameters
[in]client_handleclient handle from registration API
[out]localASlocal AS number
Return values
OPEN_E_NONEGet successful.
OPEN_E_FAILGet failed.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.2

Examples:
bgp_example.c.
open_error_t openapiBgpLocalASSet ( openapiClientHandle_t client_handle,
uint32_t  localAS 
)

Set the Local Autonomous System (AS) number.

Parameters
[in]client_handleclient handle from registration API
[in]localASlocal AS number
-Minimum value 0
-Maximum value signed integer (65535)
Return values
OPEN_E_NONESet successful.
OPEN_E_FAILSet failed.
OPEN_E_PARAMError in parameter passed.
Note
Setting AS to 0 destroys the existing BGP instance.
Calling this API will change the running configuration of the switch

OpEN API Version: 1.2

Examples:
bgp_example.c.
open_error_t openapiBgpLocalIdGet ( openapiClientHandle_t client_handle,
uint32_t *  routerId 
)

Get the BGP router ID.

Parameters
[in]client_handleclient handle from registration API
[out]routerIdrouter id
Return values
OPEN_E_NONEGet successful.
OPEN_E_FAILGet failed.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.2

Examples:
bgp_example.c.
open_error_t openapiBgpLocalIdSet ( openapiClientHandle_t client_handle,
uint32_t  routerId 
)

Set the BGP router ID.

Parameters
[in]client_handleclient handle from registration API
[in]routerIdrouter ipv4 address for BGP
Return values
OPEN_E_NONESet successful.
OPEN_E_FAILSet failed.
OPEN_E_PARAMError in parameter passed.
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.2

Examples:
bgp_example.c.
open_error_t openapiBgpLocalPrefGet ( openapiClientHandle_t client_handle,
uint32_t *  localPref 
)

Get the value of local preference attribute.

Parameters
[in]client_handleclient handle from registration API
[out]localPreflocal preference
Return values
OPEN_E_NONEGet successful.
OPEN_E_FAILGet failed.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.2

Examples:
bgp_example.c.
open_error_t openapiBgpLocalPrefSet ( openapiClientHandle_t client_handle,
uint32_t  localPref 
)

Set the value of local preference attribute.

Parameters
[in]client_handleclient handle from registration API
[in]localPreflocal preference
-Minimum value 0
-Maximum value unsigned integer (4294967295)
Return values
OPEN_E_NONESet successful.
OPEN_E_FAILSet failed.
OPEN_E_PARAMError in parameter passed.
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.2

Examples:
bgp_example.c.
open_error_t openapiBgpLogNeighborChangesGet ( openapiClientHandle_t client_handle,
bool *  log 
)

Get the log neighbor changes parameter.

Parameters
[in]client_handleclient handle from registration API
[out]logif true, then logging is allowed
Return values
OPEN_E_NONEGet successful.
OPEN_E_FAILGet failed.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.2

Examples:
bgp_example.c.
open_error_t openapiBgpLogNeighborChangesSet ( openapiClientHandle_t client_handle,
bool  log 
)

Enable/Disable log neighbor changes.

Parameters
[in]client_handleclient handle from registration API
[in]logif true, then logging is allowed
Return values
OPEN_E_NONESet successful.
OPEN_E_FAILSet failed.
OPEN_E_PARAMError in parameter passed.
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.2

Examples:
bgp_example.c.
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.

Parameters
[in]client_handleclient handle from registration API
[in]afaddress family
[in]indexindex of process history information
[out]pHistpointer to the history structure open_bgpDecProcHist_t
Return values
OPEN_E_NONESet successful
OPEN_E_PARAMError in parameter passed
OPEN_E_FAILSet failed
OPEN_E_NOT_FOUNDSet if the neighbor is not found
OPEN_E_INTERNALCatch for lower level failures

OpEN API Version: 1.6

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.

Parameters
[in]client_handleclient handle from registration API
[in]afaddress family
[out]numEntriesprocess history count
Return values
OPEN_E_NONESet successful
OPEN_E_PARAMError in parameter passed
OPEN_E_FAILSet failed
OPEN_E_NOT_FOUNDSet if the neighbor is not found
OPEN_E_INTERNALCatch for lower level failures

OpEN API Version: 1.6

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.

Parameters
[in]client_handleclient handle from registration API
[in]afaddress family
[out]numNetworksNumber of distinct prefixes in the local RIB
[out]numAsPathsNumber of AS paths in the local RIB
Return values
OPEN_E_NONESet successful.
OPEN_E_PARAMError in parameter passed.
OPEN_E_FAILFailed to get BGP global status
OPEN_E_INTERNALCatch for lower level failures

OpEN API Version: 1.6

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.

Parameters
[in]client_handleclient handle from registration API
[in]pTypeWhether to get the value configured directly on the peer or the active value, which may be inherited from a peer template
[in]remoteAddrIP address of peer
[in]scopeIdaddress scope
[out]connRetryIntervalconnection retry interval in seconds
Return values
OPEN_E_NONESet successful
OPEN_E_PARAMError in parameter passed
OPEN_E_FAILSet failed
OPEN_E_NOT_FOUNDSet if the neighbor is not found
OPEN_E_INTERNALCatch for lower level failures

OpEN API Version: 1.6

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.

Parameters
[in]client_handleclient handle from registration API
[in]peerAddrIP address of peer
[in]scopeIdaddress scope
[out]enableBfdOPEN_TRUE is BFD session is desired
Return values
OPEN_E_NONEGet successful
OPEN_E_NOT_FOUNDif the neighbor is not found
OPEN_E_FAILany other failure
OPEN_E_UNAVAILBFD feature is not supported on this platform
OPEN_E_PARAMError in parameter passed
Note
The function supports auto detected IPv6 remote peer on the specifed interface. To call the function for the peer, it is necessary to set remoteAddr parameter to 0 IPv6 address inside it and pass the scopeId as a valid interface.

OpEN API Version: 1.6

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.

Parameters
[in]client_handleclient handle from registration API
[in]remoteAddrIP address of peer
[in]scopeIdaddress scope
[in]afaddress family
[out]flapCountnumber of times the given peer state changed from established to idle
Return values
OPEN_E_NONESet successful
OPEN_E_PARAMError in parameter passed
OPEN_E_FAILSet failed
OPEN_E_INTERNALCatch for lower level failures
Note
Calling this API will return the flap count and clears the flap count of the neighbor

OpEN API Version: 1.6

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.

Parameters
[in]client_handleclient handle from registration API
[in]pTypeWhether to get the value configured directly on the peer or the active value, which may be inherited from a peer template
[in]remoteAddrIP address of peer
[in]scopeIdaddress scope
[out]bufdNamepassword Must be at least OPEN_BGP_MAX_PASSWORD + 1.
Return values
OPEN_E_NONESet successful
OPEN_E_PARAMError in parameter passed
OPEN_E_FAILSet failed
OPEN_E_INTERNALCatch for lower level failures

OpEN API Version: 1.6

open_error_t openapiBgpMapPeerPasswordMaxLengthGet ( openapiClientHandle_t client_handle,
uint32_t *  maxLen 
)

Get maximum length of password.

Parameters
[in]client_handleclient handle from registration API
[out]maxLenstring length maximum length OPEN_BGP_MAX_PASSWORD
Return values
OPEN_E_NONEString length Get successful.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.6

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.

Parameters
[in]client_handleclient handle from registration API
[in]remoteAddrIP address of peer
[in]scopeIdaddress scope
[out]bufdNameTCP MD5 password to set
[in]defValuetrue if interval is set to a non-default value
Return values
OPEN_E_NONESet successful
OPEN_E_PARAMError in parameter passed
OPEN_E_FAILSet failed
OPEN_E_NOT_FOUNDSet if the neighbor is not found
OPEN_E_INTERNALCatch for lower level failures
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.6

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.

Parameters
[in]client_handleclient handle from registration API
[in]afaddress family
[in]prevRemoteAddrIP address of previous peer. Pass NULL to get the first peer.
[in]prevScopeIdscope ID of previous peer
[out]remoteAddrIP address of next peer
[out]scopeId(optional) scope ID of next peer address
Return values
OPEN_E_NONESet successful.
OPEN_E_PARAMError in parameter passed.
OPEN_E_FAILFailed to get next peer address
OPEN_E_INTERNALLower-level error occurred

OpEN API Version: 1.6

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.

Parameters
[in]client_handleclient handle from registration API
[in]afaddress family
[in]prevRemoteAddrIP address of previous peer. Pass NULL to get the first peer.
[in]prevScopeIdscope ID of previous peer
[in]vrfVRF name. Use "" for default.
[out]remoteAddrIP address of next peer
[out]scopeId(optional) scope ID of next peer address
Return values
OPEN_E_NONESet successful.
OPEN_E_PARAMError in parameter passed.
OPEN_E_FAILFailed to get next peer address
OPEN_E_INTERNALLower-level error occurred
Note
The vrf parameter must be "" for IPv6 instances since VRF names are not supported for IPv6.

OpEN API Version: 1.15

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.

Parameters
[in]client_handleclient handle from registration API
[in]remoteAddrthe IP address of the peer
[in]scopeIdscope ID of the peer's IP address
[in]afaddress family of interest (only affects which minRouteAdvInterval is reported)
[out]statusthe status record to fill
Return values
OPEN_E_NONESet successful.
OPEN_E_PARAMError in parameter passed.
OPEN_E_FAILFailed to get status of given peer
OPEN_E_NOT_FOUNDNo peer with the given IP address
OPEN_E_INTERNALLower-level error occurred

OpEN API Version: 1.6

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.

Parameters
[in]client_handleClient handle from registration API
[in]vrfVRF name. Use "" for default. Maximum length L7_VRF_MAX_NAME_LEN
[in]remoteAddrThe IP address of the peer
[in]scopeIdScope ID of the peer's IP address
[in]afAddress family of interest (only affects which minRouteAdvInterval is reported)
[out]statusThe status record to fill
Return values
OPEN_E_NONESet successful.
OPEN_E_PARAMError in parameter passed.
OPEN_E_FAILFailed to get status of given peer
OPEN_E_NOT_FOUNDNo peer with the given IP address
OPEN_E_INTERNALLower-level error occurred

OpEN API Version: 1.15

open_error_t openapiBgpMaxPathsGet ( openapiClientHandle_t client_handle,
OPEN_AF_t  af,
bool  isIbgp,
uint32_t *  maxPaths 
)

Get the value of maximum Paths attribute.

Parameters
[in]client_handleclient handle from registration API
[in]afaddress family
[in]isIbgpif true, then selects ibgp else ebgp
[out]maxPathsstorage space for maximum path value
Return values
OPEN_E_NONEGet successful.
OPEN_E_FAILGet failed.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.2

Examples:
bgp_example.c.
open_error_t openapiBgpMaxPathsSet ( openapiClientHandle_t client_handle,
OPEN_AF_t  af,
bool  isIbgp,
uint32_t  maxPaths 
)

Set the value of maximum Paths attribute.

Parameters
[in]client_handleclient handle from registration API
[in]afaddress family
[in]isIbgpif true, then selects ibgp else ebgp
[in]maxPathsstorage space for maximum path value
-Minimum value OPENAPI_BGP4_MAXPATH_MIN
-Maximum value openapiBgpMaxPathsGet()
Return values
OPEN_E_NONESet successful.
OPEN_E_FAILSet failed.
OPEN_E_PARAMError in parameter passed.
Note
The maxPaths value is the maximum number of paths supported for the given platform. The maximum paths is essentially the maximum number of ECMP next hops supported for the active template. This value can be obtained by using the OpEN API openapiBgpMaxPathsGet() function.
Calling this API will change the running configuration of the switch

OpEN API Version: 1.2

Examples:
bgp_example.c.
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.

Parameters
[in]client_handleclient handle from registration API
[in]normalModetrue to add, false to remove
[in]useRmtrue if a route-map is specified
[in]addrip address
[in]pfxLenprefix length
[in]rmNameroute map name
-Maximum length OPENAPI_ROUTEMAP_NAME_SIZE_MAX
Return values
OPEN_E_NONESet successful.
OPEN_E_FAILSet failed.
OPEN_E_PARAMError in parameter passed.
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.2

Examples:
bgp_example.c.
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.

Parameters
[in]client_handleclient handle from registration API
[in]pTypeWhether to get the value configured directly on the peer or the active value, which may be inherited from a peer template
[in]remoteAddrthe peer's IP address
[in]scopeIdIf remoteAddr has link scope, internal interface number where address is valid
[in]afaddress family
[out]activatetrue if address family is active
Return values
OPEN_E_NONEGet successful.
OPEN_E_FAILGet failed.
OPEN_E_PARAMError in parameter passed.
OPEN_E_NOT_FOUNDSet if the neighbor is not found
Note
Available for ipv6 peers only.

OpEN API Version: 1.2

Examples:
bgp_example.c.
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.

Parameters
[in]client_handleclient handle from registration API
[in]remoteAddrthe peer's IP address
[in]scopeIdIf remoteAddr has link scope, internal interface number where address is valid
[in]afaddress family
[in]activatetrue if address family is active
[in]defValuetrue if interval is set to a non-default value
Return values
OPEN_E_NONESet successful.
OPEN_E_FAILSet failed.
OPEN_E_NOT_FOUNDSet if the neighbor is not found
OPEN_E_UNAVAILSet if there is a failure applying the configuration change
OPEN_E_PARAMError in parameter passed.
Note
Calling this API will change the running configuration of the switch.
Available for ipv6 peers only.

OpEN API Version: 1.2

Examples:
bgp_example.c.
open_error_t openapiBgpPeerAddressStringMaxLengthGet ( openapiClientHandle_t client_handle,
uint32_t *  maxLen 
)

Gets the BGP peer address name string length.

Parameters
[in]client_handleclient handle from registration API
[out]maxLenstring length maximum length OPEN_BGP_PEER_ADDR_STR_LENGTH
Return values
OPEN_E_NONEString length Get successful.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.6

open_error_t openapiBgpPeerAddrScopeCat ( openapiClientHandle_t client_handle,
open_buffdesc bufdName,
uint32_t  scopeId 
)

Utility to concatenate an address scope to a peer address.

Parameters
[in]client_handleclient handle from registration API
[in,out]bufdNameString representation of peer's IP address
[in]scopeIdaddress scope
Return values
OPEN_E_NONEGet successful
OPEN_E_PARAMError in parameter passed
Note
prints as <peer addr> interface <if-name>.
      This is only used for BGP peer addresses, the interface
      cannot be a loopback interface. 

OpEN API Version: 1.6

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.

Parameters
[in]client_handleclient handle from registration API
[in]pTypeWhether to get the value configured directly on the peer or the active value, which may be inherited from a peer template
[in]remoteAddrthe peer's IP address
[in]scopeIdIf remoteAddr has link scope, internal interface number where address is valid
[out]statusadmin status of the peer (start/stop)
Return values
OPEN_E_NONESet successful.
OPEN_E_FAILSet failed.
OPEN_E_PARAMError in parameter passed.
OPEN_E_NOT_FOUNDSet if the neighbor is not found
OPEN_E_INTERNALCatch for lower level failures
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.2

Examples:
bgp_example.c.
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.

Parameters
[in]client_handleclient handle from registration API
[in]remoteAddrthe peer's IP address
[in]scopeIdIf remoteAddr has link scope, internal interface number where address is valid
[in]statusadmin status of the peer (start/stop)
[in]defValueenable if status is set to a non-default value
Return values
OPEN_E_NONESet successful.
OPEN_E_FAILSet failed.
OPEN_E_PARAMError in parameter passed.
OPEN_E_NOT_FOUNDSet if the neighbor is not found
OPEN_E_INTERNALCatch for lower level failures
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.2

Examples:
bgp_example.c.
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.

Parameters
[in]client_handleclient handle from registration API
[in]vrfVRF name ("" for default)
[in]pTypeWhether to get the value configured directly on the peer or the active value, which may be inherited from a peer template
[in]remoteAddrthe peer's IP address
[in]scopeIdIf remoteAddr has link scope, internal interface number where address is valid
[out]statusadmin status of the peer (start/stop)
Return values
OPEN_E_NONESet successful.
OPEN_E_FAILSet failed.
OPEN_E_PARAMError in parameter passed.
OPEN_E_NOT_FOUNDSet if the neighbor is not found
OPEN_E_INTERNALCatch for lower level failures
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.16

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.

Parameters
[in]client_handleclient handle from registration API
[in]vrfVRF name ("" for default)
[in]remoteAddrthe peer's IP address
[in]scopeIdIf remoteAddr has link scope, internal interface number where address is valid
[in]statusadmin status of the peer (start/stop)
[in]defValueenable if status is set to a non-default value
Return values
OPEN_E_NONESet successful.
OPEN_E_FAILSet failed.
OPEN_E_PARAMError in parameter passed.
OPEN_E_NOT_FOUNDSet if the neighbor is not found
OPEN_E_INTERNALCatch for lower level failures
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.16

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.

Parameters
[in]client_handleclient handle from registration API
[in]pTypeWhether to get the value configured directly on the peer or the active value, which may be inherited from a peer template
[in]remoteAddrthe peer's IP address
[in]scopeIdIf remoteAddr has link scope, internal interface number where address is valid
[in]afaddress family
[out]intervaladvertisement interval (secs)
Return values
OPEN_E_NONEGet successful.
OPEN_E_FAILGet failed.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.2

Examples:
bgp_example.c.
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.

Parameters
[in]client_handleclient handle from registration API
[in]remoteAddrthe peer's IP address
[in]scopeIdIf remoteAddr has link scope, internal interface number where address is valid
[in]afaddress family
[in]intervaladvertisement interval (secs)
-Minimum value OPENAPI_BGP4_ADV_INTERVAL_MIN
-Maximum value OPENAPI_BGP4_ADV_INTERVAL_MAX
[in]defValuetrue if interval is set to a non-default value
Return values
OPEN_E_NONESet successful.
OPEN_E_FAILSet failed.
OPEN_E_PARAMError in parameter passed.
OPEN_E_NOT_FOUNDSet if the neighbor is not found
OPEN_E_UNAVAILSet if there is a failure applying the configuration change. Could possibly be due to an invalid route for the specified transport. For example, ipv4 routes not being supported over an ipv6 transport.
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.2

Examples:
bgp_example.c.
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.

Parameters
[in]client_handleclient handle from registration API
[in]scopeIdscope ID of the peer's IP address
[out]nbrPeerAddrIP address of detected peer
Return values
OPEN_E_NONEGet successful
OPEN_E_PARAMError in parameter passed
OPEN_E_FAILGet failed
OPEN_E_ERRORif the multiple peers are autodetected
OPEN_E_UNAVAILRFC 5549 feature is not supported on this platform
OPEN_E_INTERNALCatch for lower level failures

OpEN API Version: 1.6

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.

Parameters
[in]client_handleclient handle from registration API
[in]remoteAddrIP address of peer
[in]scopeIdaddress scope
[out]bufdNamethe description of the peer
Return values
OPEN_E_NONESet successful
OPEN_E_PARAMError in parameter passed
OPEN_E_FAILSet failed
OPEN_E_NOT_FOUNDSet if the neighbor is not found
OPEN_E_INTERNALCatch for lower level failures

OpEN API Version: 1.6

open_error_t openapiBgpPeerDescriptionNameMaxLengthGet ( openapiClientHandle_t client_handle,
uint32_t *  maxLen 
)

Gets the description name maximum length.

Parameters
[in]client_handleclient handle from registration API
[out]maxLenstring length maximum length OPEN_BGP_PEER_DESC_LENGTH
Return values
OPEN_E_NONEString length Get successful.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.6

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.

Parameters
[in]client_handleclient handle from registration API
[in]remoteAddrIP address of peer
[in]scopeIdaddress scope
[in]bufdNamethe description of the peer
[in]defValuetrue if interval is set to a non-default value
Return values
OPEN_E_NONESet successful.
OPEN_E_PARAMError in parameter passed.
OPEN_E_FAILSet failed.
OPEN_E_NOT_FOUNDif peer not found
OPEN_E_INTERNALcatch for lower level failures

OpEN API Version: 1.6

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.

Parameters
[in]client_handleclient handle from registration API
[in]vrfVRF name ("" for default)
[in]remoteAddrIP address of peer
[in]scopeIdaddress scope
[out]bufdNamethe description of the peer
Return values
OPEN_E_NONESet successful
OPEN_E_PARAMError in parameter passed
OPEN_E_FAILSet failed
OPEN_E_NOT_FOUNDSet if the neighbor is not found
OPEN_E_INTERNALCatch for lower level failures

OpEN API Version: 1.16

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.

Parameters
[in]client_handleclient handle from registration API
[in]vrfVRF name ("" for default)
[in]remoteAddrIP address of peer
[in]scopeIdaddress scope
[in]bufdNamethe description of the peer
[in]defValuetrue if interval is set to a non-default value
Return values
OPEN_E_NONESet successful.
OPEN_E_PARAMError in parameter passed.
OPEN_E_FAILSet failed.
OPEN_E_NOT_FOUNDif peer not found
OPEN_E_INTERNALcatch for lower level failures

OpEN API Version: 1.16

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.

Parameters
[in]client_handleclient handle from registration API
[in]pTypeWhether to get the value configured directly on the peer or the active value, which may be inherited from a peer template
[in]remoteAddrthe peer's IP address
[in]scopeIdIf remoteAddr has link scope, internal interface number where address is valid
[out]holdTimehold time (secs)
Return values
OPEN_E_NONEGet successful.
OPEN_E_FAILGet failed.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.2

Examples:
bgp_example.c.
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.

Parameters
[in]client_handleclient handle from registration API
[in]remoteAddrthe peer's IP address
[in]scopeIdIf remoteAddr has link scope, internal interface number where address is valid
[in]holdTimehold time (secs)
-Minimum value OPENAPI_BGP4_HOLD_TIME_MIN
-Maximum value OPENAPI_BGP4_HOLD_TIME_MAX
[in]defValuetrue if interval is set to a non-default value
Return values
OPEN_E_NONESet successful.
OPEN_E_FAILSet failed.
OPEN_E_PARAMError in parameter passed.
OPEN_E_NOT_FOUNDSet if the neighbor is not found
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.2

Examples:
bgp_example.c.
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.

Parameters
[in]client_handleclient handle from registration API
[in]remoteAddrIP address of peer
[in]scopeIdaddress scope
[in]bufdNamethe template name
Return values
OPEN_E_NONESet successful
OPEN_E_PARAMError in parameter passed
OPEN_E_FAILSet failed
OPEN_E_NOT_FOUNDSet if the neighbor is not found
OPEN_E_INTERNALCatch for lower level failures

OpEN API Version: 1.6

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.

Parameters
[in]client_handleclient handle from registration API
[in]remoteAddrIP address of peer
[in]scopeIdaddress scope
[in]bufdNametemplate name
[in]defValuetrue if interval is set to a non-default value
Return values
OPEN_E_NONESet successful
OPEN_E_PARAMError in parameter passed
OPEN_E_FAILSet failed
OPEN_E_NOT_FOUNDSet if the neighbor is not found
OPEN_E_INTERNALCatch for lower level failures
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.6

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.

Parameters
[in]client_handleclient handle from registration API
[in]pTypeWhether to get the value configured directly on the peer or the active value, which may be inherited from a peer template
[in]remoteAddrthe peer's IP address
[in]scopeIdIf remoteAddr has link scope, internal interface number where address is valid
[out]keepAlivekeep alive time (secs)
Return values
OPEN_E_NONEGet successful.
OPEN_E_FAILGet failed.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.2

Examples:
bgp_example.c.
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.

Parameters
[in]client_handleclient handle from registration API
[in]remoteAddrthe peer's IP address
[in]scopeIdIf remoteAddr has link scope, internal interface number where address is valid
[in]keepAlivekeep alive time (secs)
-Minimum value OPENAPI_BGP4_KEEP_ALIVE_TIME_MIN
-Maximum value OPENAPI_BGP4_KEEP_ALIVE_TIME_MAX
[in]defValuetrue if interval is set to a non-default value
Return values
OPEN_E_NONESet successful.
OPEN_E_FAILSet failed.
OPEN_E_PARAMError in parameter passed.
OPEN_E_NOT_FOUNDSet if the neighbor is not found
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.2

Examples:
bgp_example.c.
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.

Parameters
[in]client_handleclient handle from registration API
[in]pTypeWhether to get the value configured directly on the peer or the active value, which may be inherited from a peer template
[in]remoteAddrthe peer's IP address
[in]scopeIdIf remoteAddr has link scope, internal interface number where address is valid
[in]afaddress family
[out]enableenabled if BGP uses its own address as the BGP NEXT HOP in advertisements to this peer
Return values
OPEN_E_NONEGet successful.
OPEN_E_FAILGet failed.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.2

Examples:
bgp_example.c.
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.

Parameters
[in]client_handleclient handle from registration API
[in]remoteAddrthe peer's IP address
[in]scopeIdIf remoteAddr has link scope, internal interface number where address is valid
[in]afaddress family
[in]enableenabled if BGP uses its own address as the BGP NEXT HOP in advertisements to this peer
[in]defValuetrue if enable is set to a non-default value
Return values
OPEN_E_NONESet successful.
OPEN_E_FAILSet failed.
OPEN_E_PARAMError in parameter passed.
OPEN_E_NOT_FOUNDSet if the neighbor is not found
Note
Calling this API will change the running configuration of the switch.
External peers cannot be configured for next-hop-self.

OpEN API Version: 1.2

Examples:
bgp_example.c.
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.

Parameters
[in]client_handleclient handle from registration API
[in]pTypeWhether to get the value configured directly on the peer or the active value, which may be inherited from a peer template
[in]remoteAddrthe peer's IP address
[in]scopeIdIf remoteAddr has link scope, internal interface number where address is valid
[in]afaddress family
[out]pfxLimitmaximum number of prefixes
[out]thresholdthreshold percentage for warning generation
[out]warningOnlytrue if new prefixes are allowed, but give warning message when limit exceeded.
Return values
OPEN_E_NONEGet successful.
OPEN_E_FAILGet failed.
OPEN_E_PARAMError in parameter passed.
Note
The peerAddr and scopeId fields specify which peer to examine.

OpEN API Version: 1.2

Examples:
bgp_example.c.
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.

Parameters
[in]client_handleclient handle from registration API
[in]remoteAddrthe peer's IP address
[in]scopeIdIf remoteAddr has link scope, internal interface number where address is valid
[in]afaddress family
[out]pfxLimitmaximum number of prefixes (see notes)
[in]thresholdthreshold percentage for warning generation
[in]warningOnlytrue if new prefixes are allowed, but give warning message when limit exceeded.
[in]defValuetrue if source is set to a non-default value
Return values
OPEN_E_NONESet successful.
OPEN_E_FAILSet failed.
OPEN_E_PARAMError in parameter passed.
OPEN_E_NOT_FOUNDSet if the neighbor is not found
OPEN_E_UNAVAILSet if there is a failure applying the configuration change. Could possibly be due to an invalid route for the specified transport. For example, ipv4 routes not being supported over an ipv6 transport.
Note
The peerAddr and scopeId fields specify which peer to configure.
pfxLimit - the maximum routes are platform specific.
pfxLimit - use openapiBgpIpv4RouteMax() to determine Ipv4 route max.
pfxLimit - use openapiBgpIpv6RouteMax() to determine Ipv6 route max.
pfxLimit - use OPEN_BGP_NBR_MAX_PFX_NOLIMIT for unlimited (platform max).
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.2

Examples:
bgp_example.c.
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.

Parameters
[in]client_handleclient handle from registration API
[in]remoteAddrthe peer's IP address
[in]scopeIdIf remoteAddr has link scope, internal interface number where address is valid
[out]remoteASAS number of peer
Return values
OPEN_E_NONESet successful.
OPEN_E_FAILSet failed.
OPEN_E_PARAMError in parameter passed.
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.2

Examples:
bgp_example.c.
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.

Parameters
[in]client_handleclient handle from registration API
[in]remoteAddrthe peer's IP address
[in]scopeIdIf remoteAddr has link scope, internal interface number where address is valid
[in]remoteASAS number of peer
-Minimum value 0
-Maximum value signed integer (65535)
Return values
OPEN_E_NONEset successful.
OPEN_E_FAILset failed.
OPEN_E_PARAMerror in parameter passed.
OPEN_E_FULLexceeded the maximum number of peers
OPEN_E_UNAVAILif a peer is already configured at this IP address but with a different AS number.
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.2

Examples:
bgp_example.c.
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.

Parameters
[in]client_handleclient handle from registration API
[in]vrfVRF name ("" for default VRF)
[in]remoteAddrthe peer's IP address
[in]scopeIdIf remoteAddr has link scope, internal interface number where address is valid
[out]remoteASAS number of peer
Return values
OPEN_E_NONESet successful.
OPEN_E_FAILSet failed.
OPEN_E_PARAMError in parameter passed.
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.16

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.

Parameters
[in]client_handleclient handle from registration API
[in]vrfVRF name ("" for default VRF)
[in]remoteAddrthe peer's IP address
[in]scopeIdIf remoteAddr has link scope, internal interface number where address is valid
[in]remoteASAS number of peer
-Minimum value 0
-Maximum value signed integer (65535)
Return values
OPEN_E_NONEset successful.
OPEN_E_FAILset failed.
OPEN_E_PARAMerror in parameter passed.
OPEN_E_FULLexceeded the maximum number of peers
OPEN_E_UNAVAILif a peer is already configured at this IP address but with a different AS number.
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.16

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.

Parameters
[in]client_handleclient handle from registration API
[in]pTypeWhether to get the value configured directly on the peer or the active value, which may be inherited from a peer template
[in]remoteAddrthe peer's IP address
[in]scopeIdIf remoteAddr has link scope, internal interface number where address is valid
[out]sourceinternal interface number
Return values
OPEN_E_NONEGet successful.
OPEN_E_FAILGet failed.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.2

Examples:
bgp_example.c.
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.

Parameters
[in]client_handleclient handle from registration API
[in]remoteAddrthe peer's IP address
[in]scopeIdIf remoteAddr has link scope, internal interface number where address is valid
[in]sourceinternal interface number
[in]defValuetrue if source is set to a non-default value
Return values
OPEN_E_NONESet successful.
OPEN_E_FAILSet failed.
OPEN_E_PARAMError in parameter passed.
OPEN_E_NOT_FOUNDSet if the neighbor is not found
Note
Calling this API will change the running configuration of the switch.
Source can also be a loopback interface.

OpEN API Version: 1.2

Examples:
bgp_example.c.
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.

Parameters
[in]client_handleclient handle from registration API
[in]addif true, customer is setting or adding options
[in]protoNameredistribution route name
-Maximum length openapiRouteProtoNameLenMax()
[in]matchSetif true, set OSPF match
[in]matchBitsmatch options for OSPF
[in]metricSetif true, turn metric options on
[in]metricValueSetif true, use new metric value
[in]metricValuenew metric value
-Minimum value 0
-Maximum value unsigned integer (4294967295)
[in]routeMapSetif true, select optional route map
[in]afaddress family
[in]rmNameroute map tag
-Maximum length OPENAPI_ROUTEMAP_NAME_SIZE_MAX
Return values
OPEN_E_NONEset successful.
OPEN_E_FAILset failed.
OPEN_E_PARAMerror in parameter passed.
OPEN_E_FULLif route-map couldn't be created
OPEN_E_NOT_FOUNDif the route-map name doesn't match (no form)
OPEN_E_UNAVAILif the peer address requires a non-zero scope ID
Note
The match arguments are ignored if protocol is not REDIST_RT_OSPF.
If disabling redistribution, don't clear a distribute list, if set, since a distribute list is configured with a separate call.

OpEN API Version: 1.2

Examples:
bgp_example.c.
open_error_t openapiBgpTemplateAFClear ( openapiClientHandle_t client_handle,
open_buffdesc bufdName,
OPEN_AF_t  af 
)

Clear the address-family of given template.

Parameters
[in]client_handleclient handle from registration API
[in]bufdNametemplate name
-Maximum length OPEN_BGP_MAX_TEMPLATE_NAME
[in]afaddress family
Return values
OPEN_E_NONEset successful
OPEN_E_FAILset failed
OPEN_E_PARAMerror in parameter passed
OPEN_E_INTERNALcatch for lower level failures
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.6

open_error_t openapiBgpTemplateAFSet ( openapiClientHandle_t client_handle,
open_buffdesc bufdName,
OPEN_AF_t  af 
)

Set the address-family of given template.

Parameters
[in]client_handleclient handle from registration API
[in]bufdNametemplate name
-Maximum length OPEN_BGP_MAX_TEMPLATE_NAME
[in]afaddress family
Return values
OPEN_E_NONEset successful
OPEN_E_FAILset failed
OPEN_E_PARAMerror in parameter passed
OPEN_E_INTERNALcatch for lower level failures
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.6

open_error_t openapiBgpTemplateDelete ( openapiClientHandle_t client_handle,
open_buffdesc bufdName 
)

Clear the template name and inuse flag.

Parameters
[in]client_handleclient handle from registration API
[in]bufdNametemplate name
-Maximum length OPEN_BGP_MAX_TEMPLATE_NAME
Return values
OPEN_E_NONEset successful
OPEN_E_FAILset failed
OPEN_E_PARAMerror in parameter passed
OPEN_E_NOT_FOUNDset if the template is not found
OPEN_E_UNAVAILset if there is a failure applying the configuration change
OPEN_E_INTERNALcatch for lower level failures
Note
Calling this API will change the running configuration of the switch Search for the given template name and if found, reset all the fields and reset the inUse flag.

OpEN API Version: 1.6

open_error_t openapiBgpTemplateNameMaxLengthGet ( openapiClientHandle_t client_handle,
uint32_t *  maxLen 
)

Gets the Template Name string length.

This length is used to allocate and initialize the open_buffdesc type argument buffers used by various BGP OpEN APIs.

Parameters
[in]client_handleclient handle from registration API
[out]maxLenstring length maximum length OPEN_BGP_MAX_TEMPLATE_NAME
Return values
OPEN_E_NONEString length Get successful.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.6

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.

Parameters
[in]client_handleclient handle from registration API
[in]bufdNametemplate name
-Maximum length OPEN_BGP_MAX_TEMPLATE_NAME
[in]afaddress family
Return values
OPEN_E_NONEset successful
OPEN_E_FAILset failed
OPEN_E_PARAMerror in parameter passed
OPEN_E_INTERNALcatch for lower level failures
Note
Calling this API will change the running configuration of the switch

OpEN API Version: 1.6

open_error_t openapiBgpTemplateSet ( openapiClientHandle_t client_handle,
open_buffdesc bufdName 
)

Set the template name and inuse flag.

Parameters
[in]client_handleclient handle from registration API
[in]bufdNametemplate name
-Maximum length OPEN_BGP_MAX_TEMPLATE_NAME
Return values
OPEN_E_NONEset successful
OPEN_E_FAILset failed
OPEN_E_PARAMerror in parameter passed
OPEN_E_FULLexceeded the maximum number of templates
OPEN_E_INTERNALcatch for lower level failures
Note
Calling this API will change the running configuration of the switch Find the first unused slot and set the name and the inUse flag. If we find that the template name already exists then simply make sure the inUse flag is set.

OpEN API Version: 1.6