+// SPDX-License-Identifier: GPL-2.0-or-later
/*
* PIM for Quagga
* Copyright (C) 2008 Everton da Silva Marques
- *
- * 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.
- *
- * This program 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.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; see the file COPYING; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef PIM_OIL_H
/*
* Where did we get this (S,G) from?
*
- * IGMP - Learned from IGMP
+ * GM - Learned from IGMP/MLD
* PIM - Learned from PIM
* SOURCE - Learned from Source multicast packet received
* STAR - Inherited
*/
-#define PIM_OIF_FLAG_PROTO_IGMP (1 << 0)
+#define PIM_OIF_FLAG_PROTO_GM (1 << 0)
#define PIM_OIF_FLAG_PROTO_PIM (1 << 1)
#define PIM_OIF_FLAG_PROTO_STAR (1 << 2)
#define PIM_OIF_FLAG_PROTO_VXLAN (1 << 3)
-#define PIM_OIF_FLAG_PROTO_ANY \
- (PIM_OIF_FLAG_PROTO_IGMP | PIM_OIF_FLAG_PROTO_PIM \
- | PIM_OIF_FLAG_PROTO_STAR | PIM_OIF_FLAG_PROTO_VXLAN)
+#define PIM_OIF_FLAG_PROTO_ANY \
+ (PIM_OIF_FLAG_PROTO_GM | PIM_OIF_FLAG_PROTO_PIM | \
+ PIM_OIF_FLAG_PROTO_STAR | PIM_OIF_FLAG_PROTO_VXLAN)
/* OIF is present in the OIL but must not be used for forwarding traffic */
#define PIM_OIF_FLAG_MUTE (1 << 4)
return &c_oil->oil.mfcc_parent;
}
-static inline uint8_t oil_if_has(struct channel_oil *c_oil, vifi_t ifi)
+static inline bool oil_if_has(struct channel_oil *c_oil, vifi_t ifi)
{
- return c_oil->oil.mfcc_ttls[ifi];
+ return !!c_oil->oil.mfcc_ttls[ifi];
}
static inline void oil_if_set(struct channel_oil *c_oil, vifi_t ifi, uint8_t set)
return !!IF_ISSET(ifi, &c_oil->oil.mf6cc_ifset);
}
-static inline void oil_if_set(struct channel_oil *c_oil, mifi_t ifi, bool set)
+static inline void oil_if_set(struct channel_oil *c_oil, mifi_t ifi,
+ uint8_t set)
{
if (set)
IF_SET(ifi, &c_oil->oil.mf6cc_ifset);
DECLARE_RBTREE_UNIQ(rb_pim_oil, struct channel_oil, oil_rb,
pim_channel_oil_compare);
-
-extern struct list *pim_channel_oil_list;
-
void pim_oil_init(struct pim_instance *pim);
void pim_oil_terminate(struct pim_instance *pim);
pim_sgaddr *sg);
struct channel_oil *pim_channel_oil_add(struct pim_instance *pim,
pim_sgaddr *sg, const char *name);
-void pim_channel_oil_change_iif(struct pim_instance *pim,
- struct channel_oil *c_oil, int input_vif_index,
- const char *name);
+void pim_clear_nocache_state(struct pim_interface *pim_ifp);
struct channel_oil *pim_channel_oil_del(struct channel_oil *c_oil,
const char *name);