BroadView™ API Guide and Reference Manual
Data Structures | Macros | Typedefs | Enumerations | Functions
BroadView BST Feature Declarations And Definitions [BVIEW]
API Definitions

Data Structures

struct  _bst_asic_data_snapshot_
 
struct  _bst_config_
 
struct  _bst_cpu_q_
 
struct  _bst_cpu_q_threshold_
 
struct  _bst_device_
 
struct  _bst_device_threshold_
 
struct  _bst_e_mcq_
 
struct  _bst_e_mcq_threshold_
 
struct  _bst_e_p_sp_
 
struct  _bst_e_sp_
 
struct  _bst_e_sp_threshold_
 
struct  _bst_e_ucq_
 
struct  _bst_e_ucq_threshold_
 
struct  _bst_e_ucqg_
 
struct  _bst_e_ucqg_threshold_
 
struct  _bst_ep_sp_threshold_
 
struct  _bst_i_p_pg_
 
struct  _bst_i_p_pg_threshold_
 
struct  _bst_i_p_sp_
 
struct  _bst_i_p_sp_threshold_
 
struct  _bst_i_sp_
 
struct  _bst_i_sp_threshold_
 
struct  _bst_rqe_q_
 
struct  _bst_rqe_q_threshold_
 
struct  _bst_trigger_info_
 
struct  _bst_cpu_q_::_cpuq_data_
 
struct  _bst_e_mcq_::_emcq_data_
 
struct  _bst_e_p_sp_::_epsp_data_
 
struct  _bst_e_sp_::_esp_data_
 
struct  _bst_e_ucq_::_eucq_data_
 
struct  _bst_e_ucqg_::_eucqg_data_
 
struct  _bst_i_p_pg_::_ippg_data_
 
struct  _bst_i_p_sp_::_ipsp_data_
 
struct  _bst_i_sp_::_isp_data_
 
struct  _bst_rqe_q_::_rqeq_data_
 

Macros

#define BVIEW_BST_CPU_MASK   (1<<CPU_COUNTER)
 
#define BVIEW_BST_DEVICE_MASK   (1<<DEVICE_COUNTER)
 
#define BVIEW_BST_DEVICE_THRESHOLD_CHECK(_p)
 
#define BVIEW_BST_E_CPU_QUEUE_THRESHOLD_CHECK(_p)
 
#define BVIEW_BST_E_CPU_THRESHOLD_CHECK(_p)
 
#define BVIEW_BST_E_MC_QG_THRESHOLD_CHECK(_p)
 
#define BVIEW_BST_E_MC_QUEUE_THRESHOLD_CHECK(_p)
 
#define BVIEW_BST_E_MC_SQG_THRESHOLD_CHECK(_p)
 
#define BVIEW_BST_E_MC_THRESHOLD_CHECK(_p)
 
#define BVIEW_BST_E_RQE_QUEUE_THRESHOLD_CHECK(_p)
 
#define BVIEW_BST_E_RQE_THRESHOLD_CHECK(_p)
 
#define BVIEW_BST_E_SP_MC_SQ_THRESHOLD_CHECK(_p)
 
#define BVIEW_BST_E_SP_MC_THRESHOLD_CHECK(_p)
 
#define BVIEW_BST_E_SP_UM_THRESHOLD_CHECK(_p)
 
#define BVIEW_BST_E_UC_GRP_THRESHOLD_CHECK(_p)
 
#define BVIEW_BST_E_UC_THRESHOLD_CHECK(_p)
 
#define BVIEW_BST_EGRESS_CPU_THRESHOLD_CHECK(_p)
 
#define BVIEW_BST_EGRESS_RQE_QUEUE_THRESHOLD_CHECK(_p)
 
#define BVIEW_BST_EGRESS_UC_GRP_THRESHOLD_CHECK(_p)
 
#define BVIEW_BST_EGRESS_UC_THRESHOLD_CHECK(_p)
 
#define BVIEW_BST_EPSP_MC_SQ_THRESHOLD_CHECK(_p)
 
#define BVIEW_BST_EPSP_MC_THRESHOLD_CHECK(_p)
 
#define BVIEW_BST_EPSP_UC_THRESHOLD_CHECK(_p)
 
#define BVIEW_BST_EPSP_UM_THRESHOLD_CHECK(_p)
 
#define BVIEW_BST_IPPG_HDRM_THRESHOLD_CHECK(_p)
 
#define BVIEW_BST_IPPG_SHRD_THRESHOLD_CHECK(_p)
 
#define BVIEW_BST_IPSP_THRESHOLD_CHECK(_p)
 
#define BVIEW_BST_ISP_THRESHOLD_CHECK(_p)
 
#define BVIEW_BST_MC_MASK   (1<<MC_COUNTER)
 
#define BVIEW_BST_MCQUEUE_MASK   (1<<MCQUEUE_COUNTER)
 
#define BVIEW_BST_MCSHARE_MASK   (1<<MCSHARE_COUNTER)
 
