Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.6.0.3
openapi_lag.h
Go to the documentation of this file.
1 
9 /*********************************************************************
10 *
11 * Copyright 2016-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 **********************************************************************
26 *
27 * @filename openapi_lag.h
28 *
29 * @purpose LAG Configuration and Status
30 *
31 * @component OPEN
32 *
33 * @create 10/10/2012
34 *
35 * @end
36 *
37 **********************************************************************/
38 #ifndef OPENAPI_LAG_H_INCLUDED
39 #define OPENAPI_LAG_H_INCLUDED
40 
41 #include <stdio.h>
42 #include <stddef.h>
43 #include <sys/un.h>
44 
45 #include "openapi_common.h"
46 
48 typedef enum
49 {
58 
60 typedef enum
61 {
66 
67 #define OPEN_MAX_MEMBERS_PER_LAG 32
68 #define OPEN_LAG_MEMBER_BUFFER_SIZE (sizeof(uint32_t) * OPEN_MAX_MEMBERS_PER_LAG)
69 
70 /*****************************************************************/
87  uint32_t lagIfNum,
88  uint32_t phyIfNum);
89 
90 /*****************************************************************/
105  uint32_t lagIfNum,
106  uint32_t phyIfNum);
107 
108 /*****************************************************************/
124  uint32_t lagIfNum,
125  OPEN_CONTROL_t *staticMode);
126 
127 /*****************************************************************/
148  uint32_t lagIfNum,
149  OPEN_CONTROL_t staticMode);
150 
151 /*****************************************************************/
164  uint32_t *maxLen);
165 
166 /***********************************************************************/
184  uint32_t lagIfNum,
185  open_buffdesc *name);
186 
187 /***********************************************************************/
206  uint32_t lagIfNum,
207  open_buffdesc *name);
208 
209 /****************************************************************************/
224  uint32_t lagIfNum,
225  OPEN_LAG_HASH_MODE_t *lbMode);
226 
227 /****************************************************************************/
244  uint32_t lagIfNum,
245  OPEN_LAG_HASH_MODE_t lbMode);
246 
247 /*****************************************************************/
263  uint32_t *minThreshold,
264  uint32_t *maxThreshold);
265 
266 /****************************************************************************/
283  uint32_t lagIfNum,
284  uint32_t *minUpLinks);
285 
286 /****************************************************************************/
306  uint32_t lagIfNum,
307  uint32_t minUpLinks);
308 
309 /*****************************************************************/
324  uint32_t *memberMax);
325 
326 /****************************************************************************/
348  uint32_t lagIfNum,
349  uint32_t *count,
350  open_buffdesc *bufd);
351 
352 /****************************************************************************/
374  uint32_t lagIfNum,
375  uint32_t *count,
376  open_buffdesc *bufd);
377 
378 /****************************************************************************/
400  uint32_t lagIfNum,
401  uint32_t *count,
402  open_buffdesc *bufd);
403 
404 /****************************************************************************/
426  uint32_t lagIfNum,
427  uint32_t *count,
428  open_buffdesc *bufd);
429 
430 /****************************************************************************/
445  uint32_t ifNum,
446  OPEN_CONTROL_t *lacpMode);
447 
448 /****************************************************************************/
463  uint32_t ifNum,
464  OPEN_CONTROL_t lacpMode);
465 
466 /****************************************************************************/
482  uint32_t ifNum,
484  OPEN_CONTROL_t *state);
485 
486 /****************************************************************************/
502  uint32_t ifNum,
504  OPEN_CONTROL_t mode);
505 
506 /*****************************************************************/
522  uint32_t lagIfNum,
523  OPEN_CONTROL_t *adminMode);
524 
525 /*****************************************************************/
541  uint32_t lagIfNum,
542  OPEN_CONTROL_t adminMode);
543 #endif
544 
open_error_t openapiLagNameGet(openapiClientHandle_t *client_handle, uint32_t lagIfNum, open_buffdesc *name)
Gets name of the LAG interface.
open_error_t openapiDot3adAggPortLacpModeGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_CONTROL_t *lacpMode)
Gets the LACP mode of the physical interface.
open_error_t openapiLagLoadBalanceModeSet(openapiClientHandle_t *client_handle, uint32_t lagIfNum, OPEN_LAG_HASH_MODE_t lbMode)
Sets load balancing mode of the LAG interface.
open_error_t openapiLagNameMaxLengthGet(openapiClientHandle_t *client_handle, uint32_t *maxLen)
Get the maximum LAG name length.
open_error_t openapiLagActiveMembersListGet(openapiClientHandle_t *client_handle, uint32_t lagIfNum, uint32_t *count, open_buffdesc *bufd)
Gets a comma-delimited list of active member ports for the LAG interface.
OPEN_LAG_HASH_MODE_t
Hash Mode names.
Definition: openapi_lag.h:48
open_error_t openapiLagThresholdMinMaxGet(openapiClientHandle_t *client_handle, uint32_t *minThreshold, uint32_t *maxThreshold)
Get the LAG Threshold minimum and maximum values.
open_error_t openapiDot3adAggPortActorAdminStateSet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_DOT3AD_STATE_TYPE_t type, OPEN_CONTROL_t mode)
Sets the LACP actor admin state.
open_error_t
OPEN uses these enumerators to indicate the error codes.
Src IP and Src TCP/UDP Port fields.
Definition: openapi_lag.h:53
Enhanced hashing mode.
Definition: openapi_lag.h:56
open_error_t openapiLagStaticModeGet(openapiClientHandle_t *client_handle, uint32_t lagIfNum, OPEN_CONTROL_t *staticMode)
Gets static mode of the LAG interface.
open_error_t openapiLagAdminModeSet(openapiClientHandle_t *client_handle, uint32_t lagIfNum, OPEN_CONTROL_t adminMode)
Set the administrative mode of a LAG interface.
open_error_t openapiLagMinUplinksSet(openapiClientHandle_t *client_handle, uint32_t lagIfNum, uint32_t minUpLinks)
Sets minimum uplinks for the LAG interface.
OPEN_DOT3AD_STATE_TYPE_t
OpEN uses these enumerations to indicate DOT3AD state types.
Definition: openapi_lag.h:60
open_error_t openapiLagMembersGet(openapiClientHandle_t *client_handle, uint32_t lagIfNum, uint32_t *count, open_buffdesc *bufd)
Gets the list of member ports for the LAG interface.
open_error_t openapiLagLoadBalanceModeGet(openapiClientHandle_t *client_handle, uint32_t lagIfNum, OPEN_LAG_HASH_MODE_t *lbMode)
Gets load balancing mode of the LAG interface.
open_error_t openapiLagMembersListGet(openapiClientHandle_t *client_handle, uint32_t lagIfNum, uint32_t *count, open_buffdesc *bufd)
Gets a comma-delimited list of member ports for the LAG interface.
Dest MAC, VLAN, EType, incoming port.
Definition: openapi_lag.h:51
open_error_t openapiLagNameSet(openapiClientHandle_t *client_handle, uint32_t lagIfNum, open_buffdesc *name)
Sets name of the LAG interface.
Dest IP and Dest TCP/UDP Port fields.
Definition: openapi_lag.h:54
Src/Dest MAC, VLAN, EType, incoming port.
Definition: openapi_lag.h:52
open_error_t openapiLagAdminModeGet(openapiClientHandle_t *client_handle, uint32_t lagIfNum, OPEN_CONTROL_t *adminMode)
Get the administrative mode of a LAG interface.
open_error_t openapiLagMaxMemberCountGet(openapiClientHandle_t *client_handle, uint32_t *memberMax)
Get the maximum number of members allowed for a LAG.
OPEN_CONTROL_t
OPEN uses these enumerators to indicate enable or disable for a given config or status parameter...
open_error_t openapiLagPortDelete(openapiClientHandle_t *client_handle, uint32_t lagIfNum, uint32_t phyIfNum)
Delete a physical interface from a LAG interface.
open_error_t openapiDot3adAggPortLacpModeSet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_CONTROL_t lacpMode)
Sets the LACP mode of the physical interface.
open_error_t openapiDot3adAggPortActorAdminStateGet(openapiClientHandle_t *client_handle, uint32_t ifNum, OPEN_DOT3AD_STATE_TYPE_t type, OPEN_CONTROL_t *state)
Gets the LACP actor admin state.
open_error_t openapiLagPortAdd(openapiClientHandle_t *client_handle, uint32_t lagIfNum, uint32_t phyIfNum)
Adds a physical interface to a LAG interface.
open_error_t openapiLagActiveMembersGet(openapiClientHandle_t *client_handle, uint32_t lagIfNum, uint32_t *count, open_buffdesc *bufd)
Gets the list of active member ports for the LAG interface.
open_error_t openapiLagMinUplinksGet(openapiClientHandle_t *client_handle, uint32_t lagIfNum, uint32_t *minUpLinks)
Gets minimum uplinks for the LAG interface.
Src/Dest IP and TCP/UDP Port fields.
Definition: openapi_lag.h:55
open_error_t openapiLagStaticModeSet(openapiClientHandle_t *client_handle, uint32_t lagIfNum, OPEN_CONTROL_t staticMode)
Sets static mode of the LAG interface.
Src MAC, VLAN, EType, incoming port.
Definition: openapi_lag.h:50