Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.6.0.3
Data Structures | Macros | Typedefs | Enumerations | Functions
Instrumentation PT Specific APIs [OPENAPI_INSTRU_PACKET_TRACE]

Data Structures

struct  _open_pt_config_pkt_drop_ctrs_s
 
struct  _open_pt_drop_ctrs_req_info_s
 
struct  _open_pt_drop_reason_data_s
 
struct  _open_pt_drop_reason_info_s
 
struct  _OPEN_pt_hashing_info_
 packet hashing resolution information More...
 
struct  _open_pt_pkt_drop_ctrs_s
 
struct  _OPEN_pt_trace_profile_
 Trace Profile. More...
 
struct  open_pt_5_tuple_params_s_
 
struct  OPEN_PT_DROP_REASON_MASK_t
 
struct  OPEN_PT_LOOKUP_RESULT_MASK_t
 lookup result set bit map More...
 
struct  OPEN_PT_PACKET_t
 Packet Including Checksum. More...
 

Macros

#define OPEN_MASK_BASE_UNIT   unsigned int
 Base type for declarations.
 
#define OPEN_MASK_SIZE(_max)    (((_max) + OPEN_MASKWID - 1) / OPEN_MASKWID)
 (internal) Number of OPEN_MASK_BASE_UNITs needed to contain _max bits
 
#define OPEN_MASKWID   32
 
#define OPEN_PT_CPU_RATE_LIMIT   3
 
#define OPEN_PT_CPU_RATE_LIMIT_BURST   3
 
#define OPEN_PT_DROP_REASON_MAX_SIZE   4
 
#define OPEN_PT_DROP_REASON_STR_MAX_ELE   32
 
#define OPEN_PT_DROP_REASON_STR_SIZE   64
 
#define OPEN_PT_MATCH_RULE_NUM   61
 
#define OPEN_PT_MAX_PACKET_SIZE   OPEN_INSTRU_MAX_PACKET_SIZE
 These data structure are used for OpEN API only.
 

Typedefs

typedef struct open_pt_5_tuple_params_s_ OPEN_PT_5_TUPLE_PARAMS_t
 
typedef struct _open_pt_config_pkt_drop_ctrs_s OPEN_PT_CONFIG_PKT_DROP_CTRS_t
 
typedef struct _open_pt_drop_ctrs_req_info_s OPEN_PT_DROP_CTRS_REQ_INFO_t
 
typedef enum _open_pt_drop_loc_s OPEN_PT_DROP_LOC_t
 
typedef struct _open_pt_drop_reason_data_s OPEN_PT_DROP_REASON_DATA_t
 
typedef struct _open_pt_drop_reason_info_s OPEN_PT_DROP_REASON_INFO_t
 
typedef enum _OPEN_pt_hashing_info_mask_ OPEN_PT_HASHING_INFO_MASK_t
 
typedef struct _OPEN_pt_hashing_info_ OPEN_PT_HASHING_INFO_t
 packet hashing resolution information
 
typedef enum _OPEN_pt_lookup_result_type_ OPEN_PT_LOOKUP_RESULT_TYPE_t
 packet trace lookup result enums
 
typedef struct _open_pt_pkt_drop_ctrs_s OPEN_PT_PKT_DROP_CTRS_t
 
typedef enum _OPEN_pt_resolution_type_t OPEN_PT_RESOULTION_t
 packet trace resolution enums
 
typedef enum _OPEN_stp_state_ OPEN_PT_STP_STATE_t
 
typedef struct _OPEN_pt_trace_profile_ OPEN_PT_TRACE_PROFILE_t
 Trace Profile.
 

Enumerations

enum  _open_pt_drop_loc_s { OPEN_PT_NO_DROP_LOC = 1, OPEN_PT_DROP_LOC_INGRESS, OPEN_PT_DROP_LOC_PIPELINE, OPEN_PT_DROP_LOC_EGRESS }
 
enum  _OPEN_pt_hashing_info_mask_ {
  OPEN_PT_NO_HASHING_RESOLUTION = 0, OPEN_PT_ECMP_1_RESOLUTION = 1, OPEN_PT_ECMP_2_RESOLUTION = 2, OPEN_PT_TRUNK_RESOLUTION = 3,
  OPEN_PT_FABRIC_TRUNK_RESOLUTION = 4
}
 