#define BVIEW_BST_MCSHARE_QUEUE_MASK   (1<<MCSHARE_QUEUE_COUNTER)
 
#define BVIEW_BST_PG_MASK   (1<<BVIEW_BST_PG_POS)
 
#define BVIEW_BST_PG_POS   (BVIEW_BST_REALM_MAX+3)
 
#define BVIEW_BST_PORT_MASK   (1<<BVIEW_BST_PORT_POS)
 
#define BVIEW_BST_PORT_POS   (BVIEW_BST_REALM_MAX+1)
 
#define BVIEW_BST_QUEUE_GRP_MASK   (1<<BVIEW_BST_QUEUE_GRP_POS)
 
#define BVIEW_BST_QUEUE_GRP_POS   (BVIEW_BST_REALM_MAX+5)
 
#define BVIEW_BST_QUEUE_MASK   (1<<BVIEW_BST_QUEUE_POS)
 
#define BVIEW_BST_QUEUE_POS   (BVIEW_BST_REALM_MAX+4)
 
#define BVIEW_BST_REALM_MAX   RQE_COUNTER
 
#define BVIEW_BST_RQE_MASK   (1<<RQE_COUNTER)
 
#define BVIEW_BST_SP_MASK   (1<<BVIEW_BST_SP_POS)
 
#define BVIEW_BST_SP_POS   (BVIEW_BST_REALM_MAX+2)
 
#define BVIEW_BST_UC_MASK   (1<<UC_COUNTER)
 
#define BVIEW_BST_UCSHARE_MASK   (1<<UCSHARE_COUNTER)
 
#define BVIEW_BST_UMHEADROOM_MASK   (1<<UMHEADROOM_COUNTER)
 
#define BVIEW_BST_UMSHARE_MASK   (1<<UMSHARE_COUNTER)
 
#define BVIEW_MAX_STRING_NAME_LEN   256
 

Typedefs

typedef struct
_bst_asic_data_snapshot_ 
BVIEW_BST_ASIC_SNAPSHOT_DATA_t
 
typedef enum _bst_collection_mode_ BVIEW_BST_COLLECTION_MODE
 
typedef struct _bst_config_ BVIEW_BST_CONFIG_t
 
typedef enum _threshold_fields_ BVIEW_BST_COUNTER_t
 
typedef struct _bst_device_ BVIEW_BST_DEVICE_DATA_t
 
typedef struct
_bst_device_threshold_ 
BVIEW_BST_DEVICE_THRESHOLD_t
 
typedef struct _bst_cpu_q_ BVIEW_BST_EGRESS_CPU_QUEUE_DATA_t
 
typedef struct
_bst_cpu_q_threshold_ 
BVIEW_BST_EGRESS_CPU_QUEUE_THRESHOLD_t
 
typedef struct _bst_e_mcq_ BVIEW_BST_EGRESS_MC_QUEUE_DATA_t
 
typedef struct
_bst_e_mcq_threshold_ 
BVIEW_BST_EGRESS_MC_QUEUE_THRESHOLD_t
 
typedef struct _bst_e_p_sp_ BVIEW_BST_EGRESS_PORT_SP_DATA_t
 
typedef struct
_bst_ep_sp_threshold_ 
BVIEW_BST_EGRESS_PORT_SP_THRESHOLD_t
 
typedef struct _bst_rqe_q_ BVIEW_BST_EGRESS_RQE_QUEUE_DATA_t
 
typedef struct
_bst_rqe_q_threshold_ 
BVIEW_BST_EGRESS_RQE_QUEUE_THRESHOLD_t
 
typedef struct _bst_e_sp_ BVIEW_BST_EGRESS_SP_DATA_t
 
typedef struct _bst_e_sp_threshold_ BVIEW_BST_EGRESS_SP_THRESHOLD_t
 
typedef struct _bst_e_ucq_ BVIEW_BST_EGRESS_UC_QUEUE_DATA_t
 
typedef struct
_bst_e_ucq_threshold_ 
BVIEW_BST_EGRESS_UC_QUEUE_THRESHOLD_t
 
typedef struct _bst_e_ucqg_ BVIEW_BST_EGRESS_UC_QUEUEGROUPS_DATA_t
 
typedef struct
_bst_e_ucqg_threshold_ 
BVIEW_BST_EGRESS_UC_QUEUEGROUPS_THRESHOLD_t
 
typedef struct _bst_i_p_pg_ BVIEW_BST_INGRESS_PORT_PG_DATA_t
 
typedef struct
_bst_i_p_pg_threshold_ 
BVIEW_BST_INGRESS_PORT_PG_THRESHOLD_t
 
typedef struct _bst_i_p_sp_ BVIEW_BST_INGRESS_PORT_SP_DATA_t
 
typedef struct
_bst_i_p_sp_threshold_ 
BVIEW_BST_INGRESS_PORT_SP_THRESHOLD_t
 
typedef struct _bst_i_sp_ BVIEW_BST_INGRESS_SP_DATA_t
 
