Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.6.0.3
Macros | Enumerations | Functions
Data Center Bridging Capability Exchange Protocol APIs [OPENAPI_DCBX]

Macros

#define OPEN_ETS_TCG_NUM_MAX   7 /*<< Maximum ETS TCG number */
 
#define OPEN_ETS_TCG_NUM_MIN   0 /*<< Minimum ETS TCG number */
 
#define OPEN_LLDP_MGMT_STRING_SIZE_MAX   (255+1)
 

Enumerations

enum  OPEN_DCBX_CAPABILITIES_t {
  OPEN_DCBX_CAP_NONE = 0, OPEN_DCBX_CAP_PFC_BITMASK = (1 << 0), OPEN_DCBX_CAP_ETS_CFG_BITMASK = (1 << 1), OPEN_DCBX_CAP_ETS_REC_BITMASK = (1 << 2),
  OPEN_DCBX_CAP_APP_PRI_BITMASK = (1 << 3), OPEN_DCBX_CAP_CONTROL_BITMASK = (1 << 4)
}
 
enum  OPEN_DCBX_OP_STATUS { OPEN_DCBX_OP_STATUS_ENABLE = 1, OPEN_DCBX_OP_STATUS_DISABLE = 2, OPEN_DCBX_OP_STATUS_MULTI_PEER = 3 }
 
enum  OPEN_DCBX_PORT_ROLE_t { OPEN_DCBX_PORT_ROLE_MANUAL = 1, OPEN_DCBX_PORT_ROLE_AUTO_UPSTREAM = 2, OPEN_DCBX_PORT_ROLE_AUTO_DOWNSTREAM = 3, OPEN_DCBX_PORT_ROLE_AUTO_CFG_SRC = 4 }
 
enum  OPEN_DCBX_VERSION_t { OPEN_DCBX_AUTO = 1, OPEN_DCBX_IEEE = 2, OPEN_DCBX_CIN = 3, OPEN_DCBX_CEE = 4 }
 

Functions

open_error_t openapiDcbxAppPriTableGet (openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t index, uint16_t *protocolId, uint32_t *protoSel, uint8_t *priority, OPEN_BOOL_t *appStatus)
 Get the application table. More...
 
open_error_t openapiDcbxAutoCfgPortRoleGet (openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_DCBX_PORT_ROLE_t *role)
 Get the port role configuration. More...
 
open_error_t openapiDcbxAutoCfgPortRoleSet (openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_DCBX_PORT_ROLE_t role)
 Set the port role for auto configuration. More...
 
open_error_t openapiDcbxCfgSrcGet (openapiClientHandle_t *client_handle, uint32_t *ifNum, OPEN_BOOL_t *selected)
 Get the configuration port number. More...
 
open_error_t openapiDcbxCounterGet (openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *txCnt, uint32_t *rxCnt, uint32_t *errorFrames, uint32_t *unknownTlv)
 Get the DCBX counters. More...
 
open_error_t openapiDcbxIntfIsCfgSrcGet (openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_BOOL_t *isCfgSrc)
 Check the peer is config source for the auto configuration. More...
 
open_error_t openapiDcbxIsValidIntf (openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_BOOL_t *valid)
 Determine if the interface is valid for DCBX. More...
 
open_error_t openapiDcbxLocalEtsBwGet (openapiClientHandle_t *client_handle, uint32_t ifNum, open_buffdesc *bwList)
 Get local ETS bandwidth. More...
 
open_error_t openapiDcbxLocalEtsSchedGet (openapiClientHandle_t *client_handle, uint32_t ifNum, open_buffdesc *schedList)
 Get the local scheduler type. More...
 
open_error_t openapiDcbxOperStatusGet (openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_DCBX_OP_STATUS *status)
 Get the operational status of DCBX. More...
 
open_error_t openapiDcbxPeerAppPriTableGet (openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t index, uint16_t *protocolId, uint32_t *protoSel, uint8_t *priority, OPEN_BOOL_t *appStatus)
 Get Peer application table. More...
 
open_error_t openapiDcbxPeerDescGet (openapiClientHandle_t *client_handle, uint32_t ifNum, open_buffdesc *descr)
 Get the system description of the peer device. More...
 
