Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.4.4.5
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 {
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 {
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 {
192 
194 typedef struct
195 {
196  uint32_t numTenants;
197  uint32_t numTenantVlans;
199  uint32_t numAccessPorts;
200  uint32_t numTenantTunnels;
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