diff options
author | Klement Sekera <ksekera@cisco.com> | 2018-05-16 10:52:45 +0200 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2018-06-21 14:50:10 +0000 |
commit | a98346f664aae148d26a8e158008b773d73db96f (patch) | |
tree | 2a850b1925f3dd70817fb0e41324baef71fd7a05 /test/vpp_tunnel_interface.py | |
parent | 56ba844d6a8b8f58b18fe51bf22707b0c37d3a87 (diff) |
ipsec: VPP-1316 calculate IP/TCP/UDP inner checksums
Calculate IP/TCP/UDP checksums in software before adding authentication.
Change-Id: I3e121cb00aeba667764f39ade8d62170f18f8b6b
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Diffstat (limited to 'test/vpp_tunnel_interface.py')
-rw-r--r-- | test/vpp_tunnel_interface.py | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/test/vpp_tunnel_interface.py b/test/vpp_tunnel_interface.py new file mode 100644 index 00000000000..c74f58532f2 --- /dev/null +++ b/test/vpp_tunnel_interface.py @@ -0,0 +1,32 @@ +from abc import abstractmethod, ABCMeta +from vpp_pg_interface import is_ipv6_misc +from vpp_interface import VppInterface + + +class VppTunnelInterface(VppInterface): + """ VPP tunnel interface abstration """ + __metaclass__ = ABCMeta + + @abstractmethod + def __init__(self, test, parent_if): + super(VppTunnelInterface, self).__init__(test) + self.parent_if = parent_if + + @property + def local_mac(self): + return self.parent_if.local_mac + + @property + def remote_mac(self): + return self.parent_if.remote_mac + + def enable_capture(self): + return self.parent_if.enable_capture() + + def add_stream(self, pkts): + return self.parent_if.add_stream(pkts) + + def get_capture(self, expected_count=None, remark=None, timeout=1, + filter_out_fn=is_ipv6_misc): + return self.parent_if.get_capture(expected_count, remark, timeout, + filter_out_fn) |