open_error_t openapiDcbxPeerMacGet (openapiClientHandle_t *client_handle, uint32_t ifNum, open_buffdesc *macAddr)
 Get the MAC address of remote DCBX device. More...
 
open_error_t openapiDcbxPeerTlvMaskGet (openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_DCBX_CAPABILITIES_t *peerTlvMask)
 Get peer TLV supported mask. More...
 
open_error_t openapiDcbxPeerVersionGet (openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_DCBX_VERSION_t *mode)
 Get the peer DCBX running version. More...
 
open_error_t openapiDcbxPortConfigTLVsEnabledGet (openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_DCBX_CAPABILITIES_t *dcbxCap)
 Get bit mask of DCBX TLVs enabled. More...
 
open_error_t openapiDcbxPortConfigTLVsEnabledSet (openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_DCBX_CAPABILITIES_t dcbxCap)
 Set bit mask of enabled DCBX TLVs. More...
 
open_error_t openapiDcbxPortLegacyRemMaxVerGet (openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *maxVer)
 Get the Max version supported by the remote legacy DCBX device. More...
 
open_error_t openapiDcbxPortLegacyRemOperVerGet (openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *operVer)
 Get the Oper version supported by remote legacy DCBX device. More...
 
open_error_t openapiDcbxPortLegacyRemRcvdAckNumGet (openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *rcvdAckNum)
 Get the current ACK number that is sent by peer in DCBX control TLVs in Legacy mode. More...
 
open_error_t openapiDcbxPortLegacyRemSeqNumGet (openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *seqNum)
 Get the current sequence number that is sent in DCBX control TLVs in Legacy Mode. More...
 
open_error_t openapiDcbxPortOperationalModeGet (openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_DCBX_VERSION_t *version)
 Gets the DCBX TLVs that need to be transmitted in the LLDP PDU. More...
 
open_error_t openapiDcbxPortWillingGet (openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_BOOL_t *willing)
 Get the port local willing status. More...
 
open_error_t openapiDcbxTimedOutAndMultiPeerCountGet (openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *timedOutCount, uint32_t *multiPeerCount)
 Get the timed-out and multi-peer counts for an interface. More...
 
open_error_t openapiDcbxVersionGet (openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_DCBX_VERSION_t *version)
 Get the DCBX version. More...
 
open_error_t openapiDcbxVersionSet (openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_DCBX_VERSION_t version)
 Set the DCBX version. More...
 

Detailed Description

Function Documentation

open_error_t openapiDcbxAppPriTableGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint32_t  index,
uint16_t *  protocolId,
uint32_t *  protoSel,
uint8_t *  priority,
OPEN_BOOL_t appStatus 
)

Get the application table.

Parameters
[in]client_handleclient handle.
[in]ifNuminterface number.
[out]indexIndex to the application priority
[out]protocolIdprotocol Id(ethertype or socket num)
[out]protoSelprotocol sel
[out]prioritydot1p priority
[out]appStatusapplication status
Return values
OPEN_E_NONEOn success.
OPEN_E_UNAVAILInterface not supported.
OPEN_E_PARAMBad parameter.
OPEN_E_FAILSome failure occurred.

OpEN API Version: 1.14

open_error_t openapiDcbxAutoCfgPortRoleGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
OPEN_DCBX_PORT_ROLE_t *  role 
)

Get the port role configuration.

Parameters
[in]client_handleclient handle.
[in]ifNuminterface number.
[out]rolerole.
Return values
OPEN_E_NONEOn success.
OPEN_E_PARAMBad parameter.
OPEN_E_UNAVAILInterface not supported.
OPEN_E_FAILSome failure occurred.

OpEN API Version: 1.14

open_error_t openapiDcbxAutoCfgPortRoleSet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
OPEN_DCBX_PORT_ROLE_t  role 
)

Set the port role for auto configuration.

Parameters
[in]client_handleclient handle.
[in]ifNuminterface number.
[in]roleport role for auto configuration.
Return values
OPEN_E_NONEOn success.
OPEN_E_UNAVAILInterface not supported.
OPEN_E_PARAMBad parameter.
OPEN_E_FAILSome failure occurred.

