Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.6.0.3
Data Structures | Macros | Typedefs | Functions
System Information [OPENAPI_INSTRU_NOS]

Data Structures

struct  _open_port_mask_
 
struct  OPEN_ASIC_CAPABILITIES_ALL_t
 

Macros

#define CONVERT_32_TO_64_INT(dest, src)
 
#define CONVERT_64_TO_32_INT(dest, src)
 
#define OPEN_INSTRU_MAX_PACKET_SIZE   1588
 These data structure are used for OpEN API only.
 
#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 BVIEW_MASK_BASE_UNITs needed to contain _max bits
 
#define OPEN_MASKWID   32
 
#define OPEN_MAX_PORT_LIST_STR   256
 

Typedefs

typedef struct _open_port_mask_ OPEN_PORT_MASK_t
 
typedef time_t OPEN_TIME_t
 

Functions

open_error_t openapiAsicCapabilityGet (openapiClientHandle_t *clientHandle, int asic, OPEN_ASIC_CAPABILITIES_ALL_t *asicCap)
 Asic capabilities get function. More...
 
open_error_t openapiBstMaxSnapshotCompressedGet (openapiClientHandle_t *clientHandle, int asic, open_buffdesc *compSnapshot, time_t *time)
 Obtain compressed complete ASIC Statistics Report of maximum buffer values. More...
 
open_error_t openapiBstMaxSnapshotGet (openapiClientHandle_t *clientHandle, int asic, OPEN_BST_ASIC_SNAPSHOT_DATA_t *data1, OPEN_BST_EGRESS_UC_QUEUE_DATA_t *data2, OPEN_BST_EGRESS_MC_QUEUE_DATA_t *data3, time_t *time)
 Obtain Complete ASIC Statistics Report of maximum buffer values. More...
 
open_error_t openapiChipFamilyNameGet (openapiClientHandle_t *client_handle, open_buffdesc *buf)
 Get Chip Family name. More...
 
open_error_t openapiHttpPortGet (openapiClientHandle_t *client_handle, int asic, int *httpPort)
 Get HTTP listening port. More...
 
open_error_t openapiHwMaxPortsGet (openapiClientHandle_t *client_handle, int *maxPhysPorts, int *maxHiGigPorts)
 Get Chip Max Ports. More...
 
open_error_t openapiLagTranslateToNotation (openapiClientHandle_t *client_handle, int asic, int lag, open_buffdesc *dst)
 Get LAG string from SDK lag number. More...
 
open_error_t openapiMacAddrGet (openapiClientHandle_t *client_handle, open_buffdesc *mac)
 Get System MAC Address. More...
 
open_error_t openapiSystemCosqHwqFullMapGet (openapiClientHandle_t *client_handle, int asic, OPEN_SYSTEM_COSQ_HWQ_MAP_t *cosq_hwq_map)
 Get HW queue map of cosqs in the system. More...
 
open_error_t openapiSystemCosqHwqFullMapGetV2 (openapiClientHandle_t *client_handle, int asic, OPEN_SYSTEM_COSQ_HWQ_MAP_V2_t *cosq_hwq_map)
 Get HW queue map of cosqs in the system. More...
 
open_error_t openapiSystemHwqMCosqMapGet (openapiClientHandle_t *client_handle, int asic, int hwQNum, int *port, int *cosq)
 Get the port and cos queue number of a multicast HW queue. More...
 
open_error_t openapiSystemHwqUCosqMapGet (openapiClientHandle_t *client_handle, int asic, int hwQNum, int *port, int *cosq)
 Get the port and cos queue number of a unicast HW queue. More...
 
open_error_t openapiSystemMCosqHwqMapGet (openapiClientHandle_t *client_handle, int asic, int port, int cosq, int *hwQNum)
 Get the HW queue number of a multicast cosq. More...
 
open_error_t openapiSystemPacketTcamRegister (openapiClientHandle_t *clientHandle, int asic, open_buffdesc *name, int ClientId)
 Register with System for TCAM packets. More...
 
open_error_t openapiSystemUCosqHwqMapGet (openapiClientHandle_t *client_handle, int asic, int port, int cosq, int *hwQNum)
 Get the HW queue number of a unicast cosq. More...
 
open_error_t openapiTimeGet (openapiClientHandle_t *client_handle, int *second, int *nanosecond)
 Get System Time. More...
 

Detailed Description

Macro Definition Documentation

