def _getaddr(self, ifname, func):
        ifreq = (ifname + '\0'*32)[:32]
        try:
            result = self._fcntl(func, ifreq)
        except __HOLE__:
            return None

        return socket.inet_ntoa(result[20:24])
dataset/ETHPy150Open kdart/pycopia/aid/pycopia/ifconfig.py/IfConfig._getaddr