Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.12.0.1
openapi_lag.h
Go to the documentation of this file.
1 
9 /*********************************************************************
10 *
11 * Copyright 2016-2023 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 #define OPEN_LAG_PORT_ACTOR_SYSTEM_PRIORITY_MIN 0
71 #define OPEN_LAG_PORT_ACTOR_SYSTEM_PRIORITY_DEFAULT 32768
72 #define OPEN_LAG_PORT_ACTOR_SYSTEM_PRIORITY_MAX 65535
73 
74 #define OPEN_LAG_PORT_ACTOR_PORT_PRIORITY_MIN 0
75 #define OPEN_LAG_PORT_ACTOR_PORT_PRIORITY_DEFAULT 128
76 #define OPEN_LAG_PORT_ACTOR_PORT_PRIORITY_MAX 65535
77 
78 /*****************************************************************/
95  uint32_t lagIfNum,
96  uint32_t phyIfNum);
97 
98 /*****************************************************************/
113  uint32_t lagIfNum,
114  uint32_t phyIfNum);
115 
116 /*****************************************************************/
132  uint32_t lagIfNum,
133  OPEN_CONTROL_t *staticMode);
134 
135 /*****************************************************************/
156  uint32_t lagIfNum,
157  OPEN_CONTROL_t staticMode);
158 
159 /*****************************************************************/
172  uint32_t *maxLen);
173 
174 /***********************************************************************/
192  uint32_t lagIfNum,
193  open_buffdesc *name);
194 
195 /***********************************************************************/
214  uint32_t lagIfNum,
215  open_buffdesc *name);
216 
217 /****************************************************************************/
232  uint32_t lagIfNum,
233  OPEN_LAG_HASH_MODE_t *lbMode);
234 
235 /****************************************************************************/
252  uint32_t lagIfNum,
253  OPEN_LAG_HASH_MODE_t lbMode);
254 
255 /*****************************************************************/
271  uint32_t *minThreshold,
272  uint32_t *maxThreshold);
273 
274 /****************************************************************************/
291  uint32_t lagIfNum,
292  uint32_t *minUpLinks);
293 
294 /****************************************************************************/
314  uint32_t lagIfNum,
315  uint32_t minUpLinks);
316 
317 /*****************************************************************/
332  uint32_t *memberMax);
333 
334 /****************************************************************************/
356  uint32_t lagIfNum,
357  uint32_t *count,
358  open_buffdesc *bufd);
359 
360 /****************************************************************************/
382  uint32_t lagIfNum,
383  uint32_t *count,
384  open_buffdesc *bufd);
385 
386 /****************************************************************************/
408  uint32_t lagIfNum,
409  uint32_t *count,
410  open_buffdesc *bufd);
411 
412 /****************************************************************************/
434  uint32_t lagIfNum,
435  uint32_t *count,
436  open_buffdesc *bufd);
437 
438 /****************************************************************************/
453  uint32_t ifNum,
454  OPEN_CONTROL_t *lacpMode);
455 
456 /****************************************************************************/
471  uint32_t ifNum,
472  OPEN_CONTROL_t lacpMode);
473 
474 /****************************************************************************/
490  uint32_t ifNum,
492  OPEN_CONTROL_t *state);
493 
494 /****************************************************************************/
510  uint32_t ifNum,
512  OPEN_CONTROL_t mode);
513 
514 /*****************************************************************/
530  uint32_t lagIfNum,
531  OPEN_CONTROL_t *adminMode);
532 
533 /*****************************************************************/
549  uint32_t lagIfNum,
550  OPEN_CONTROL_t adminMode);
551 
552 /*****************************************************************/
570  OPEN_CONTROL_t *adminMode);
571 
572 /*****************************************************************/
590  OPEN_CONTROL_t adminMode);
591 
592 /****************************************************************************/
609  OPEN_LAG_HASH_MODE_t *hashMode);
610 
611 /****************************************************************************/
628  OPEN_LAG_HASH_MODE_t hashMode);
629 
630 /*****************************************************************/
648  OPEN_CONTROL_t *adminMode);
649 
650 /*****************************************************************/
669  OPEN_CONTROL_t adminMode);
670 
671 /*****************************************************************/
690  uint32_t lagIntIfNum,
691  OPEN_CONTROL_t *adminMode);
692 
693 /*****************************************************************/
711  uint32_t lagIntIfNum,
712  OPEN_BOOL_t *autoLagStatus);
713 
714 /*************************************************************************/
730  uint32_t ifNum, uint32_t *val);
731 
732 /*************************************************************************/
748  uint32_t ifNum, uint32_t val);
749 /*************************************************************************/
764  uint32_t *val);
765 
766 /*************************************************************************/
781  uint32_t val);
782 
783 /*************************************************************************/
799  uint32_t ifNum, uint32_t *val);
800 /*************************************************************************/
816  uint32_t ifNum, uint32_t val);
817 
818 /*************************************************************************/
833  uint32_t *lagCount);
834 
835 /*************************************************************************/
850  uint32_t *intfIndex);
851 
852 /*************************************************************************/
871  uint32_t intfIndex,
872  uint32_t *nextIntfIndex);
873 
874 /*************************************************************************/
893  uint32_t ifNum,
894  uint32_t *portChannelId);
895 
896 #endif
897 
open_error_t openapiLagPortChannelIdGet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *portChannelId)
Get the port channel ID for a given interface number.
open_error_t openapiLagIfIndexGetNext(openapiClientHandle_t *client_handle, uint32_t intfIndex, uint32_t *nextIntfIndex)
Get the interface index number of the next successive LAG interface.
open_error_t openapiLagAutoLAGAvbProfileModeGet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t *adminMode)
Get the Auto-LAG global AVB profile mode.
open_error_t openapiLagIfIndexGetFirst(openapiClientHandle_t *client_handle, uint32_t *intfIndex)
Get the interface index number of the first LAG interface.
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 openapiLagAvbProfileModeGet(openapiClientHandle_t *client_handle, uint32_t lagIntIfNum, OPEN_CONTROL_t *adminMode)
Get the AVB profile mode of the LAG interface.
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 openapiLagAggPortActorPortPrioritySet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t val)
Set the priority of this aggregation port.
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 openapiLagAutoLAGModeGet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t *adminMode)
Get the Auto-LAG administrative mode.
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.
open_error_t openapiLagAggPortActorSystemPriorityGet(openapiClientHandle_t *client_handle, uint32_t *val)
Get the priority value associated with the system actor&#39;s ID.
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
open_error_t openapiLagAutoLAGHashModeGet(openapiClientHandle_t *client_handle, OPEN_LAG_HASH_MODE_t *hashMode)
Get the Auto-LAG global hash mode.
open_error_t openapiLagCountGet(openapiClientHandle_t *client_handle, uint32_t *lagCount)
Get the current number of LAGs in the system (static and dynamic).
open_error_t openapiLagAutoLAGHashModeSet(openapiClientHandle_t *client_handle, OPEN_LAG_HASH_MODE_t hashMode)
Set the Auto-LAG global hash mode.
open_error_t openapiLagLinkTrapGet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *val)
Get the link trap mode of a configured LAG.
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_BOOL_t
OPEN uses these enumerators to indicate true or false 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 openapiLagAutoLAGStatusGet(openapiClientHandle_t *client_handle, uint32_t lagIntIfNum, OPEN_BOOL_t *autoLagStatus)
Get the Auto-LAG status of the LAG interface.
open_error_t openapiLagAutoLAGAvbProfileModeSet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t adminMode)
Set the Auto-LAG global AVB profile mode.
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 openapiLagAggPortActorPortPriorityGet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t *val)
Get the priority assigned to this aggregation port.
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 openapiLagLinkTrapSet(openapiClientHandle_t *client_handle, uint32_t ifNum, uint32_t val)
Set the link trap mode of a configured LAG.
open_error_t openapiLagAggPortActorSystemPrioritySet(openapiClientHandle_t *client_handle, uint32_t val)
Set the priority value associated with the system actor&#39;s ID.
open_error_t openapiLagAutoLAGModeSet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t adminMode)
Set the Auto-LAG administrative mode.
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