From b9a279ba9466d8733261aff1bab0d3ec1031c34c Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Wed, 24 Jan 2007 23:53:22 +0000 Subject: Unify ping and ping6. ping has -4 and -6 which force name resolution into IP or IPv6 only, otherwise we take address family returned by host2sockaddr() in lsa->sa.sa_family. IOW: "ping ::1" with do IPv6 ping, "ping 127.0.0.1" will do IPv4 ping. ping6 is aliased to "ping -6". --- libbb/xconnect.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libbb/xconnect.c') diff --git a/libbb/xconnect.c b/libbb/xconnect.c index 61fe7fd6c..2b35baab7 100644 --- a/libbb/xconnect.c +++ b/libbb/xconnect.c @@ -296,10 +296,12 @@ char* xmalloc_sockaddr2host(const struct sockaddr *sa, socklen_t salen) return sockaddr2str(sa, salen, 0); } +/* Unused char* xmalloc_sockaddr2host_noport(const struct sockaddr *sa, socklen_t salen) { return sockaddr2str(sa, salen, IGNORE_PORT); } +*/ char* xmalloc_sockaddr2hostonly_noport(const struct sockaddr *sa, socklen_t salen) { -- cgit v1.2.3