Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.6.0.3
Macros | Enumerations | Functions
IP Route Table Support [OPENAPI_IP_ROUTE_TABLE]

Macros

#define OPEN_API_ROUTE_NEXT_HOP_ADDR_BUF_MIN   ((16 * 20) + 1)
 Minimum size of the buffer for the nex hop IP addresses list.
 
#define OPEN_API_ROUTE_NEXT_HOP_INTF_BUF_MIN   ((16 * 60) + 1)
 Minimum size of the buffer for the nex hop interfaces list.
 
#define OPEN_API_ROUTE_PREF_MAX   255
 Maximum value of the route preference.
 
#define OPEN_API_ROUTE_PREF_MIN   0
 Maximum value of the route preference.
 

Enumerations

enum  OPEN_RTO6_ROUTE_TYPE_INDICES_t {
  OPEN_RTO6_LOCAL = 1, OPEN_RTO6_KERNEL = 2, OPEN_RTO6_STATIC = 3, OPEN_RTO6_MPLS = 4,
  OPEN_RTO6_OSPFV3_INTRA_AREA = 5, OPEN_RTO6_OSPFV3_INTER_AREA = 6, OPEN_RTO6_OSPFV3_TYPE1_EXT = 7, OPEN_RTO6_OSPFV3_TYPE2_EXT = 8,
  OPEN_RTO6_OSPFV3_NSSA_TYPE1_EXT = 9, OPEN_RTO6_OSPFV3_NSSA_TYPE2_EXT = 10, OPEN_RTO6_RIP = 11, OPEN_RTO6_DEFAULT = 12,
  OPEN_RTO6_IBGP = 13, OPEN_RTO6_EBGP = 14, OPEN_RTO6_LBGP = 15, OPEN_RTO6_EXTERNAL = 16,
  OPEN_RTO6_6TO4 = 17, OPEN_RTO6_NET_PROTOTYPE = 18
}
 
enum  OPEN_RTO_PROTOCOL_INDICES_t {
  OPEN_RTO_RESERVED = 0, OPEN_RTO_LOCAL = 1, OPEN_RTO_KERNEL = 2, OPEN_RTO_STATIC = 3,
  OPEN_RTO_MPLS = 4, OPEN_RTO_OSPF_INTRA_AREA = 5, OPEN_RTO_OSPF_INTER_AREA = 6, OPEN_RTO_OSPF_TYPE1_EXT = 7,
  OPEN_RTO_OSPF_TYPE2_EXT = 8, OPEN_RTO_OSPF_NSSA_TYPE1_EXT = 9, OPEN_RTO_OSPF_NSSA_TYPE2_EXT = 10, OPEN_RTO_OSPFV3_INTRA_AREA = 11,
  OPEN_RTO_OSPFV3_INTER_AREA = 12, OPEN_RTO_OSPFV3_TYPE1_EXT = 13, OPEN_RTO_OSPFV3_TYPE2_EXT = 14, OPEN_RTO_OSPFV3_NSSA_TYPE1_EXT = 15,
  OPEN_RTO_OSPFV3_NSSA_TYPE2_EXT = 16, OPEN_RTO_RIP = 17, OPEN_RTO_DEFAULT = 18, OPEN_RTO_IBGP = 19,
  OPEN_RTO_EBGP = 20, OPEN_RTO_LBGP = 21, OPEN_RTO_EXTERNAL = 22, OPEN_RTO_UNNUMBERED = 23,
  OPEN_RTO_NET_PROTOTYPE = 24, OPEN_RTO_LAST_PROTOCOL = 25
}
 

Functions

open_error_t openapiIpRouteAgeGet (openapiClientHandle_t *client_handle, uint32_t *routeDest, uint32_t *routeMask, OPEN_RTO_PROTOCOL_INDICES_t *routeProto, uint32_t *routePref, uint32_t *routeAge)
 Gets the number of seconds since this route was last updated or otherwise determined to be correct. More...
 
