netaddr function