OpEN API Version: 1.14

open_error_t openapiDcbxCfgSrcGet ( openapiClientHandle_t client_handle,
uint32_t *  ifNum,
OPEN_BOOL_t selected 
)

Get the configuration port number.

Parameters
[in]client_handleclient handle.
[out]ifNuminterface number.
[out]selectedif OPEN_TRUE, config source is selected.
Return values
OPEN_E_NONEOn success.
OPEN_E_PARAMBad parameter.
OPEN_E_FAILSome failure occurred.

OpEN API Version: 1.14

open_error_t openapiDcbxCounterGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint32_t *  txCnt,
uint32_t *  rxCnt,
uint32_t *  errorFrames,
uint32_t *  unknownTlv 
)

Get the DCBX counters.

Parameters
[in]client_handleclient handle.
[in]ifNumInterface Number
[out]txCntTransmits
[out]rxCntReceives
[out]errorFrameserror frames
[out]unknownTlvunknown TLV
Return values
OPEN_E_NONEOn success.
OPEN_E_PARAMBad parameter.
OPEN_E_UNAVAILInterface not supported.
OPEN_E_FAILSome failure occurred.

OpEN API Version: 1.14

open_error_t openapiDcbxIntfIsCfgSrcGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
OPEN_BOOL_t isCfgSrc 
)

Check the peer is config source for the auto configuration.

Parameters
[in]client_handleclient handle.
[in]ifNuminterface number.
[out]isCfgSrcOPEN_TRUE if peer is config src, else OPEN_FALSE.
Return values
OPEN_E_NONEOn success.
OPEN_E_PARAMBad parameter.
OPEN_E_UNAVAILInterface not supported.
OPEN_E_FAILSome failure occurred.

OpEN API Version: 1.14

open_error_t openapiDcbxIsValidIntf ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
OPEN_BOOL_t valid 
)

Determine if the interface is valid for DCBX.

Parameters
[in]client_handleclient handle.
[in]ifNuminterface number.
[out]validOPEN_TRUE if valid, OPEN_FALSE otherwise.
Return values
OPEN_E_NONEOn success.
OPEN_E_PARAMBad parameter.
OPEN_E_FAILSome failure occurred.

OpEN API Version: 1.14

open_error_t openapiDcbxLocalEtsBwGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
open_buffdesc bwList 
)

Get local ETS bandwidth.

Parameters
[in]client_handleclient handle.
[in]ifNuminterface number.
[out]bwListbandwidth list.
Return values
OPEN_E_NONEOn success.
OPEN_E_PARAMBad parameter.
OPEN_E_UNAVAILInterface not supported.
OPEN_E_FAILSome failure occurred.

OpEN API Version: 1.14

open_error_t openapiDcbxLocalEtsSchedGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
open_buffdesc schedList 
)

Get the local scheduler type.

Parameters
[in]client_handleclient handle.
[in]ifNuminterface number.
[out]schedListscheduler list.
Return values
OPEN_E_NONEOn success.
OPEN_E_PARAMBad parameter.
OPEN_E_UNAVAILInterface not supported.
OPEN_E_FAILSome failure occurred.

OpEN API Version: 1.14

open_error_t openapiDcbxOperStatusGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
OPEN_DCBX_OP_STATUS *  status 
)

Get the operational status of DCBX.

Parameters
[in]client_handleclient handle.
[in]ifNuminterface number.
[out]statusstatus.
Return values
OPEN_E_NONEOn success.
OPEN_E_PARAMBad parameter.
OPEN_E_UNAVAILInterface not supported.
OPEN_E_FAILSome failure occurred.
Note
The operational state of DCBX is enabled if: 1) LLDP TX and RX is enabled. 2) DCBX TLV are enabled.

OpEN API Version: 1.14

open_error_t openapiDcbxPeerAppPriTableGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint32_t  index,
uint16_t *  protocolId,
uint32_t *  protoSel,
uint8_t *  priority,
OPEN_BOOL_t appStatus 
)

Get Peer application table.

