Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.6.0.3
Data Structures | Macros | Enumerations | Functions | Variables
openapi_mpls.h File Reference
#include <stdio.h>
#include <stddef.h>
#include <sys/un.h>
#include "openapi_common.h"

Go to the source code of this file.

Data Structures

struct  OPEN_MPLS_LABELS_t
 
struct  OPEN_MPLS_TUNNEL_INITIATOR_t
 MPLS tunnel initiator informaton. More...
 

Macros

#define OPEN_MAX_MPLS_IMPOSE_LABELS   3
 

Enumerations

enum  OPEN_MPLS_LFDB_ENTRY_TYPE_t { OPEN_MPLS_TYPE_LAYER_2 = 1, OPEN_MPLS_TYPE_IPV4 = 2, OPEN_MPLS_TYPE_IPV6 = 3, OPEN_MPLS_TYPE_LAST = 4 }
 MPLS LFDB label type. More...
 
enum  OPEN_MPLS_LFDB_IN_HARDWARE_STATUS_t { OPEN_MPLS_LABEL_IN_HARDWARE = 0, OPEN_MPLS_LABEL_NOT_IN_HARDWARE = 1 }
 MPLS LFDB label status. More...
 
enum  OPEN_MPLS_LFDB_LABEL_ACTION_t { OPEN_MPLS_LABEL_SWAP = 1, OPEN_MPLS_LABEL_POP = 2, OPEN_MPLS_LABEL_LAST_POP = 3 }
 MPLS LFDB label action. More...
 
enum  OPEN_MPLS_LFDB_NOT_INSERTED_REASON_t {
  OPEN_MPLS_NONE = 0, OPEN_MPLS_UNKNOWN_SUBNET = 1, OPEN_MPLS_LOCAL_SUBNET = 3, OPEN_MPLS_NO_RESOURCES = 4,
  OPEN_MPLS_NO_VLAN = 5, OPEN_MPLS_NO_PORT = 6
}
 Reason for which the MPLS LFDB label is not applied to HW. More...
 
enum  OPEN_MPLS_LFDB_PROTOCOL_t { OPEN_MPLS_PROTO_STATIC = 1, OPEN_MPLS_PROTO_DYNAMIC = 2, OPEN_MPLS_PROTO_BGP = 3, OPEN_MPLS_PROTO_LAST = 4 }
 MPLS LFDB protocol type. More...
 

Functions

open_error_t openapiMplsBgpIntfLabelGet (openapiClientHandle_t *client_handle, uint32_t intIfNum, OPEN_AFX_t type, uint32_t *label)
 Get the label configured for the specified interface. More...
 
open_error_t openapiMplsBgpIntfLabelSet (openapiClientHandle_t *client_handle, uint32_t intIfNum, OPEN_AFX_t type, uint32_t label)
 Set an interface label. More...
 
open_error_t openapiMplsBgpLabelModeGet (openapiClientHandle_t *client_handle, OPEN_CONTROL_t *mode)
 Gets the BGP label distribution mode. More...
 
open_error_t openapiMplsBgpLabelModeSet (openapiClientHandle_t *client_handle, OPEN_CONTROL_t mode)
 Sets the BGP label distribution mode. More...
 
open_error_t openapiMplsCountersClear (openapiClientHandle_t *client_handle)
 Clears MPLS statistics. More...
 
open_error_t openapiMplsGlobalStatusGet (openapiClientHandle_t *client_handle, OPEN_MPLS_GLOBAL_STATS_t *global_status)
 Gets the global MPLS status and statistics. More...
 
open_error_t openapiMplsLfdbCreate (openapiClientHandle_t *client_handle, OPEN_MPLS_LFDB_ENTRY_t *lfdb_entry)
 Inserts a LFDB entry into the database. More...
 
open_error_t openapiMplsLfdbDelete (openapiClientHandle_t *client_handle, uint32_t label)
 Deletes an LFDB entry from the database. More...
 
open_error_t openapiMplsLfdbGet (openapiClientHandle_t *client_handle, uint32_t label, OPEN_MPLS_LFDB_ENTRY_t *lfdb_entry)
 Gets the LFDB entry for the specified label. More...
 