open_error_t openapiIpRouteEntryGetNext (openapiClientHandle_t *client_handle, uint32_t *routeDest, uint32_t *routeMask, OPEN_RTO_PROTOCOL_INDICES_t *routeProto, uint32_t *routePref)
 Gets the next route entry for the specified route destination. More...
 
open_error_t openapiIpRouteHwFailureGet (openapiClientHandle_t *client_handle, uint32_t *routeDest, uint32_t *routeMask, OPEN_RTO_PROTOCOL_INDICES_t *routeProto, uint32_t *routePref, OPEN_BOOL_t *hwFailure)
 Gets the hardware failure flag for this route. More...
 
open_error_t openapiIpRouteMetricGet (openapiClientHandle_t *client_handle, uint32_t *routeDest, uint32_t *routeMask, OPEN_RTO_PROTOCOL_INDICES_t *routeProto, uint32_t *routePref, uint32_t *metric)
 Gets the primary routing metric for this route. More...
 
open_error_t openapiIpRouteNextHopAddrGet (openapiClientHandle_t *client_handle, uint32_t *routeDest, uint32_t *routeMask, OPEN_RTO_PROTOCOL_INDICES_t *routeProto, uint32_t *routePref, open_buffdesc *nextHopAddr)
 Gets the comma separated list of the IP addresses of the next hop of this route. More...
 
open_error_t openapiIpRouteNextHopIntfGet (openapiClientHandle_t *client_handle, uint32_t *routeDest, uint32_t *routeMask, OPEN_RTO_PROTOCOL_INDICES_t *routeProto, uint32_t *routePref, open_buffdesc *nextHopIntf)
 Gets the comma separated list of the local interfaces through which the next hop of this route should be reached. More...
 

Detailed Description

Enumeration Type Documentation

Enumerator
OPEN_RTO6_LOCAL 

Local route.

OPEN_RTO6_KERNEL 

Kernel route.

OPEN_RTO6_STATIC 

Static route.

OPEN_RTO6_MPLS 

MPLS route.

OPEN_RTO6_OSPFV3_INTRA_AREA 

OSPFV3 intra area route.

OPEN_RTO6_OSPFV3_INTER_AREA 

OSPFV3 inter area route.

OPEN_RTO6_OSPFV3_TYPE1_EXT 

OSPFV3 type 1 ext route.

OPEN_RTO6_OSPFV3_TYPE2_EXT 

OSPFV3 type 2 ext route.

OPEN_RTO6_OSPFV3_NSSA_TYPE1_EXT 

OSPFV3 nssa type 1 ext route.

OPEN_RTO6_OSPFV3_NSSA_TYPE2_EXT 

OSPFV3 nssa type 2 ext route.

OPEN_RTO6_RIP 

RIP route.

OPEN_RTO6_DEFAULT 

Default route.

OPEN_RTO6_IBGP 

IBGP route.

OPEN_RTO6_EBGP 

EBGP route.

OPEN_RTO6_LBGP 

local BGP routes, e.g., reject routes for aggregates

OPEN_RTO6_EXTERNAL 

Learnt from external third party entity via netlink.

OPEN_RTO6_6TO4 

6to4 route

OPEN_RTO6_NET_PROTOTYPE 

Net prototype route.

Definition at line 78 of file openapi_ip_route_table.h.

Enumerator
OPEN_RTO_RESERVED 

Not a valid protocol.

OPEN_RTO_LOCAL 

Connected.

OPEN_RTO_KERNEL 

Kernel.

OPEN_RTO_STATIC 

Static.

OPEN_RTO_MPLS 

MPLS.

OPEN_RTO_OSPF_INTRA_AREA 

OSPF Intra Area.

OPEN_RTO_OSPF_INTER_AREA 

OSPF Inter Area.

OPEN_RTO_OSPF_TYPE1_EXT 

OSPF External Type 1.

OPEN_RTO_OSPF_TYPE2_EXT 

OSPF External Type 2.

OPEN_RTO_OSPF_NSSA_TYPE1_EXT 

OSPF NSSA External Type 1.

