(self, index)
| 78 | logger.info("%d %s %s" % (index, self.ip2str(ip), address)) |
| 79 | |
| 80 | def setIpRange(self, index): |
| 81 | offset = self.firstIndex + index * 7 |
| 82 | self.ipdb.seek(offset) |
| 83 | buf = self.ipdb.read(7) |
| 84 | (self.curStartIp, of1, of2) = struct.unpack("IHB", buf) |
| 85 | self.curEndIpOffset = of1 + (of2 << 16) |
| 86 | self.ipdb.seek(self.curEndIpOffset) |
| 87 | buf = self.ipdb.read(4) |
| 88 | (self.curEndIp,) = struct.unpack("I", buf) |
| 89 | |
| 90 | def getIpAddr(self, ip): |
| 91 | L = 0 |