typedef struct _bst_i_sp_threshold_ BVIEW_BST_INGRESS_SP_THRESHOLD_t
 
typedef BVIEW_STATUS(* BVIEW_BST_TRIGGER_CALLBACK_t )(int asic, void *cookie, BVIEW_BST_TRIGGER_INFO_t *triggerInfo)
 
typedef struct _bst_trigger_info_ BVIEW_BST_TRIGGER_INFO_t
 
typedef enum _bst_trigger_type_ BVIEW_BST_TRIGGER_TYPE
 

Enumerations

enum  _bst_collection_mode_ { BVIEW_BST_MODE_CURRENT = 1, BVIEW_BST_MODE_PEAK }
 
enum  _bst_trigger_type_ { BVIEW_BST_TRIGGER_DEVICE = (0x1 << 0), BVIEW_BST_TRIGGER_INGRESS = (0x1 << 1), BVIEW_BST_TRIGGER_EGRESS = (0x1 << 2) }
 
enum  _threshold_fields_ {
  DEVICE_COUNTER = 0, UMSHARE_COUNTER, UMHEADROOM_COUNTER, UCSHARE_COUNTER,
  MCSHARE_COUNTER, MCSHARE_QUEUE_COUNTER, UC_COUNTER, MCQUEUE_COUNTER,
  MC_COUNTER, CPU_COUNTER, RQE_COUNTER
}
 

Functions

BVIEW_STATUS bst_app_config_init (unsigned int num_units)
 : function to initializes bst structures to default values
 
BVIEW_STATUS bst_app_main (void)
 : bst main application function which does processing of messages
 
void bst_app_uninit ()
 : function to clean up bst application
 
BVIEW_STATUS bst_cancel_request (unsigned int unit, unsigned int id)
 
BVIEW_STATUS bst_main ()
 : function to creathe the bst application thread.
 
BVIEW_STATUS sb_plugin_register (BVIEW_SB_PLUGIN_t sbPlugin)
 Register a south bound plug-in with south bound redirector.
 
BVIEW_STATUS sb_redirector_init ()
 Initialize South bound redirector's local data with defaults.
 
BVIEW_STATUS sbapi_system_asic_capabilities_get (int asic, BVIEW_ASIC_CAPABILITIES_t *asicCapPtr)
 Get asic capabilites of a unit.
 
BVIEW_STATUS sbapi_system_asic_num_cp_get (int asic, int *numCommonPools)
 Get number of common pools in a unit.
 
BVIEW_STATUS sbapi_system_asic_num_cpuq_get (int asic, int *numCpuQueues)
 Get number of cpu queues in a unit.
 
BVIEW_STATUS sbapi_system_asic_num_mcq_get (int asic, int *numMulticastQueues)
 Get number of multicast queues in a unit.
 
BVIEW_STATUS sbapi_system_asic_num_pg_get (int asic, int *numPriorityGroups)
 Get number of priority groups in a unit.
 
BVIEW_STATUS sbapi_system_asic_num_ports_get (int asic, int *numPorts)
 Get number of ports in a unit.
 
BVIEW_STATUS sbapi_system_asic_num_rqeq_get (int asic, int *numRqeQueues)
 Get number of RQE queues in a unit.
 
BVIEW_STATUS sbapi_system_asic_num_rqeqp_get (int asic, int *numRqeQueuePools)
 Get number of RQE queue pools in a unit.
 
BVIEW_STATUS sbapi_system_asic_num_sp_get (int asic, int *numServicePools)
 Get number of service pools in a unit.
 
BVIEW_STATUS sbapi_system_asic_num_ucq_get (int asic, int *numUnicastQueues)
 Get number of unicast queues in a unit.
 
BVIEW_STATUS sbapi_system_asic_num_ucqg_get (int asic, int *numUnicastQueueGroups)
 Get number of unicast queue groups in a unit.
 
BVIEW_STATUS sbapi_system_asic_support_1588_get (int asic, bool *support1588)
 Get whether a unit supports 1588 or not.
 
BVIEW_STATUS sbapi_system_asic_translate_from_notation (char *src, int *asic)
 Get system asic number from notational asic number representation - string form.
 
BVIEW_STATUS sbapi_system_asic_translate_to_notation (int asic, char *dst)
 Get asic number in notational representation(string) from system asic number.
 
BVIEW_STATUS sbapi_system_feature_mask_get (int *featureMask)
 Get Supported Feature Mask.
 
BVIEW_STATUS sbapi_system_ip4_get (uint8_t *buffer, int length)
 Get system IPv4 address.
 
BVIEW_STATUS sbapi_system_lag_translate_to_notation (int asic, int lag, char *dst)
 Get lag number in notational representation(string) from system lag number and asic number.
 
BVIEW_STATUS sbapi_system_mac_get (uint8_t *buffer, int length)
 Get system MAC address.
 
