示例#1
0
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()
示例#2
0
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()
示例#3
0
 def __init__(self, net, bitmask):
     object.__init__(self)
     self._ip_ = IP('%s/%s' %(net, bitmask))
示例#4
0
 def __init__(self, net, bitmask):
     object.__init__(self)
     self._ip_ = IP('%s/%s' % (net, bitmask))