open_error_t openapiMplsLfdbNextGet (openapiClientHandle_t *client_handle, uint32_t label, OPEN_MPLS_LFDB_ENTRY_t *lfdb_entry)
 Gets the LFDB entry for the next numerically higher label after the specified label. More...
 
open_error_t openapiMplsTunnelInitiatorGet (openapiClientHandle_t *client_handle, OPEN_MPLS_TUNNEL_INITIATOR_t *tunnel_entry)
 Get the specified MPLS tunnel initiator information. More...
 
open_error_t openapiMplsTunnelInitiatorGetNext (openapiClientHandle_t *client_handle, OPEN_MPLS_TUNNEL_INITIATOR_t *tunnel_entry, OPEN_MPLS_TUNNEL_INITIATOR_t *next_tunnel_entry)
 Get the next MPLS tunnel initiator information. More...
 

Variables

uint32_t duplicateInsertions
 The counter shows how many duplicate insertion attempts happened for the LFDB entry. More...
 
uint32_t dynamicLfdbInsertFailures
 LFDB dynamic insert failure count. More...
 
uint32_t ecmpHighInUse
 The highest number of ECMP entries used since the switch was last powered up. More...
 
uint32_t ecmpInUse
 Current number of ECMP groups in use. More...
 
uint32_t ecmpMax
 The maximum number of ECMP entries available in the hardware. More...
 
uint32_t egressInterface
 Egress interface. More...
 
uint32_t egressLabel
 Egress label ID. More...
 
unsigned char egressMac [OPEN_MAC_ADDR_LEN]
 Egress MAC. More...
 
uint32_t egressVlan
 Egress VLAN. More...
 
OPEN_MPLS_LFDB_ENTRY_TYPE_t entryType
 Type of label. More...
 
uint64_t inBytes
 Statistics in bytes. More...
 
OPEN_MPLS_LFDB_IN_HARDWARE_STATUS_t inHardware
 Label status. More...
 
uint64_t inPackets
 Statistics in packets. More...
 
uint32_t ipv4Addr
 IPv4 address. More...
 
uint32_t ipv4PrefixLen
 IPv4 prefix len. More...
 
uint32_t ipv6PrefixLen
 IPv6 prefix len. More...
 
open_in6_addr_t ipv6Subnet
 IPv6 address. More...
 
OPEN_MPLS_LFDB_LABEL_ACTION_t labelAction
 Label action. More...
 
uint32_t lfdbHighWaterMark
 LFDB high water mark. More...
 
uint64_t lfdbLookupFailurePackets
 LFDB lookup failure packets. More...
 
uint32_t lfdbSize
 Maximum number of LFDB entries available in the hardware. More...
 
uint32_t maxLfdbLabel
 Maximum number that can be used as a label ID. More...
 
uint32_t maxTunnelInitiators
 Maximum number of MPLS tunnels available in the hardware. More...
 
uint32_t minLfdbLabel
 Minimal number that can be used as a label ID. More...
 
OPEN_MPLS_LFDB_NOT_INSERTED_REASON_t notInsertedReason
 Reason why a MPLS label is not applied in HW. More...
 
uint32_t numLfdbEntries
 Number of LFDB entries that have been already created. More...
 
uint32_t numLfdbInHardware
 Number of LFDB entries that have been applied into HW. More...
 
uint32_t numLfdbNotInHardware
 Number of LFDB entries that have not been applied into HW. More...
 
uint32_t numLfdbPerProto [OPEN_MPLS_PROTO_LAST]
 Number of LFDB entries per protocol. More...
 
uint32_t numLfdbPerType [OPEN_MPLS_TYPE_LAST]
 Number of LFDB entries per type. More...
 
uint32_t numTunnelInitiators
 Number of MPLS tunnels that have been already created. More...
 
uint32_t numTunnelsOneLabel
 Number of MPLS tunnels created with one label.
 
uint32_t numTunnelsThreeLabel
 Number of MPLS tunnels created with three labels.
 
uint32_t numTunnelsTwoLabel
 Number of MPLS tunnels created with two labels.
 
 OPEN_MPLS_GLOBAL_STATS_t
 
 OPEN_MPLS_LFDB_ENTRY_t
 
 OPEN_PACKED_STRUCT
 MPLS LFDB entry information. More...
 
OPEN_MPLS_LFDB_PROTOCOL_t protocol
 Protocol by which the label is created. More...