summaryrefslogtreecommitdiff
path: root/pimd/pim_oil.h
diff options
context:
space:
mode:
authorplsaranya <saranya_panjarathina@dell.com>2022-03-03 21:55:50 +0530
committerplsaranya <saranya_panjarathina@dell.com>2022-03-23 19:34:28 +0530
commita5fa982256b23d53d5b833f75224fb7f96054b9b (patch)
tree876c47319611707f7143f577d79a3e03bf9edb77 /pimd/pim_oil.h
parent116f0dd90507c71a557214877c9c4df5a6a77e12 (diff)
pim6d: Mroute changes
Mroute and supporting changes Signed-off-by: plsaranya <Saranya_Panjarathina@dell.com>
Diffstat (limited to 'pimd/pim_oil.h')
-rw-r--r--pimd/pim_oil.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/pimd/pim_oil.h b/pimd/pim_oil.h
index a52e23351e..68b5ef474e 100644
--- a/pimd/pim_oil.h
+++ b/pimd/pim_oil.h
@@ -98,7 +98,11 @@ struct channel_oil {
struct rb_pim_oil_item oil_rb;
- pim_mfcctl oil;
+#if PIM_IPV == 4
+ struct mfcctl oil;
+#else
+ struct mf6cctl oil;
+#endif
int installed;
int oil_inherited_rescan;
int oil_size;
@@ -135,6 +139,12 @@ static inline void oil_if_set(struct channel_oil *c_oil, vifi_t ifi, uint8_t set
{
c_oil->oil.mfcc_ttls[ifi] = set;
}
+
+static inline int oil_if_cmp(struct mfcctl *oil1, struct mfcctl *oil2)
+{
+ return memcmp(&oil1->mfcc_ttls[0], &oil2->mfcc_ttls[0],
+ sizeof(oil1->mfcc_ttls));
+}
#else
static inline pim_addr *oil_origin(struct channel_oil *c_oil)
{
@@ -163,6 +173,12 @@ static inline void oil_if_set(struct channel_oil *c_oil, mifi_t ifi, bool set)
else
IF_CLR(ifi, &c_oil->oil.mf6cc_ifset);
}
+
+static inline int oil_if_cmp(struct mf6cctl *oil1, struct mf6cctl *oil2)
+{
+ return memcmp(&oil1->mf6cc_ifset, &oil2->mf6cc_ifset,
+ sizeof(oil1->mf6cc_ifset));
+}
#endif
extern int pim_channel_oil_compare(const struct channel_oil *c1,