]>
Commit | Line | Data |
---|---|---|
0adeb5fd | 1 | /* |
efde4f25 | 2 | * Zebra VxLAN (EVPN) interface data structures and definitions |
0adeb5fd SR |
3 | * These are public definitions referenced by other files. |
4 | * Copyright (C) 2021 Cumulus Networks, Inc. | |
5 | * Sharath Ramamurthy | |
6 | * | |
7 | * This file is part of FRR. | |
8 | * | |
9 | * FRR is free software; you can redistribute it and/or modify it | |
10 | * under the terms of the GNU General Public License as published by the | |
11 | * Free Software Foundation; either version 2, or (at your option) any | |
12 | * later version. | |
13 | * | |
14 | * FRR is distributed in the hope that it will be useful, but | |
15 | * WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
17 | * General Public License for more details. | |
18 | * | |
19 | * You should have received a copy of the GNU General Public License | |
20 | * along with FRR; see the file COPYING. If not, write to the Free | |
21 | * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | |
22 | * 02111-1307, USA. | |
23 | */ | |
24 | ||
25 | #ifndef _ZEBRA_VXLAN_IF_H | |
26 | #define _ZEBRA_VXLAN_IF_H | |
27 | ||
28 | #include <zebra.h> | |
29 | #include <zebra/zebra_router.h> | |
30 | ||
31 | #include "linklist.h" | |
32 | #include "if.h" | |
33 | #include "vlan.h" | |
34 | #include "vxlan.h" | |
35 | ||
36 | #include "lib/json.h" | |
37 | #include "zebra/zebra_vrf.h" | |
38 | #include "zebra/zserv.h" | |
39 | #include "zebra/zebra_dplane.h" | |
40 | ||
41 | #ifdef __cplusplus | |
42 | extern "C" { | |
43 | #endif | |
44 | ||
96c25556 SR |
45 | extern void *zebra_vxlan_vni_alloc(void *p); |
46 | extern void zebra_vxlan_vni_free(void *arg); | |
47 | extern struct hash *zebra_vxlan_vni_table_create(void); | |
48 | extern void zebra_vxlan_vni_table_destroy(struct hash *vni_table); | |
49 | extern int zebra_vxlan_if_vni_table_create(struct zebra_if *zif); | |
50 | extern int zebra_vxlan_if_vni_table_destroy(struct zebra_if *zif); | |
51 | extern struct zebra_vxlan_vni * | |
52 | zebra_vxlan_if_vni_find(const struct zebra_if *zif, vni_t vni); | |
a26daa77 SW |
53 | extern struct zebra_vxlan_vni * |
54 | zebra_vxlan_if_vlanid_vni_find(struct zebra_if *zif, vlanid_t vni); | |
96c25556 SR |
55 | extern void zebra_vxlan_if_vni_iterate(struct zebra_if *zif, |
56 | int (*func)(struct zebra_if *zif, | |
57 | struct zebra_vxlan_vni *, | |
58 | void *), | |
59 | void *arg); | |
60 | extern void zebra_vxlan_if_vni_walk(struct zebra_if *zif, | |
61 | int (*func)(struct zebra_if *zif, | |
62 | struct zebra_vxlan_vni *, | |
63 | void *), | |
64 | void *arg); | |
efde4f25 | 65 | extern vni_t zebra_vxlan_if_access_vlan_vni_find(struct zebra_if *zif, |
efde4f25 | 66 | struct interface *br_if); |
e41db240 | 67 | extern int |
68 | zebra_vxlan_if_vni_mcast_group_add_update(struct interface *ifp, vni_t vni_id, | |
69 | struct in_addr *mcast_group); | |
70 | extern int zebra_vxlan_if_vni_mcast_group_del(struct interface *ifp, | |
71 | vni_t vni_id, | |
72 | struct in_addr *mcast_group); | |
96c25556 SR |
73 | extern int zebra_vxlan_if_vni_down(struct interface *ifp, |
74 | struct zebra_vxlan_vni *vni); | |
0adeb5fd | 75 | extern int zebra_vxlan_if_down(struct interface *ifp); |
96c25556 SR |
76 | extern int zebra_vxlan_if_vni_up(struct interface *ifp, |
77 | struct zebra_vxlan_vni *vni); | |
0adeb5fd | 78 | extern int zebra_vxlan_if_up(struct interface *ifp); |
96c25556 | 79 | extern int zebra_vxlan_if_vni_del(struct interface *ifp, vni_t vni); |
0adeb5fd | 80 | extern int zebra_vxlan_if_del(struct interface *ifp); |
96c25556 SR |
81 | extern int zebra_vxlan_if_vni_table_add_update(struct interface *ifp, |
82 | struct hash *vni_table); | |
83 | extern int zebra_vxlan_if_vni_update(struct interface *ifp, | |
84 | struct zebra_vxlan_vni *vni, | |
85 | uint16_t chgflags); | |
00d30205 | 86 | extern int zebra_vxlan_if_update(struct interface *ifp, |
87 | struct zebra_vxlan_if_update_ctx *ctx); | |
96c25556 SR |
88 | extern int zebra_vxlan_if_vni_add(struct interface *ifp, |
89 | struct zebra_vxlan_vni *vni); | |
0adeb5fd SR |
90 | extern int zebra_vxlan_if_add(struct interface *ifp); |
91 | ||
92 | #ifdef __cplusplus | |
93 | } | |
94 | #endif | |
95 | ||
96 | #endif /* _ZEBRA_VXLAN_IF_H */ |