summaryrefslogtreecommitdiff
path: root/libbb/xconnect.c
diff options
context:
space:
mode:
authorDenis Vlasenko2007-01-24 23:53:22 +0000
committerDenis Vlasenko2007-01-24 23:53:22 +0000
commitb9a279ba9466d8733261aff1bab0d3ec1031c34c (patch)
tree6a995795abf0322f540585a6c4d28847fbebb773 /libbb/xconnect.c
parent677cb5eea52f2424bef1fd0fcc6ed3c8c8b5f1d5 (diff)
downloadbusybox-b9a279ba9466d8733261aff1bab0d3ec1031c34c.zip
busybox-b9a279ba9466d8733261aff1bab0d3ec1031c34c.tar.gz
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".
Diffstat (limited to 'libbb/xconnect.c')
-rw-r--r--libbb/xconnect.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libbb/xconnect.c b/libbb/xconnect.c
index 61fe7fd..2b35baa 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)
{