diff options
Diffstat (limited to 'test/util.py')
-rw-r--r-- | test/util.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/util.py b/test/util.py index 3a8bd838b00..d6b77f9d3c3 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 |