diff options
author | Jakub Grajciar <jgrajcia@cisco.com> | 2017-12-08 16:28:42 +0100 |
---|---|---|
committer | Chris Luke <chris_luke@comcast.com> | 2018-03-19 15:53:19 +0000 |
commit | 7b867a8e491357058d37838091ed67a2e77bce2c (patch) | |
tree | 8f9373e4e41e930d0f20e90305168a1ab80dd714 /test/vpp_papi_provider.py | |
parent | 489cc829224407a51ca8d612c92bd78c30eaf660 (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 'test/vpp_papi_provider.py')
-rw-r--r-- | test/vpp_papi_provider.py | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/test/vpp_papi_provider.py b/test/vpp_papi_provider.py index da59bc86ca0..dd553cb473e 100644 --- a/test/vpp_papi_provider.py +++ b/test/vpp_papi_provider.py @@ -3291,3 +3291,39 @@ class VppPapiProvider(object): {'sw_if_index': sw_if_index, 'input_source': input_source, 'enable': enable}) + + def igmp_listen(self, enable, sw_if_index, saddr, gaddr): + """ Listen for new (S,G) on specified interface + + :param enable: add/del + :param sw_if_index: interface sw index + :param saddr: source ip4 addr + :param gaddr: group ip4 addr + """ + return self.api(self.papi.igmp_listen, + {'enable': enable, + 'sw_if_index': sw_if_index, + 'saddr': saddr, + 'gaddr': gaddr}) + + def igmp_dump(self, sw_if_index=None): + """ Dump all (S,G) interface configurations """ + if sw_if_index is None: + dump_all = 1 + sw_if_index = 0 + else: + dump_all = 0 + return self.api(self.papi.igmp_dump, {'sw_if_index': sw_if_index, + 'dump_all': dump_all}) + + def igmp_clear_interface(self, sw_if_index): + """ Remove all (S,G)s from specified interface + doesn't send IGMP report! + """ + return self.api( + self.papi.igmp_clear_interface, { + 'sw_if_index': sw_if_index}) + + def want_igmp_events(self, enable=1): + return self.api(self.papi.want_igmp_events, {'enable': enable, + 'pid': os.getpid()}) |