aboutsummaryrefslogtreecommitdiffstats
path: root/test/util.py
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2017-02-16 21:57:05 -0800
committerDamjan Marion <dmarion.lists@gmail.com>2017-02-27 12:10:50 +0000
commit39f9d8bd226ab5aa366f181a5cbf7c873f599e06 (patch)
tree313fc63450ddca953a6c7ee9c1ee9260169f4003 /test/util.py
parent3e7b569361f97368b0cad3468fac76ef2a398bfa (diff)
[Proxy] ARP tests
Change-Id: I40d6d763b55a26cdee0afef85d1acdd19dd10dd6 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'test/util.py')
-rw-r--r--test/util.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/util.py b/test/util.py
index 3a8bd838..d6b77f9d 100644
--- a/test/util.py
+++ b/test/util.py
@@ -47,6 +47,11 @@ def ip4n_range(ip4n, s, e):
for ip in ip4_range(ip4, s, e))
+def mactobinary(mac):
+ """ Convert the : separated format into binary packet data for the API """
+ return mac.replace(':', '').decode('hex')
+
+
class NumericConstant(object):
__metaclass__ = ABCMeta