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>
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user