OPEN_RTO_OSPF_NSSA_TYPE2_EXT 

OSPF NSSA External Type 2.

OPEN_RTO_OSPFV3_INTRA_AREA 

OSPFv3 Intra Area.

OPEN_RTO_OSPFV3_INTER_AREA 

OSPFv3 Inter Area.

OPEN_RTO_OSPFV3_TYPE1_EXT 

OSPFv3 External Type 1.

OPEN_RTO_OSPFV3_TYPE2_EXT 

OSPFv3 External Type 2.

OPEN_RTO_OSPFV3_NSSA_TYPE1_EXT 

OSPFv3 NSSA External Type 1.

OPEN_RTO_OSPFV3_NSSA_TYPE2_EXT 

OSPFv3 NSSA External Type 2.

OPEN_RTO_RIP 

RIP.

OPEN_RTO_DEFAULT 

Default.

OPEN_RTO_IBGP 

IBGP.

OPEN_RTO_EBGP 

EBGP.

OPEN_RTO_LBGP 

Local BGP.

OPEN_RTO_EXTERNAL 

External.

OPEN_RTO_UNNUMBERED 

Unnumbered.

OPEN_RTO_NET_PROTOTYPE 

NetP rototype.

OPEN_RTO_LAST_PROTOCOL 

Always keep this last.

Definition at line 48 of file openapi_ip_route_table.h.

Function Documentation

open_error_t openapiIpRouteAgeGet ( openapiClientHandle_t client_handle,
uint32_t *  routeDest,
uint32_t *  routeMask,
OPEN_RTO_PROTOCOL_INDICES_t routeProto,
uint32_t *  routePref,
uint32_t *  routeAge 
)

Gets the number of seconds since this route was last updated or otherwise determined to be correct.

Parameters
[in]client_handleclient handle from registration API.
[in]routeDestroute destination for this aentry.
[in]routeMaskroute mask for this entry.
[in]routeProtoroute protocol for this entry.
[in]routePrefroute preference for this entry.
-Minimum value OPEN_API_ROUTE_PREF_MIN
-Maximum value OPEN_API_ROUTE_PREF_MAX
[out]routeAgeroute age for this entry in seconds.
Return values
OPEN_E_NONEIf the routing age was retrived successfully.
OPEN_E_FAILIf failed to get the routing age.
OPEN_E_PARAMError in parameter passed.
OPEN_E_INTERNALInternal error.

OpEN API Version: 1.14

open_error_t openapiIpRouteEntryGetNext ( openapiClientHandle_t client_handle,
uint32_t *  routeDest,
uint32_t *  routeMask,
OPEN_RTO_PROTOCOL_INDICES_t routeProto,
uint32_t *  routePref 
)

Gets the next route entry for the specified route destination.

Parameters
[in]client_handleclient handle from registration API.
[in,out]routeDestroute destination for this and next entry.
[in,out]routeMaskroute mask for this and next entry.
[in,out]routeProtoroute protocol for this and next entry.
[in,out]routePrefroute preference for this and next entry
-Minimum value OPEN_API_ROUTE_PREF_MIN
-Maximum value OPEN_API_ROUTE_PREF_MAX
Return values
OPEN_E_NONEIf the corresponding entry exists.
OPEN_E_FAILIf the corresponding entry does not exist.
OPEN_E_PARAMError in parameter passed.
OPEN_E_INTERNALInternal error.

To get first entry *routeDest, *routeMask, *routeProto and *routePref should be set with 0.

OpEN API Version: 1.14

open_error_t openapiIpRouteHwFailureGet ( openapiClientHandle_t client_handle,
uint32_t *  routeDest,
uint32_t *  routeMask,
OPEN_RTO_PROTOCOL_INDICES_t routeProto,
uint32_t *  routePref,
OPEN_BOOL_t hwFailure 
)

Gets the hardware failure flag for this route.

