@graft(namespace='<STR_LIT>')<EOL>def interfaces_info():
def replace(value):<EOL><INDENT>if value == netifaces.AF_LINK:<EOL><INDENT>return '<STR_LIT>'<EOL><DEDENT>if value == netifaces.AF_INET:<EOL><INDENT>return '<STR_LIT>'<EOL><DEDENT>if value == netifaces.AF_INET6:<EOL><INDENT>return '<STR_LIT>'<EOL><DEDENT>return value<EOL><DEDENT>results = {}<EOL>for iface in netifaces.interfaces():<EOL><INDENT>addrs = netifaces.ifaddresses(iface)<EOL>results[iface] = {replace(k): v for k, v in addrs.items()}<EOL><DEDENT>return results<EOL>
Returns interfaces data.