38 #ifndef OPENAPI_MPLS_H_INCLUDED
39 #define OPENAPI_MPLS_H_INCLUDED
47 #define OPEN_MAX_MPLS_IMPOSE_LABELS 3
98 uint32_t label[OPEN_MAX_MPLS_IMPOSE_LABELS];
104 uint32_t ingressLabel;
132 } OPEN_MPLS_LFDB_ENTRY_t;
137 unsigned char mplsMac[OPEN_MAC_ADDR_LEN];
166 } OPEN_MPLS_GLOBAL_STATS_t;
173 uint32_t label[OPEN_MAX_MPLS_IMPOSE_LABELS];
207 uint32_t intIfNum,
OPEN_AFX_t type, uint32_t label);
229 uint32_t intIfNum,
OPEN_AFX_t type, uint32_t *label);
260 OPEN_MPLS_GLOBAL_STATS_t *global_status);
323 uint32_t label, OPEN_MPLS_LFDB_ENTRY_t *lfdb_entry);
346 uint32_t label, OPEN_MPLS_LFDB_ENTRY_t *lfdb_entry);
374 OPEN_MPLS_LFDB_ENTRY_t *lfdb_entry);
uint32_t numLfdbPerType[OPEN_MPLS_TYPE_LAST]
Number of LFDB entries per type.
open_in6_addr_t ipv6Subnet
IPv6 address.
OPEN_MPLS_LFDB_PROTOCOL_t protocol
Protocol by which the label is created.
OPEN_MPLS_LFDB_NOT_INSERTED_REASON_t notInsertedReason
Reason why a MPLS label is not applied in HW.
OPEN_AFX_t
OPEN uses these enumerators to indicate BGP address family index of routes or policy for IPV4 or IPV6...
uint32_t numLfdbPerProto[OPEN_MPLS_PROTO_LAST]
Number of LFDB entries per protocol.
uint32_t age
Seconds since last update.
uint32_t ipv4PrefixLen
IPv4 prefix len.
uint32_t numLfdbNotInHardware
Number of LFDB entries that have not been applied into HW.
L2 label is not installed because reference VLAN is not created.
OPEN_MPLS_LFDB_ENTRY_TYPE_t
MPLS LFDB label type.
uint32_t maxTunnelInitiators
Maximum number of MPLS tunnels available in the hardware.
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.
uint32_t numTunnelsTwoLabel
Number of MPLS tunnels created with two labels.
open_error_t
OPEN uses these enumerators to indicate the error codes.
uint32_t ipv4Addr
IPv4 address.
This entry must be last in the list.
uint32_t egressLabel
Egress label ID.
OPEN_MPLS_LFDB_NOT_INSERTED_REASON_t
Reason for which the MPLS LFDB label is not applied to HW.
open_error_t openapiMplsBgpLabelModeSet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t mode)
Sets the BGP label distribution mode.
A label was not applied into HW.
This entry must be last in the list.
OPEN_MPLS_LFDB_PROTOCOL_t
MPLS LFDB protocol type.
uint32_t egressInterface
Egress interface.
OPEN_MPLS_LFDB_IN_HARDWARE_STATUS_t inHardware
Label status.
uint64_t inBytes
Statistics in bytes.
uint32_t numLfdbEntries
Number of LFDB entries that have been already created.
open_inet_addr_t nextHop
The IPv4 or IPv6 address of the next hop with which this tunnel is associated.
uint64_t inPackets
Statistics in packets.
OPEN_MPLS_LFDB_LABEL_ACTION_t labelAction
Label action.
MPLS tunnel initiator informaton.
uint32_t numTunnelsThreeLabel
Number of MPLS tunnels created with three labels.
uint32_t dynamicLfdbInsertFailures
LFDB dynamic insert failure count.
uint32_t lfdbSize
Maximum number of LFDB entries available in the hardware.
uint32_t numTunnelsOneLabel
Number of MPLS tunnels created with one label.
uint32_t numLfdbInHardware
Number of LFDB entries that have been applied into HW.
uint32_t maxLfdbLabel
Maximum number that can be used as a label ID.
uint32_t minLfdbLabel
Minimal number that can be used as a label ID.
open_error_t openapiMplsBgpLabelModeGet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t *mode)
Gets the BGP label distribution mode.
L3 label matches a locally attached subnet.
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.
open_error_t openapiMplsLfdbCreate(openapiClientHandle_t *client_handle, OPEN_MPLS_LFDB_ENTRY_t *lfdb_entry)
Inserts a LFDB entry into the database.
OPEN_CONTROL_t
OPEN uses these enumerators to indicate enable or disable for a given config or status parameter...
open_error_t openapiMplsTunnelInitiatorGet(openapiClientHandle_t *client_handle, OPEN_MPLS_TUNNEL_INITIATOR_t *tunnel_entry)
Get the specified MPLS tunnel initiator information.
open_error_t openapiMplsLfdbDelete(openapiClientHandle_t *client_handle, uint32_t label)
Deletes an LFDB entry from the database.
unsigned char egressMac[OPEN_MAC_ADDR_LEN]
Egress MAC.
uint32_t ecmpHighInUse
The highest number of ECMP entries used since the switch was last powered up.
open_error_t openapiMplsCountersClear(openapiClientHandle_t *client_handle)
Clears MPLS statistics.
L3 label does not match any subnet.
uint32_t egressIfNum
The interface number to which this tunnel is pointing.
OPEN_MPLS_LFDB_IN_HARDWARE_STATUS_t
MPLS LFDB label status.
OPEN_MPLS_LFDB_ENTRY_TYPE_t entryType
Type of label.
uint32_t numRoutes
Number of routes pointing to this MPLS tunnel initiator.
OPEN_PACKED_STRUCT
MPLS LFDB entry information.
uint32_t ecmpInUse
Current number of ECMP groups in use.
L2 label is not installed because egress port is not attached.
OPEN_MPLS_LFDB_LABEL_ACTION_t
MPLS LFDB label action.
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.
uint32_t lfdbHighWaterMark
LFDB high water mark.
Label is inserted in hardware.
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.
L3 label type that works with IPv6 address.
uint32_t ecmpMax
The maximum number of ECMP entries available in the hardware.
A label was applied to HW.
uint16_t egressVlan
VLAN on which MPLS tunneled packets exit the switch.
open_error_t openapiMplsGlobalStatusGet(openapiClientHandle_t *client_handle, OPEN_MPLS_GLOBAL_STATS_t *global_status)
Gets the global MPLS status and statistics.
uint32_t numTunnelInitiators
Number of MPLS tunnels that have been already created.
uint64_t lfdbLookupFailurePackets
LFDB lookup failure packets.
uint32_t duplicateInsertions
The counter shows how many duplicate insertion attempts happened for the LFDB entry.
L3 label type that works with IPv4 address.
open_error_t openapiMplsBgpIntfLabelSet(openapiClientHandle_t *client_handle, uint32_t intIfNum, OPEN_AFX_t type, uint32_t label)
Set an interface label.
uint32_t egressVlan
Egress VLAN.
uint32_t ipv6PrefixLen
IPv6 prefix len.