BVIEW_STATUS sbapi_system_max_buf_snapshot_get (int asic, BVIEW_SYSTEM_ASIC_MAX_BUF_SNAPSHOT_DATA_t *maxBufSnapshot, BVIEW_TIME_t *time)
 Get snapshot of max buffers allocated.
 
BVIEW_STATUS sbapi_system_name_get (char *buffer, int length)
 Get system name.
 
BVIEW_STATUS sbapi_system_network_os_get (uint8_t *buffer, int length)
 Get Network OS.
 
BVIEW_STATUS sbapi_system_num_units_get (int *unitNum)
 Get number of units in the system.
 
BVIEW_STATUS sbapi_system_packet_rx_register (int asic, BVIEW_PACKET_RX_CALLBACK_t callback, char *name, void *cookie)
 
BVIEW_STATUS sbapi_system_port_translate_from_notation (char *src, int *port)
 Get system port number from notational port number representation - string form.
 
BVIEW_STATUS sbapi_system_port_translate_to_notation (int asic, int port, char *dst)
 Get port number in notational representation(string) from system port number and asic number.
 
BVIEW_STATUS sbapi_system_time_get (time_t *ptime)
 Get Current local time.
 
BVIEW_STATUS sbapi_system_uid_get (uint8_t *buffer, int length)
 Get system UID.
 
BVIEW_STATUS sbapi_system_unit_to_asic_type_get (int asic, BVIEW_ASIC_TYPE *asicType)
 Get asic type of a unit.
 

Detailed Description

Macro Definition Documentation

#define BVIEW_BST_DEVICE_THRESHOLD_CHECK (   _p)
Value:
((_p)->threshold <= 0 || \
(_p)->threshold > BVIEW_BST_DEVICE_THRES_DEFAULT)

Definition at line 373 of file bst.h.

#define BVIEW_BST_E_CPU_QUEUE_THRESHOLD_CHECK (   _p)
Value:
((_p)->cpuQueueThreshold <= 0 || \
(_p)->cpuQueueThreshold > (BVIEW_BST_E_CPU_UCMC_THRES_DEFAULT))

Definition at line 324 of file bst.h.

#define BVIEW_BST_E_CPU_THRESHOLD_CHECK (   _p)
Value:
((_p)->cpuBufferThreshold <= 0 || \
(_p)->cpuBufferThreshold > (BVIEW_BST_E_CPU_UCMC_THRES_DEFAULT))

Definition at line 320 of file bst.h.

#define BVIEW_BST_E_MC_QG_THRESHOLD_CHECK (   _p)
Value:
((_p)->mcThreshold <= 0 || \
(_p)->mcThreshold > (0x1FFFF * 208))

Definition at line 404 of file bst.h.

#define BVIEW_BST_E_MC_QUEUE_THRESHOLD_CHECK (   _p)
Value:
((_p)->mcQueueThreshold <= 0 || \
(_p)->mcQueueThreshold > (0x1FFFF * 208))

Definition at line 332 of file bst.h.

#define BVIEW_BST_E_MC_SQG_THRESHOLD_CHECK (   _p)
Value:
((_p)->mcQueueEntriesThreshold <= 0 || \
(_p)->mcQueueEntriesThreshold > (0x1FFFF * 208))

Definition at line 408 of file bst.h.

#define BVIEW_BST_E_MC_THRESHOLD_CHECK (   _p)
Value:
((_p)->mcBufferThreshold <= 0 || \
(_p)->mcBufferThreshold > BVIEW_BST_MCAST_THRES_DEFAULT)

Definition at line 328 of file bst.h.

#define BVIEW_BST_E_RQE_QUEUE_THRESHOLD_CHECK (   _p)
Value:
((_p)->rqeQueueThreshold <= 0 || \
(_p)->rqeQueueThreshold > (0xFFF * 208))

Definition at line 400 of file bst.h.

#define BVIEW_BST_E_RQE_THRESHOLD_CHECK (   _p)
Value:
((_p)->rqeBufferThreshold <= 0 || \
(_p)->rqeBufferThreshold > BVIEW_BST_E_RQE_THRES_DEFAULT)

Definition at line 396 of file bst.h.

#define BVIEW_BST_E_SP_MC_SQ_THRESHOLD_CHECK (   _p)
Value:
((_p)->mcShareQueueEntriesThreshold <= 0 || \
(_p)->mcShareQueueEntriesThreshold > (0x1FFFF * 208))

Definition at line 390 of file bst.h.

#define BVIEW_BST_E_SP_MC_THRESHOLD_CHECK (   _p)
Value:
((_p)->mcShareThreshold <= 0 || \
(_p)->mcShareThreshold > BVIEW_BST_E_SP_MC_THRES_DEFAULT)

Definition at line 386 of file bst.h.

#define BVIEW_BST_E_SP_UM_THRESHOLD_CHECK (   _p)
Value:
((_p)->umShareThreshold <= 0 || \
(_p)->umShareThreshold > BVIEW_BST_E_SP_UCMC_THRES_DEFAULT)

Definition at line 381 of file bst.h.

