addr.py
changeset 1 2223ade4f259
parent 0 257003279747
child 4 8b633782f02d
equal deleted inserted replaced
0:257003279747 1:2223ade4f259
    26             Parse the given prefix in "a.b.c.d/l" form
    26             Parse the given prefix in "a.b.c.d/l" form
    27         """
    27         """
    28 
    28 
    29         super(Network, self).__init__(prefix)
    29         super(Network, self).__init__(prefix)
    30 
    30 
       
    31 class MAC (object) :
       
    32     """
       
    33         A mac address
       
    34     """
       
    35 
       
    36     def __init__ (self, mac) :
       
    37         """
       
    38             Parse the given MAC address in "aa:bb:cc:dd:ee:ff" form
       
    39         """
       
    40 
       
    41         # XXX: validate
       
    42         self.mac = mac
       
    43 
       
    44     def __str__ (self) :
       
    45         return self.mac
       
    46