def interface_ip(self):
"""
Returns ascii representation of the ip address of the interface used to communicate with the Cb Response server.
If using NAT, this will be the "internal" IP address of the sensor.
"""
try:
ip_address = socket.inet_ntoa(struct.pack('>i', self._attribute('interface_ip', 0)))
except:
ip_address = self._attribute('interface_ip', 0)
return ip_address
评论列表
文章目录