2019-03-19 23:54:02 +01:00
|
|
|
/* PIM support for VxLAN BUM flooding
|
|
|
|
*
|
|
|
|
* Copyright (C) 2019 Cumulus Networks, Inc.
|
|
|
|
*
|
|
|
|
* This file is part of FRR.
|
|
|
|
*
|
|
|
|
* FRR is free software; you can redistribute it and/or modify it
|
|
|
|
* under the terms of the GNU General Public License as published by the
|
|
|
|
* Free Software Foundation; either version 2, or (at your option) any
|
|
|
|
* later version.
|
|
|
|
*
|
|
|
|
* FRR is distributed in the hope that it will be useful, but
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* General Public License for more details.
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef PIM_VXLAN_H
|
|
|
|
#define PIM_VXLAN_H
|
|
|
|
|
2019-03-22 18:10:28 +01:00
|
|
|
enum pim_vxlan_sg_flags {
|
|
|
|
PIM_VXLAN_SGF_NONE = 0,
|
|
|
|
PIM_VXLAN_SGF_DEL_IN_PROG = (1 << 0),
|
|
|
|
PIM_VXLAN_SGF_OIF_INSTALLED = (1 << 1)
|
|
|
|
};
|
|
|
|
|
2019-03-19 23:54:02 +01:00
|
|
|
struct pim_vxlan_sg {
|
|
|
|
struct pim_instance *pim;
|
|
|
|
|
|
|
|
/* key */
|
|
|
|
struct prefix_sg sg;
|
|
|
|
char sg_str[PIM_SG_LEN];
|
2019-03-22 18:10:28 +01:00
|
|
|
|
|
|
|
enum pim_vxlan_sg_flags flags;
|
|
|
|
struct pim_upstream *up;
|
|
|
|
|
|
|
|
/* termination info (only applicable to termination XG mroutes)
|
|
|
|
* term_if - termination device ipmr-lo is added to the OIL
|
|
|
|
* as local/IGMP membership to allow termination of vxlan traffic
|
|
|
|
*/
|
|
|
|
struct interface *term_oif;
|
|
|
|
|
|
|
|
/* origination info
|
|
|
|
* iif - lo/vrf or peerlink (on MLAG setups)
|
|
|
|
* peerlink_oif - added to the OIL to send encapsulated BUM traffic to
|
|
|
|
* the MLAG peer switch
|
|
|
|
*/
|
|
|
|
struct interface *iif;
|
|
|
|
/* on a MLAG setup the peerlink is added as a static OIF */
|
|
|
|
struct interface *orig_oif;
|
2019-03-19 23:54:02 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
extern struct pim_vxlan_sg *pim_vxlan_sg_find(struct pim_instance *pim,
|
|
|
|
struct prefix_sg *sg);
|
|
|
|
extern struct pim_vxlan_sg *pim_vxlan_sg_add(struct pim_instance *pim,
|
|
|
|
struct prefix_sg *sg);
|
|
|
|
extern void pim_vxlan_sg_del(struct pim_instance *pim, struct prefix_sg *sg);
|
|
|
|
|
|
|
|
#endif /* PIM_VXLAN_H */
|