class SubNet(object): def __init__(self, net, bitmask): object.__init__(self) self._ip_ = IP('%s/%s' %(net, bitmask)) def router(self): return self._ip_[1] def __getitem__(self, key): return self._ip_[key+1] def netmask(self): return self._ip_.netmask() def net(self): return self._ip_.net() def broadcast(self): return self._ip_.broadcast()
class SubNet(object): def __init__(self, net, bitmask): object.__init__(self) self._ip_ = IP('%s/%s' % (net, bitmask)) def router(self): return self._ip_[1] def __getitem__(self, key): return self._ip_[key + 1] def netmask(self): return self._ip_.netmask() def net(self): return self._ip_.net() def broadcast(self): return self._ip_.broadcast()
def __init__(self, net, bitmask): object.__init__(self) self._ip_ = IP('%s/%s' %(net, bitmask))
def __init__(self, net, bitmask): object.__init__(self) self._ip_ = IP('%s/%s' % (net, bitmask))