]> git.proxmox.com Git - mirror_frr.git/blame - pimd/pim_vxlan.h
pimd: vxlan definitions for creation origination and terminatiom mroutes
[mirror_frr.git] / pimd / pim_vxlan.h
CommitLineData
b583b035
AK
1/* PIM support for VxLAN BUM flooding
2 *
3 * Copyright (C) 2019 Cumulus Networks, Inc.
4 *
5 * This file is part of FRR.
6 *
7 * FRR is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2, or (at your option) any
10 * later version.
11 *
12 * FRR is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or
19 * (at your option) any later version.
20 */
21
22#ifndef PIM_VXLAN_H
23#define PIM_VXLAN_H
24
62429d84
AK
25enum pim_vxlan_sg_flags {
26 PIM_VXLAN_SGF_NONE = 0,
27 PIM_VXLAN_SGF_DEL_IN_PROG = (1 << 0),
28 PIM_VXLAN_SGF_OIF_INSTALLED = (1 << 1)
29};
30
b583b035
AK
31struct pim_vxlan_sg {
32 struct pim_instance *pim;
33
34 /* key */
35 struct prefix_sg sg;
36 char sg_str[PIM_SG_LEN];
62429d84
AK
37
38 enum pim_vxlan_sg_flags flags;
39 struct pim_upstream *up;
40
41 /* termination info (only applicable to termination XG mroutes)
42 * term_if - termination device ipmr-lo is added to the OIL
43 * as local/IGMP membership to allow termination of vxlan traffic
44 */
45 struct interface *term_oif;
46
47 /* origination info
48 * iif - lo/vrf or peerlink (on MLAG setups)
49 * peerlink_oif - added to the OIL to send encapsulated BUM traffic to
50 * the MLAG peer switch
51 */
52 struct interface *iif;
53 /* on a MLAG setup the peerlink is added as a static OIF */
54 struct interface *orig_oif;
b583b035
AK
55};
56
57extern struct pim_vxlan_sg *pim_vxlan_sg_find(struct pim_instance *pim,
58 struct prefix_sg *sg);
59extern struct pim_vxlan_sg *pim_vxlan_sg_add(struct pim_instance *pim,
60 struct prefix_sg *sg);
61extern void pim_vxlan_sg_del(struct pim_instance *pim, struct prefix_sg *sg);
62
63#endif /* PIM_VXLAN_H */