aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorJakub Grajciar <jgrajcia@cisco.com>2017-12-08 16:28:42 +0100
committerChris Luke <chris_luke@comcast.com>2018-03-19 15:53:19 +0000
commit7b867a8e491357058d37838091ed67a2e77bce2c (patch)
tree8f9373e4e41e930d0f20e90305168a1ab80dd714 /src/vnet
parent489cc829224407a51ca8d612c92bd78c30eaf660 (diff)
IGMP plugin
- host mode: igmp_listen - API to signal that the host has joined an (S,G) - route mode: igmp_enable - API to enable the reception of host IGMP messages igmp_event - API to report the host join/leave from an (S,G) Change-Id: Id180ec27dee617d33ab3088f5dcf6125d3aa9c8f Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/fib/fib_test.c20
-rw-r--r--src/vnet/ip/igmp_packet.h18
2 files changed, 36 insertions, 2 deletions
diff --git a/src/vnet/fib/fib_test.c b/src/vnet/fib/fib_test.c
index 8f7bba0369a..61ba9348fd8 100644
--- a/src/vnet/fib/fib_test.c
+++ b/src/vnet/fib/fib_test.c
@@ -40,6 +40,8 @@
#include <vnet/fib/fib_node_list.h>
#include <vnet/fib/fib_urpf_list.h>
+#include <vlib/unix/plugin.h>
+
/*
* Add debugs for passing tests
*/
@@ -827,7 +829,15 @@ fib_test_v4 (void)
* table, and 4 path-lists in the v6 MFIB table
*/
#define ENBR (5+5+2)
-#define PNBR (5+5+6)
+
+ u32 PNBR = 5+5+2+4;
+
+ /*
+ * if the IGMP plugin is loaded this adds two more entries to the v4 MFIB
+ */
+ if (vlib_get_plugin_symbol("igmp_plugin.so", "igmp_listen"))
+ PNBR += 2;
+
FIB_TEST((0 == fib_path_list_db_size()), "path list DB is empty");
FIB_TEST((PNBR == fib_path_list_pool_size()), "path list pool size is %d",
fib_path_list_pool_size());
@@ -4343,7 +4353,13 @@ fib_test_v6 (void)
* All entries are special so no path-list sharing.
*/
#define ENPS (5+4)
-#define PNPS (5+4+4)
+ u32 PNPS = (5+4+4);
+ /*
+ * if the IGMP plugin is loaded this adds two more entries to the v4 MFIB
+ */
+ if (vlib_get_plugin_symbol("igmp_plugin.so", "igmp_listen"))
+ PNPS += 2;
+
FIB_TEST((0 == fib_path_list_db_size()), "path list DB is empty");
FIB_TEST((PNPS == fib_path_list_pool_size()), "path list pool size is %d",
fib_path_list_pool_size());
diff --git a/src/vnet/ip/igmp_packet.h b/src/vnet/ip/igmp_packet.h
index 503259ece7c..a8e9db6d9ab 100644
--- a/src/vnet/ip/igmp_packet.h
+++ b/src/vnet/ip/igmp_packet.h
@@ -83,6 +83,24 @@ typedef struct
ip4_address_t dst;
} igmp_message_t;
+typedef struct
+{
+ /* type 0x11 (IGMPv3) */
+ igmp_header_t header;
+
+ ip4_address_t dst;
+
+ /* Reserved, Suppress Router-Side Processing flag and
+ Querier's Robustness Variable RRRRSQQQ. */
+ u8 resv_s_qrv;
+
+ /* Querier's Query Interval Code */
+ u8 qqi_code;
+
+ u16 n_src_addresses;
+ ip4_address_t src_addresses[0];
+} igmp_membership_query_v3_t;
+
#define foreach_igmp_membership_group_v3_type \
_ (1, mode_is_filter_include) \
_ (2, mode_is_filter_exclude) \