#define BVIEW_BST_E_UC_GRP_THRESHOLD_CHECK (   _p)
Value:
((_p)->ucBufferThreshold <= 0 || \
(_p)->ucBufferThreshold > BVIEW_BST_UCAST_QUEUE_GROUP_DEFAULT)

Definition at line 336 of file bst.h.

#define BVIEW_BST_E_UC_THRESHOLD_CHECK (   _p)
Value:
((_p)->ucBufferThreshold <= 0 || \
(_p)->ucBufferThreshold > BVIEW_BST_UCAST_THRES_DEFAULT)

Definition at line 340 of file bst.h.

#define BVIEW_BST_EGRESS_CPU_THRESHOLD_CHECK (   _p)
Value:
((_p)->cpuThreshold <= 0 || \
(_p)->cpuThreshold > (0x1FFFF * 208))

Definition at line 413 of file bst.h.

#define BVIEW_BST_EGRESS_RQE_QUEUE_THRESHOLD_CHECK (   _p)
Value:
((_p)->rqeThreshold <= 0 || \
(_p)->rqeThreshold > (0x1FFFF * 208))

Definition at line 418 of file bst.h.

#define BVIEW_BST_EGRESS_UC_GRP_THRESHOLD_CHECK (   _p)
Value:
((_p)->ucThreshold <= 0 || \
(_p)->ucThreshold > BVIEW_BST_UCAST_QUEUE_GROUP_DEFAULT)

Definition at line 427 of file bst.h.

#define BVIEW_BST_EGRESS_UC_THRESHOLD_CHECK (   _p)
Value:
((_p)->ucThreshold <= 0 || \
(_p)->ucThreshold > (0x1FFFF * 208))

Definition at line 423 of file bst.h.

#define BVIEW_BST_EPSP_MC_SQ_THRESHOLD_CHECK (   _p)
Value:
((_p)->mcShareQueueEntriesThreshold <= 0 || \
(_p)->mcShareQueueEntriesThreshold > (0x1FFFF * 208))

Definition at line 356 of file bst.h.

#define BVIEW_BST_EPSP_MC_THRESHOLD_CHECK (   _p)
Value:
((_p)->mcShareThreshold <= 0 || \
(_p)->mcShareThreshold > (0x1FFFF * 208))

Definition at line 352 of file bst.h.

#define BVIEW_BST_EPSP_UC_THRESHOLD_CHECK (   _p)
Value:
((_p)->ucShareThreshold <= 0 || \
(_p)->ucShareThreshold > BVIEW_BST_E_P_SP_UC_THRES_DEFAULT)

Definition at line 344 of file bst.h.

#define BVIEW_BST_EPSP_UM_THRESHOLD_CHECK (   _p)
Value:
((_p)->umShareThreshold <= 0 || \
(_p)->umShareThreshold > BVIEW_BST_E_P_SP_UCMC_THRES_DEFAULT)

Definition at line 348 of file bst.h.

#define BVIEW_BST_IPPG_HDRM_THRESHOLD_CHECK (   _p)
Value:
((_p)->umHeadroomThreshold <= 0 || \
(_p)->umHeadroomThreshold > BVIEW_BST_I_P_PG_UCMC_HDRM_THRES_DEFAULT)

Definition at line 368 of file bst.h.

#define BVIEW_BST_IPPG_SHRD_THRESHOLD_CHECK (   _p)
Value:
((_p)->umShareThreshold <= 0 || \
(_p)->umShareThreshold > BVIEW_BST_I_P_SP_UCMC_SHARED_THRES_DEFAULT)

Definition at line 364 of file bst.h.

#define BVIEW_BST_IPSP_THRESHOLD_CHECK (   _p)
Value:
((_p)->umShareThreshold <= 0 || \
(_p)->umShareThreshold > BVIEW_BST_I_SP_UCMC_SHARED_THRES_DEFAULT)

Definition at line 360 of file bst.h.

#define BVIEW_BST_ISP_THRESHOLD_CHECK (   _p)
Value:
((_p)->umShareThreshold <=0 || \
(_p)->umShareThreshold > (0x1FFFF * 208))

Definition at line 377 of file bst.h.

Function Documentation

BVIEW_STATUS bst_app_config_init ( unsigned int  num_units)

: function to initializes bst structures to default values

Parameters
[in]:number of units on the agent
Return values
:BVIEW_STATUS_SUCCESS : configuration is successfully initialized.
:BVIEW_STATUS_FAILURE : Fail to initialize the BST appliation to default.
Note
: Initialization functon to make sure both software and asic are configured with same default values. We are not setting the default values for threshold, but we are using the same as that of asic.
BVIEW_STATUS bst_app_main ( void  )

: bst main application function which does processing of messages

Parameters
[in]:none
Return values
:BVIEW_STATUS_SUCCESS: Fails to register with module manager or some error happened due to which the bst application is unable to process incoming messages.
void bst_app_uninit ( )

: function to clean up bst application