enum  _OPEN_pt_lookup_result_type_ {
  OPEN_PT_LOOKUPINVALID = 0, OPEN_PT_LOOKUPFIRSTVLANTRANSLATIONHIT = 1, OPEN_PT_LOOKUPSECONDVLANTRANSLATIONHIT = 2, OPEN_PT_LOOKUPFORWARDINGVLANVALID = 3,
  OPEN_PT_LOOKUPL2SRCHIT = 6, OPEN_PT_LOOKUPL2SRCSTATIC = 7, OPEN_PT_LOOKUPL2DSTHIT = 8, OPEN_PT_LOOKUPL2CACHEHIT = 9,
  OPEN_PT_LOOKUPL3SRCHOSTHIT = 10, OPEN_PT_LOOKUPL3DESTHOSTHIT = 11, OPEN_PT_LOOKUPL3DESTROUTEHIT = 12, OPEN_PT_LOOKUPL2SRCMISS = 13,
  OPEN_PT_LOOKUPDOSATTACK = 14, OPEN_PT_LOOKUPIPTUNNELHIT = 15, OPEN_PT_LOOKUPMPLSLABEL1HIT = 16, OPEN_PT_LOOKUPMPLSLABEL2HIT = 17,
  OPEN_PT_LOOKUPMPLSTERMINATED = 18, OPEN_PT_LOOKUPMYSTATIONHIT = 19, OPEN_PT_LOOKUPCOUNT = 20
}
 packet trace lookup result enums
 
enum  _OPEN_pt_resolution_type_t {
  OPEN_PT_RESOLUTIONUNKOWN = 0, OPEN_PT_RESOLUTIONCONTROLPKT = 1, OPEN_PT_RESOLUTIONOAMPKT = 2, OPEN_PT_RESOLUTIONBFDPKT = 3,
  OPEN_PT_RESOLUTIONBPDUPKT = 4, OPEN_PT_RESOLUTION1588PKT = 6, OPEN_PT_RESOLUTIONKNOWNL2UCPKT = 8, OPEN_PT_RESOLUTIONUNKNOWNL2UCPKT = 9,
  OPEN_PT_RESOLUTIONKNOWNL2MCPKT = 10, OPEN_PT_RESOLUTIONUNKNOWNL2MCPKT = 11, OPEN_PT_RESOLUTIONL2BCPKT = 12, OPEN_PT_RESOLUTIONKNOWNL3UCPKT = 16,
  OPEN_PT_RESOLUTIONUNKNOWNL3UCPKT = 17, OPEN_PT_RESOLUTIONKNOWNIPMCPKT = 18, OPEN_PT_RESOLUTIONUNKNOWNIPMCPKT = 19, OPEN_PT_RESOLUTIONKNOWNMPLSL2PKT = 24,
  OPEN_PT_RESOLUTIONUNKNOWNMPLSPKT = 25, OPEN_PT_RESOLUTIONKNOWNMPLSL3PKT = 26, OPEN_PT_RESOLUTIONKNOWNMPLSPKT = 28, OPEN_PT_RESOLUTIONKNOWNMIMPKT = 32,
  OPEN_PT_RESOLUTIONUNKNOWNMIMPKT = 33, OPEN_PT_RESOLUTIONKNOWNTRILLPKT = 40, OPEN_PT_RESOLUTIONUNKNOWNTRILLPKT = 41, OPEN_PT_RESOLUTIONKNOWNNIVPKT = 48,
  OPEN_PT_RESOLUTIONUNKNOWNNIVPKT = 49, OPEN_PT_RESOLUTIONKNOWNL2GREPKT = 50, OPEN_PT_RESOLUTIONKNOWNVXLANPKT = 51, OPEN_PT_RESOLUTIONCOUNT = 52
}
 packet trace resolution enums More...
 
enum  _OPEN_stp_state_ { OPEN_DISABLED = 0, OPEN_FORWARDING = 1, OPEN_DISCRADING = 2, OPEN_LEARNING = 3 }
 