Parameters
[in]client_handleclient handle from registration API.
[in]routeDestroute destination for this aentry.
[in]routeMaskroute mask for this entry.
[in]routeProtoroute protocol for this entry.
[in]routePrefroute preference for this entry.
-Minimum value OPEN_API_ROUTE_PREF_MIN
-Maximum value OPEN_API_ROUTE_PREF_MAX
[out]hwFailurehardware failure flag for this entry.
Return values
OPEN_E_NONEIf the hardware failure flag was retrived successfully.
OPEN_E_FAILIf failed to get the hardware failure flag.
OPEN_E_PARAMError in parameter passed.
OPEN_E_INTERNALInternal error.

OpEN API Version: 1.14

open_error_t openapiIpRouteMetricGet ( openapiClientHandle_t client_handle,
uint32_t *  routeDest,
uint32_t *  routeMask,
OPEN_RTO_PROTOCOL_INDICES_t routeProto,
uint32_t *  routePref,
uint32_t *  metric 
)

Gets the primary routing metric for this route.

Parameters
[in]client_handleclient handle from registration API.
[in]routeDestroute destination for this aentry.
[in]routeMaskroute mask for this entry.
[in]routeProtoroute protocol for this entry.
[in]routePrefroute preference for this entry.
-Minimum value OPEN_API_ROUTE_PREF_MIN
-Maximum value OPEN_API_ROUTE_PREF_MAX
[out]metricroute metric for this entry.
Return values
OPEN_E_NONEIf the primary routing metric was retrived successfully.
OPEN_E_FAILIf failed to get the primary routing metric.
OPEN_E_PARAMError in parameter passed.
OPEN_E_INTERNALInternal error.

OpEN API Version: 1.14

open_error_t openapiIpRouteNextHopAddrGet ( openapiClientHandle_t client_handle,
uint32_t *  routeDest,
uint32_t *  routeMask,
OPEN_RTO_PROTOCOL_INDICES_t routeProto,
uint32_t *  routePref,
open_buffdesc nextHopAddr 
)

Gets the comma separated list of the IP addresses of the next hop of this route.

Parameters
[in]client_handleclient handle from registration API.
[in]routeDestroute destination for this aentry.
[in]routeMaskroute mask for this entry.
[in]routeProtoroute protocol for this entry.
[in]routePrefroute preference for this entry.
-Minimum value OPEN_API_ROUTE_PREF_MIN
-Maximum value OPEN_API_ROUTE_PREF_MAX
[out]nextHopAddrcomma separated list of the next hop IP addresses.
-Minimum buffer size OPEN_API_ROUTE_NEXT_HOP_ADDR_BUF_MIN
Return values
OPEN_E_NONEIf the hardware failure flag was retrived successfully.
OPEN_E_FAILIf failed to get the hardware failure flag.
OPEN_E_PARAMError in parameter passed.
OPEN_E_INTERNALInternal error.

OpEN API Version: 1.14

open_error_t openapiIpRouteNextHopIntfGet ( openapiClientHandle_t client_handle,
uint32_t *  routeDest,
uint32_t *  routeMask,
OPEN_RTO_PROTOCOL_INDICES_t routeProto,
uint32_t *  routePref,
open_buffdesc nextHopIntf 
)

Gets the comma separated list of the local interfaces through which the next hop of this route should be reached.

Parameters
[in]client_handleclient handle from registration API.
[in]routeDestroute destination for this aentry.
[in]routeMaskroute mask for this entry.
[in]routeProtoroute protocol for this entry.
[in]routePrefroute preference for this entry.
-Minimum value OPEN_API_ROUTE_PREF_MIN
-Maximum value OPEN_API_ROUTE_PREF_MAX
[out]nextHopIntfcomma separated list of the next hop interfaces.
-Minimum buffer size OPEN_API_ROUTE_NEXT_HOP_INTF_BUF_MIN
Return values
OPEN_E_NONEIf the hardware failure flag was retrived successfully.
OPEN_E_FAILIf failed to get the hardware failure flag.
OPEN_E_PARAMError in parameter passed.
OPEN_E_INTERNALInternal error.

OpEN API Version: 1.14