(self, mac)
return bmac
Packs a MAC up
Packs a MAC up
Packs a MAC up
def mac_bytes(self, mac):
        """Packs a MAC up"""
        bmac = ''
        while len(mac) < 12:
            mac = mac + '0'
        for idx in range(0, 12, 2):
            m = int(mac[idx:idx + 2], 16)
            bmac += pack('!B', m)
        return bmac
def mac_bytes ( self , mac ) : bmac = '' while len ( mac ) < 12 : mac = mac + '0' for idx in range ( 0 , 12 , 2 ) : m = int ( mac [ idx : idx + 2 ] , 16 ) bmac += pack ( '!B' , m ) return bmac