diff options
author | Matus Fabian <matfabia@cisco.com> | 2017-08-15 06:59:19 -0700 |
---|---|---|
committer | Ole Trøan <otroan@employees.org> | 2017-11-07 21:58:31 +0000 |
commit | efcd1e9e1d7dda4e4ea3db5750925cd8f6894f4d (patch) | |
tree | 63c07cf6a94820a5fb2c3935082b6a02f6d210d3 /test/vpp_papi_provider.py | |
parent | 20ab0a4943f7509f6e07d6c614eee90c80c8b963 (diff) |
SNAT: IP fragmentation (VPP-890)
Translation of fragmented packets.
Change-Id: I9b1f2e9433ce273638080f32c2d3bff39c49899d
Signed-off-by: Matus Fabian <matfabia@cisco.com>
Diffstat (limited to 'test/vpp_papi_provider.py')
-rw-r--r-- | test/vpp_papi_provider.py | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/test/vpp_papi_provider.py b/test/vpp_papi_provider.py index 31d7ac48d1f..63f938376ae 100644 --- a/test/vpp_papi_provider.py +++ b/test/vpp_papi_provider.py @@ -1408,6 +1408,43 @@ class VppPapiProvider(object): 'vrf_id': vrf_id, 'is_in': is_in}) + def nat_set_reass( + self, + timeout=2, + max_reass=1024, + max_frag=5, + drop_frag=0, + is_ip6=0): + """Set NAT virtual fragmentation reassembly + + :param timeout: reassembly timeout (Default 2sec) + :param max_reass: maximum concurrent reassemblies (Default 1024) + :param max_frag: maximum fragmets per reassembly (Default 5) + :param drop_frag: if 0 translate fragments, otherwise drop fragments + :param is_ip6: 1 if IPv6, 0 if IPv4 + """ + return self.api( + self.papi.nat_set_reass, + {'timeout': timeout, + 'max_reass': max_reass, + 'max_frag': max_frag, + 'drop_frag': drop_frag, + 'is_ip6': is_ip6}) + + def nat_get_reass(self): + """Get NAT virtual fragmentation reassembly configuration + + :return: NAT virtual fragmentation reassembly configuration + """ + return self.api(self.papi.nat_get_reass, {}) + + def nat_reass_dump(self): + """Dump NAT virtual fragmentation reassemblies + + :return: Dictionary of NAT virtual fragmentation reassemblies + """ + return self.api(self.papi.nat_reass_dump, {}) + def nat_det_add_del_map( self, in_addr, |