<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def read_local_ifaddrs (self):
 """ IP addresses for all active interfaces. @return: list of IP addresses @rtype: list of strings """

        if os.name != 'posix':
            # only POSIX is supported right now
            return []
        try:
            from linkcheck.network import IfConfig
        except ImportError:
            return []
        ifaddrs = []
        ifc = IfConfig()
        for iface in ifc.getInterfaceList(flags=IfConfig.IFF_UP):
            addr = ifc.getAddr(iface)
            if addr:
                ifaddrs.append(addr)
        return ifaddrs