Parameters
[in]none
Return values
:none
Note
When in case of any error event, this api cleans up all the resources. i.e it deletes the timer notes, if any are present. destroy the mutexes. clears the memory and destroys the message queue.
BVIEW_STATUS bst_main ( )

: function to creathe the bst application thread.

Parameters
[in]none
Return values
:BVIEW_STATUS_RESOURCE_NOT_AVAILABLE : Returns when memory is not available
:BVIEW_STATUS_FAILURE : failed to create the message queue or thread.
:BVIEW_STATUS_SUCCESS : successful completion of task creation.
Note
: Main function to invoke the bst thread. This function allocates the required memory for bst application. Creates the mutexes for the bst data. Creates the message queue It assumes that the system is initialized before the bst thread is invoked. This api depends on the system variables such as number of units per device. Incase of no such need, the number of units can be #defined.
BVIEW_STATUS sb_plugin_register ( BVIEW_SB_PLUGIN_t  sbPlugin)

Register a south bound plug-in with south bound redirector.

Parameters
[in]sbPluginSouth bound plug-in
Return values
BVIEW_STATUS_FAILUREWhen validation of sb plug-in fails or Lock acquistion fails
BVIEW_STATUS_TABLE_FULLNumber of plug-ins already registered are BVIEW_MAX_SUPPORTED_SB_PLUGINS.
BVIEW_STATUS_SUCCESSSuccessfully registered sb plug-in with sb redirector
BVIEW_STATUS sb_redirector_init ( )

Initialize South bound redirector's local data with defaults.

Return values
BVIEW_STATUS_FAILUREif failed to initialize read-write lock
BVIEW_STATUS_SUCCESSAll the data structures are sucessfully initialized
BVIEW_STATUS sbapi_system_asic_capabilities_get ( int  asic,
BVIEW_ASIC_CAPABILITIES_t *  asicCapPtr 
)

Get asic capabilites of a unit.

Parameters
[in]asicUnit number
[out]asicCapPtrPointer to asic capabilities
Return values
BVIEW_STATUS_FAILUREDue to lock acquistion failure or Failed to get asic type from unit or Failed to get asic capabilites for this unit
BVIEW_STATUS_SUCCESSFound asic capabilities
BVIEW_STATUS sbapi_system_asic_num_cp_get ( int  asic,
int *  numCommonPools 
)

Get number of common pools in a unit.

Parameters
[in]asicUnit number
[out]numCommonPoolsNumber of common pools
Return values
BVIEW_STATUS_FAILUREDue to lock acquistion failure or Failed to get asic type from unit or Failed to get asic capabilites for this unit
BVIEW_STATUS_SUCCESSGet number of common pools is successful
BVIEW_STATUS sbapi_system_asic_num_cpuq_get ( int  asic,
int *  numCpuQueues 
)

Get number of cpu queues in a unit.

Parameters
[in]asicUnit number
[out]numCpuQueuesNumber of cpu queues
Return values
BVIEW_STATUS_FAILUREDue to lock acquistion failure or Failed to get asic type from unit or Failed to get asic capabilites for this unit
BVIEW_STATUS_SUCCESSGet number of cpu queues is successful
BVIEW_STATUS sbapi_system_asic_num_mcq_get ( int  asic,
int *  numMulticastQueues 
)

Get number of multicast queues in a unit.

Parameters
[in]asicUnit number
[out]numMulticastQueueGroupsNumber of Multicast queues
Return values
BVIEW_STATUS_FAILUREDue to lock acquistion failure or Failed to get asic type from unit or Failed to get asic capabilites for this unit
BVIEW_STATUS_SUCCESSGet number of multicast queues is successful
BVIEW_STATUS sbapi_system_asic_num_pg_get ( int  asic,
int *  numPriorityGroups 
)

Get number of priority groups in a unit.

Parameters
[in]asicUnit number
[out]numPriorityGroupsNumber of priority groups
Return values
BVIEW_STATUS_FAILUREDue to lock acquistion failure or Failed to get asic type from unit or Failed to get asic capabilites for this unit
BVIEW_STATUS_SUCCESSGet number of priority groups is successful
BVIEW_STATUS sbapi_system_asic_num_ports_get ( int  asic,
int *  numPorts 
)

Get number of ports in a unit.

Parameters
[in]asicUnit number
[out]numPortsNumber of ports
Return values
BVIEW_STATUS_FAILUREDue to lock acquistion failure or Failed to get asic type from unit or Failed to get asic capabilites for this unit
BVIEW_STATUS_SUCCESSGet number of ports is successful
BVIEW_STATUS sbapi_system_asic_num_rqeq_get ( int  asic,
int *  numRqeQueues 
)

Get number of RQE queues in a unit.

Parameters
[in]asicUnit number
[out]numRqeQueuesNumber of RQE queues
Return values
BVIEW_STATUS_FAILUREDue to lock acquistion failure or Failed to get asic type from unit or Failed to get asic capabilites for this unit
BVIEW_STATUS_SUCCESSGet number of RQE queues is successful
BVIEW_STATUS sbapi_system_asic_num_rqeqp_get ( int  asic,
int *  numRqeQueuePools 
)

