Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.6.0.3
openapi_dcbx.h
Go to the documentation of this file.
1 
9 /*********************************************************************
10 *
11 * Copyright 2017-2018 Broadcom.
12 *
13 * Licensed under the Apache License, Version 2.0 (the "License");
14 * you may not use this file except in compliance with the License.
15 * You may obtain a copy of the License at
16 *
17 * http://www.apache.org/licenses/LICENSE-2.0
18 *
19 * Unless required by applicable law or agreed to in writing, software
20 * distributed under the License is distributed on an "AS IS" BASIS,
21 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 * See the License for the specific language governing permissions and
23 * limitations under the License.
24 *
25 * Licensed under the Apache License, Version 2.0 (the "License");
26 * you may not use this file except in compliance with the License.
27 * You may obtain a copy of the License at
28 *
29 * http://www.apache.org/licenses/LICENSE-2.0
30 *
31 * Unless required by applicable law or agreed to in writing, software
32 * distributed under the License is distributed on an "AS IS" BASIS,
33 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
34 * See the License for the specific language governing permissions and
35 * limitations under the License.
36 *
37 **********************************************************************
38 *
39 * @filename openapi_dcbx.h
40 *
41 * @purpose Data center Bridging Capability Exchange Protocol APIs.
42 *
43 * @component OPEN
44 *
45 * @create 01/23/2017
46 *
47 * @end
48 *
49 **********************************************************************/
50 #ifndef OPENAPI_DCBX_H_INCLUDED
51 #define OPENAPI_DCBX_H_INCLUDED
52 
53 #include "openapi_common.h"
54 
55 typedef enum
56 {
57  OPEN_DCBX_CAP_NONE = 0, /*<< No capability bits set */
58  OPEN_DCBX_CAP_PFC_BITMASK = (1 << 0), /*<< PFC capability */
59  OPEN_DCBX_CAP_ETS_CFG_BITMASK = (1 << 1), /*<< ETS config capability */
60  OPEN_DCBX_CAP_ETS_REC_BITMASK = (1 << 2), /*<< ETS recommendation TLV */
61  OPEN_DCBX_CAP_APP_PRI_BITMASK = (1 << 3), /*<< Application priority */
62  OPEN_DCBX_CAP_CONTROL_BITMASK = (1 << 4) /*<< Control capability */
63 } OPEN_DCBX_CAPABILITIES_t;
64 
65 #define OPEN_ETS_TCG_NUM_MIN 0 /*<< Minimum ETS TCG number */
66 #define OPEN_ETS_TCG_NUM_MAX 7 /*<< Maximum ETS TCG number */
67 
68 typedef enum
69 {
70  OPEN_DCBX_AUTO = 1, /*<< Auto */
71  OPEN_DCBX_IEEE = 2, /*<< IEEE */
72  OPEN_DCBX_CIN = 3, /*<< CIN */
73  OPEN_DCBX_CEE = 4, /*<< CEE */
74 } OPEN_DCBX_VERSION_t;
75 
76 typedef enum
77 {
78  OPEN_DCBX_OP_STATUS_ENABLE = 1, /*<< Enabled */
79  OPEN_DCBX_OP_STATUS_DISABLE = 2, /*<< Disabled */
80  OPEN_DCBX_OP_STATUS_MULTI_PEER = 3, /*<< Multi-peer */
81 } OPEN_DCBX_OP_STATUS;
82 
83 typedef enum
84 {
85  OPEN_DCBX_PORT_ROLE_MANUAL = 1, /*<< Port role manual */
86  OPEN_DCBX_PORT_ROLE_AUTO_UPSTREAM = 2, /*<< Port role auto upstream */
87  OPEN_DCBX_PORT_ROLE_AUTO_DOWNSTREAM = 3, /*<< Port role auto downstream */
88  OPEN_DCBX_PORT_ROLE_AUTO_CFG_SRC = 4 /*<< Port role auto config src */
89 } OPEN_DCBX_PORT_ROLE_t;
90 
91 #define OPEN_LLDP_MGMT_STRING_SIZE_MAX (255+1)
92 
93 /*****************************************************************/
108  uint32_t ifNum,
109  OPEN_DCBX_VERSION_t version);
110 
111 /*****************************************************************/
126  uint32_t *ifNum, OPEN_BOOL_t *selected);
127 
128 /*****************************************************************/
148  uint32_t ifNum,
149  OPEN_DCBX_OP_STATUS *status);
150 
151 /*****************************************************************/
167  uint32_t ifNum,
168  OPEN_DCBX_PORT_ROLE_t *role);
169 
170 /*****************************************************************/
186  uint32_t ifNum,
187  OPEN_DCBX_VERSION_t *version);
188 
189 /*****************************************************************/
205  uint32_t ifNum,
206  OPEN_DCBX_VERSION_t *mode);
207 
208 /*****************************************************************/
227  uint32_t ifNum,
228  uint32_t *txCnt,
229  uint32_t *rxCnt,
230  uint32_t *errorFrames,
231  uint32_t *unknownTlv);
232 
233 /*****************************************************************/
249  uint32_t ifNum,
250  open_buffdesc *macAddr);
251 
252 /*****************************************************************/
270  uint32_t ifNum,
271  open_buffdesc *descr);
272 
273 /*****************************************************************/
288  uint32_t ifNum,
289  OPEN_BOOL_t *valid);
290 
291 /*****************************************************************/
307  uint32_t ifNum,
308  OPEN_BOOL_t *isCfgSrc);
309 
310 /*****************************************************************/
327  uint32_t ifNum,
328  uint32_t *timedOutCount,
329  uint32_t *multiPeerCount);
330 
331 /*****************************************************************/
347  uint32_t ifNum,
348  OPEN_DCBX_VERSION_t *version);
349 
350 
351 /*****************************************************************/
368  uint32_t ifNum,
369  OPEN_DCBX_CAPABILITIES_t *peerTlvMask);
370 
371 /*****************************************************************/
387  uint32_t ifNum,
388  uint32_t *operVer);
389 
390 /*****************************************************************/
406  uint32_t ifNum,
407  uint32_t *maxVer);
408 
409 /*****************************************************************/
426  uint32_t ifNum,
427  uint32_t *seqNum);
428 
429 /*****************************************************************/
446  uint32_t ifNum,
447  uint32_t *rcvdAckNum);
448 
449 /*****************************************************************/
465  uint32_t ifNum,
466  OPEN_BOOL_t *willing);
467 
468 /*****************************************************************/
484  uint32_t ifNum,
485  open_buffdesc *schedList);
486 
487 /*****************************************************************/
503  uint32_t ifNum,
504  open_buffdesc *bwList);
505 
506 /*****************************************************************/
526  uint32_t ifNum,
527  uint32_t index,
528  uint16_t *protocolId,
529  uint32_t *protoSel,
530  uint8_t *priority,
531  OPEN_BOOL_t *appStatus);
532 
533 /*****************************************************************/
555  uint32_t ifNum,
556  uint32_t index,
557  uint16_t *protocolId,
558  uint32_t *protoSel,
559  uint8_t *priority,
560  OPEN_BOOL_t *appStatus);
561 
562 /*****************************************************************/
578  uint32_t ifNum,
579  OPEN_DCBX_CAPABILITIES_t *dcbxCap);
580 
581 /*****************************************************************/
598  uint32_t ifNum,
599  OPEN_DCBX_CAPABILITIES_t dcbxCap);
600 
601 /*****************************************************************/
617  uint32_t ifNum,
618  OPEN_DCBX_PORT_ROLE_t role);
619 
620 #endif /* OPENAPI_DCBX_H_INCLUDED */
621 
open_error_t openapiDcbxLocalEtsSchedGet(openapiClientHandle_t *client_handle, uint32_t ifNum, open_buffdesc *schedList)
Get the local scheduler type.
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.
open_error_t openapiDcbxLocalEtsBwGet(openapiClientHandle_t *client_handle, uint32_t ifNum, open_buffdesc *bwList)
Get local ETS bandwidth.
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.
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.
open_error_t openapiDcbxPeerDescGet(openapiClientHandle_t *client_handle, uint32_t ifNum, open_buffdesc *descr)
Get the system description of the peer device.
open_error_t openapiDcbxPeerMacGet(openapiClientHandle_t *client_handle, uint32_t ifNum, open_buffdesc *macAddr)
Get the MAC address of remote DCBX device.
open_error_t openapiDcbxVersionSet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_DCBX_VERSION_t version)
Set the DCBX version.
open_error_t openapiDcbxPortLegacyRemOperVerGet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *operVer)
Get the Oper version supported by remote legacy DCBX device.
open_error_t
OPEN uses these enumerators to indicate the error codes.
open_error_t openapiDcbxAutoCfgPortRoleGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_DCBX_PORT_ROLE_t *role)
Get the port role configuration.
open_error_t openapiDcbxPortConfigTLVsEnabledGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_DCBX_CAPABILITIES_t *dcbxCap)
Get bit mask of DCBX TLVs enabled.
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.
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. ...
open_error_t openapiDcbxVersionGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_DCBX_VERSION_t *version)
Get the DCBX version.
open_error_t openapiDcbxPeerTlvMaskGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_DCBX_CAPABILITIES_t *peerTlvMask)
Get peer TLV supported mask.
open_error_t openapiDcbxOperStatusGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_DCBX_OP_STATUS *status)
Get the operational status of DCBX.
open_error_t openapiDcbxIsValidIntf(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_BOOL_t *valid)
Determine if the interface is valid for DCBX.
open_error_t openapiDcbxPeerVersionGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_DCBX_VERSION_t *mode)
Get the peer DCBX running version.
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.
OPEN_BOOL_t
OPEN uses these enumerators to indicate true or false for a given config or status parameter...
open_error_t openapiDcbxCfgSrcGet(openapiClientHandle_t *client_handle, uint32_t *ifNum, OPEN_BOOL_t *selected)
Get the configuration port number.
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.
open_error_t openapiDcbxPortWillingGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_BOOL_t *willing)
Get the port local willing status.
open_error_t openapiDcbxPortConfigTLVsEnabledSet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_DCBX_CAPABILITIES_t dcbxCap)
Set bit mask of enabled DCBX TLVs.
open_error_t openapiDcbxAutoCfgPortRoleSet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_DCBX_PORT_ROLE_t role)
Set the port role for auto configuration.
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.
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.