Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.4.4.5
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