enum  OPEN_PT_DROP_REASON_t {
  OPEN_PT_NO_DROP = 1, OPEN_PT_DROP_REASON_INTERNAL, OPEN_PT_DROP_REASON_MPLS_LABEL_LKUP_MISS, OPEN_PT_DROP_REASON_MPLS_INVALID_ACTION,
  OPEN_PT_DROP_REASON_MPLS_INVALID_PAYLOAD, OPEN_PT_DROP_REASON_MPLS_TTL_CHECK_FAIL, OPEN_PT_DROP_REASON_MPLS_INVALID_CTRL_WORD, OPEN_PT_DROP_REASON_L2_GRE_SIP_LKUP_MISS,
  OPEN_PT_DROP_REASON_L2_GRE_VPN_LKUP_MISS, OPEN_PT_DROP_REASON_L2_GRE_TUNNEL_ERROR, OPEN_PT_DROP_REASON_VXLAN_SIP_LKUP_MISS, OPEN_PT_DROP_REASON_VXLAN_VNID_LKUP_MISS,
  OPEN_PT_DROP_REASON_VXLAN_TUNNEL_ERROR, OPEN_PT_DROP_REASON_VLAN_NOT_VALID, OPEN_PT_DROP_REASON_ING_PORT_NOT_IN_VLAN_MEMBER, OPEN_PT_DROP_REASON_TPID_MISMATCH,
  OPEN_PT_DROP_REASON_IPV4_PROTO_ERROR, OPEN_PT_DROP_REASON_HIGIG_LP_BACK, OPEN_PT_DROP_REASON_HIGIG_MIRROR_ONLY, OPEN_PT_DROP_REASON_HIGIG_UNKNOWN_HDR,
  OPEN_PT_DROP_REASON_HIGIG_UNKNOWN_OP_CODE, OPEN_PT_DROP_REASON_LAG_FAIL_LP_BACK, OPEN_PT_DROP_REASON_L2_SRC_EQ_L2_DST, OPEN_PT_DROP_REASON_IPV6_PROTO_ERROR,
  OPEN_PT_DROP_REASON_NIV_VNTAG_PRESENT, OPEN_PT_DROP_REASON_NIV_VNTAG_NOT_PRESENT, OPEN_PT_DROP_REASON_NIV_VNTAG_FORMAT, OPEN_PT_DROP_REASON_TRILL_ERROR_FRAME,
  OPEN_PT_DROP_REASON_BPDU, OPEN_PT_DROP_REASON_BAD_UDP_CHKSUM, OPEN_PT_DROP_REASON_TUNNEL_DECAP_ECN_ERROR, OPEN_PT_DROP_REASON_IPV4_HDR_ERROR,
  OPEN_PT_DROP_REASON_IPV6_HDR_ERROR, OPEN_PT_DROP_REASON_PARITY_ERROR, OPEN_PT_DROP_REASON_RPF_CHK_FAIL, OPEN_PT_DROP_REASON_STAGE_LKUP,
  OPEN_PT_DROP_REASON_STAGE_INGRESS, OPEN_PT_DROP_REASON_MAX = 128
}
 

Functions

open_error_t openapiPtPktDropCtrsProfileCreate (openapiClientHandle_t *clientHandle, int asic, OPEN_PT_CONFIG_PKT_DROP_CTRS_t *dropCtrsProfile, OPEN_PT_DROP_CTRS_REQ_INFO_t *ruleReqInfo)
 PT feature trace profile get function. More...
 
open_error_t openapiPtPktDropReasonInfoGet (openapiClientHandle_t *clientHandle, int asic, int port, OPEN_PT_PACKET_t *packet, OPEN_PT_DROP_REASON_DATA_t *dropInfo)
 PT feature packet drop reason get function. More...
 
open_error_t openapiPtTrace5TupleProfileCreate (openapiClientHandle_t *instruOpenConnHandle, int asic, int requestId, OPEN_PORT_MASK_t *portList, OPEN_PT_5_TUPLE_PARAMS_t *tupleParams, OPEN_TCAM_API_POLICYID_t *policyHandle)
 Create a 5 tuple profile/rule in HW to capture live traffic. More...
 
open_error_t openapiPtTrace5TupleProfileDelete (openapiClientHandle_t *instruOpenConnHandle, int asic, OPEN_TCAM_API_POLICYID_t *policyHandle)
 Delete a 5 tuple profile/rule in HW to capture live traffic. More...
 
open_error_t openapiPtTraceProfileGet (openapiClientHandle_t *clientHandle, int asic, int port, OPEN_PT_PACKET_t *packetData, OPEN_PT_TRACE_PROFILE_t *traceProfile, time_t *time)
 PT feature trace profile get function. More...
 

Detailed Description

Enumeration Type Documentation

Enumerator
OPEN_PT_ECMP_1_RESOLUTION 

level 1 ecmp hashing resolution done

OPEN_PT_ECMP_2_RESOLUTION 

level 2 ecmp hashing resolution done