Get number of RQE queue pools in a unit.

Parameters
[in]asicUnit number
[out]numRqeQueuePoolsNumber of RQE queue pools
Return values
BVIEW_STATUS_FAILUREDue to lock acquistion failure or Failed to get asic type from unit or Failed to get asic capabilites for this unit
BVIEW_STATUS_SUCCESSGet number of RQE queue pools is successful
BVIEW_STATUS sbapi_system_asic_num_sp_get ( int  asic,
int *  numServicePools 
)

Get number of service pools in a unit.

Parameters
[in]asicUnit number
[out]numServicePoolsNumber of Service pools
Return values
BVIEW_STATUS_FAILUREDue to lock acquistion failure or Failed to get asic type from unit or Failed to get asic capabilites for this unit
BVIEW_STATUS_SUCCESSGet number of service pools is successful
BVIEW_STATUS sbapi_system_asic_num_ucq_get ( int  asic,
int *  numUnicastQueues 
)

Get number of unicast queues in a unit.

Parameters
[in]asicUnit number
[out]numUnicastQueuesNumber of Unicast queues
Return values
BVIEW_STATUS_FAILUREDue to lock acquistion failure or Failed to get asic type from unit or Failed to get asic capabilites for this unit
BVIEW_STATUS_SUCCESSGet number of unicast queues is successful
BVIEW_STATUS sbapi_system_asic_num_ucqg_get ( int  asic,
int *  numUnicastQueueGroups 
)

Get number of unicast queue groups in a unit.

Parameters
[in]asicUnit number
[out]numUnicastQueueGroupsNumber of Unicast queue groups
Return values
BVIEW_STATUS_FAILUREDue to lock acquistion failure or Failed to get asic type from unit or Failed to get asic capabilites for this unit
BVIEW_STATUS_SUCCESSGet number of unicast queue groups is successful
BVIEW_STATUS sbapi_system_asic_support_1588_get ( int  asic,
bool *  support1588 
)

Get whether a unit supports 1588 or not.

Parameters
[in]asicUnit number
[out]support1588Support for 1588
Return values
BVIEW_STATUS_FAILUREDue to lock acquistion failure or Failed to get asic type from unit or Failed to get asic capabilites for this unit
BVIEW_STATUS_SUCCESSUnit's capability for 1588 is successfully queried
BVIEW_STATUS sbapi_system_asic_translate_from_notation ( char *  src,
int *  asic 
)

Get system asic number from notational asic number representation - string form.

Parameters
[in]srcAsic number in notational(string) form
[out]asicSystem asic number
Return values
BVIEW_STATUS_FAILUREDue to lock acquistion failure or System feature is not present or System south bound function has returned failure
BVIEW_STATUS_SUCCESSSystem south bound function for name get is successful
BVIEW_STATUS_UNSUPPORTEDSystem name get functionality is not supported on this unit

none

BVIEW_STATUS sbapi_system_asic_translate_to_notation ( int  asic,
char *  dst 
)

Get asic number in notational representation(string) from system asic number.

Parameters
[in]asicSystem asic number
[out]dstAsic number in notational(string) form
Return values
BVIEW_STATUS_FAILUREDue to lock acquistion failure or System feature is not present or System south bound function has returned failure
BVIEW_STATUS_SUCCESSSystem south bound function for name get is successful
BVIEW_STATUS_UNSUPPORTEDSystem name get functionality is not supported on this unit

none

BVIEW_STATUS sbapi_system_feature_mask_get ( int *  featureMask)

Get Supported Feature Mask.

Parameters
[out]featureMaskSupported Feature Mask
Return values
BVIEW_STATUS_FAILUREDue to lock acquistion failure or Failed to get asic type from unit or Failed to get asic capabilites for this unit
BVIEW_STATUS_SUCCESSSupported Feature Mask is successfully queried

none

BVIEW_STATUS sbapi_system_ip4_get ( uint8_t *  buffer,
int  length 
)

Get system IPv4 address.

Parameters
[out]bufferIPv4 address
[in]lengthBuffer length
Return values
BVIEW_STATUS_FAILUREDue to lock acquistion failure or System feature is not present or System south bound function has returned failure
BVIEW_STATUS_SUCCESSSystem south bound function for ipv4 get is successful
BVIEW_STATUS_UNSUPPORTEDSystem ipv4 get functionality is not supported on this unit
BVIEW_STATUS sbapi_system_lag_translate_to_notation ( int  asic,
int  lag,
char *  dst 
)

Get lag number in notational representation(string) from system lag number and asic number.

Parameters
[in]asicSystem asic number
[in]lagSystem lag number
[out]dstlag number in notational(string) form
Return values
BVIEW_STATUS_FAILUREDue to lock acquistion failure or System feature is not present or System south bound function has returned failure
BVIEW_STATUS_SUCCESSSystem south bound function for name get is successful
BVIEW_STATUS_UNSUPPORTEDSystem name get functionality is not supported on this unit

