2 * Zebra VxLAN (EVPN) interface data structures and definitions
3 * These are public definitions referenced by other files.
4 * Copyright (C) 2021 Cumulus Networks, Inc.
7 * This file is part of FRR.
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
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.
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
25 #ifndef _ZEBRA_VXLAN_IF_H
26 #define _ZEBRA_VXLAN_IF_H
29 #include <zebra/zebra_router.h>
37 #include "zebra/zebra_vrf.h"
38 #include "zebra/zserv.h"
39 #include "zebra/zebra_dplane.h"
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
);
53 extern struct zebra_vxlan_vni
*
54 zebra_vxlan_if_vlanid_vni_find(struct zebra_if
*zif
, vlanid_t vni
);
55 extern void zebra_vxlan_if_vni_iterate(struct zebra_if
*zif
,
56 int (*func
)(struct zebra_if
*zif
,
57 struct zebra_vxlan_vni
*,
60 extern void zebra_vxlan_if_vni_walk(struct zebra_if
*zif
,
61 int (*func
)(struct zebra_if
*zif
,
62 struct zebra_vxlan_vni
*,
65 extern vni_t
zebra_vxlan_if_access_vlan_vni_find(struct zebra_if
*zif
,
66 struct interface
*br_if
);
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
,
72 struct in_addr
*mcast_group
);
73 extern int zebra_vxlan_if_vni_down(struct interface
*ifp
,
74 struct zebra_vxlan_vni
*vni
);
75 extern int zebra_vxlan_if_down(struct interface
*ifp
);
76 extern int zebra_vxlan_if_vni_up(struct interface
*ifp
,
77 struct zebra_vxlan_vni
*vni
);
78 extern int zebra_vxlan_if_up(struct interface
*ifp
);
79 extern int zebra_vxlan_if_vni_del(struct interface
*ifp
, vni_t vni
);
80 extern int zebra_vxlan_if_del(struct interface
*ifp
);
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
,
86 extern int zebra_vxlan_if_update(struct interface
*ifp
,
87 struct zebra_vxlan_if_update_ctx
*ctx
);
88 extern int zebra_vxlan_if_vni_add(struct interface
*ifp
,
89 struct zebra_vxlan_vni
*vni
);
90 extern int zebra_vxlan_if_add(struct interface
*ifp
);
96 #endif /* _ZEBRA_VXLAN_IF_H */