diff --git a/adafruit_wiznet5k/adafruit_wiznet5k.py b/adafruit_wiznet5k/adafruit_wiznet5k.py index 2bfbd5d..0d870a5 100755 --- a/adafruit_wiznet5k/adafruit_wiznet5k.py +++ b/adafruit_wiznet5k/adafruit_wiznet5k.py @@ -265,6 +265,11 @@ def pretty_ip(self, ip): # pylint: disable=no-self-use, invalid-name """ return "%d.%d.%d.%d" % (ip[0], ip[1], ip[2], ip[3]) + def unpretty_ip(self, ip): # pylint: disable=no-self-use, invalid-name + """Converts a dotted-quad string to a bytearray IP address""" + octets = [int(x) for x in ip.split('.')] + return bytes(octets) + @property def mac_address(self): """Returns the hardware's MAC address."""