Parameters
[in]client_handleclient handle.
[in]ifNuminterface number.
[out]indexIndex to the application priority
[out]protocolIdprotocol Id(ethertype or socket num)
[out]protoSelprotocol sel
[out]prioritydot1p priority
[out]appStatusapplication status
Return values
OPEN_E_NONEOn success.
OPEN_E_PARAMBad parameter.
OPEN_E_UNAVAILInterface not supported.
OPEN_E_NOT_FOUNDPeer is not present
OPEN_E_FAILSome failure occurred.

OpEN API Version: 1.14

open_error_t openapiDcbxPeerDescGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
open_buffdesc descr 
)

Get the system description of the peer device.

Parameters
[in]client_handleclient handle.
[in]ifNuminterface number.
[out]descrdescription string.
Return values
OPEN_E_NONEOn success.
OPEN_E_PARAMBad parameter.
OPEN_E_UNAVAILInterface not supported.
OPEN_E_FAILSome failure occurred.
Note
descr must point to at least OPEN_LLDP_MGMT_STRING_SIZE_MAX bytes.

OpEN API Version: 1.14

open_error_t openapiDcbxPeerMacGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
open_buffdesc macAddr 
)

Get the MAC address of remote DCBX device.

Parameters
[in]client_handleclient handle.
[in]ifNuminterface number.
[out]macAddrmac addr.
Return values
OPEN_E_NONEOn success.
OPEN_E_PARAMBad parameter.
OPEN_E_UNAVAILInterface not supported.
OPEN_E_FAILSome failure occurred.

OpEN API Version: 1.14

open_error_t openapiDcbxPeerTlvMaskGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
OPEN_DCBX_CAPABILITIES_t *  peerTlvMask 
)

Get peer TLV supported mask.

Parameters
[in]client_handleclient handle.
[in]ifNuminterface number.
[out]peerTlvMaskmask of TLV supported.
Return values
OPEN_E_NONEOn success.
OPEN_E_PARAMBad parameter.
OPEN_E_UNAVAILInterface not supported.
OPEN_E_NOT_FOUNDNo peer detected.
OPEN_E_FAILSome failure occurred.

OpEN API Version: 1.14

open_error_t openapiDcbxPeerVersionGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
OPEN_DCBX_VERSION_t *  mode 
)

Get the peer DCBX running version.

Parameters
[in]client_handleclient handle.
[in]ifNuminterface number.
[out]modepeer DCBX running version.
Return values
OPEN_E_NONEOn success.
OPEN_E_PARAMBad parameter.
OPEN_E_UNAVAILInterface not supported.
OPEN_E_FAILSome failure occurred.

OpEN API Version: 1.14

open_error_t openapiDcbxPortConfigTLVsEnabledGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
OPEN_DCBX_CAPABILITIES_t *  dcbxCap 
)

Get bit mask of DCBX TLVs enabled.

Parameters
[in]client_handleclient handle.
[in]ifNuminterface number.
[out]dcbxCapmask of enabled DCBX TLVs.
Return values
OPEN_E_NONEOn success.
OPEN_E_UNAVAILInterface not supported.
OPEN_E_PARAMBad parameter.
OPEN_E_FAILSome failure occurred.

OpEN API Version: 1.14

open_error_t openapiDcbxPortConfigTLVsEnabledSet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
OPEN_DCBX_CAPABILITIES_t  dcbxCap 
)

Set bit mask of enabled DCBX TLVs.

Parameters
[in]client_handleclient handle.
[in]ifNuminterface number.
[out]dcbxCapmask of enabled DCBX TLVs.
Return values
OPEN_E_NONEOn success.
OPEN_E_UNAVAILInterface not supported.
OPEN_E_PARAMBad parameter.
OPEN_E_FAILSome failure occurred.

OpEN API Version: 1.14

open_error_t openapiDcbxPortLegacyRemMaxVerGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint32_t *  maxVer 
)

Get the Max version supported by the remote legacy DCBX device.

Parameters
[in]client_handleclient handle.
[in]ifNuminterface number.
[out]maxVermax version number.
Return values
OPEN_E_NONEOn success.
OPEN_E_UNAVAILInterface not supported.
OPEN_E_PARAMBad parameter.
OPEN_E_FAILSome failure occurred.