#define CONVERT_32_TO_64_INT (   dest,
  src 
)
Value:
do{ \
int i = 0; \
for (i = 0;i < (sizeof(src)/sizeof(uint32_t)); i++) \
{ \
*(((uint64_t*)(&dest)) + i) = *(((uint32_t*)(&src)) + i); \
} \
}while(0);

Definition at line 60 of file openapi_instru_nos.h.

#define CONVERT_64_TO_32_INT (   dest,
  src 
)
Value:
do{ \
int i = 0; \
for (i=0;i < (sizeof(src)/sizeof(uint64_t)); i++) \
{ \
*(((uint32_t*)&dest) + i) = *(((uint64_t*)&src) + i); \
} \
}while(0);

Definition at line 69 of file openapi_instru_nos.h.

Function Documentation

open_error_t openapiAsicCapabilityGet ( openapiClientHandle_t clientHandle,
int  asic,
OPEN_ASIC_CAPABILITIES_ALL_t asicCap 
)

Asic capabilities get function.

Parameters
[in]clientHandleOpenAPI connection Handle
[in]asicAsic/Unit number
[out]asicCapAsic capability
Return values
OPEN_E_NONE
OPEN_E_ERROROpEN API Version: 1.14
Examples:
instru_nos_example.c.
open_error_t openapiBstMaxSnapshotCompressedGet ( openapiClientHandle_t clientHandle,
int  asic,
open_buffdesc compSnapshot,
time_t *  time 
)

Obtain compressed complete ASIC Statistics Report of maximum buffer values.

Parameters
[in]clientHandleOpenAPI connection Handle
[in]asicAsic/Unit number
[out]compSnapshotcompressed snapshot data
[out]timeTime of retrieving data
Return values
OPEN_E_NONE
OPEN_E_ERROR
Note
zlib library is used for compression of data.

OpEN API Version: 1.14

Examples:
instru_nos_example.c.
open_error_t openapiBstMaxSnapshotGet ( openapiClientHandle_t clientHandle,
int  asic,
OPEN_BST_ASIC_SNAPSHOT_DATA_t data1,
OPEN_BST_EGRESS_UC_QUEUE_DATA_t data2,
OPEN_BST_EGRESS_MC_QUEUE_DATA_t data3,
time_t *  time 
)

Obtain Complete ASIC Statistics Report of maximum buffer values.

Parameters
[in]clientHandleOpenAPI connection Handle
[in]asicAsic/Unit number
[out]data1Snapshot data
[out]data2Eucq snapshot data
[out]data3Emcq Snapshot data
[out]timeTime of retrieving data
Return values
OPEN_E_NONE
OPEN_E_ERROR

OpEN API Version: 1.10

Examples:
instru_example.c.
open_error_t openapiChipFamilyNameGet ( openapiClientHandle_t client_handle,
open_buffdesc buf 
)

Get Chip Family name.

Parameters
[in]client_handleClient handle from registration API
[out]buffamily name to be fetched
Return values
OPEN_E_NONE
OPEN_E_ERROROpEN API Version: 1.3
Examples:
instru_nos_example.c.
open_error_t openapiHttpPortGet ( openapiClientHandle_t client_handle,
int  asic,
int *  httpPort 
)

Get HTTP listening port.

Parameters
client_handleOpenapi connection handle
asicThe UNIT number
httpPortHTTP listening port
Return values
OPEN_E_NONE
OPEN_E_ERROROpEN API Version: 1.10
open_error_t openapiHwMaxPortsGet ( openapiClientHandle_t client_handle,
int *  maxPhysPorts,
int *  maxHiGigPorts 
)

Get Chip Max Ports.

Parameters
[in]client_handleClient handle from registration API
[out]maxPhysPortsMAX Physical ports
[out]maxHiGigPortsMAX Hi Gig Ports
Return values
OPEN_E_NONE
OPEN_E_ERROROpEN API Version: 1.3
Examples:
instru_nos_example.c.
open_error_t openapiLagTranslateToNotation ( openapiClientHandle_t client_handle,
int  asic,
int  lag,
open_buffdesc dst 
)

Get LAG string from SDK lag number.

Parameters
client_handleOpenapi connection handle
asicThe ASIC number
lagSDK trunk number
dstLag string
Return values
OPEN_E_NONE
OPEN_E_ERROROpEN API Version: 1.9
Examples:
instru_example.c.
open_error_t openapiMacAddrGet ( openapiClientHandle_t client_handle,
open_buffdesc mac 
)

