'Understands Ethernet address is various forms.  Hex strings, raw byte
strings, etc.'

def __init__(self, addr):

    if (isinstance(addr, bytes) or isinstance(addr, basestring)):
        if (len(addr) == 6):
            pass
        elif ((len(addr) == 17) or (len(addr) == 12) or (addr.count(':') == 5)):
            if (len(addr) == 17):
                if ((addr[2::3] != ':::::') and (addr[2::3] != '-----')):
                    raise RuntimeError('Bad    format    for    ethernet    address')
                addr = ''.join((addr[(x * 3):((x * 3) + 2)] for x in xrange(0, 6)))
            elif (len(addr) == 12):
                pass
            else:
                addr = ''.join([('%02x' % (int(x, 16),)) for x in addr.split(':')])
            addr = ''.join((chr(int(addr[(x * 2):((x * 2) + 2)], 16)) for x in range(0, 6)))
        else:
            raise RuntimeError('Expected    ethernet    address    string    to    be    6    raw    bytes    or    some    hex')
        self._value = addr
    elif isinstance(addr, EthAddr):
        self._value = addr.toRaw()
    elif ((type(addr) == list) or (hasattr(addr, '__len__') and (len(addr) == 6) and hasattr(addr, '__iter__'))):
        self._value = ''.join((chr(x) for x in addr))
    elif (addr is None):
        self._value = ('\x00' * 6)
    else:
        raise RuntimeError('Expected    ethernet    address    to    be    a    string    of    6    raw    bytes    or    some    hex')