OpEN API Version: 1.14

open_error_t openapiDcbxPortLegacyRemOperVerGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint32_t *  operVer 
)

Get the Oper version supported by remote legacy DCBX device.

Parameters
[in]client_handleclient handle.
[in]ifNuminterface number.
[out]operVeroperVer.
Return values
OPEN_E_NONEOn success.
OPEN_E_PARAMBad parameter.
OPEN_E_UNAVAILInterface not supported.
OPEN_E_FAILSome failure occurred.

OpEN API Version: 1.14

open_error_t openapiDcbxPortLegacyRemRcvdAckNumGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint32_t *  rcvdAckNum 
)

Get the current ACK number that is sent by peer in DCBX control TLVs in Legacy mode.

Parameters
[in]client_handleclient handle.
[in]ifNuminterface number.
[out]rcvdAckNumreceived ack number.
Return values
OPEN_E_NONEOn success.
OPEN_E_PARAMBad parameter.
OPEN_E_UNAVAILInterface not supported.
OPEN_E_FAILSome failure occurred.

OpEN API Version: 1.14

open_error_t openapiDcbxPortLegacyRemSeqNumGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint32_t *  seqNum 
)

Get the current sequence number that is sent in DCBX control TLVs in Legacy Mode.

Parameters
[in]client_handleclient handle.
[in]ifNuminterface number.
[out]seqNumsequence number.
Return values
OPEN_E_NONEOn success.
OPEN_E_PARAMBad parameter.
OPEN_E_UNAVAILInterface not supported.
OPEN_E_FAILSome failure occurred.

OpEN API Version: 1.14

open_error_t openapiDcbxPortOperationalModeGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
OPEN_DCBX_VERSION_t *  version 
)

Gets the DCBX TLVs that need to be transmitted in the LLDP PDU.

Parameters
[in]client_handleclient handle.
[in]ifNuminterface number.
[out]versionversion.
Return values
OPEN_E_NONEOn success.
OPEN_E_PARAMBad parameter.
OPEN_E_UNAVAILInterface not supported.
OPEN_E_FAILSome failure occurred.

OpEN API Version: 1.14

open_error_t openapiDcbxPortWillingGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
OPEN_BOOL_t willing 
)

Get the port local willing status.

Parameters
[in]client_handleclient handle.
[in]ifNuminterface number.
[out]willingport local willing status.
Return values
OPEN_E_NONEOn success.
OPEN_E_PARAMBad parameter.
OPEN_E_UNAVAILInterface not supported.
OPEN_E_FAILSome failure occurred.

OpEN API Version: 1.14

open_error_t openapiDcbxTimedOutAndMultiPeerCountGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
uint32_t *  timedOutCount,
uint32_t *  multiPeerCount 
)

Get the timed-out and multi-peer counts for an interface.

Parameters
[in]client_handleclient handle.
[in]ifNuminterface number.
[out]timedOutCounttimed-out count.
[out]multiPeerCountmulti-peer count.
Return values
OPEN_E_NONEOn success.
OPEN_E_PARAMBad parameter.
OPEN_E_UNAVAILInterface not supported.
OPEN_E_FAILSome failure occurred.

OpEN API Version: 1.14

open_error_t openapiDcbxVersionGet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
OPEN_DCBX_VERSION_t *  version 
)

Get the DCBX version.

Parameters
[in]client_handleclient handle.
[in]ifNuminterface number.
[out]versionDCBX version.
Return values
OPEN_E_NONEOn success.
OPEN_E_PARAMBad parameter.
OPEN_E_UNAVAILInterface not supported.
OPEN_E_FAILSome failure occurred.

OpEN API Version: 1.14

open_error_t openapiDcbxVersionSet ( openapiClientHandle_t client_handle,
uint32_t  ifNum,
OPEN_DCBX_VERSION_t  version 
)

Set the DCBX version.

Parameters
[in]client_handleclient handle.
[in]ifNuminterface number.
[in]versionversion.
Return values
OPEN_E_NONEOn success.
OPEN_E_PARAMBad parameter.
OPEN_E_FAILSome failure occurred.

OpEN API Version: 1.14