diff options
author | Denys Vlasenko | 2018-02-11 14:55:46 +0100 |
---|---|---|
committer | Denys Vlasenko | 2018-02-11 14:55:46 +0100 |
commit | ba3b9dbf065438402d89655d7baefb0ccc6f0663 (patch) | |
tree | 4669edd0fb031940a794eaf8942bdbf314efea2e /include | |
parent | d3162773d5c722cc1f5c5b1ea5171c8d3c208135 (diff) | |
download | busybox-ba3b9dbf065438402d89655d7baefb0ccc6f0663.zip busybox-ba3b9dbf065438402d89655d7baefb0ccc6f0663.tar.gz |
libbb: introduce and use bb_getsockname()
function old new delta
bb_getsockname - 18 +18
xrtnl_open 88 83 -5
do_iplink 1216 1209 -7
arping_main 1686 1668 -18
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 0/3 up/down: 18/-30) Total: -12 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/libbb.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/libbb.h b/include/libbb.h index e2bedaf..2c34859 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -636,6 +636,7 @@ void setsockopt_reuseaddr(int fd) FAST_FUNC; /* On Linux this never fails. */ int setsockopt_keepalive(int fd) FAST_FUNC; int setsockopt_broadcast(int fd) FAST_FUNC; int setsockopt_bindtodevice(int fd, const char *iface) FAST_FUNC; +int bb_getsockname(int sockfd, void *addr, socklen_t addrlen) FAST_FUNC; /* NB: returns port in host byte order */ unsigned bb_lookup_port(const char *port, const char *protocol, unsigned default_port) FAST_FUNC; typedef struct len_and_sockaddr { |