diff options
author | Pavel Kotucek <pavel.kotucek@pantheon.tech> | 2018-11-28 07:42:11 +0100 |
---|---|---|
committer | Ole Trøan <otroan@employees.org> | 2018-12-07 12:24:52 +0000 |
commit | e88865d7bc9cd45b044f8aeadf1916c38e0eb165 (patch) | |
tree | a6dfb198549ff9f2335724e3ea7b0f942ad08540 /test/vpp_papi_provider.py | |
parent | e6b58cf86affdf434a15f8833e959cded6c15784 (diff) |
VPP-1506: dump local punts and registered punt sockets
Change-Id: If7835e9b80ec9402404bfc8d271eb11a10ef992b
Signed-off-by: Pavel Kotucek <pavel.kotucek@pantheon.tech>
Diffstat (limited to 'test/vpp_papi_provider.py')
-rw-r--r-- | test/vpp_papi_provider.py | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/test/vpp_papi_provider.py b/test/vpp_papi_provider.py index 8153e031607..612a678ae9d 100644 --- a/test/vpp_papi_provider.py +++ b/test/vpp_papi_provider.py @@ -3486,15 +3486,27 @@ class VppPapiProvider(object): 'namespace_id': namespace_id, 'namespace_id_len': len(namespace_id)}) - def punt_socket_register(self, l4_port, pathname, header_version=1, - is_ip4=1, l4_protocol=0x11): - """ Punt to socket """ + def punt_socket_register(self, port, pathname, protocol=0x11, + header_version=1, is_ip4=1): + """ Register punt socket """ return self.api(self.papi.punt_socket_register, - {'is_ip4': is_ip4, - 'l4_protocol': l4_protocol, - 'l4_port': l4_port, - 'pathname': pathname, - 'header_version': header_version}) + {'header_version': header_version, + 'punt': {'ipv': is_ip4, + 'l4_protocol': protocol, + 'l4_port': port}, + 'pathname': pathname}) + + def punt_socket_deregister(self, port, protocol=0x11, is_ip4=1): + """ Unregister punt socket """ + return self.api(self.papi.punt_socket_deregister, + {'punt': {'ipv': is_ip4, + 'l4_protocol': protocol, + 'l4_port': port}}) + + def punt_socket_dump(self, is_ip6=1): + """ Dump punt socket""" + return self.api(self.papi.punt_socket_dump, + {'is_ipv6': is_ip6}) def ip_reassembly_set(self, timeout_ms, max_reassemblies, expire_walk_interval_ms, is_ip6=0): |