Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.6.0.3
openapi_l2ol3tunnel.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_l2ol3tunnel.h
28 *
29 * @purpose Overlay (L2 over L3 tunnel) Configuration and Status
30 *
31 * @component OpEN
32 *
33 * @note none
34 *
35 * @create 05/21/2012
36 *
37 * @end
38 *
39 **********************************************************************/
40 #ifndef __OPENAPI_L2OL3TUNNEL_H__
41 #define __OPENAPI_L2OL3TUNNEL_H__
42 
43 #include "openapi_common.h"
44 
45 /*********************************************************
46  * OVERLAY DEFAULT PARAMETERS/CONSTANTS
47  ********************************************************/
48 /* Tunnel control information */
49 #define OPEN_L2OL3_TUNNEL_VXLAN_UDP_PORT (4789)
51 #define OPEN_L2OL3_TENANT_ID_MIN (1)
52 #define OPEN_L2OL3_TENANT_ID_MAX (0xFFFFFE)
53 #define OPEN_L2OL3_TENANT_ID_RESERVED (0xFFFFFF)
55 /*********************************************************
56  * OVERLAY CONFIGURATION DATASTRUCTURES AND FLAGS
57  ********************************************************/
58 
60 typedef enum
61 {
62  OPEN_L2OL3_TUNNEL_TYPE_INVALID = 0,
66 
68 typedef enum
69 {
73 
75 typedef enum
76 {
77  OPEN_L2OL3_REASON_INVALID = 0,
82 
84 typedef struct
85 {
86  OPEN_L2OL3_TUNNEL_TYPE_t tunnelType;
87  uint32_t vlanId;
88  uint32_t localTepIpAddr;
91 
93 typedef enum
94 {
98 
100 typedef struct
101 {
102  uint32_t accessHandle;
103  uint32_t tenantId;
121  uint32_t intIfNum;
122  uint32_t vlanId;
124 
126 typedef struct
127 {
128  OPEN_LINK_STATE_t status;
131  OPEN_L2OL3_REASON_t reasonFlags;
133 
135 typedef struct
136 {
137  uint32_t rxBytes;
138  uint32_t rxPkts;
139  uint32_t txBytes;
140  uint32_t txPkts;
142 
144 typedef struct
145 {
146  uint32_t tunnelHandle;
147  uint32_t tenantId;
149  uint32_t remoteIPAddr;
152 
154 typedef struct
155 {
156  uint32_t tenantId;
157  unsigned char macAddress[OPEN_MAC_ADDR_LEN];
158  uint32_t destHandle;
160  OPEN_BOOL_t isStatic;
163  uint32_t timeStamp;
165 
166 /*********************************************************
167  * OVERLAY TUNNEL SOFTWARE STATISTICS AND ALLOWED LIMITS
168  ********************************************************/
169 
171 typedef struct
172 {
173  uint32_t globalTunnelModeFailures;
174  uint32_t numTenantCreateFailures;
175  uint32_t numTenantDeleteFailures;
176  uint32_t numTenantVlanAddFailures;
177  uint32_t numTenantVlanDeleteFailures;
178  uint32_t numTenantSrcTepAddFailures;
179  uint32_t numTenantSrcTepDeleteFailures;
180  uint32_t numAccessCreateFailures;
181  uint32_t numAccessDeleteFailures;
182  uint32_t numTenantTunnelCreateFailures;
183  uint32_t numTenantTunnelModifyFailures;
184  uint32_t numTenantTunnelDeleteFailures;
185  uint32_t numVxlanUdpDstCfgFailures;
186  uint32_t numStaticFwdAddFailures;
187  uint32_t numStaticFwdDeleteFailures;
188  uint32_t numLearnedFwdAddFailures;
189  uint32_t numLearnedFwdDeleteFailures;
192 
194 typedef struct
195 {
196  uint32_t numTenants;
197  uint32_t numTenantVlans;
198  uint32_t numTenantLocalTeps;
199  uint32_t numAccessPorts;
200  uint32_t numTenantTunnels;
201  uint32_t numStaticFwdEntries;
202  uint32_t numLearnedFwdEntries;
203  uint32_t numTotalFwdEntries;
206 
208 typedef struct
209 {
210  uint32_t maxNumTenants;
211  uint32_t maxNumAccessPorts;
212  uint32_t maxNumTunnelPorts;
213  uint32_t maxNumTunnelsInHw;
214  uint32_t maxNumLocalStaticFwdEntriesPerInterface;
216  uint32_t maxNumRemoteStaticFwdEntriesPerTenant;
218  uint32_t maxNumRemoteStaticFwdEntriesPerSwitch;
220  uint32_t maxNumFwdEntries;
222 
223 
224 /*********************************************************
225  * OVERLAY APIs DECLARATIONS
226  ********************************************************/
227 
228 /**************************************************************************/
246  uint32_t *capabilities );
247 
248 /**************************************************************************/
264  open_l2ol3ResourceLimits_t * resourceLimits );
265 
266 /***************************************************************************/
284  open_l2ol3ResourceStats_t * resourceStats );
285 
286 /***************************************************************************/
310  OPEN_L2OL3_TUNNEL_TYPE_t tunnelType,
311  OPEN_CONTROL_t mode );
312 
313 /***************************************************************************/
331  OPEN_L2OL3_TUNNEL_TYPE_t tunnelType,
332  OPEN_CONTROL_t * mode );
333 
334 
335 /***************************************************************************/
363  uint32_t udpDestPort );
364 
365 /***************************************************************************/
385  uint32_t * udpDestPort );
386 
387 /***************************************************************************/
429  uint32_t * ipAddr );
430 
431 /***************************************************************************/
536  OPEN_L2OL3_CONFIG_t configType,
537  uint32_t tenant,
538  open_l2ol3TenantConfig_t tenantConfig );
539 
540 /***************************************************************************/
558  uint32_t tenant );
559 
560 /***************************************************************************/
577  uint32_t tenant,
578  open_l2ol3TenantConfig_t * tenantConfig );
579 
580 /***************************************************************************/
599  uint32_t tenant,
600  uint32_t * nextTenant,
601  open_l2ol3TenantConfig_t * nextTenantConfig );
602 
603 /***************************************************************************/
620  uint32_t accessPortHandle,
621  open_l2ol3AccessPortInfo_t * accessPortInfo );
622 
623 /***************************************************************************/
641  uint32_t accessPortHandle,
642  open_l2ol3AccessPortInfo_t * accessPortNextInfo );
643 
644 /***************************************************************************/
700  OPEN_L2OL3_CONFIG_t configType,
701  uint32_t tenant,
702  uint32_t remoteIPAddr,
703  uint32_t * tunnelHandle );
704 
705 /****************************************************************************/
723  uint32_t tunnelHandle );
724 
725 /****************************************************************************/
742  uint32_t tunnelHandle,
743  open_l2ol3TunnelInfo_t * tunnelInfo );
744 
745 /****************************************************************************/
763  uint32_t tunnelId,
764  open_l2ol3TunnelInfo_t * tunnelInfoNext );
765 
766 /****************************************************************************/
795  uint32_t tunnelHandle,
796  open_l2ol3TunnelStats_t * tunnelStats );
797 
798 /****************************************************************************/
826  uint32_t tunnelHandle );
827 
828 /****************************************************************************/
862  uint32_t tenantId,
863  open_buffdesc * macAddress,
864  uint32_t destIntfHandle );
865 
866 /****************************************************************************/
888  uint32_t tenantId,
889  open_buffdesc * macAddress );
890 
891 /****************************************************************************/
912  uint32_t tenantId,
913  open_buffdesc * macAddress,
914  open_l2ol3L2FwdEntry_t * macEntry );
915 
916 /****************************************************************************/
938  uint32_t tenantId,
939  open_buffdesc * macAddress,
940  open_l2ol3L2FwdEntry_t * nextMacEntry );
941 
942 #endif /* #ifndef __OPENAPI_L2OL3TUNNEL_H__*/
943 
open_error_t openapiL2oL3TunnelGet(openapiClientHandle_t *client_handle, uint32_t tunnelHandle, open_l2ol3TunnelInfo_t *tunnelInfo)
Gets tenant tunnel entry from the specified tunnel handle.
open_error_t openapiL2oL3TunnelCapabilitiesGet(openapiClientHandle_t *client_handle, uint32_t *capabilities)
Get Overlay capabilities of the Switch.
OPEN_L2OL3_TUNNEL_TYPE_t
Overlay Types.
Tunnel Port Entry Information.
open_error_t openapiL2oL3TenantL2FwdEntryGet(openapiClientHandle_t *client_handle, uint32_t tenantId, open_buffdesc *macAddress, open_l2ol3L2FwdEntry_t *macEntry)
Gets forwarding entry specified by tenant and MAC address.
Failed to configure terminator.
open_error_t openapiL2oL3ResourceLimitsGet(openapiClientHandle_t *client_handle, open_l2ol3ResourceLimits_t *resourceLimits)
Get Overlay configuration maximum allowed limits.
open_error_t openapiL2oL3ResourceStatsGet(openapiClientHandle_t *client_handle, open_l2ol3ResourceStats_t *resourceStats)
Get Overlay global statistics.
Classifies based on incoming port.
Tunnel Status Information.
open_error_t openapiL2oL3TenantDelete(openapiClientHandle_t *client_handle, uint32_t tenant)
Deletes specified tenant configuration.
open_error_t openapiL2oL3SwitchVxlanUdpDestPortSet(openapiClientHandle_t *client_handle, uint32_t udpDestPort)
Set VXLAN UDP port on the switch.
open_error_t
OPEN uses these enumerators to indicate the error codes.
Tenant Configuration Information.
open_error_t openapiL2oL3AccessPortNextGet(openapiClientHandle_t *client_handle, uint32_t accessPortHandle, open_l2ol3AccessPortInfo_t *accessPortNextInfo)
Gets next access port entry for the next numerically higher access port handle after the specified ac...
open_error_t openapiL2oL3TunnelLocalIPAddrGet(openapiClientHandle_t *client_handle, uint32_t *ipAddr)
Gets the preferred IP address that can be used as Local TEP or local Overlay Gateway IP address...
open_error_t openapiL2oL3TenantL2FwdEntryNextGet(openapiClientHandle_t *client_handle, uint32_t tenantId, open_buffdesc *macAddress, open_l2ol3L2FwdEntry_t *nextMacEntry)
Get the next forwarding entry available after the forwarding entry specified by tenant and MAC addres...
open_error_t openapiL2oL3TunnelNextGet(openapiClientHandle_t *client_handle, uint32_t tunnelId, open_l2ol3TunnelInfo_t *tunnelInfoNext)
Gets tunnel entry for the next numerically higher tunnel handle after the specified tunnel handle...
open_error_t openapiL2oL3TenantCreate(openapiClientHandle_t *client_handle, OPEN_L2OL3_CONFIG_t configType, uint32_t tenant, open_l2ol3TenantConfig_t tenantConfig)
Creates or updates specified tenant configuration.
Overlay Global Statistics Information.
Overlay Failure Statistics Information.
open_error_t openapiL2oL3SwitchVxlanUdpDestPortGet(openapiClientHandle_t *client_handle, uint32_t *udpDestPort)
Gets VXLAN UDP port configured on the switch.
OPEN_CONTROL_t
OPEN uses these enumerators to indicate enable or disable for a given config or status parameter...
open_error_t openapiL2oL3SwitchTunnelModeSet(openapiClientHandle_t *client_handle, OPEN_L2OL3_TUNNEL_TYPE_t tunnelType, OPEN_CONTROL_t mode)
Set the switch mode for the specified type of Overlay functionality.
open_error_t openapiL2oL3SwitchTunnelModeGet(openapiClientHandle_t *client_handle, OPEN_L2OL3_TUNNEL_TYPE_t tunnelType, OPEN_CONTROL_t *mode)
Gets the mode of the specified Overlay type.
OPEN_BOOL_t
OPEN uses these enumerators to indicate true or false for a given config or status parameter...
open_error_t openapiL2oL3TenantNextGet(openapiClientHandle_t *client_handle, uint32_t tenant, uint32_t *nextTenant, open_l2ol3TenantConfig_t *nextTenantConfig)
Get the next tenant entry for the next numerically higher tenant after the specified tenant...
open_error_t openapiL2oL3TenantL2FwdEntryDelete(openapiClientHandle_t *client_handle, uint32_t tenantId, open_buffdesc *macAddress)
Deletes a forwarding entry of the specified tenant system.
Classifies based on incoming VLAN tag.
Access Port Entry Information.
open_error_t openapiL2oL3TunnelCounterClear(openapiClientHandle_t *client_handle, uint32_t tunnelHandle)
Clears packet/byte counters of the tenant tunnel specified by tunnel handle.
Tunnel Counters Information.
open_error_t openapiL2oL3TunnelDelete(openapiClientHandle_t *client_handle, uint32_t tunnelHandle)
Delete a tenant tunnel specified by the tunnel handle.
Failed to configure initiator.
open_error_t openapiL2oL3TunnelCounterGet(openapiClientHandle_t *client_handle, uint32_t tunnelHandle, open_l2ol3TunnelStats_t *tunnelStats)
Gets packet/byte counters of the tenant tunnel specified tunnel handle.
OPEN_L2OL3_ACCESS_MATCH_t
Tenant Access Port Classification Types.
open_error_t openapiL2oL3AccessPortGet(openapiClientHandle_t *client_handle, uint32_t accessPortHandle, open_l2ol3AccessPortInfo_t *accessPortInfo)
Gets access port information from the specified access port handle.
open_error_t openapiL2oL3TenantGet(openapiClientHandle_t *client_handle, uint32_t tenant, open_l2ol3TenantConfig_t *tenantConfig)
Get the configuration for a specified tenant.
OPEN_L2OL3_REASON_t
Tunnel Status Reason Codes.
open_error_t openapiL2oL3TenantL2FwdEntryAdd(openapiClientHandle_t *client_handle, uint32_t tenantId, open_buffdesc *macAddress, uint32_t destIntfHandle)
Configures a forwarding entry for the specified tenant system.
Tenant Forwarding Entry Information.
open_error_t openapiL2oL3TunnelCreate(openapiClientHandle_t *client_handle, OPEN_L2OL3_CONFIG_t configType, uint32_t tenant, uint32_t remoteIPAddr, uint32_t *tunnelHandle)
Create a tunnel to a specified remote TEP for a specified tenant.
Overlay Global Resource Limits.
OPEN_LINK_STATE_t
OPEN uses these enumerators to indicate the link status.
OPEN_L2OL3_CONFIG_t
Overlay Configuration Methods.