OpenNSL API Guide and Reference Manual
vxlanX.h
Go to the documentation of this file.
1 
4 /*****************************************************************************
5  *
6  * This software is governed by the Broadcom Advanced Switch APIs license.
7  * This license is set out in the
8  * https://github.com/Broadcom-Switch/OpenNSL/Legal/LICENSE-Adv file.
9  *
10  * Copyright 2015-2016 Broadcom Corporation. All rights reserved.
11  *
12  ***************************************************************************/
16 #ifndef __OPENNSL_VXLANX_H__
17 #define __OPENNSL_VXLANX_H__
18 
19 #if defined(INCLUDE_L3)
20 
21 #include <opennsl/types.h>
22 #include <opennsl/l3.h>
23 #include <opennsl/tunnel.h>
24 #include <opennsl/vlan.h>
25 
26 #if defined(INCLUDE_L3)
27 #define OPENNSL_VXLAN_VPN_ELINE 0x00000001
28 #define OPENNSL_VXLAN_VPN_ELAN 0x00000002
29 #define OPENNSL_VXLAN_VPN_WITH_ID 0x00000004
30 #define OPENNSL_VXLAN_VPN_WITH_VPNID 0x00000008
31 #define OPENNSL_VXLAN_VPN_SERVICE_TAGGED 0x00000010
32 #define OPENNSL_VXLAN_VPN_SERVICE_VLAN_DELETE 0x00000080
33 #endif
34 #if defined(INCLUDE_L3)
35 #endif
36 #if defined(INCLUDE_L3)
37 #endif
38 #if defined(INCLUDE_L3)
39 
56 /* __doxy_func_body_end__ */
57 #endif
58 
59 #if defined(INCLUDE_L3)
60 /***************************************************************************/
71 #endif
72 
73 #if defined(INCLUDE_L3)
74 /***************************************************************************/
91 extern int opennsl_vxlan_vpn_create(
92  int unit,
94 #endif
95 
96 #if defined(INCLUDE_L3)
97 /***************************************************************************/
113 extern int opennsl_vxlan_vpn_destroy(
114  int unit,
116 #endif
117 
118 #if defined(INCLUDE_L3)
119 /***************************************************************************/
135  int unit) LIB_DLL_EXPORTED ;
136 #endif
137 
138 #if defined(INCLUDE_L3)
139 /***************************************************************************/
150 extern int opennsl_vxlan_vpn_get(
151  int unit,
152  opennsl_vpn_t l2vpn,
154 #endif
155 
156 #if defined(INCLUDE_L3)
158  int unit,
160  void *user_data);
161 #endif
162 
163 #if defined(INCLUDE_L3)
164 /***************************************************************************/
177 extern int opennsl_vxlan_vpn_traverse(
178  int unit,
180  void *user_data) LIB_DLL_EXPORTED ;
181 #endif
182 
183 #if defined(INCLUDE_L3)
184 
192 /* __doxy_func_body_end__ */
193 #endif
194 
195 #if defined(INCLUDE_L3)
196 #define OPENNSL_VXLAN_PORT_WITH_ID (1 << 0)
198 #define OPENNSL_VXLAN_PORT_NETWORK (1 << 2)
200 #define OPENNSL_VXLAN_PORT_EGRESS_TUNNEL (1 << 7)
202 #define OPENNSL_VXLAN_PORT_SERVICE_TAGGED (1 << 8)
203 #define OPENNSL_VXLAN_PORT_MULTICAST (1 << 19)
205 #endif
206 #if defined(INCLUDE_L3)
207 
208 typedef struct opennsl_vxlan_port_s {
228  int reserved3;
232 /* __doxy_func_body_end__ */
233 #endif
234 
235 #if defined(INCLUDE_L3)
236 /***************************************************************************/
245 extern void opennsl_vxlan_port_t_init(
247 #endif
248 
249 #if defined(INCLUDE_L3)
250 /***************************************************************************/
259 extern int opennsl_vxlan_init(
260  int unit) LIB_DLL_EXPORTED ;
261 #endif
262 
263 #if defined(INCLUDE_L3)
264 /***************************************************************************/
273 extern int opennsl_vxlan_cleanup(
274  int unit) LIB_DLL_EXPORTED ;
275 #endif
276 
277 #if defined(INCLUDE_L3)
278 /***************************************************************************/
309 extern int opennsl_vxlan_port_add(
310  int unit,
311  opennsl_vpn_t l2vpn,
313 #endif
314 
315 #if defined(INCLUDE_L3)
316 /***************************************************************************/
336 extern int opennsl_vxlan_port_delete(
337  int unit,
338  opennsl_vpn_t l2vpn,
339  opennsl_gport_t vxlan_port_id) LIB_DLL_EXPORTED ;
340 #endif
341 
342 #if defined(INCLUDE_L3)
343 /***************************************************************************/
363  int unit,
365 #endif
366 
367 #if defined(INCLUDE_L3)
368 /***************************************************************************/
379 extern int opennsl_vxlan_port_get(
380  int unit,
381  opennsl_vpn_t l2vpn,
383 #endif
384 
385 #if defined(INCLUDE_L3)
386 /***************************************************************************/
401 extern int opennsl_vxlan_port_get_all(
402  int unit,
403  opennsl_vpn_t l2vpn,
404  int port_max,
405  opennsl_vxlan_port_t *port_array,
406  int *port_count) LIB_DLL_EXPORTED ;
407 #endif
408 
409 #if defined(INCLUDE_L3)
410 /***************************************************************************/
426  int unit,
428 #endif
429 
430 #if defined(INCLUDE_L3)
431 /***************************************************************************/
442  int unit,
443  opennsl_gport_t vxlan_tunnel_id) LIB_DLL_EXPORTED ;
444 #endif
445 
446 #if defined(INCLUDE_L3)
447 /***************************************************************************/
458  int unit,
460 #endif
461 
462 #if defined(INCLUDE_L3)
463 /***************************************************************************/
477  int unit,
479  void *user_data) LIB_DLL_EXPORTED ;
480 #endif
481 
482 #if defined(INCLUDE_L3)
483 /***************************************************************************/
494  int unit,
496 #endif
497 
498 #if defined(INCLUDE_L3)
499 /***************************************************************************/
512  int unit,
514 #endif
515 
516 #if defined(INCLUDE_L3)
517 /***************************************************************************/
528  int unit,
529  opennsl_gport_t vxlan_tunnel_id) LIB_DLL_EXPORTED ;
530 #endif
531 
532 #if defined(INCLUDE_L3)
533 /***************************************************************************/
544  int unit,
546 #endif
547 
548 #if defined(INCLUDE_L3)
549 /***************************************************************************/
563  int unit,
565  void *user_data) LIB_DLL_EXPORTED ;
566 #endif
567 
569 typedef enum opennsl_vxlan_stat_e {
575 /* __doxy_func_body_end__ */
576 
577 /***************************************************************************/
597 extern int opennsl_vxlan_stat_attach(
598  int unit,
600  opennsl_vpn_t vpn,
601  uint32 stat_counter_id) LIB_DLL_EXPORTED ;
602 
603 /***************************************************************************/
616 extern int opennsl_vxlan_stat_detach(
617  int unit,
620 
621 /***************************************************************************/
639  int unit,
641  opennsl_vpn_t vpn,
642  opennsl_vxlan_stat_t stat,
643  uint32 num_entries,
644  uint32 *counter_indexes,
645  opennsl_stat_value_t *counter_values) LIB_DLL_EXPORTED ;
646 
647 /***************************************************************************/
665  int unit,
667  opennsl_vpn_t vpn,
668  opennsl_vxlan_stat_t stat,
669  uint32 num_entries,
670  uint32 *counter_indexes,
671  opennsl_stat_value_t *counter_values) LIB_DLL_EXPORTED ;
672 
673 /***************************************************************************/
691  int unit,
693  opennsl_vpn_t vpn,
694  opennsl_vxlan_stat_t stat,
695  uint32 num_entries,
696  uint32 *counter_indexes,
697  opennsl_stat_value_t *counter_values) LIB_DLL_EXPORTED ;
698 
699 /***************************************************************************/
714 extern int opennsl_vxlan_stat_id_get(
715  int unit,
717  opennsl_vpn_t vpn,
718  opennsl_vxlan_stat_t stat,
719  uint32 *stat_counter_id) LIB_DLL_EXPORTED ;
720 
721 /***************************************************************************/
737  int unit,
739  opennsl_vpn_t vpn,
740  int enable) LIB_DLL_EXPORTED ;
741 
742 #if defined(INCLUDE_L3)
744  int unit,
745  opennsl_vxlan_port_t *info,
746  void *user_data);
747 #endif
748 
749 #if defined(INCLUDE_L3)
750 /***************************************************************************/
763 extern int opennsl_vxlan_port_traverse(
764  int unit,
766  void *user_data) LIB_DLL_EXPORTED ;
767 #endif
768 
769 #if defined(INCLUDE_L3)
770 #endif
771 #endif /* defined(INCLUDE_L3) */
772 
773 #endif /* __OPENNSL_VXLANX_H__ */
774