Get System MAC Address.

Parameters
[in]client_handleClient handle from registration API
[out]macMAC Address
Return values
OPEN_E_NONE
OPEN_E_ERROROpEN API Version: 1.3
Examples:
instru_nos_example.c.
open_error_t openapiSystemCosqHwqFullMapGet ( openapiClientHandle_t client_handle,
int  asic,
OPEN_SYSTEM_COSQ_HWQ_MAP_t cosq_hwq_map 
)

Get HW queue map of cosqs in the system.

Parameters
[in]clientHandleOpenAPI connection Handle
[in]asicAsic/Unit number
[out]cosq_hwq_mapH/W queue map
Return values
OPEN_E_NONE
OPEN_E_ERROR
Note
This function was deprecated in API version 1.19. Please use openapiSystemCosqHwqFullMapGetV2 in new code.

OpEN API Version: 1.14 OpEN API Version: 1.19

open_error_t openapiSystemCosqHwqFullMapGetV2 ( openapiClientHandle_t client_handle,
int  asic,
OPEN_SYSTEM_COSQ_HWQ_MAP_V2_t cosq_hwq_map 
)

Get HW queue map of cosqs in the system.

Parameters
[in]clientHandleOpenAPI connection Handle
[in]asicAsic/Unit number
[out]cosq_hwq_mapH/W queue map
Return values
OPEN_E_NONE
OPEN_E_ERROR

OpEN API Version: 1.19

open_error_t openapiSystemHwqMCosqMapGet ( openapiClientHandle_t client_handle,
int  asic,
int  hwQNum,
int *  port,
int *  cosq 
)

Get the port and cos queue number of a multicast HW queue.

Parameters
[in]clientHandleOpenAPI connection Handle
[in]asicAsic/Unit number
[in]hwQNumH/W queue number
[out]portPort number
[out]cosqCosq number
Return values
OPEN_E_NONE
OPEN_E_ERROR

OpEN API Version: 1.14

open_error_t openapiSystemHwqUCosqMapGet ( openapiClientHandle_t client_handle,
int  asic,
int  hwQNum,
int *  port,
int *  cosq 
)

Get the port and cos queue number of a unicast HW queue.

Parameters
[in]clientHandleOpenAPI connection Handle
[in]asicAsic/Unit number
[in]hwQNumH/W queue number
[out]portPort number
[out]cosqCosq number
Return values
OPEN_E_NONE
OPEN_E_ERROR

OpEN API Version: 1.14

open_error_t openapiSystemMCosqHwqMapGet ( openapiClientHandle_t client_handle,
int  asic,
int  port,
int  cosq,
int *  hwQNum 
)

Get the HW queue number of a multicast cosq.

Parameters
[in]clientHandleOpenAPI connection Handle
[in]asicAsic/Unit number
[in]portPort number
[in]cosqCosq number
[out]hwQNumH/W queue number
Return values
OPEN_E_NONE
OPEN_E_ERROR

OpEN API Version: 1.14

open_error_t openapiSystemPacketTcamRegister ( openapiClientHandle_t clientHandle,
int  asic,
open_buffdesc name,
int  ClientId 
)

Register with System for TCAM packets.

Parameters
[in]clientHandleOpenAPI connection Handle
[in]asicASIC number
[in]nameClient name
[in]agentIdagentId to be Registered
Return values
BVIEW_STATUS_FAILURERegistration is failure.
BVIEW_STATUS_SUCCESSRegistration is successful
BVIEW_STATUS_UNSUPPORTEDPacket TCAM registration is not supported

OpEN API Version: 1.12

open_error_t openapiSystemUCosqHwqMapGet ( openapiClientHandle_t client_handle,
int  asic,
int  port,
int  cosq,
int *  hwQNum 
)

Get the HW queue number of a unicast cosq.

Parameters
[in]clientHandleOpenAPI connection Handle
[in]asicAsic/Unit number
[in]portPort number
[in]cosqCosq number
[out]hwQNumH/W queue number
Return values
OPEN_E_NONE
OPEN_E_ERROR

OpEN API Version: 1.14

open_error_t openapiTimeGet ( openapiClientHandle_t client_handle,
int *  second,
int *  nanosecond 
)

Get System Time.

Parameters
[in]client_handleClient handle from registration API
[out]secondTime
[out]nanosecondTime
Return values
OPEN_E_NONE
OPEN_E_ERROROpEN API Version: 1.3
Examples:
instru_nos_example.c.