Open Ethernet Networking (OpEN) API Guide and Reference Manual
3.6.0.3
|
Data Structures | |
struct | openBfdEndpoint_s |
struct | openBfdSessionInfo_s |
The BFD Session data. More... | |
struct | openBfdSessionKey_s |
The key into the BFD database. More... | |
struct | openBfdSessionStats_s |
struct | openNextHop_s |
struct | openrBestRouteChangeMsg_s |
Message structure for forwarding table change notifications. More... | |
struct | openRmMatchParams_s |
struct | openRmSetParams_s |
struct | openRoute_s |
struct | openRouteChange_s |
struct | openRouteChangeList_s |
struct | openrPolicyChangeMsg_s |
struct | openrRouterEventMsg_s |
Macros | |
#define | OPEN_BFD_MAX_REG_PROT 2 /* BGP and OSPF */ |
#define | OPEN_BFD_SESSION_ID_INVALID (~0) |
#define | OPEN_RPPI_CLIENT_NAME_MAX_LEN (32) |
#define | OPEN_VRF_MAX_NAME_LEN 64 |
The max length in bytes of a VRF name, not including the null termination. | |
#define | OPENR_BRC_NAME_LEN 16 |
#define | OPENR_NUM_BEST_ROUTES_PER_GET 50 |
#define | OPENR_PLAT_MAX_ECMP_NEXTHOPS 48 |
#define | OPENR_POLICY_CLIENT_NAME_LEN 16 |
#define | OPENR_ROUTING_PROTOCOL_NAME_LEN 10 |
#define | OPENR_RTR_GBL_MSG_LEN (sizeof(openrRouterEventMsg_t) - sizeof(uint32_t)) |
#define | OPENR_RTR_INTF_MSG_LEN (sizeof(openrRouterEventMsg_t)) |
#define | ROUTER_EVENT_CLIENT_ADDR "/tmp/rppi_rec.%04u" |
#define | RPPI_BRC_ADDR "/tmp/rppi_brc.%04u" |
The "address" of the client end of the UNIX datagram socket opened to receive forwarding table change notifications. More... | |
#define | RPPI_MSG_SIZE_MAX 256 |
#define | RPPI_POLICY_CLIENT_ADDR "/tmp/rppi_pc.%04u" |
#define | SYNCDB_OPENAPI_BFD "OpEN API BFD" |
#define | SYNCDB_OPENAPI_BFD_VERSION 1 |
Typedefs | |
typedef struct openBfdEndpoint_s | openBfdEndpoint_t |
typedef struct openBfdSessionInfo_s | openBfdSessionInfo_t |
The BFD Session data. | |
typedef struct openBfdSessionKey_s | openBfdSessionKey_t |
The key into the BFD database. More... | |
typedef struct openBfdSessionStats_s | openBfdSessionStats_t |
typedef struct openNextHop_s | openNextHop_t |
typedef struct openrBestRouteChangeMsg_s | openrBestRouteChangeMsg_t |
Message structure for forwarding table change notifications. More... | |
typedef struct openRmMatchParams_s | openRmMatchParams_t |
typedef struct openRmSetParams_s | openRmSetParams_t |
typedef struct openRoute_s | openRoute_t |
typedef struct openRouteChange_s | openRouteChange_t |
typedef struct openRouteChangeList_s | openRouteChangeList_t |
typedef struct openrPolicyChangeMsg_s | openrPolicyChangeMsg_t |
typedef struct openrRouterEventMsg_s | openrRouterEventMsg_t |
Enumerations | |
enum | OPEN_BFD_ADMIN_MODE_t { OPEN_BFD_DISABLE = 0, OPEN_BFD_ENABLE = 1 } |
enum | OPEN_BFD_DIAG_CODE_t { OPEN_BFD_DIAG_CODE_NONE, OPEN_BFD_DIAG_CODE_CTRL_DETECT_TIME_EXPIRED, OPEN_BFD_DIAG_CODE_ECHO_FAILED, OPEN_BFD_DIAG_CODE_NEIGHBOR_SIGNALED_SESSION_DOWN, OPEN_BFD_DIAG_CODE_FORWARDING_PLANE_RESET, OPEN_BFD_DIAG_CODE_PATH_DOWN, OPEN_BFD_DIAG_CODE_CONCATENATED_PATH_DOWN, OPEN_BFD_DIAG_CODE_ADMIN_DOWN, OPEN_BFD_DIAG_CODE_REVERSE_CONCATENATED_PATH_DOWN, OPEN_BFD_DIAG_CODE_MIS_CONNECTIVITY_DEFECT } |
enum | OPEN_BFD_SESSION_STATE_t { OPEN_BFD_SESSION_STATE_ADMIN_DOWN = 0, OPEN_BFD_SESSION_STATE_DOWN = 1, OPEN_BFD_SESSION_STATE_INIT = 2, OPEN_BFD_SESSION_STATE_UP = 3 } |
enum | OPEN_INTF_IP_ADDR_METHOD_t { OPEN_INTF_IP_ADDR_METHOD_NONE = 0, OPEN_INTF_IP_ADDR_METHOD_CONFIG = 1, OPEN_INTF_IP_ADDR_METHOD_DHCP = 2 } |
IP address configuration method. More... | |
enum | OPEN_NSF_PROTOCOL_t { OPEN_NSF_PROTOCOL_OSPF = 0x1, OPEN_NSF_PROTOCOL_RIP = 0x2, OPEN_NSF_PROTOCOL_BGP = 0x4, OPEN_NSF_PROTOCOL_LAST = 0x8 } |
enum | OPEN_ROUTE_EVENT_t { OPEN_ADD_ROUTE = 0, OPEN_DELETE_ROUTE = 1, OPEN_CHANGE_ROUTE = 2 } |
OPEN uses these 3 enumerators to indicate the addition, deletion, or change to the best route for a given destination. More... | |
enum | OPEN_ROUTING_POLICY_CHANGE_t { OPEN_POLICY_CHANGE = 1, OPEN_POLICY_DELETE = 2 } |
Type of a policy change notification. More... | |
enum | OPEN_ROUTING_POLICY_TYPE_t { OPEN_POLICY_ROUTE_MAP = 1, OPEN_POLICY_PREFIX_LIST = 2, OPEN_POLICY_AS_PATH_LIST = 4, OPEN_POLICY_ACL_ROUTE_FILTER = 8 } |
These values must be powers of 2. More... | |
enum | openBfdTunnelType_t { OPEN_BFD_TUNNEL_TYPE_RAW, OPEN_BFD_TUNNEL_TYPE_UDP, OPEN_BFD_TUNNEL_TYPE_COUNT } |
enum | OPENR_MESSAGE_TYPE_t { OPENR_KEEPALIVE = 1, OPENR_BEST_ROUTE_CHANGE = 10, OPENR_RTR_ENABLE = 101, OPENR_RTR_DISABLE = 102, OPENR_RTR_STARTUP_DONE = 103, OPENR_RTR_INTF_CREATE = 104, OPENR_RTR_INTF_DELETE = 105, OPENR_RTR_INTF_ENABLE = 106, OPENR_RTR_INTF_ENABLE_PENDING = 107, OPENR_RTR_INTF_DISABLE = 108, OPENR_RTR_INTF_DISABLE_PENDING = 109, OPENR_RTR_INTF_ADDR_CHANGE = 110, OPENR_RTR_INTF_MTU = 111, OPENR_RTR_INTF_BW_CHANGE = 112, OPENR_RTR_INTF_HOST_MODE = 113, OPENR_RTR_INTF_CFG_CHANGE = 114, OPENR_RTR6_ENABLE = 201, OPENR_RTR6_DISABLE = 202, OPENR_RTR6_STARTUP_DONE = 203, OPENR_RTR6_INTF_CREATE = 204, OPENR_RTR6_INTF_DELETE = 205, OPENR_RTR6_INTF_ENABLE = 206, OPENR_RTR6_INTF_DISABLE = 207, OPENR_RTR6_INTF_ADDR_CHANGE = 208, OPENR_RTR6_INTF_MTU = 209, OPENR_RTR6_INTF_BW_CHANGE = 210, OPENR_RTR6_INTF_HOST_MODE = 211, OPENR_POLICY_CHANGE = 300 } |
Values that go in the Message Type field of event messages sent to applications. More... | |
Functions | |
open_error_t | openapiArpResolve (openapiClientHandle_t *client_handle, uint32_t vrfId, open_inet_addr_t *nh_addr, open_buffdesc *mac, uint32_t cbParm1, uint32_t cbParm2, uint32_t cbParm3) |
Resolve ARP for the given IP Address. More... | |
open_error_t | openapiBestRouteChangeNextGet (openapiClientHandle_t *client_handle, uint32_t clientId, OPEN_ROUTE_EVENT_t *chType, openRoute_t *route, open_buffdesc *nextHopListBuff) |
Get the next best route change pending for a specific client. More... | |
open_error_t | openapiBestRouteChangeNextGetMult (openapiClientHandle_t *client_handle, uint32_t clientId, uint32_t numChanges, open_buffdesc *routeListBuff) |
Get the next best route change pending for a specific client. More... | |
open_error_t | openapiBestRouteEventDeregister (openapiClientHandle_t *client_handle, uint32_t clientId) |
Deregister for notifications when there are changes to one or more routes used for IP forwarding. More... | |
open_error_t | openapiBestRouteEventRegister (openapiClientHandle_t *client_handle, OPEN_AF_t family, uint32_t pid, uint32_t vrfId, open_buffdesc *clientName, uint32_t *clientId) |
Register to be notified when there are changes to one or more routes used for IP forwarding. More... | |
open_error_t | openapiBestRouteEventRegisterVr (openapiClientHandle_t *client_handle, uint32_t vrfId, OPEN_AF_t family, uint32_t pid, open_buffdesc *clientName, uint32_t *clientId) |
Register to be notified when there are changes to one or more routes used for IP forwarding. More... | |
open_error_t | openapiBestRouteLookup (openapiClientHandle_t *client_handle, open_inet_addr_t destAddr, openRoute_t *route, open_buffdesc *nextHopListBuff) |
Find the longest prefix match for a given destination IP address. More... | |
open_error_t | openapiBestRouteNextGet (openapiClientHandle_t *client_handle, OPEN_AF_t family, openRoute_t *routeEntry, open_buffdesc *nextHopListBuff) |
Return next best route in the routing table. More... | |
open_error_t | openapiBestRouteNextGetVr (openapiClientHandle_t *client_handle, OPEN_AF_t family, uint32_t vrfId, openRoute_t *openRoute, open_buffdesc *nextHopListBuff) |
Return next best route in the specified VRF routing table. More... | |
open_error_t | openapiBfdModeSet (OPEN_BFD_ADMIN_MODE_t mode) |
Set the BFD Global Admin Mode. More... | |
open_error_t | openapiBfdSessionCreate (openapiClientHandle_t *client_handle, openBfdEndpoint_t *ep, uint32_t *id) |
Create a BFD Session. More... | |
open_error_t | openapiBfdSessionDelete (openapiClientHandle_t *client_handle, openBfdEndpoint_t *ep, uint32_t id) |
Delete a BFD Session. More... | |
open_error_t | openapiBfdSessionFind (openapiClientHandle_t *client_handle, open_inet_addr_t peer, uint32_t *id) |
Get the BFD Session Identifier for a given peer by IP address. More... | |
open_error_t | openapiBfdSessionInfoGet (openapiClientHandle_t *client_handle, uint32_t id, openBfdSessionInfo_t *info) |
Get the BFD session information. More... | |
open_error_t | openapiBfdSessionStatsGet (openapiClientHandle_t *client_handle, uint32_t id, openBfdSessionStats_t *stats) |
Get the BFD statistics associated with the given session. More... | |
open_error_t | openapiExternalRoutesSaveDeRegister (openapiClientHandle_t *client_handle, OPEN_AF_t addressFamily, uint32_t vrfId, uint32_t protoId) |
De-Register with RTO to save External routes to SyncDB. More... | |
open_error_t | openapiExternalRoutesSaveRegister (openapiClientHandle_t *client_handle, OPEN_AF_t addressFamily, uint32_t vrfId, uint32_t protoId) |
Register with RTO to save External routes to SyncDB. More... | |
open_error_t | openapiIntfBandwidthGet (openapiClientHandle_t *client_handle, OPEN_AF_t af, uint32_t intf, uint32_t *bandwidth) |
Get the bandwidth value configure on the device ( ** to change **) More... | |
open_error_t | openapiIntfBestRoutesNextGet (openapiClientHandle_t *client_handle, uint32_t clientId, uint32_t intIfNum, uint32_t numChanges, open_buffdesc *routeListBuff) |
Get the next set of best-routes on an interface for a specific client. More... | |
open_error_t | openapiIntfIpMtuGet (openapiClientHandle_t *client_handle, OPEN_AF_t af, uint32_t intf, uint32_t *ipMtu) |
Get the configured ipmtu value for the router interface given an address family. More... | |
open_error_t | openapiIntfIsUnnumbered (openapiClientHandle_t *client_handle, uint32_t intIfNum, OPEN_BOOL_t *isUnnumbered) |
Check if a given interface is unnumbered. More... | |
open_error_t | openapiIntfNameSizeGet (openapiClientHandle_t *client_handle, uint32_t *ifNameSize) |
Get the maximum length of an OPEN interface name. More... | |
open_error_t | openapiIp6RouterPreferenceGet (openapiClientHandle_t *client_handle, OPEN_PREF_INDICES_t index, uint32_t *pref) |
Get IPv6 router preference associated with the specified protocol. More... | |
open_error_t | openapiIp6RouterPreferenceSet (openapiClientHandle_t *client_handle, OPEN_PREF_INDICES_t index, uint32_t pref) |
Set IPV6 router preference associated with the specified protocol. More... | |
open_error_t | openapiIpMapInitialRoutesDone (openapiClientHandle_t *client_handle, uint32_t vrfId, OPEN_NSF_PROTOCOL_t protocol) |
A protocol that controls NSF routes calls this function to indicate it has updated RTO with all its initial routes after a warm restart. More... | |
open_error_t | openapiIpMapIsBackupElectedGet (openapiClientHandle_t *client_handle, OPEN_BOOL_t *isBackupElected) |
Check if backup is elected. More... | |
open_error_t | openapiIpMapNsfRouteSource (openapiClientHandle_t *client_handle, uint32_t vrfId, OPEN_NSF_PROTOCOL_t protocol) |
Indicate that a protocol intends to add routes to RTO following a warm restart. More... | |
open_error_t | openapiIpRouterPreferenceGet (openapiClientHandle_t *client_handle, OPEN_PREF_INDICES_t index, uint32_t *pref) |
Get router preference associated with the specified protocol. More... | |
open_error_t | openapiIpRouterPreferenceGetVr (openapiClientHandle_t *client_handle, uint32_t vrfId, OPEN_PREF_INDICES_t index, uint32_t *pref) |
Get router preference associated with the specified protocol in a VRF. More... | |
open_error_t | openapiIpRouterPreferenceSet (openapiClientHandle_t *client_handle, OPEN_PREF_INDICES_t index, uint32_t pref) |
Set router preference associated with the specified protocol. More... | |
open_error_t | openapiIpRouterProtoNameNextGet (openapiClientHandle_t *client_handle, uint32_t protoId, open_buffdesc *protoName, uint32_t *nextProtoId) |
Get the protocol name assigned to the associated protocol id. More... | |
open_error_t | openapiKernelArpAdd (openapiClientHandle_t *client_handle, uint32_t vrfId, open_inet_addr_t *dest_addr, open_buffdesc *mac, int32_t stkIfIndex, uint16_t state) |
Add the ARP entry. More... | |
open_error_t | openapiKernelArpDelete (openapiClientHandle_t *client_handle, uint32_t vrfId, open_inet_addr_t *dest_addr, int32_t stkIfIndex) |
Delete the ARP entry. More... | |
open_error_t | openapiKernelRouteAddVr (openapiClientHandle_t *client_handle, uint32_t vrfId, openRoute_t *routeEntry, open_buffdesc *nextHopListBuff) |
Add a kernel route to the common routing table. More... | |
open_error_t | openapiKernelRouteDelVr (openapiClientHandle_t *client_handle, uint32_t vrfId, openRoute_t *routeEntry, open_buffdesc *nextHopListBuff) |
Delete a kernel route from the common routing table. More... | |
open_error_t | openapiMaxNextHopsGet (openapiClientHandle_t *client_handle, uint32_t *maxNextHops) |
Get the maximum number of next hops in an ECMP route. More... | |
open_error_t | openapiMaxRoutingInterfacesGet (openapiClientHandle_t *client_handle, uint32_t *routingIntfMax) |
Get the maximum number of OPEN routing interfaces. More... | |
open_error_t | openapiPlatRtrRouteMaxEntriesGet (openapiClientHandle_t *client_handle, uint32_t *pval) |
Get the number of IPv4 routes for this platform. More... | |
open_error_t | openapiPlatRtrRouteMaxEqualCostEntriesGet (openapiClientHandle_t *client_handle, uint32_t *pval) |
Get the number of ECMP MAX PATHS FROM PLATFORM params. More... | |
open_error_t | openapiPolicyChangeAck (openapiClientHandle_t *client_handle, uint32_t clientId, uint32_t seqNo) |
Acknowledge receipt of a policy change notification. More... | |
open_error_t | openapiPrefixFind (openapiClientHandle_t *client_handle, open_inet_addr_t destPrefix, uint32_t pfxLen, openRoute_t *route, open_buffdesc *nextHopListBuff) |
Find the best route with a specific prefix. More... | |
open_error_t | openapiPrefixFindVr (openapiClientHandle_t *client_handle, uint32_t vrfId, open_inet_addr_t destPrefix, uint32_t pfxLen, openRoute_t *route, open_buffdesc *nextHopListBuff) |
Find the best route with a specific prefix. More... | |
int | openapiPrefixListApply (openapiClientHandle_t *client_handle, open_buffdesc *pfxListName, open_inet_addr_t prefix, uint32_t pfxLen) |
Apply a prefix list with a given name to a given prefix. More... | |
open_error_t | openapiRouteAdd (openapiClientHandle_t *client_handle, openRoute_t *routeEntry, open_buffdesc *nextHopListBuff) |
Add a route to the common routing table. More... | |
open_error_t | openapiRouteAddVr (openapiClientHandle_t *client_handle, uint32_t vrfId, openRoute_t *routeEntry, open_buffdesc *nextHopListBuff) |
Add a route to the common routing table. More... | |
open_error_t | openapiRouteDel (openapiClientHandle_t *client_handle, openRoute_t *routeEntry) |
Delete a route from the common routing table. More... | |
open_error_t | openapiRouteDelVr (openapiClientHandle_t *client_handle, uint32_t vrfId, openRoute_t *routeEntry, open_buffdesc *nextHopListBuff) |
Delete a route from the common routing table. More... | |
int | openapiRouteMapApply (openapiClientHandle_t *client_handle, open_buffdesc *routeMapName, openRmMatchParams_t *matchParams, openRmSetParams_t *setParams) |
Apply a route map with a given name to a route whose attributes are set in the matchParams argument. More... | |
open_error_t | openapiRouteMod (openapiClientHandle_t *client_handle, openRoute_t *routeEntry, open_buffdesc *nextHopListBuff) |
Modify an existing route to the common routing table. More... | |
open_error_t | openapiRouteModVr (openapiClientHandle_t *client_handle, uint32_t vrfId, openRoute_t *routeEntry, open_buffdesc *nextHopListBuff) |
Modify an existing route to the common routing table. More... | |
open_error_t | openapiRouteNextGet (openapiClientHandle_t *client_handle, OPEN_AF_t family, openRoute_t *route, open_buffdesc *nextHopListBuff) |
Return next route in the routing table. More... | |
open_error_t | openapiRouteProtoNameLenMax (openapiClientHandle_t *client_handle, uint32_t *protoNameLen) |
Get the maximum length of a protocol name. More... | |
open_error_t | openapiRouterEventAcknowledge (openapiClientHandle_t *client_handle, uint32_t vrfId, uint32_t clientId, uint32_t eventId) |
Acknowledge a router event. More... | |
open_error_t | openapiRouterEventDeregister (openapiClientHandle_t *client_handle, uint32_t vrfId, uint32_t clientId) |
Deregister for routing events. More... | |
open_error_t | openapiRouterEventRegister (openapiClientHandle_t *client_handle, OPEN_AF_t family, uint32_t pid, uint32_t vrfId, open_buffdesc *clientName, uint32_t *clientId) |
Register for routing events. More... | |
open_error_t | openapiRouteTypeDeregister (openapiClientHandle_t *client_handle, uint32_t addressFamily, uint32_t routeType) |
Deregister a route type. More... | |
open_error_t | openapiRouteTypeInfoGet (openapiClientHandle_t *client_handle, uint32_t routeType, open_buffdesc *protoName, open_buffdesc *routeTypeName) |
For a given route type, get the protocol and route type names. More... | |
open_error_t | openapiRouteTypeNameLenMax (openapiClientHandle_t *client_handle, uint32_t *routeTypeNameLen) |
Get the maximum length of a protocol name. More... | |
open_error_t | openapiRouteTypeRegister (openapiClientHandle_t *client_handle, OPEN_AF_t addressFamily, uint32_t protoId, open_buffdesc *routeTypeName, open_buffdesc *routeTypeCode, uint32_t *routeType) |
Register a new route type. More... | |
open_error_t | openapiRoutingPolicyRegister (openapiClientHandle_t *client_handle, open_buffdesc *clientName, uint32_t pid, uint32_t policyTypeMask, uint32_t *clientId) |
Register to be notified when there are routing policy changes. More... | |
open_error_t | openapiRoutingProtocolDeregister (openapiClientHandle_t *client_handle, uint32_t vrfId, uint32_t addressFamily, uint32_t protoId) |
Deregister a routing protocol. More... | |
open_error_t | openapiRoutingProtocolRegister (openapiClientHandle_t *client_handle, uint32_t vrfId, OPEN_AF_t addressFamily, open_buffdesc *protoName, open_buffdesc *protoCode, uint32_t *protoId) |
Register a new routing protocol. More... | |
open_error_t | openapiRoutingStartupStatus (openapiClientHandle_t *client_handle, OPEN_AF_t af, uint32_t *complete) |
Report whether IP routing has finished initialization for a given address family. More... | |
open_error_t | openapiRoutingStartupStatusVr (openapiClientHandle_t *client_handle, OPEN_AF_t af, uint32_t vrfId, uint32_t *complete) |
Report whether IP routing has finished initialization in the requested VRF for a given address family. More... | |
open_error_t | openapiRtoFreeRouteCountGet (openapiClientHandle_t *client_handle, uint32_t vrfId, uint32_t *rtoFreeRouteCount) |
Get the number of available routes in RTO for this VRF Id. More... | |
open_error_t | openapiRtrAdminModeGet (openapiClientHandle_t *client_handle, OPEN_AF_t af, OPEN_CONTROL_t *enable) |
Get the current router admin mode given an address family. More... | |
open_error_t | openapiRtrAdminModeGetVrf (openapiClientHandle_t *client_handle, OPEN_AF_t af, uint32_t vrfId, OPEN_CONTROL_t *enable) |
Get the router admin mode of the VRF. More... | |
open_error_t | openapiRtrICMPEchoReplyModeGet (openapiClientHandle_t *client_handle, open_buffdesc *vrfName, uint32_t *mode) |
Get the ICMP ignore echo-req mode. More... | |
open_error_t | openapiRtrICMPRatelimitGet (openapiClientHandle_t *client_handle, open_buffdesc *vrfName, uint32_t *burstSize, uint32_t *interval) |
Get the ICMP Ratelimit parameters. More... | |
open_error_t | openapiRtrICMPRedirectsModeGet (openapiClientHandle_t *client_handle, uint32_t intf, uint32_t *mode) |
Get the ICMP Redirects mode of the interface. More... | |
open_error_t | openapiRtrICMPUnreachablesModeGet (openapiClientHandle_t *client_handle, uint32_t intf, uint32_t *mode) |
Get the ICMP Unreachables mode of the interface. More... | |
open_error_t | openapiRtrIntfIpAddrGet (openapiClientHandle_t *client_handle, OPEN_AF_t af, uint32_t intf, open_inet_pfx_t *ipAddr) |
Get an IP address on a given router interface for a given address family. More... | |
open_error_t | openapiRtrIntfIpAddrMethodGet (openapiClientHandle_t *client_handle, uint32_t intf, OPEN_INTF_IP_ADDR_METHOD_t *addrMethod, OPEN_CONTROL_t *clientIdEnable) |
Get the method used to assign the IP address to a Router interface. More... | |
open_error_t | openapiRtrIntfIpStackDrvNameGet (openapiClientHandle_t *client_handle, uint32_t vrfId, uint32_t intf, open_buffdesc *intfName) |
Get the drv name of the configured router interface. More... | |
open_error_t | openapiRtrIntfIpStackIfIndexGet (openapiClientHandle_t *client_handle, uint32_t intf, uint32_t *ifIndex) |
Get the ipstack ifIndex on the configured router interface. More... | |
open_error_t | openapiRtrIntfIpStackIfNameGet (openapiClientHandle_t *client_handle, uint32_t intf, open_buffdesc *intfName) |
Get the name of the configured router interface. More... | |
open_error_t | openapiRtrIntfIpStackStkNameGet (openapiClientHandle_t *client_handle, uint32_t vrfId, uint32_t intf, open_buffdesc *intfName) |
Get the stk name of the configured router interface. More... | |
open_error_t | openapiRtrIntfL3MacAddressGet (openapiClientHandle_t *client_handle, uint32_t intf, open_buffdesc *mac) |
Get the L3 MAC address of the router interface. More... | |
open_error_t | openapiRtrIntfLoopbackIdGet (openapiClientHandle_t *client_handle, uint32_t intf, uint32_t *loopbackId) |
Get the loopback id for the configured router interface. More... | |
open_error_t | openapiRtrIntfNameGet (openapiClientHandle_t *client_handle, uint32_t intf, open_buffdesc *intfName) |
Get the interface name of the configured router interface. More... | |
open_error_t | openapiRtrIntfNextGet (openapiClientHandle_t *client_handle, uint32_t intf, uint32_t *nextIntf) |
Get the next configured router interface. More... | |
open_error_t | openapiRtrIntfNextGetVrf (openapiClientHandle_t *client_handle, uint32_t vrfId, uint32_t intf, uint32_t *nextIntf) |
Get the next configured router interface. More... | |
open_error_t | openapiRtrIntfOperModeGet (openapiClientHandle_t *client_handle, OPEN_AF_t af, uint32_t intf, OPEN_CONTROL_t *ifState) |
Get the up/down status of the router interface given the address family. More... | |
open_error_t | openapiRtrIntfSecIpAddrGet (openapiClientHandle_t *client_handle, OPEN_AF_t af, uint32_t intf, open_inet_pfx_t *ipAddr, uint32_t *index) |
Get a Secondary IP address on a given router interface for a given address family. More... | |
open_error_t | openapiRtrIntfTypeGet (openapiClientHandle_t *client_handle, uint32_t intf, OPEN_INTF_TYPE_t *intfType) |
Get the type of the interface for the given router interface. More... | |
open_error_t | openapiRtrIntfUnitSlotPortGet (openapiClientHandle_t *client_handle, uint32_t intf, open_USP_t *usp) |
Get the unit, slot and port of the router interface. More... | |
open_error_t | openapiRtrIntfVlanIdGet (openapiClientHandle_t *client_handle, uint32_t intf, uint32_t *vlanId) |
Get the vlan id on the configured router interface. More... | |
open_error_t | openapiRtrLoopbackIntIfNumGet (openapiClientHandle_t *client_handle, uint32_t loopbackId, uint32_t *intf) |
Get the internal interface number of the loopback interface. More... | |
open_error_t | openapiStackIfIndexIntIfNumGet (openapiClientHandle_t *client_handle, uint32_t ifIndex, uint32_t *intIfNum) |
Get the interface number corresponding to the given ipstack ifIndex. More... | |
open_error_t | openapiUnnumberedPeerInfoSet (openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t peerIp, OPEN_BOOL_t isAdd, uint32_t flag) |
Set the Unnumbered peer info on an interface. More... | |
open_error_t | openapiVrAgentProbeResultIpSlaNotify (openapiClientHandle_t *client_handle, uint32_t vrfId, uint32_t ipSlaId, uint32_t probeReturnCode, uint32_t lastProbeRTTvalue, uint32_t latestOperationStartUpTime) |
This routine is called by VRF Manager when a VR Probe Agent of VRF Instance needs to update the result of last probe attempt of an IPSLA operation. More... | |
open_error_t | openapiVrfIntfNameGet (openapiClientHandle_t *client_handle, uint32_t vrfId, open_buffdesc *intfName) |
Get the name of the configured VRF interface. More... | |
open_error_t | openapiVrfNameGet (openapiClientHandle_t *client_handle, uint32_t vrfId, open_buffdesc *vrfName) |
Get the VRF name for a given VRF ID. More... | |
open_error_t | openapiVrfNameNextGet (openapiClientHandle_t *client_handle, open_buffdesc *vrfName, open_buffdesc *vrfNameNext) |
Get the next VRF name. More... | |
#define RPPI_BRC_ADDR "/tmp/rppi_brc.%04u" |
The "address" of the client end of the UNIX datagram socket opened to receive forwarding table change notifications.
Definition at line 54 of file openapi_routing.h.
typedef struct openBfdSessionKey_s openBfdSessionKey_t |
The key into the BFD database.
The Syncdb evaluates this key using the memcmp() function, so the BFD entries don't appear in any particular order on the "GetNext" operation.
typedef struct openrBestRouteChangeMsg_s openrBestRouteChangeMsg_t |
Message structure for forwarding table change notifications.
IP address configuration method.
Enumerator | |
---|---|
OPEN_INTF_IP_ADDR_METHOD_NONE |
No method. |
OPEN_INTF_IP_ADDR_METHOD_CONFIG |
Manual configuration. |
OPEN_INTF_IP_ADDR_METHOD_DHCP |
Leased through DHCP. |
Definition at line 89 of file openapi_routing.h.
enum OPEN_ROUTE_EVENT_t |
OPEN uses these 3 enumerators to indicate the addition, deletion, or change to the best route for a given destination.
Definition at line 99 of file openapi_routing.h.
Type of a policy change notification.
Enumerator | |
---|---|
OPEN_POLICY_CHANGE |
Policy has been added or modified. |
OPEN_POLICY_DELETE |
Policy has been deleted. |
Definition at line 119 of file openapi_routing.h.
These values must be powers of 2.
They are used as indexes to a bit map when registering for routing policy changes.
Definition at line 109 of file openapi_routing.h.
enum OPENR_MESSAGE_TYPE_t |
Values that go in the Message Type field of event messages sent to applications.
Definition at line 126 of file openapi_routing.h.
open_error_t openapiArpResolve | ( | openapiClientHandle_t * | client_handle, |
uint32_t | vrfId, | ||
open_inet_addr_t * | nh_addr, | ||
open_buffdesc * | mac, | ||
uint32_t | cbParm1, | ||
uint32_t | cbParm2, | ||
uint32_t | cbParm3 | ||
) |
Resolve ARP for the given IP Address.
[in] | vrfId | VRF Identifier |
[in] | client_handle | client handle from registration API |
[in] | destPrefix | destination IP prefix |
[in] | pfxLen | destination prefix length |
[out] | route | best route to this prefix |
[out] | nextHopListBuff | List of nextHops associated with route. |
OPEN_E_NONE | If a best route is found |
OPEN_E_NOT_FOUND | If there is no route to the destination |
OpEN API Version: 1.3
open_error_t openapiBestRouteChangeNextGet | ( | openapiClientHandle_t * | client_handle, |
uint32_t | clientId, | ||
OPEN_ROUTE_EVENT_t * | chType, | ||
openRoute_t * | route, | ||
open_buffdesc * | nextHopListBuff | ||
) |
Get the next best route change pending for a specific client.
[in] | client_handle | client handle from registration API |
[in] | clientId | Unique integer ID assigned to the client for this registration. Used to identify the client when retrieving changes. |
[out] | chType | Type of change (add, modify, delete) |
[out] | route | The changed route. On a delete route event, the only valid fields are the prefix and prefix length. |
[out] | nextHopListBuff | List of nextHops associated with route. |
OPEN_E_NONE | If a route change is returned |
OPEN_E_PARAM | If any output parameter is NULL |
OPEN_E_EMPTY | If no more route changes are pending |
OPEN_E_NOT_FOUND | No client is registered with the given client ID |
OPEN_E_FAIL | Any other failure |
OpEN API Version: 1.1
open_error_t openapiBestRouteChangeNextGetMult | ( | openapiClientHandle_t * | client_handle, |
uint32_t | clientId, | ||
uint32_t | numChanges, | ||
open_buffdesc * | routeListBuff | ||
) |
Get the next best route change pending for a specific client.
[in] | client_handle | client handle from registration API |
[in] | clientId | Unique integer ID assigned to the client for this registration. Used to identify the client when retrieving changes. |
[out] | numChanges | The number of changes to retrieve |
[out] | routeListBuff | The list that holds the set of best routes. |
OPEN_E_NONE | If a route change is returned |
OPEN_E_PARAM | If any output parameter is NULL |
OPEN_E_EMPTY | If no more route changes are pending |
OPEN_E_NOT_FOUND | No client is registered with the given client ID |
OPEN_E_FAIL | Any other failure |
OpEN API Version: 1.1
open_error_t openapiBestRouteEventDeregister | ( | openapiClientHandle_t * | client_handle, |
uint32_t | clientId | ||
) |
Deregister for notifications when there are changes to one or more routes used for IP forwarding.
[in] | client_handle | client handle from registration API |
[in] | clientId | Unique integer ID assigned to the client for this registration. Used to identify the client when retrieving changes. |
OPEN_E_NONE | If the registration was successful |
OPEN_E_UNAVAIL | If RPPI is not ready to accept registrations yet. This may occur when switchdrvr is first starting and has not yet reached a state where it can accept best route client registrations. The caller should try again later. |
OPEN_E_NOT_FOUND | If the client ID does not match a registered client. |
OPEN_E_FAIL | Any other failure |
OpEN API Version: 1.1
open_error_t openapiBestRouteEventRegister | ( | openapiClientHandle_t * | client_handle, |
OPEN_AF_t | family, | ||
uint32_t | pid, | ||
uint32_t | vrfId, | ||
open_buffdesc * | clientName, | ||
uint32_t * | clientId | ||
) |
Register to be notified when there are changes to one or more routes used for IP forwarding.
[in] | client_handle | client handle from registration API |
[in] | family | OPEN_AF_INET to be notified of changes to IPv4 routes OPEN_AF_INET6 to be notified of changes to IPv6 routes |
[in] | pid | Linux process ID of the process registering |
[in] | vrfId | VRF Identifier |
[in] | clientName | Name of the client. Must be unique among all clients registering for best route change notification. Up to OPENR_BRC_NAME_LEN characters long. |
[out] | clientId | Unique integer ID assigned to the client for this registration. Used to identify the client when retrieving changes. |
OPEN_E_NONE | If the registration was successful OPEN_E_UNAVAIL If RPPI is not ready to accept registrations yet. This may occur when switchdrvr is first starting and has not yet reached a state where it can accept best route client registrations. The caller should try again later. |
OPEN_E_FULL | If the maximum number of best route clients are already registered. |
OPEN_E_FAIL | Any other failure |
OpEN API Version: 1.3
open_error_t openapiBestRouteEventRegisterVr | ( | openapiClientHandle_t * | client_handle, |
uint32_t | vrfId, | ||
OPEN_AF_t | family, | ||
uint32_t | pid, | ||
open_buffdesc * | clientName, | ||
uint32_t * | clientId | ||
) |
Register to be notified when there are changes to one or more routes used for IP forwarding.
[in] | client_handle | client handle from registration API |
[in] | vrfId | VRF instance |
[in] | family | OPEN_AF_INET to be notified of changes to IPv4 routes OPEN_AF_INET6 to be notified of changes to IPv6 routes |
[in] | pid | Linux process ID of the process registering |
[in] | clientName | Name of the client. Must be unique among all clients registering for best route change notification. Up to OPENR_BRC_NAME_LEN characters long. |
[out] | clientId | Unique integer ID assigned to the client for this registration. Used to identify the client when retrieving changes. |
OPEN_E_NONE | If the registration was successful OPEN_E_UNAVAIL If RPPI is not ready to accept registrations yet. This may occur when switchdrvr is first starting and has not yet reached a state where it can accept best route client registrations. The caller should try again later. |
OPEN_E_FULL | If the maximum number of best route clients are already registered. |
OPEN_E_FAIL | Any other failure |
OpEN API Version: 1.3
open_error_t openapiBestRouteLookup | ( | openapiClientHandle_t * | client_handle, |
open_inet_addr_t | destAddr, | ||
openRoute_t * | route, | ||
open_buffdesc * | nextHopListBuff | ||
) |
Find the longest prefix match for a given destination IP address.
[in] | client_handle | client handle from registration API |
[in] | destAddr | destination IP address |
[out] | route | best route to destination |
[out] | nextHopListBuff | List of nextHops associated with route. |
OPEN_E_NONE | If a best route is found |
OPEN_E_NOT_FOUND | If there is no route to the destination |
OpEN API Version: 1.1
open_error_t openapiBestRouteNextGet | ( | openapiClientHandle_t * | client_handle, |
OPEN_AF_t | family, | ||
openRoute_t * | routeEntry, | ||
open_buffdesc * | nextHopListBuff | ||
) |
Return next best route in the routing table.
[in] | client_handle | client handle from registration API |
[in] | family | Address family (IPv4 or IPv6) |
[in,out] | routeEntry | Next best route in the routing table. |
[out] | nextHopListBuff | List of nextHops associated with route. |
OPEN_E_NONE | If a next route is returned in routeEntry. |
OPEN_E_NOT_FOUND | If there are no more best routes. |
OPEN_E_PARAM | If an input parameter is invalid. |
OPEN_E_FAIL | Other failure. |
The route returned includes all active next hops.
OpEN API Version: 1.1
open_error_t openapiBestRouteNextGetVr | ( | openapiClientHandle_t * | client_handle, |
OPEN_AF_t | family, | ||
uint32_t | vrfId, | ||
openRoute_t * | openRoute, | ||
open_buffdesc * | nextHopListBuff | ||
) |
Return next best route in the specified VRF routing table.
[in] | client_handle | client handle from registration API |
[in] | family | Address family (IPv4 or IPv6) |
[in] | vrfId | VRF Identifier |
[in,out] | routeEntry | Next best route in the routing table. |
[out] | nextHopListBuff | List of nextHops associated with route. |
OPEN_E_NONE | If a next route is returned in routeEntry. |
OPEN_E_NOT_FOUND | If there are no more best routes. |
OPEN_E_PARAM | If an input parameter is invalid. |
OPEN_E_FAIL | Other failure. |
The route returned includes all active next hops.
OpEN API Version: 1.3
open_error_t openapiBfdModeSet | ( | OPEN_BFD_ADMIN_MODE_t | mode | ) |
Set the BFD Global Admin Mode.
[in] | mode | the new value of the BFD mode |
OPEN_E_NONE | |
OPEN_E_FAIL | OpEN API Version: 1.3 |
open_error_t openapiBfdSessionCreate | ( | openapiClientHandle_t * | client_handle, |
openBfdEndpoint_t * | ep, | ||
uint32_t * | id | ||
) |
Create a BFD Session.
[in] | client_handle | client handle from registration API |
[in] | ep | BFD endpoint parameters |
[out] | id | Session identifier |
OPEN_E_NONE | If the session was created successfully. |
OPEN_E_FAIL | If the session was not created. |
OpEN API Version: 1.3
open_error_t openapiBfdSessionDelete | ( | openapiClientHandle_t * | client_handle, |
openBfdEndpoint_t * | ep, | ||
uint32_t | id | ||
) |
Delete a BFD Session.
[in] | client_handle | client handle from registration API |
[in] | ep | BFD endpoint parameters |
[in] | id | Session identifier |
OPEN_E_NONE | If the session was deleted successfully. |
OPEN_E_FAIL | If the session was not deleted. |
OpEN API Version: 1.3
open_error_t openapiBfdSessionFind | ( | openapiClientHandle_t * | client_handle, |
open_inet_addr_t | peer, | ||
uint32_t * | id | ||
) |
Get the BFD Session Identifier for a given peer by IP address.
[in] | client_handle | client handle from registration API |
[in] | peer | peer IP address |
[out] | id | session identifier |
OPEN_E_NONE | On success. |
OPEN_E_PARAM | Invalid parameter. |
OPEN_E_FAIL | Failure occurred. |
OPEN_E_INTERNAL | Internal error occurred. |
OpEN API Version: 1.15
open_error_t openapiBfdSessionInfoGet | ( | openapiClientHandle_t * | client_handle, |
uint32_t | id, | ||
openBfdSessionInfo_t * | info | ||
) |
Get the BFD session information.
[in] | client_handle | client handle from registration API |
[in] | id | Session identifier |
[out] | info | Session information |
OPEN_E_NONE | If the session was created successfully. |
OPEN_E_FAIL | If the session was not created. |
OpEN API Version: 1.3
open_error_t openapiBfdSessionStatsGet | ( | openapiClientHandle_t * | client_handle, |
uint32_t | id, | ||
openBfdSessionStats_t * | stats | ||
) |
Get the BFD statistics associated with the given session.
[in] | client_handle | client handle from registration API |
[in] | id | session identifier |
[out] | stats | session stats |
OPEN_E_NONE | on successful operation |
OPEN_E_FAIL | if the operation failed |
OpEN API Version: 1.3
open_error_t openapiExternalRoutesSaveDeRegister | ( | openapiClientHandle_t * | client_handle, |
OPEN_AF_t | addressFamily, | ||
uint32_t | vrfId, | ||
uint32_t | protoId | ||
) |
De-Register with RTO to save External routes to SyncDB.
[in] | client_handle | client handle from registration API |
[in] | addressFamily | Address family (IPv4 or IPv6) |
[in] | vrfId | Virtual router identifier |
[in] | protoId | Unique protocol identifier that RPPI provided at registration time. |
OPEN_E_NONE | If the de-registration is successful |
OPEN_E_ERROR | Other failure. |
OpEN API Version: 1.1
open_error_t openapiExternalRoutesSaveRegister | ( | openapiClientHandle_t * | client_handle, |
OPEN_AF_t | addressFamily, | ||
uint32_t | vrfId, | ||
uint32_t | protoId | ||
) |
Register with RTO to save External routes to SyncDB.
[in] | client_handle | client handle from registration API |
[in] | addressFamily | Address family (IPv4 or IPv6) |
[in] | vrfId | Virtual router identifier |
[in] | protoId | Unique protocol identifier that RPPI provided at registration time. |
OPEN_E_NONE | If the registration is successful |
OPEN_E_ERROR | Other failure. |
OpEN API Version: 1.1
open_error_t openapiIntfBandwidthGet | ( | openapiClientHandle_t * | client_handle, |
OPEN_AF_t | af, | ||
uint32_t | intf, | ||
uint32_t * | bandwidth | ||
) |
Get the bandwidth value configure on the device ( ** to change **)
[in] | client_handle | client handle from registration API |
[in] | af | Address Family |
[in] | intf | The Configured Router Interface |
[out] | bandwidth | Bandwidth for the interface |
OPEN_E_NONE | on success |
OPEN_E_PARAM | on improper input parameters |
OPEN_E_FAIL | on other failure |
OpEN API Version: 1.1
open_error_t openapiIntfBestRoutesNextGet | ( | openapiClientHandle_t * | client_handle, |
uint32_t | clientId, | ||
uint32_t | intIfNum, | ||
uint32_t | numChanges, | ||
open_buffdesc * | routeListBuff | ||
) |
Get the next set of best-routes on an interface for a specific client.
[in] | client_handle | client handle from registration API |
[in] | clientId | Unique integer ID assigned to the client for this registration. Used to identify the client when retrieving changes. |
[in] | intIfNum | interface number |
[out] | numChanges | The number of changes to retrieve |
[out] | routeListBuff | The list that holds the set of best routes. |
OPEN_E_NONE | If a route change is returned |
OPEN_E_PARAM | If any output parameter is NULL |
OPEN_E_EMPTY | If no more route changes are pending |
OPEN_E_NOT_FOUND | No client is registered with the given client ID |
OPEN_E_FAIL | Any other failure |
OpEN API Version: 1.1
open_error_t openapiIntfIpMtuGet | ( | openapiClientHandle_t * | client_handle, |
OPEN_AF_t | af, | ||
uint32_t | intf, | ||
uint32_t * | ipMtu | ||
) |
Get the configured ipmtu value for the router interface given an address family.
[in] | client_handle | client handle from registration API |
[in] | af | Address Family |
[in] | intf | The Configured Router Interface |
[out] | ipMtu | IP MTU configured on the interface |
OPEN_E_NONE | on success |
OPEN_E_PARAM | on improper input parameters |
OPEN_E_FAIL | on other failure |
OpEN API Version: 1.1
open_error_t openapiIntfIsUnnumbered | ( | openapiClientHandle_t * | client_handle, |
uint32_t | intIfNum, | ||
OPEN_BOOL_t * | isUnnumbered | ||
) |
Check if a given interface is unnumbered.
[in] | client_handle | Client handle from registration API |
[in] | intIfNum | Internal Interface Number |
[out] | isUnnumbered | status |
OPEN_E_NONE | If the unnumbered status retrieval is successful |
OPEN_E_NOT_FOUND | If the interface is not configured |
OPEN_E_PARAM | If any of the input params are invalid |
OpEN API Version: 1.3
open_error_t openapiIntfNameSizeGet | ( | openapiClientHandle_t * | client_handle, |
uint32_t * | ifNameSize | ||
) |
Get the maximum length of an OPEN interface name.
[in] | client_handle | client handle from registration API |
[out] | ifNameSize | Maximum number of characters in an OPEN interface name (not including NULL terminator). |
OPEN_E_NONE | on success |
OPEN_E_PARAM | on improper input parameters |
OPEN_E_FAIL | on other failure |
OpEN API Version: 1.1
open_error_t openapiIp6RouterPreferenceGet | ( | openapiClientHandle_t * | client_handle, |
OPEN_PREF_INDICES_t | index, | ||
uint32_t * | pref | ||
) |
Get IPv6 router preference associated with the specified protocol.
[in] | client_handle | client handle from registration API |
[in] | index | router protocol type |
[out] | pref | router preference value |
OPEN_E_NONE | Get successful. |
OPEN_E_FAIL | Get failed. |
OPEN_E_PARAM | Error in parameter passed. |
OpEN API Version: 1.1
open_error_t openapiIp6RouterPreferenceSet | ( | openapiClientHandle_t * | client_handle, |
OPEN_PREF_INDICES_t | index, | ||
uint32_t | pref | ||
) |
Set IPV6 router preference associated with the specified protocol.
[in] | client_handle | client handle from registration API |
[in] | index | router protocol type |
[in] | pref | router preference value |
OPEN_E_NONE | Set successful. |
OPEN_E_FAIL | Set failed. |
OPEN_E_PARAM | Error in parameter passed. |
OpEN API Version: 1.1
open_error_t openapiIpMapInitialRoutesDone | ( | openapiClientHandle_t * | client_handle, |
uint32_t | vrfId, | ||
OPEN_NSF_PROTOCOL_t | protocol | ||
) |
A protocol that controls NSF routes calls this function to indicate it has updated RTO with all its initial routes after a warm restart.
[in] | client_handle | Client handle from registration API |
[in] | vrfId | VRF Id |
[in] | protocol | Protocol to add NSF routes |
OPEN_E_PARAM | If the passed params are invalid |
OPEN_E_NONE | If the OPEN call is successful |
OPEN_E_FAIL | If the OPEN call is unsuccessful |
OpEN API Version: 1.3
open_error_t openapiIpMapIsBackupElectedGet | ( | openapiClientHandle_t * | client_handle, |
OPEN_BOOL_t * | isBackupElected | ||
) |
Check if backup is elected.
[in] | client_handle | Client handle from registration API |
[out] | isBackupElected | Backup elected status |
OPEN_E_PARAM | If the passed params are invalid |
OPEN_E_NONE | If the OPEN call is successful |
OpEN API Version: 1.3
open_error_t openapiIpMapNsfRouteSource | ( | openapiClientHandle_t * | client_handle, |
uint32_t | vrfId, | ||
OPEN_NSF_PROTOCOL_t | protocol | ||
) |
Indicate that a protocol intends to add routes to RTO following a warm restart.
[in] | client_handle | Client handle from registration API |
[in] | vrfId | VRF Id |
[in] | protocol | Protocol to add NSF routes |
OPEN_E_PARAM | If the passed params are invalid |
OPEN_E_NONE | If the OPEN call is successful |
OPEN_E_FAIL | If the OPEN call is unsuccessful |
OpEN API Version: 1.3
open_error_t openapiIpRouterPreferenceGet | ( | openapiClientHandle_t * | client_handle, |
OPEN_PREF_INDICES_t | index, | ||
uint32_t * | pref | ||
) |
Get router preference associated with the specified protocol.
[in] | client_handle | client handle from registration API |
[in] | index | router protocol type |
[out] | pref | router preference value |
OPEN_E_NONE | Get successful. |
OPEN_E_FAIL | Get failed. |
OPEN_E_PARAM | Error in parameter passed. |
OpEN API Version: 1.1
open_error_t openapiIpRouterPreferenceGetVr | ( | openapiClientHandle_t * | client_handle, |
uint32_t | vrfId, | ||
OPEN_PREF_INDICES_t | index, | ||
uint32_t * | pref | ||
) |
Get router preference associated with the specified protocol in a VRF.
[in] | client_handle | client handle from registration API |
[in] | vrfId | VRF Identifier |
[in] | index | router protocol type |
[out] | pref | router preference value |
OPEN_E_NONE | Get successful. |
OPEN_E_PARAM | Error in parameter passed. |
OpEN API Version: 1.3
open_error_t openapiIpRouterPreferenceSet | ( | openapiClientHandle_t * | client_handle, |
OPEN_PREF_INDICES_t | index, | ||
uint32_t | pref | ||
) |
Set router preference associated with the specified protocol.
[in] | client_handle | client handle from registration API |
[in] | index | router protocol type |
[in] | pref | router preference value |
OPEN_E_NONE | Set successful. |
OPEN_E_FAIL | Set failed. |
OPEN_E_PARAM | Error in parameter passed. |
OpEN API Version: 1.1
open_error_t openapiIpRouterProtoNameNextGet | ( | openapiClientHandle_t * | client_handle, |
uint32_t | protoId, | ||
open_buffdesc * | protoName, | ||
uint32_t * | nextProtoId | ||
) |
Get the protocol name assigned to the associated protocol id.
[in] | client_handle | client handle from registration API |
[in] | protoId | unique identifier for the routing protocol. |
[in] | protoName | Name of the routing protocol. This name is used in the UI to refer to this protocol. (e.g., "redistribute <protoName>). openapiRouteProtoNameLenMax() gives the max length. |
[out] | nextProtoId | next unique identifier for the routing protocol. |
OPEN_E_PARAM | If the output parameter is NULL. |
OPEN_E_INTERNAL | If any of the input names are too long or otherwise invalid. |
OPEN_E_FAIL | Other failure. |
OpEN API Version: 1.1
open_error_t openapiKernelArpAdd | ( | openapiClientHandle_t * | client_handle, |
uint32_t | vrfId, | ||
open_inet_addr_t * | dest_addr, | ||
open_buffdesc * | mac, | ||
int32_t | stkIfIndex, | ||
uint16_t | state | ||
) |
Add the ARP entry.
[in] | vrfId | VRF Identifier |
[in] | client_handle | client handle from registration API |
[in] | dest_addr | destination IP address |
[in] | mac | destination MAC address |
[in] | stkIfIndex | stack if index of the interface |
[in] | state | state of the arp entry |
OPEN_E_NONE | |
OPEN_E_PARAM | |
OPEN_E_UNAVAIL | |
OPEN_E_ERROR | |
OPEN_E_EXISTS | |
OPEN_E_INTERNAL | OpEN API Version: 1.3 |
open_error_t openapiKernelArpDelete | ( | openapiClientHandle_t * | client_handle, |
uint32_t | vrfId, | ||
open_inet_addr_t * | dest_addr, | ||
int32_t | stkIfIndex | ||
) |
Delete the ARP entry.
[in] | vrfId | VRF Identifier |
[in] | client_handle | client handle from registration API |
[in] | dest_addr | destination IP address |
[in] | stkIfIndex | stack if index of the interface |
OPEN_E_NONE | |
OPEN_E_PARAM | |
OPEN_E_UNAVAIL | |
OPEN_E_ERROR | |
OPEN_E_NOT_FOUND | OpEN API Version: 1.3 |
open_error_t openapiKernelRouteAddVr | ( | openapiClientHandle_t * | client_handle, |
uint32_t | vrfId, | ||
openRoute_t * | routeEntry, | ||
open_buffdesc * | nextHopListBuff | ||
) |
Add a kernel route to the common routing table.
[in] | client_handle | client handle from registration API |
[in] | vrfId | VRF Identifier |
[in] | routeEntry | Route to be added. |
[in] | nextHopListBuff | List of nextHops associated with route. |
OPEN_E_NONE | If the route was added successfully. |
OPEN_E_NOT_FOUND | If none of the route's next hops is in a local subnet. |
OPEN_E_FULL | If the route was not added because the routing table is full. |
OPEN_E_EXISTS | If a route with the same route type and destination is already in the routing table. |
OPEN_E_FAIL | Any other failure. |
OpEN API Version: 1.3
open_error_t openapiKernelRouteDelVr | ( | openapiClientHandle_t * | client_handle, |
uint32_t | vrfId, | ||
openRoute_t * | routeEntry, | ||
open_buffdesc * | nextHopListBuff | ||
) |
Delete a kernel route from the common routing table.
[in] | client_handle | client handle from registration API |
[in] | vrfId | VRF Identifier |
[in] | routeEntry | Route to be deleted. |
OPEN_E_NONE | If the route was successfully deleted. |
OPEN_E_NOT_FOUND | If the route table does not have a route to this destination with the given route type. |
OPEN_E_FAIL | Any other failure. |
OpEN API Version: 1.3
open_error_t openapiMaxNextHopsGet | ( | openapiClientHandle_t * | client_handle, |
uint32_t * | maxNextHops | ||
) |
Get the maximum number of next hops in an ECMP route.
[in] | client_handle | client handle from registration API |
[out] | maxNextHops | Maximum number of next hops |
OPEN_E_NONE | If the maximum is successfully reported |
OPEN_E_PARAM | If any output parameter is NULL |
OPEN_E_FAIL | Any other failure |
OpEN API Version: 1.1
open_error_t openapiMaxRoutingInterfacesGet | ( | openapiClientHandle_t * | client_handle, |
uint32_t * | routingIntfMax | ||
) |
Get the maximum number of OPEN routing interfaces.
[in] | client_handle | client handle from registration API |
[out] | routingIntfMax | The maximum number of routing interfaces. |
OPEN_E_NONE | on success |
OPEN_E_PARAM | on invalid input parameters |
OPEN_E_FAIL | on other failure |
OpEN API Version: 1.1
open_error_t openapiPlatRtrRouteMaxEntriesGet | ( | openapiClientHandle_t * | client_handle, |
uint32_t * | pval | ||
) |
Get the number of IPv4 routes for this platform.
[in] | client_handle | Client handle from registration API |
[out] | pval | Max IPv4 routes |
OPEN_E_NONE | If the OPEN call is successful |
OPEN_E_ERROR | If the OPEN call is unsuccessful |
OpEN API Version: 1.3
open_error_t openapiPlatRtrRouteMaxEqualCostEntriesGet | ( | openapiClientHandle_t * | client_handle, |
uint32_t * | pval | ||
) |
Get the number of ECMP MAX PATHS FROM PLATFORM params.
[in] | client_handle | Client handle from registration API |
[out] | pval | Max ECMP paths |
OPEN_E_NONE | If the OPEN call is successful |
OPEN_E_ERROR | If the OPEN call is unsuccessful |
OpEN API Version: 1.3
open_error_t openapiPolicyChangeAck | ( | openapiClientHandle_t * | client_handle, |
uint32_t | clientId, | ||
uint32_t | seqNo | ||
) |
Acknowledge receipt of a policy change notification.
[in] | client_handle | client handle from registration API |
[in] | clientId | Policy client ID assigned by RPPI at registration time. |
[in] | seqNo | Sequence number from policy change notification message. Acknowledges the change with this and all lower sequence numbers. |
OPEN_E_NONE | Acknowledgement accepted. |
OPEN_E_NOT_FOUND | If the client ID does not match a registered client |
OPEN_E_FAIL | If the sequence number does not match a change previously reported. |
OpEN API Version: 1.1
open_error_t openapiPrefixFind | ( | openapiClientHandle_t * | client_handle, |
open_inet_addr_t | destPrefix, | ||
uint32_t | pfxLen, | ||
openRoute_t * | route, | ||
open_buffdesc * | nextHopListBuff | ||
) |
Find the best route with a specific prefix.
[in] | client_handle | client handle from registration API |
[in] | destPrefix | destination IP prefix |
[in] | pfxLen | destination prefix length |
[out] | route | best route to this prefix |
[out] | nextHopListBuff | List of nextHops associated with route. |
OPEN_E_NONE | If a best route is found |
OPEN_E_NOT_FOUND | If there is no route to the destination |
OpEN API Version: 1.1
open_error_t openapiPrefixFindVr | ( | openapiClientHandle_t * | client_handle, |
uint32_t | vrfId, | ||
open_inet_addr_t | destPrefix, | ||
uint32_t | pfxLen, | ||
openRoute_t * | route, | ||
open_buffdesc * | nextHopListBuff | ||
) |
Find the best route with a specific prefix.
[in] | client_handle | client handle from registration API |
[in] | destPrefix | destination IP prefix |
[in] | pfxLen | destination prefix length |
[out] | route | best route to this prefix |
[out] | nextHopListBuff | List of nextHops associated with route. |
OPEN_E_NONE | If a best route is found |
OPEN_E_NOT_FOUND | If there is no route to the destination |
OpEN API Version: 1.1
int openapiPrefixListApply | ( | openapiClientHandle_t * | client_handle, |
open_buffdesc * | pfxListName, | ||
open_inet_addr_t | prefix, | ||
uint32_t | pfxLen | ||
) |
Apply a prefix list with a given name to a given prefix.
[in] | client_handle | client handle from registration API |
[in] | pfxListName | Name of the prefix list to apply. Up to 32 characters. |
[in] | prefix | Prefix to be matched |
[in] | pfxLen | Length, in bits, of prefix to be matched. |
OPEN_E_NOT_FOUND | If there is no prefix list with the given name. |
OPEN_E_PARAM | If an input parameter is invalid |
OPEN_E_UNAVAIL | If the prefix's address family is not supported |
OPEN_E_FAIL | Any other failure |
OpEN API Version: 1.1
open_error_t openapiRouteAdd | ( | openapiClientHandle_t * | client_handle, |
openRoute_t * | routeEntry, | ||
open_buffdesc * | nextHopListBuff | ||
) |
Add a route to the common routing table.
[in] | client_handle | client handle from registration API |
[in] | routeEntry | Route to be added. |
[in] | nextHopListBuff | List of nextHops associated with route. |
OPEN_E_NONE | If the route was added successfully. |
OPEN_E_NOT_FOUND | If none of the route's next hops is in a local subnet. |
OPEN_E_FULL | If the route was not added because the routing table is full. |
OPEN_E_EXISTS | If a route with the same route type and destination is already in the routing table. |
OPEN_E_FAIL | Any other failure. |
OpEN API Version: 1.1
open_error_t openapiRouteAddVr | ( | openapiClientHandle_t * | client_handle, |
uint32_t | vrfId, | ||
openRoute_t * | routeEntry, | ||
open_buffdesc * | nextHopListBuff | ||
) |
Add a route to the common routing table.
[in] | client_handle | client handle from registration API |
[in] | vrfId | VRF Identifier |
[in] | routeEntry | Route to be added. |
[in] | nextHopListBuff | List of nextHops associated with route. |
OPEN_E_NONE | If the route was added successfully. |
OPEN_E_NOT_FOUND | If none of the route's next hops is in a local subnet. |
OPEN_E_FULL | If the route was not added because the routing table is full. |
OPEN_E_EXISTS | If a route with the same route type and destination is already in the routing table. |
OPEN_E_FAIL | Any other failure. |
OpEN API Version: 1.3
open_error_t openapiRouteDel | ( | openapiClientHandle_t * | client_handle, |
openRoute_t * | routeEntry | ||
) |
Delete a route from the common routing table.
[in] | client_handle | client handle from registration API |
[in] | routeEntry | Route to be deleted. |
OPEN_E_NONE | If the route was successfully deleted. |
OPEN_E_NOT_FOUND | If the route table does not have a route to this destination with the given route type. |
OPEN_E_FAIL | Any other failure. |
OpEN API Version: 1.1
open_error_t openapiRouteDelVr | ( | openapiClientHandle_t * | client_handle, |
uint32_t | vrfId, | ||
openRoute_t * | routeEntry, | ||
open_buffdesc * | nextHopListBuff | ||
) |
Delete a route from the common routing table.
[in] | client_handle | client handle from registration API |
[in] | vrfId | VRF Identifier |
[in] | routeEntry | Route to be deleted. |
OPEN_E_NONE | If the route was successfully deleted. |
OPEN_E_NOT_FOUND | If the route table does not have a route to this destination with the given route type. |
OPEN_E_FAIL | Any other failure. |
OpEN API Version: 1.3
int openapiRouteMapApply | ( | openapiClientHandle_t * | client_handle, |
open_buffdesc * | routeMapName, | ||
openRmMatchParams_t * | matchParams, | ||
openRmSetParams_t * | setParams | ||
) |
Apply a route map with a given name to a route whose attributes are set in the matchParams argument.
[in] | client_handle | client handle from registration API |
[in] | routeMapName | Name of the route map to apply. Up to 32 characters. |
[in] | matchParams | Route attributes to be matched |
[out] | setParams | If the route map changes any of the route's parameter (through the route map's set statements), the new values are set in this output structure. |
OPEN_E_NOT_FOUND | If there is no route map with the given name. |
OPEN_E_PARAM | If an input parameter is invalid |
OPEN_E_FAIL | Any other failure |
OpEN API Version: 1.1
open_error_t openapiRouteMod | ( | openapiClientHandle_t * | client_handle, |
openRoute_t * | routeEntry, | ||
open_buffdesc * | nextHopListBuff | ||
) |
Modify an existing route to the common routing table.
[in] | client_handle | client handle from registration API |
[in] | routeEntry | Route to be modified. |
[in] | nextHopListBuff | List of nextHops associated with route. |
OPEN_E_NONE | If the route was successfully modified. |
OPEN_E_NOT_FOUND | If the route table does not have a route to this destination with the given route type. |
OPEN_E_FAIL | Any other failure. |
OpEN API Version: 1.1
open_error_t openapiRouteModVr | ( | openapiClientHandle_t * | client_handle, |
uint32_t | vrfId, | ||
openRoute_t * | routeEntry, | ||
open_buffdesc * | nextHopListBuff | ||
) |
Modify an existing route to the common routing table.
[in] | client_handle | client handle from registration API |
[in] | vrfId | VRF Identifier |
[in] | routeEntry | Route to be modified. |
[in] | nextHopListBuff | List of nextHops associated with route. |
OPEN_E_NONE | If the route was successfully modified. |
OPEN_E_NOT_FOUND | If the route table does not have a route to this destination with the given route type. |
OPEN_E_FAIL | Any other failure. |
OpEN API Version: 1.3
open_error_t openapiRouteNextGet | ( | openapiClientHandle_t * | client_handle, |
OPEN_AF_t | family, | ||
openRoute_t * | route, | ||
open_buffdesc * | nextHopListBuff | ||
) |
Return next route in the routing table.
[in] | client_handle | client handle from registration API |
[in] | family | Address family (IPv4 or IPv6) |
[in,out] | route | Next route in the routing table. |
[out] | nextHopListBuff | List of nextHops associated with route. |
OPEN_E_NONE | If a next route is returned in routeEntry. |
OPEN_E_NOT_FOUND | If there are no more best routes. |
OPEN_E_PARAM | If an input parameter is invalid. |
OPEN_E_FAIL | Other failure. |
The route returned includes all active next hops.
OpEN API Version: 1.1
open_error_t openapiRouteProtoNameLenMax | ( | openapiClientHandle_t * | client_handle, |
uint32_t * | protoNameLen | ||
) |
Get the maximum length of a protocol name.
[in] | client_handle | client handle from registration API |
[out] | protoNameLen | The maximum length of a protocol name. |
OPEN_E_NONE | |
OPEN_E_PARAM | if protoNameLen is NULL |
If protoName has more than this number of characters in a call to openapiRoutingProtocolRegister(), the registration fails.
OpEN API Version: 1.1
open_error_t openapiRouterEventAcknowledge | ( | openapiClientHandle_t * | client_handle, |
uint32_t | vrfId, | ||
uint32_t | clientId, | ||
uint32_t | eventId | ||
) |
Acknowledge a router event.
[in] | vrfId | VRF Identifier |
[in] | client_handle | client handle from registration API |
[in] | clientId | Unique client ID received from RPPI at registration. |
[in] | eventId | ID of the event to be acknowledged. This is the value of the eventSeqNumber field in the router event message. |
OPEN_E_NONE | on success |
OPEN_E_NOT_FOUND | if client ID doesn't match a registered client |
OPEN_E_INTERNAL | for an internal error |
OPEN_E_FAIL | on other failure |
OpEN API Version: 1.3
open_error_t openapiRouterEventDeregister | ( | openapiClientHandle_t * | client_handle, |
uint32_t | vrfId, | ||
uint32_t | clientId | ||
) |
Deregister for routing events.
[in] | vrfId | VRF Identifier |
[in] | client_handle | client handle from registration API |
[in] | clientId | Unique client ID received from RPPI at registration. |
OPEN_E_NONE | on success |
OPEN_E_NOT_FOUND | if client ID doesn't match a registered client |
OPEN_E_INTERNAL | for an internal error |
OPEN_E_FAIL | on other failure |
OpEN API Version: 1.3
open_error_t openapiRouterEventRegister | ( | openapiClientHandle_t * | client_handle, |
OPEN_AF_t | family, | ||
uint32_t | pid, | ||
uint32_t | vrfId, | ||
open_buffdesc * | clientName, | ||
uint32_t * | clientId | ||
) |
Register for routing events.
[in] | client_handle | client handle from registration API |
[in] | family | IPv4 or IPv6 events |
[in] | pid | Linux process ID |
[in] | vrfId | VRF Identifier |
[in] | clientName | Name of the client. If a client is already registered with the same name, that registration is deleted and replaced. Up to (OPEN_CLIENT_NAME_MAX_LEN - 1) characters. |
[out] | clientId | Unique client ID RPPI assigns. |
OPEN_E_NONE | on success |
OPEN_E_PARAM | on invalid input parameters |
OPEN_E_FULL | if the maximum number of router event clients are already registered |
OPEN_E_INTERNAL | for an internal error |
OPEN_E_FAIL | on other failure |
OpEN API Version: 1.3
open_error_t openapiRouteTypeDeregister | ( | openapiClientHandle_t * | client_handle, |
uint32_t | addressFamily, | ||
uint32_t | routeType | ||
) |
Deregister a route type.
[in] | client_handle | client handle from registration API |
[in] | addressFamily | Address family (IPv4 or IPv6) |
[in] | routeType | Unique identifier that RPPI provided at registration time. |
OPEN_E_NONE | If a route type is removed and a valid route type is returned. |
OPEN_E_NOT_FOUND | If the route type does not match a registered route type. |
OPEN_E_FAIL | Other failure. |
OpEN API Version: 1.1
open_error_t openapiRouteTypeInfoGet | ( | openapiClientHandle_t * | client_handle, |
uint32_t | routeType, | ||
open_buffdesc * | protoName, | ||
open_buffdesc * | routeTypeName | ||
) |
For a given route type, get the protocol and route type names.
[in] | client_handle | client handle from registration API |
[in] | routeType | Route type ID |
[out] | protoName | Name of the protocol that uses this route type. Up to OPENR_ROUTE_PROTO_NAME_LEN. |
[out] | routeTypeName | Descriptive name of the route type Up to OPENR_ROUTE_TYPE_NAME_LEN. |
OPEN_E_NONE | If the route type is recognized and the names are returned |
OPEN_E_PARAM | If a parameter is invalid |
OPEN_E_NOT_FOUND | If route type is not recognized |
OPEN_E_FAIL | Otherwise |
OpEN API Version: 1.1
open_error_t openapiRouteTypeNameLenMax | ( | openapiClientHandle_t * | client_handle, |
uint32_t * | routeTypeNameLen | ||
) |
Get the maximum length of a protocol name.
[in] | client_handle | client handle from registration API |
[out] | routeTypeNameLen | The maximum length of a route type name. |
OPEN_E_NONE | |
OPEN_E_PARAM | if routeTypeNameLen is NULL |
If routeTypeName has more than this number of characters in a call to openapiRoutingProtocolRegister(), the registration fails.
OpEN API Version: 1.1
open_error_t openapiRouteTypeRegister | ( | openapiClientHandle_t * | client_handle, |
OPEN_AF_t | addressFamily, | ||
uint32_t | protoId, | ||
open_buffdesc * | routeTypeName, | ||
open_buffdesc * | routeTypeCode, | ||
uint32_t * | routeType | ||
) |
Register a new route type.
If a route type already exists with the given route type name, the existing route type ID is returned.
[in] | client_handle | client handle from registration API |
[in] | addressFamily | Address family (IPv4 or IPv6) |
[in] | protoId | ID of routing protocol already registered with RPPI. |
[in] | routeTypeName | Name of an individual route type within a protocol. For example, "OSPF External Type 1". openapiRouteTypeNameLenMax() gives the max length. |
[in] | routeTypeCode | One or two character code that identifies a route type in the UI. Used in "show ip route" to identify the route type for each route. If a routing protocol has a single route type, this parameter can be set to the empty string. |
[out] | routeType | Unique identifier for a route type. The routeType field in openRoute_t must be set to this value when adding, modifying, or removing routes. |
OPEN_E_NONE | If a new route type is added and a valid route type is returned. |
OPEN_E_EXISTS | If the route type name matches an existing route type. In this case, routeType is set to the value for the existing entry. |
OPEN_E_UNAVAIL | If the address family is not supported for this operation. |
OPEN_E_FULL | If the maximum number of route types are already registered. |
OPEN_E_PARAM | If the output parameters is NULL. |
OPEN_E_INTERNAL | If any of the input names are too long or otherwise invalid. |
OPEN_E_FAIL | Other failure. |
OpEN API Version: 1.1
open_error_t openapiRoutingPolicyRegister | ( | openapiClientHandle_t * | client_handle, |
open_buffdesc * | clientName, | ||
uint32_t | pid, | ||
uint32_t | policyTypeMask, | ||
uint32_t * | clientId | ||
) |
Register to be notified when there are routing policy changes.
[in] | client_handle | client handle from registration API |
[in] | clientName | Name of the client. Must be unique among all clients registering for routing policy change notification. Up to OPENR_POLICY_CLIENT_NAME_LEN characters long. |
[in] | pid | Linux process ID of the process registering |
[in] | policyTypeMask | Indicates which types of policies the application wants to receive change notifications for. A 1 bit indicates the application wants to receive change notification. The mask is indexed by OPEN_ROUTING_POLICY_TYPE_t. To deregister for all policy changes, set policyTypeMask to 0. |
[out] | clientId | Unique integer ID assigned to the client for this registration. Used to create the address for the application's UNIX socket. Must be non-zero if policyTypeMask is non-zero. |
OPEN_E_NONE | If the registration was successful |
OPEN_E_UNAVAIL | If RPPI is not ready to accept registrations yet. This may occur when switchdrvr is first starting and has not yet reached a state where it can accept best route client registrations. The caller should try again later. |
OPEN_E_PARAM | If an input parameter is invalid |
OPEN_E_FULL | If the maximum number of policy clients are already registered. |
OPEN_E_NOT_FOUND | If no client with the given name is in the current list of clients when a call is made to deregister (policyTypeMask is 0). |
OPEN_E_FAIL | Any other failure |
OpEN API Version: 1.1
open_error_t openapiRoutingProtocolDeregister | ( | openapiClientHandle_t * | client_handle, |
uint32_t | vrfId, | ||
uint32_t | addressFamily, | ||
uint32_t | protoId | ||
) |
Deregister a routing protocol.
[in] | client_handle | client handle from registration API |
[in] | vrfId | VRF Identifier |
[in] | addressFamily | Address family (IPv4 or IPv6) |
[in] | protoId | Unique protocol identifier that RPPI provided at registration time. |
OPEN_E_NONE | If a new route type is removed and a valid route type is returned. |
OPEN_E_NOT_FOUND | If the route type does not match a registered route type. |
OPEN_E_FAIL | Other failure. |
OpEN API Version: 1.3
open_error_t openapiRoutingProtocolRegister | ( | openapiClientHandle_t * | client_handle, |
uint32_t | vrfId, | ||
OPEN_AF_t | addressFamily, | ||
open_buffdesc * | protoName, | ||
open_buffdesc * | protoCode, | ||
uint32_t * | protoId | ||
) |
Register a new routing protocol.
If a protocol already exists with the given protocol name, the existing protocol ID is returned.
[in] | client_handle | client handle from registration API |
[in] | vrfId | VRF Identifier |
[in] | addressFamily | Address family (IPv4 or IPv6) |
[in] | protoName | Name of the routing protocol. This name is used in the UI to refer to this protocol. (e.g., "redistribute <protoName>). openapiRouteProtoNameLenMax() gives the max length. |
[in] | protoCode | One character routing protocol code. Used in "show ip route" to identify the routing protocol that provided a route. |
[out] | protoId | Unique identifier for the routing protocol. |
OPEN_E_NONE | If a protocol is added and a valid protocol ID is returned. |
OPEN_E_EXISTS | If the protocol name matches an existing protocol type. In this case, protoId is set to the value for the existing entry. |
OPEN_E_UNAVAIL | If the address family is not supported for this operation. |
OPEN_E_FULL | If the maximum number of protocols are already registered. |
OPEN_E_PARAM | If the output parameter is NULL. |
OPEN_E_INTERNAL | If any of the input names are too long or otherwise invalid. |
OPEN_E_FAIL | Other failure. |
OPEN_E_NOT_FOUND | If the VRF instance does not exist. |
OpEN API Version: 1.3
open_error_t openapiRoutingStartupStatus | ( | openapiClientHandle_t * | client_handle, |
OPEN_AF_t | af, | ||
uint32_t * | complete | ||
) |
Report whether IP routing has finished initialization for a given address family.
[in] | client_handle | client handle from registration API |
[in] | af | Address Family |
[out] | complete | 1 if OPEN routing initialization is complete 0 if OPEN routing initialization is still underway |
OPEN_E_NONE | on success |
OPEN_E_PARAM | on if the address family is unsupported |
OPEN_E_FAIL | for any other failure |
When an application starts, it can use this API to determine whether OPEN is still initializing (startup is not complete). If so, the application should wait until it receives a startup complete event (OPENR_RTR_STARTUP_DONE for IPv4, OPENR_RTR6_STARTUP_DONE for IPv6) through the router event service and then retrieve the complete routing state. If this API indicates that OPEN initialization is already complete, an application may immediately retrieve the routing state and expect to receive a notification through the RPPI router event service if any state changes.
OpEN API Version: 1.1
open_error_t openapiRoutingStartupStatusVr | ( | openapiClientHandle_t * | client_handle, |
OPEN_AF_t | af, | ||
uint32_t | vrfId, | ||
uint32_t * | complete | ||
) |
Report whether IP routing has finished initialization in the requested VRF for a given address family.
[in] | client_handle | client handle from registration API |
[in] | af | Address Family |
[in] | vrfId | VRF Identifier |
[out] | complete | 1 if OPEN routing initialization is complete 0 if OPEN routing initialization is still underway |
OPEN_E_NONE | on success |
OPEN_E_PARAM | on if the address family is unsupported |
OPEN_E_FAIL | for any other failure |
When an application starts, it can use this API to determine whether OPEN is still initializing (startup is not complete). If so, the application should wait until it receives a startup complete event (OPENR_RTR_STARTUP_DONE for IPv4, OPENR_RTR6_STARTUP_DONE for IPv6) through the router event service and then retrieve the complete routing state. If this API indicates that OPEN initialization is already complete, an application may immediately retrieve the routing state and expect to receive a notification through the RPPI router event service if any state changes.
OpEN API Version: 1.1
open_error_t openapiRtoFreeRouteCountGet | ( | openapiClientHandle_t * | client_handle, |
uint32_t | vrfId, | ||
uint32_t * | rtoFreeRouteCount | ||
) |
Get the number of available routes in RTO for this VRF Id.
[in] | client_handle | Client handle from registration API |
[in] | vrfId | VRF Identifier |
[out] | rtoFreeRouteCount | Free route count in RTO |
OPEN_E_NONE | If the RTO call is successful |
OPEN_E_ERROR | If the RTO call is unsuccessful |
OpEN API Version: 1.3
open_error_t openapiRtrAdminModeGet | ( | openapiClientHandle_t * | client_handle, |
OPEN_AF_t | af, | ||
OPEN_CONTROL_t * | enable | ||
) |
Get the current router admin mode given an address family.
[in] | client_handle | client handle from registration API |
[in] | af | Address Family |
[out] | enable | OPEN_CONTROL_t structure returning the admin mode |
OPEN_E_NONE | on success |
OPEN_E_PARAM | on improper input parameters |
OPEN_E_UNAVAIL | on failure |
OpEN API Version: 1.1
open_error_t openapiRtrAdminModeGetVrf | ( | openapiClientHandle_t * | client_handle, |
OPEN_AF_t | af, | ||
uint32_t | vrfId, | ||
OPEN_CONTROL_t * | enable | ||
) |
Get the router admin mode of the VRF.
[in] | client_handle | Client handle from registration API |
[in] | af | Address family |
[in] | vrfId | VRF Identifier |
[out] | enable | Enable mode |
OPEN_E_NONE | If the Admin mode get call is successful |
OPEN_E_FAIL | If the Admin mode get call is unsuccessful |
OPEN_E_PARAM | If the passed params are invalid |
OpEN API Version: 1.3
open_error_t openapiRtrICMPEchoReplyModeGet | ( | openapiClientHandle_t * | client_handle, |
open_buffdesc * | vrfName, | ||
uint32_t * | mode | ||
) |
Get the ICMP ignore echo-req mode.
[in] | client_handle | client handle from registration API |
[in] | vrfName | VRF name |
[out] | mode | ICMP ignore echo-request mode |
OPEN_E_NONE | on success |
OPEN_E_PARAM | on improper input parameters |
OPEN_E_FAIL | on other failure |
OpEN API Version: 1.3
open_error_t openapiRtrICMPRatelimitGet | ( | openapiClientHandle_t * | client_handle, |
open_buffdesc * | vrfName, | ||
uint32_t * | burstSize, | ||
uint32_t * | interval | ||
) |
Get the ICMP Ratelimit parameters.
[in] | client_handle | client handle from registration API |
[in] | vrfName | VRF name |
[out] | burstSize | burst-size for ICMP rate-limit |
[out] | interval | interval for ICMP rate-limit |
OPEN_E_NONE | on success |
OPEN_E_PARAM | on improper input parameters |
OPEN_E_FAIL | on other failure |
OpEN API Version: 1.3
open_error_t openapiRtrICMPRedirectsModeGet | ( | openapiClientHandle_t * | client_handle, |
uint32_t | intf, | ||
uint32_t * | mode | ||
) |
Get the ICMP Redirects mode of the interface.
[in] | client_handle | client handle from registration API |
[in] | intf | The Configured Router Interface |
[out] | mode | ICMP Redirects mode of the interface |
OPEN_E_NONE | on success |
OPEN_E_PARAM | on improper input parameters |
OPEN_E_FAIL | on other failure |
OpEN API Version: 1.3
open_error_t openapiRtrICMPUnreachablesModeGet | ( | openapiClientHandle_t * | client_handle, |
uint32_t | intf, | ||
uint32_t * | mode | ||
) |
Get the ICMP Unreachables mode of the interface.
[in] | client_handle | client handle from registration API |
[in] | intf | The Configured Router Interface |
[out] | mode | ICMP Unreachables mode of the interface |
OPEN_E_NONE | on success |
OPEN_E_PARAM | on improper input parameters |
OPEN_E_FAIL | on other failure |
OpEN API Version: 1.3
open_error_t openapiRtrIntfIpAddrGet | ( | openapiClientHandle_t * | client_handle, |
OPEN_AF_t | af, | ||
uint32_t | intf, | ||
open_inet_pfx_t * | ipAddr | ||
) |
Get an IP address on a given router interface for a given address family.
[in] | client_handle | client handle from registration API |
[in] | af | Address Family (IPv4 or IPv6) |
[in] | intf | A routing interface ID |
[in,out] | ipAddr | IP address and prefix length. On input, this can be set to an IP address on this interface, and the call returns the next IP address on the interface. Set to all zeros to retrieve the first IP address on the interface. |
OPEN_E_NONE | if an address is returned |
OPEN_E_EMPTY | if there are no more IP addresses to report on this interface |
OPEN_E_PARAM | if an input parameter is invalid |
OPEN_E_NOT_FOUND | if a previous address is specified, but that address is not on this interface |
OPEN_E_FAIL | for any other failure |
OpEN API Version: 1.1
open_error_t openapiRtrIntfIpAddrMethodGet | ( | openapiClientHandle_t * | client_handle, |
uint32_t | intf, | ||
OPEN_INTF_IP_ADDR_METHOD_t * | addrMethod, | ||
OPEN_CONTROL_t * | clientIdEnable | ||
) |
Get the method used to assign the IP address to a Router interface.
[in] | client_handle | client handle from registration API |
[in] | intf | Router Interface |
[out] | addrMethod | IP address method |
[out] | clientIdEnable | DHCP Client ID option enable flag |
OPEN_E_NONE | get successful |
OPEN_E_NOT_FOUND | not a configured routing interface |
OPEN_E_PARAM | error in parameter passed |
OPEN_E_FAIL | any other failure |
OpEN API Version: 1.18
open_error_t openapiRtrIntfIpStackDrvNameGet | ( | openapiClientHandle_t * | client_handle, |
uint32_t | vrfId, | ||
uint32_t | intf, | ||
open_buffdesc * | intfName | ||
) |
Get the drv name of the configured router interface.
[in] | client_handle | client handle from registration API |
[in] | vrfId | The Configured VRF interface |
[in] | intf | The Configured Router Interface |
[out] | intfName | Name of the interface |
OPEN_E_NONE | on success |
OPEN_E_PARAM | on improper input parameters |
OPEN_E_FAIL | on other failure |
OpEN API Version: 1.3
open_error_t openapiRtrIntfIpStackIfIndexGet | ( | openapiClientHandle_t * | client_handle, |
uint32_t | intf, | ||
uint32_t * | ifIndex | ||
) |
Get the ipstack ifIndex on the configured router interface.
[in] | client_handle | client handle from registration API |
[in] | intf | The Configured Router Interface |
[out] | ifIndex | ipstack ifIndex of the interface |
OPEN_E_NONE | on success |
OPEN_E_PARAM | on improper input parameters |
OPEN_E_FAIL | on other failure |
OpEN API Version: 1.1
open_error_t openapiRtrIntfIpStackIfNameGet | ( | openapiClientHandle_t * | client_handle, |
uint32_t | intf, | ||
open_buffdesc * | intfName | ||
) |
Get the name of the configured router interface.
[in] | client_handle | client handle from registration API |
[in] | intf | The Configured Router Interface |
[out] | intfName | Name of the interface |
OPEN_E_NONE | on success |
OPEN_E_PARAM | on improper input parameters |
OPEN_E_FAIL | on other failure |
OpEN API Version: 1.3
open_error_t openapiRtrIntfIpStackStkNameGet | ( | openapiClientHandle_t * | client_handle, |
uint32_t | vrfId, | ||
uint32_t | intf, | ||
open_buffdesc * | intfName | ||
) |
Get the stk name of the configured router interface.
[in] | client_handle | client handle from registration API |
[in] | vrfId | The Configured VRF interface |
[in] | intf | The Configured Router Interface |
[out] | intfName | Name of the interface |
OPEN_E_NONE | on success |
OPEN_E_PARAM | on improper input parameters |
OPEN_E_FAIL | on other failure |
OpEN API Version: 1.3
open_error_t openapiRtrIntfL3MacAddressGet | ( | openapiClientHandle_t * | client_handle, |
uint32_t | intf, | ||
open_buffdesc * | mac | ||
) |
Get the L3 MAC address of the router interface.
[in] | client_handle | client handle from registration API |
[in] | intf | The Configured Router Interface |
[out] | mac | L3 MAC address of the interface |
OPEN_E_NONE | on success |
OPEN_E_PARAM | on improper input parameters |
OPEN_E_FAIL | on other failure |
OpEN API Version: 1.3
open_error_t openapiRtrIntfLoopbackIdGet | ( | openapiClientHandle_t * | client_handle, |
uint32_t | intf, | ||
uint32_t * | loopbackId | ||
) |
Get the loopback id for the configured router interface.
[in] | client_handle | client handle from registration API |
[in] | intf | The Configured Router Interface |
[out] | loopbackId | Loopback id of the interface |
OPEN_E_NONE | on success |
OPEN_E_PARAM | on improper input parameters |
OPEN_E_FAIL | on other failure |
OpEN API Version: 1.1
open_error_t openapiRtrIntfNameGet | ( | openapiClientHandle_t * | client_handle, |
uint32_t | intf, | ||
open_buffdesc * | intfName | ||
) |
Get the interface name of the configured router interface.
[in] | client_handle | client handle from registration API |
[in] | intf | The Configured Router Interface |
[out] | intfName | Name of the interface. This buffer must be at least the length indicated by openapiIntfNameSizeGet(). |
OPEN_E_NONE | on success |
OPEN_E_PARAM | on improper input parameters |
OPEN_E_FAIL | on other failure |
OpEN API Version: 1.1
open_error_t openapiRtrIntfNextGet | ( | openapiClientHandle_t * | client_handle, |
uint32_t | intf, | ||
uint32_t * | nextIntf | ||
) |
Get the next configured router interface.
[in] | client_handle | client handle from registration API |
[in] | intf | The Configured Router Interface or 0 to get the first router interface |
[out] | nextIntf | The next configured router interface |
OPEN_E_NONE | on success |
OPEN_E_PARAM | on invalid input parameters |
OPEN_E_NOT_FOUND | when no next interface found |
OPEN_E_FAIL | on other failure |
OpEN API Version: 1.1
open_error_t openapiRtrIntfNextGetVrf | ( | openapiClientHandle_t * | client_handle, |
uint32_t | vrfId, | ||
uint32_t | intf, | ||
uint32_t * | nextIntf | ||
) |
Get the next configured router interface.
[in] | client_handle | client handle from registration API |
[in] | vrfId | VRF Identifier |
[in] | intf | The Configured Router Interface or 0 to get the first router interface |
[out] | nextIntf | The next configured router interface |
OPEN_E_NONE | on success |
OPEN_E_PARAM | on invalid input parameters |
OPEN_E_NOT_FOUND | when no next interface found |
OPEN_E_FAIL | on other failure |
OpEN API Version: 1.3
open_error_t openapiRtrIntfOperModeGet | ( | openapiClientHandle_t * | client_handle, |
OPEN_AF_t | af, | ||
uint32_t | intf, | ||
OPEN_CONTROL_t * | ifState | ||
) |
Get the up/down status of the router interface given the address family.
[in] | client_handle | client handle from registration API |
[in] | af | Address Family |
[in] | intf | The Configured Router Interface |
[out] | ifState | OPEN_CONTROL_t structure returning the Operating mode |
OPEN_E_NONE | on success |
OPEN_E_PARAM | on improper input parameters |
OPEN_E_FAIL | on other failure |
OpEN API Version: 1.1
open_error_t openapiRtrIntfSecIpAddrGet | ( | openapiClientHandle_t * | client_handle, |
OPEN_AF_t | af, | ||
uint32_t | intf, | ||
open_inet_pfx_t * | ipAddr, | ||
uint32_t * | index | ||
) |
Get a Secondary IP address on a given router interface for a given address family.
[in] | client_handle | client handle from registration API |
[in] | af | Address Family (IPv4) |
[in] | intf | A routing interface ID |
[in,out] | ipAddr | IP address and prefix length. On input, this can be set to an IP address on this interface, and the call returns the next IP address on the interface. Set to all zeros to retrieve the first IP address on the interface. |
[out] | index | Index of the Secondary IP |
OPEN_E_NONE | if an address is returned |
OPEN_E_EMPTY | if there are no more IP addresses to report on this interface |
OPEN_E_PARAM | if an input parameter is invalid |
OPEN_E_NOT_FOUND | if a previous address is specified, but that address is not on this interface |
OPEN_E_FAIL | for any other failure |
OpEN API Version: 1.3
open_error_t openapiRtrIntfTypeGet | ( | openapiClientHandle_t * | client_handle, |
uint32_t | intf, | ||
OPEN_INTF_TYPE_t * | intfType | ||
) |
Get the type of the interface for the given router interface.
[in] | client_handle | client handle from registration API |
[in] | intf | The Configured Router Interface |
[out] | intfType | OPEN_INTF_TYPE_t structure to hold the type of the interface |
OPEN_E_NONE | on success |
OPEN_E_PARAM | on improper input parameters |
OPEN_E_FAIL | on other failure |
OpEN API Version: 1.1
open_error_t openapiRtrIntfUnitSlotPortGet | ( | openapiClientHandle_t * | client_handle, |
uint32_t | intf, | ||
open_USP_t * | usp | ||
) |
Get the unit, slot and port of the router interface.
[in] | client_handle | client handle from registration API |
[in] | intf | The Configured Router Interface |
[out] | usp | unit/slot/port of the interface |
OPEN_E_NONE | on success |
OPEN_E_PARAM | on improper input parameters |
OPEN_E_FAIL | on other failure |
OpEN API Version: 1.3
open_error_t openapiRtrIntfVlanIdGet | ( | openapiClientHandle_t * | client_handle, |
uint32_t | intf, | ||
uint32_t * | vlanId | ||
) |
Get the vlan id on the configured router interface.
[in] | client_handle | client handle from registration API |
[in] | intf | The Configured Router Interface |
[out] | vlanId | Vlan id of the interface |
OPEN_E_NONE | on success |
OPEN_E_PARAM | on improper input parameters |
OPEN_E_FAIL | on other failure |
OpEN API Version: 1.1
open_error_t openapiRtrLoopbackIntIfNumGet | ( | openapiClientHandle_t * | client_handle, |
uint32_t | loopbackId, | ||
uint32_t * | intf | ||
) |
Get the internal interface number of the loopback interface.
[in] | client_handle | client handle from registration API |
[in] | loopbackId | Loopback id of the interface |
[out] | intf | Internal interface number |
OPEN_E_NONE | on success |
OPEN_E_PARAM | on improper input parameters |
OPEN_E_FAIL | on other failure |
OpEN API Version: 1.15
open_error_t openapiStackIfIndexIntIfNumGet | ( | openapiClientHandle_t * | client_handle, |
uint32_t | ifIndex, | ||
uint32_t * | intIfNum | ||
) |
Get the interface number corresponding to the given ipstack ifIndex.
[in] | client_handle | client handle from registration API |
[in] | ifIndex | ipstack ifIndex of the interface |
[out] | intIfNum | The Configured Router Interface |
OPEN_E_NONE | on success |
OPEN_E_PARAM | on improper input parameters |
OPEN_E_FAIL | on other failure |
OpEN API Version: 1.1
open_error_t openapiUnnumberedPeerInfoSet | ( | openapiClientHandle_t * | client_handle, |
uint32_t | intIfNum, | ||
uint32_t | peerIp, | ||
OPEN_BOOL_t | isAdd, | ||
uint32_t | flag | ||
) |
Set the Unnumbered peer info on an interface.
[in] | client_handle | Client handle from registration API |
[in] | intfNum | interface number |
[in] | peerIp | Unnumbered peer IP address |
[in] | isAdd | add/delete |
[in] | flag | flag to determine the source |
OPEN_E_NONE | If the OPEN call is successful |
OPEN_E_ERROR | otherwise |
OpEN API Version: 1.3
open_error_t openapiVrAgentProbeResultIpSlaNotify | ( | openapiClientHandle_t * | client_handle, |
uint32_t | vrfId, | ||
uint32_t | ipSlaId, | ||
uint32_t | probeReturnCode, | ||
uint32_t | lastProbeRTTvalue, | ||
uint32_t | latestOperationStartUpTime | ||
) |
This routine is called by VRF Manager when a VR Probe Agent of VRF Instance needs to update the result of last probe attempt of an IPSLA operation.
[in] | vrfId | VRF Identifier |
[in] | ipSlaId | IpSla operation number |
[in] | probeReturnCode | Result code of last probe attempt |
[in] | lastProbeRTTvalue | RTT value in msec of last probe |
[in] | latestOperationStartUpTime | Uptime of last probe attempt |
OPEN_E_NONE | Get successful. |
OPEN_E_PARAM | Error in parameter passed. |
OpEN API Version: 1.3
open_error_t openapiVrfIntfNameGet | ( | openapiClientHandle_t * | client_handle, |
uint32_t | vrfId, | ||
open_buffdesc * | intfName | ||
) |
Get the name of the configured VRF interface.
[in] | client_handle | client handle from registration API |
[in] | vrfId | The Configured VRF interface |
[out] | intfName | Name of the interface |
OPEN_E_NONE | on success |
OPEN_E_PARAM | on improper input parameters |
OPEN_E_FAIL | on other failure |
OpEN API Version: 1.3
open_error_t openapiVrfNameGet | ( | openapiClientHandle_t * | client_handle, |
uint32_t | vrfId, | ||
open_buffdesc * | vrfName | ||
) |
Get the VRF name for a given VRF ID.
[in] | client_handle | client handle from registration API |
[in] | vrfId | VRF Identifier |
[out] | vrfName | VRF name |
OPEN_E_NONE | on success |
OPEN_E_PARAM | on improper input parameters |
OPEN_E_FAIL | on other failure |
OpEN API Version: 1.1
open_error_t openapiVrfNameNextGet | ( | openapiClientHandle_t * | client_handle, |
open_buffdesc * | vrfName, | ||
open_buffdesc * | vrfNameNext | ||
) |
Get the next VRF name.
[in] | client_handle | client handle from registration API |
[in] | vrfName | VRF name (set to "") for initial. |
[out] | vrfNameNext | Next VRF name |
OPEN_E_NONE | on success |
OPEN_E_PARAM | on improper input parameters |
OPEN_E_FAIL | if no more VRFs to report |
OpEN API Version: 1.15