Open Ethernet Networking (OpEN) API Guide and Reference Manual
3.6.0.3
|
Data Structures | |
struct | openEcmpRouteProtocolCount_s |
struct | openRouteStats_s |
Typedefs | |
typedef struct openEcmpRouteProtocolCount_s | openEcmpRouteProtocolCount_t |
typedef struct openRouteStats_s | openRouteStats_t |
Functions | |
open_error_t | openapiGetReportableRouteStats (openapiClientHandle_t *client_handle, uint64_t *ipv4Mask, uint64_t *ipv6Mask) |
Get the IPv4/IPv6 reportable route stats masks. More... | |
open_error_t | openapiIpMapDynamicProtoNextGet (openapiClientHandle_t *client_handle, uint32_t *protoId) |
Iterate through the protocols that have been dynamically registered at run time. More... | |
open_error_t | openapiIpMapProtoNameGet (openapiClientHandle_t *client_handle, uint32_t protoId, open_buffdesc *protoName) |
Get the name for a given protocol. More... | |
open_error_t | openapiIpMapProtoNameLenGet (openapiClientHandle_t *client_handle, uint32_t *len) |
Get the max protocol name length. More... | |
open_error_t | openapiIpMapProtoRouteTypeNextGet (openapiClientHandle_t *client_handle, uint32_t protoId, uint32_t *routeType) |
Iterate through the route types with a given protocol ID. More... | |
open_error_t | openapiIpMapRouteTypeNameGet (openapiClientHandle_t *client_handle, uint32_t routeType, open_buffdesc *routeTypeName) |
Get the name for a given route type. More... | |
open_error_t | openapiIpMapRouteTypeNameLenGet (openapiClientHandle_t *client_handle, uint32_t *len) |
Get the max route type name length. More... | |
open_error_t | openapiIpv4EcmpRouteProtocolCountsGet (openapiClientHandle_t *client_handle, open_buffdesc *vrf, open_buffdesc *counts) |
Get a table containing ECMP counts for each IPv4 routing protocol. More... | |
open_error_t | openapiIpv4NumRoutingProtocolsGet (openapiClientHandle_t *client_handle, uint32_t *count) |
Get the number of IPv4 routing protocols. More... | |
open_error_t | openapiIpv4RouteTableStatsGet (openapiClientHandle_t *client_handle, open_buffdesc *vrfName, OPEN_BOOL_t bestRoutes, openRouteStats_t *routeStats, open_buffdesc *numRoutes, open_buffdesc *ecmpHisto) |
Report IPv4 routing table statistics. More... | |
open_error_t | openapiIpv6EcmpRouteProtocolCountsGet (openapiClientHandle_t *client_handle, open_buffdesc *counts) |
Get a table containing ECMP counts for each IPv6 routing protocol. More... | |
open_error_t | openapiIpv6NumRoutingProtocolsGet (openapiClientHandle_t *client_handle, uint32_t *count) |
Get the number of IPv6 routing protocols. More... | |
open_error_t | openapiIpv6RouteTableStatsGet (openapiClientHandle_t *client_handle, OPEN_BOOL_t bestRoutes, openRouteStats_t *routeStats, open_buffdesc *numRoutes, open_buffdesc *ecmpHisto, open_buffdesc *prefixesNo) |
Report IPv6 routing table statistics. More... | |
open_error_t | openapiNumEcmpRoutesGet (openapiClientHandle_t *client_handle, uint32_t *count) |
Get the number of ECMP Routes. More... | |
open_error_t | openapiNumIpv6PrefixesGet (openapiClientHandle_t *client_handle, uint32_t *count) |
Get the number of IPv6 prefixes. More... | |
open_error_t openapiGetReportableRouteStats | ( | openapiClientHandle_t * | client_handle, |
uint64_t * | ipv4Mask, | ||
uint64_t * | ipv6Mask | ||
) |
Get the IPv4/IPv6 reportable route stats masks.
[in] | client_handle | OpEN client handle. |
[out] | ipv4Mask | IPv4 mask |
[out] | ipv6Mask | IPv6 mask |
OPEN_E_NONE | On success OPEN_E_FAIL Otherwise OPEN_E_PARAM Bad parameter (see notes) |
if (mask & (1 << OPEN_RTO6_MPLS)) { printf("MPLS route stats are supported\n"); } else { printf("MPLS route stats are not suppoted\n"); }
A field in openRouteStats_t named mask holds the same mask when stats are reported by openapiIpv4RouteTableStatsGet and openapiIpv6RouteTableStatsGet. However, this function can be used to get the masks without querying for statistics.
Passing either ipv4Mask or ipv6Mask as NULL will cause that mask to not be retrieved. Passing both as NULL will result in a OPEN_E_PARAM return.
OpEN API Version: 1.14
open_error_t openapiIpMapDynamicProtoNextGet | ( | openapiClientHandle_t * | client_handle, |
uint32_t * | protoId | ||
) |
Iterate through the protocols that have been dynamically registered at run time.
[in] | client_handle | OpEN client handle. |
[in,out] | protoId | Protocol ID. Set to 0 on input to get the first value. Set to previous value on input to get the next value. |
OPEN_E_NONE | If a protocol ID is returned OPEN_E_FAIL If no more dynamic protocols OPEN_E_PARAM Bad parameter |
OpEN API Version: 1.14
open_error_t openapiIpMapProtoNameGet | ( | openapiClientHandle_t * | client_handle, |
uint32_t | protoId, | ||
open_buffdesc * | protoName | ||
) |
Get the name for a given protocol.
[in] | client_handle | OpEN client handle. |
[in] | protoId | A protocol ID |
[out] | protoName | Protocol name. Size must be at least the value obtained by calling openapiIpMapProtoNameLenGet() in bytes. |
OPEN_E_NONE | If protocol name found OPEN_E_PARAM Invalid parameter. OPEN_E_FAIL Otherwise |
OpEN API Version: 1.14
open_error_t openapiIpMapProtoNameLenGet | ( | openapiClientHandle_t * | client_handle, |
uint32_t * | len | ||
) |
Get the max protocol name length.
[in] | client_handle | OpEN client handle. |
[out] | len | Max len for a protocol name. |
OPEN_E_NONE | On success OPEN_E_PARAM Bad argument OPEN_E_FAIL Otherwise |
OpEN API Version: 1.14
open_error_t openapiIpMapProtoRouteTypeNextGet | ( | openapiClientHandle_t * | client_handle, |
uint32_t | protoId, | ||
uint32_t * | routeType | ||
) |
Iterate through the route types with a given protocol ID.
[in] | client_handle | OpEN client handle. |
[in] | protoId | protocol ID |
[in,out] | routeType | route type. Set to 0 on input to get the first value. Set to previous value on input to get the next value. |
OPEN_E_NONE | If a route type returned OPEN_E_NOT_FOUND If there is no protocol with the given protocol ID OPEN_E_FAIL If no more route types for this protocol OPEN_E_PARAM Bad parameter |
OpEN API Version: 1.14
open_error_t openapiIpMapRouteTypeNameGet | ( | openapiClientHandle_t * | client_handle, |
uint32_t | routeType, | ||
open_buffdesc * | routeTypeName | ||
) |
Get the name for a given route type.
[in] | client_handle | OpEN client handle. |
[in] | routeType | A route type |
[out] | routeTypeName | Route type name. Size must be at least the value obtained by calling openapiIpMapRouteTypeNameLenGet() in bytes. |
OPEN_E_NONE | If route type name found OPEN_E_PARAM Invalid parameter. OPEN_E_FAIL Otherwise |
OpEN API Version: 1.14
open_error_t openapiIpMapRouteTypeNameLenGet | ( | openapiClientHandle_t * | client_handle, |
uint32_t * | len | ||
) |
Get the max route type name length.
[in] | client_handle | OpEN client handle. |
[out] | len | Max length for a route type name. |
OPEN_E_NONE | On success OPEN_E_PARAM Bad argument OPEN_E_FAIL Otherwise |
OpEN API Version: 1.14
open_error_t openapiIpv4EcmpRouteProtocolCountsGet | ( | openapiClientHandle_t * | client_handle, |
open_buffdesc * | vrf, | ||
open_buffdesc * | counts | ||
) |
Get a table containing ECMP counts for each IPv4 routing protocol.
[in] | client_handle | OpEN client handle |
[in] | vrf | VRF name. Use "" for default. |
[out] | counts | Number of ECMP routes returned as a vector of openEcmpRouteProtocolCount_t. Use openapiIpv4NumRoutingProtocolsGet() to determine the number of elements to allocate in this buffer. On return, the size field of the buffdesc will contain the number of bytes consumed by the elements that were returned. |
OPEN_E_NONE | Success. |
OPEN_E_PARAM | Invalid argument. |
OPEN_E_FAIL | Failure occurred. |
OPEN_E_INTERNAL | Internal error occurred. |
OpEN API Version: 1.15
open_error_t openapiIpv4NumRoutingProtocolsGet | ( | openapiClientHandle_t * | client_handle, |
uint32_t * | count | ||
) |
Get the number of IPv4 routing protocols.
[in] | client_handle | OpEN client handle |
[out] | count | Number of IPv4 routing protocols. |
OPEN_E_NONE | Success. |
OPEN_E_PARAM | Invalid argument. |
OPEN_E_FAIL | Failure occurred. |
OpEN API Version: 1.14
open_error_t openapiIpv4RouteTableStatsGet | ( | openapiClientHandle_t * | client_handle, |
open_buffdesc * | vrfName, | ||
OPEN_BOOL_t | bestRoutes, | ||
openRouteStats_t * | routeStats, | ||
open_buffdesc * | numRoutes, | ||
open_buffdesc * | ecmpHisto | ||
) |
Report IPv4 routing table statistics.
[in] | client_handle | OpEN client handle. |
[in] | vrfName | VRF Name |
[in] | bestRoutes | Whether to report statistics for just best routes or for all routes. Set to OPEN_TRUE to only get best routes and OPEN_FALSE to get all routes. |
[out] | routeStats | A place to put the stats. |
[out] | numRoutes | Contains number of routes for each supported routing protocol. |
[out] | ecmpHisto | Contains ECMP next hop histogram. |
OPEN_E_NONE | Success. |
OPEN_E_PARAM | Invalid argument. |
OPEN_E_FAIL | Failure occurred. |
OpEN API Version: 1.14
open_error_t openapiIpv6EcmpRouteProtocolCountsGet | ( | openapiClientHandle_t * | client_handle, |
open_buffdesc * | counts | ||
) |
Get a table containing ECMP counts for each IPv6 routing protocol.
[in] | client_handle | OpEN client handle. |
[out] | counts | Number of ECMP routes returned as a vector of openEcmpRouteProtocolCount_t. Use openapiIpv6NumRoutingProtocolsGet() to determine the number of elements to allocate in this buffer. On return, the size field of the buffdesc will contain the size in bytes consumed by the number of elements that were returned. |
OPEN_E_NONE | Success. |
OPEN_E_PARAM | Invalid argument. |
OPEN_E_FAIL | Failure occurred. |
OPEN_E_UNAVAIL | Failure occurred. |
OPEN_E_INTERNAL | Internal error occurred. |
OpEN API Version: 1.15
open_error_t openapiIpv6NumRoutingProtocolsGet | ( | openapiClientHandle_t * | client_handle, |
uint32_t * | count | ||
) |
Get the number of IPv6 routing protocols.
[in] | client_handle | OpEN client handle |
[out] | count | Number of IPv6 routing protocols. |
OPEN_E_NONE | Success. |
OPEN_E_PARAM | Invalid argument. |
OPEN_E_FAIL | Failure occurred. |
OpEN API Version: 1.14
open_error_t openapiIpv6RouteTableStatsGet | ( | openapiClientHandle_t * | client_handle, |
OPEN_BOOL_t | bestRoutes, | ||
openRouteStats_t * | routeStats, | ||
open_buffdesc * | numRoutes, | ||
open_buffdesc * | ecmpHisto, | ||
open_buffdesc * | prefixesNo | ||
) |
Report IPv6 routing table statistics.
[in] | client_handle | OpEN client handle. |
[in] | vrfName | VRF Name |
[in] | bestRoutes | Whether to report statistics for just best routes or for all routes |
[out] | routeStats | A place to put the stats. |
[out] | numRoutes | Contains number of routes for each supported routing protocol. |
[out] | ecmpHisto | Contains ECMP next hop histogram. |
[out] | prefixesNo | Contains vector of prefix numbers. |
OPEN_E_NONE | Success. |
OPEN_E_PARAM | Invalid argument. |
OPEN_E_FAIL | Failure occurred. |
OpEN API Version: 1.14
open_error_t openapiNumEcmpRoutesGet | ( | openapiClientHandle_t * | client_handle, |
uint32_t * | count | ||
) |
Get the number of ECMP Routes.
[in] | client_handle | OpEN client handle |
[out] | count | Number of ECMP routes. |
OPEN_E_NONE | Success. |
OPEN_E_PARAM | Invalid argument. |
OPEN_E_FAIL | Failure occurred. |
OpEN API Version: 1.14
open_error_t openapiNumIpv6PrefixesGet | ( | openapiClientHandle_t * | client_handle, |
uint32_t * | count | ||
) |
Get the number of IPv6 prefixes.
[in] | client_handle | OpEN client handle |
[out] | count | Number of IPv6 prefixes. |
OPEN_E_NONE | Success. |
OPEN_E_PARAM | Invalid argument. |
OPEN_E_FAIL | Failure occurred. |
OpEN API Version: 1.14