Пример #1
0
 def addresses(self):
     # Since range will stop one before the endpoint, passing it
     # self.bcast effectively means that the addresses run from
     # the network start to last_host.
     return [
         int_to_dq(i)
         for i in range(dq_to_int(self.ip), dq_to_int(self.bcast))
     ]
Пример #2
0
 def last_host(self):
     return int_to_dq(dq_to_int(self.bcast) - 1)
Пример #3
0
 def first_host(self):
     return int_to_dq(dq_to_int(self.ip) + 1)