none

BVIEW_STATUS sbapi_system_mac_get ( uint8_t *  buffer,
int  length 
)

Get system MAC address.

Parameters
[out]bufferSystem MAC address
[in]lengthBuffer length
Return values
BVIEW_STATUS_FAILUREDue to lock acquistion failure or System feature is not present or System south bound function has returned failure
BVIEW_STATUS_SUCCESSSystem south bound function for mac get is successful
BVIEW_STATUS_UNSUPPORTEDSystem mac get functionality is not supported on this unit
BVIEW_STATUS sbapi_system_max_buf_snapshot_get ( int  asic,
BVIEW_SYSTEM_ASIC_MAX_BUF_SNAPSHOT_DATA_t *  maxBufSnapshot,
BVIEW_TIME_t *  time 
)

Get snapshot of max buffers allocated.

Parameters
[in]asicunit
[out]maxBufSnapshotMax buffers snapshot
[out]timetime
Return values
BVIEW_STATUS_FAILUREDue to lock acquistion failure or Not able to get asic type of this unit or system feature is not present or System south bound function has returned failure
BVIEW_STATUS_SUCCESSSnapshot get is successful
BVIEW_STATUS_UNSUPPORTEDSnapshot get functionality is not supported on this unit

none

BVIEW_STATUS sbapi_system_name_get ( char *  buffer,
int  length 
)

Get system name.

Parameters
[out]bufferSystem name
[in]lengthBuffer length
Return values
BVIEW_STATUS_FAILUREDue to lock acquistion failure or System feature is not present or System south bound function has returned failure
BVIEW_STATUS_SUCCESSSystem south bound function for name get is successful
BVIEW_STATUS_UNSUPPORTEDSystem name get functionality is not supported on this unit
BVIEW_STATUS sbapi_system_network_os_get ( uint8_t *  buffer,
int  length 
)

Get Network OS.

Parameters
[out]bufferPointer to network OS String
Return values
BVIEW_STATUS_FAILUREDue to lock acquistion failure Failed to get network os
BVIEW_STATUS_SUCCESSNetwork OS is successfully queried

none

BVIEW_STATUS sbapi_system_num_units_get ( int *  unitNum)

Get number of units in the system.

Parameters
[out]unitNumNumbers of units
Return values
BVIEW_STATUS_FAILUREWhen lock acquistion fails or System feature is not avaialable or The number of units is '0'
BVIEW_STATUS_SUCCESSRead number of units from system feature handler sucessfully
BVIEW_STATUS sbapi_system_port_translate_from_notation ( char *  src,
int *  port 
)

Get system port number from notational port number representation - string form.

Parameters
[in]srcPort number in notational(string) form
[out]portSystem port number
Return values
BVIEW_STATUS_FAILUREDue to lock acquistion failure or System feature is not present or System south bound function has returned failure
BVIEW_STATUS_SUCCESSSystem south bound function for name get is successful
BVIEW_STATUS_UNSUPPORTEDSystem name get functionality is not supported on this unit

none

BVIEW_STATUS sbapi_system_port_translate_to_notation ( int  asic,
int  port,
char *  dst 
)

Get port number in notational representation(string) from system port number and asic number.

Parameters
[in]asicSystem asic number
[in]portSystem port number
[out]dstPort number in notational(string) form
Return values
BVIEW_STATUS_FAILUREDue to lock acquistion failure or System feature is not present or System south bound function has returned failure
BVIEW_STATUS_SUCCESSSystem south bound function for name get is successful
BVIEW_STATUS_UNSUPPORTEDSystem name get functionality is not supported on this unit

none

BVIEW_STATUS sbapi_system_time_get ( time_t *  ptime)

Get Current local time.

Parameters
[out]tm- Pointer to tm structure
Return values
BVIEW_STATUS_FAILUREDue to lock acquistion failure or System feature is not present or System south bound function has returned failure
BVIEW_STATUS_SUCCESSSystem south bound function for time get is successful
BVIEW_STATUS_UNSUPPORTEDSystem time get functionality is not supported on this unit none
BVIEW_STATUS sbapi_system_uid_get ( uint8_t *  buffer,
int  length 
)

Get system UID.

Parameters
[out]bufferPointer to UID String
Return values
BVIEW_STATUS_FAILUREDue to lock acquistion failure Failed to get network os
BVIEW_STATUS_SUCCESSUID is successfully queried

none

BVIEW_STATUS sbapi_system_unit_to_asic_type_get ( int  asic,
BVIEW_ASIC_TYPE *  asicType 
)

Get asic type of a unit.

Parameters
[in]asicUnit number
[out]asicTypeAsic type of unit
Return values
BVIEW_STATUS_FAILUREWhen lock acquistion fails or System feature is not avaialable or The number of units is '0' or unit entry is not found
BVIEW_STATUS_SUCCESSAble to convert unit number to asic type sucessfully