OPEN_PT_TRUNK_RESOLUTION 

trunk hashing resolution done

OPEN_PT_FABRIC_TRUNK_RESOLUTION 

hg trunk hashing resolution done

Definition at line 174 of file openapi_instru_packet_trace.h.

packet trace resolution enums

Enumerator
OPEN_PT_RESOLUTIONOAMPKT 

1

Definition at line 203 of file openapi_instru_packet_trace.h.

Function Documentation

open_error_t openapiPtPktDropCtrsProfileCreate ( openapiClientHandle_t clientHandle,
int  asic,
OPEN_PT_CONFIG_PKT_DROP_CTRS_t dropCtrsProfile,
OPEN_PT_DROP_CTRS_REQ_INFO_t ruleReqInfo 
)

PT feature trace profile get function.

Parameters
[in]clientHandleOpenAPI connection Handle.
[in]asicAsic/Unit number.
[in]dropCtrsProfileDrop counters profile.
[out]ruleReqInfoRule request information.
Return values
OPEN_E_NONE
OPEN_E_ERROR
Note
From OpEN API Version 1.15 onwards, setting resourceTrackingFlag for a given client handle will ensure that the TCAM policy (resource) created in hardware gets freed when the client ceases to exist. openapiClientResourceTrackingSet OpEN API can be used to enable or disable resourceTrackingFlag.

OpEN API Version: 1.16

open_error_t openapiPtPktDropReasonInfoGet ( openapiClientHandle_t clientHandle,
int  asic,
int  port,
OPEN_PT_PACKET_t packet,
OPEN_PT_DROP_REASON_DATA_t dropInfo 
)

PT feature packet drop reason get function.

Parameters
[in]clientHandleOpenAPI connection Handle
[in]asicAsic/Unit number
[in]portPort number
[in]packetPacket whose drop reason info is required.
[out]dropInfoDrop reason info of packet.
Return values
OPEN_E_NONE
OPEN_E_ERROROpEN API Version: 1.16
open_error_t openapiPtTrace5TupleProfileCreate ( openapiClientHandle_t instruOpenConnHandle,
int  asic,
int  requestId,
OPEN_PORT_MASK_t portList,
OPEN_PT_5_TUPLE_PARAMS_t tupleParams,
OPEN_TCAM_API_POLICYID_t policyHandle 
)

Create a 5 tuple profile/rule in HW to capture live traffic.

Parameters
[in]instruOpenConnHandleOpenAPI connection Handle
[in]asicAsic/Unit number
[in]requestIdRequest id of the profile.
[in]PortListList of ports on which this rule has to be applied
[in]tupleParams5 tuple params
[out]policyHandleHandle of the policy created.
Return values
BVIEW_STATUS_FAILUREFailed to create a profile/rule with the requested params.
BVIEW_STATUS_SUCCESSProfile is created in HW
Note
This API is deprecated.

Deprecated OpEN API Version: 1.12 OpEN API Version: 1.14

Examples:
instru_packet_trace_example.c.
open_error_t openapiPtTrace5TupleProfileDelete ( openapiClientHandle_t instruOpenConnHandle,
int  asic,
OPEN_TCAM_API_POLICYID_t policyHandle 
)

Delete a 5 tuple profile/rule in HW to capture live traffic.

Parameters
[in]instruOpenConnHandleOpenAPI connection Handle
[in]asicAsic/Unit number
[in]policyHandlePolicy handle
Return values
BVIEW_STATUS_FAILUREFailed to delete a profile/rule with the requested params.
BVIEW_STATUS_SUCCESSProfile is deleted in HW
Note
This API is deprecated.

Deprecated OpEN API Version: 1.12 OpEN API Version: 1.14

Examples:
instru_packet_trace_example.c.
open_error_t openapiPtTraceProfileGet ( openapiClientHandle_t clientHandle,
int  asic,
int  port,
OPEN_PT_PACKET_t packetData,
OPEN_PT_TRACE_PROFILE_t traceProfile,
time_t *  time 
)

PT feature trace profile get function.

Parameters
[in]clientHandleOpenAPI connection Handle
[in]asicAsic/Unit number
[in]portPort number
[in]packetDataPacket whose trace profile is required.
[out]traceProfileTrace profile of packet.
[out]timeTime.
Return values
OPEN_E_NONE
OPEN_E_ERROROpEN API Version: 1.5
Examples:
instru_packet_trace_example.c.