summaryrefslogblamecommitdiff
path: root/src/net/ip.py
blob: bcf90a245edcd235eabd2ad40c226f0018f5849d (plain) (tree)
1
2
3
4
5



                           
                             








                                                    
class IP4Address(object):
    ''' print an IP4Address
    '''
    __slots__ = ('_value')
    name = 'tmwa::IP4Address'
    enabled = True

    def __init__(self, value):
        self._value = value

    def to_string(self):
        addr = self._value['_addr']
        addr = tuple(int(addr[i]) for i in range(4))
        return '%d.%d.%d.%d' % addr