aboutsummaryrefslogtreecommitdiffstats
path: root/test/vpp_ip.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/vpp_ip.py')
-rw-r--r--test/vpp_ip.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/vpp_ip.py b/test/vpp_ip.py
index 6d22c16ff60..2083e03b5e5 100644
--- a/test/vpp_ip.py
+++ b/test/vpp_ip.py
@@ -200,6 +200,20 @@ class VppIpPrefix():
return False
+class VppIp6Prefix():
+ def __init__(self, prefix, prefixlen):
+ self.ip_prefix = ip_address(unicode(prefix))
+ self.prefixlen = prefixlen
+
+ def encode(self):
+ return {'prefix': {'address': self.ip_prefix.packed},
+ 'len': self.prefixlen}
+
+
+class VppIp4Prefix(VppIp6Prefix):
+ pass
+
+
class VppIpMPrefix():
def __init__(self, saddr, gaddr, len):
self.saddr = saddr