diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/libbb.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/include/libbb.h b/include/libbb.h index 52bc33940..651c48ba1 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -241,6 +241,7 @@ extern char *bb_get_last_path_component(char *path); | |||
241 | 241 | ||
242 | int ndelay_on(int fd); | 242 | int ndelay_on(int fd); |
243 | int ndelay_off(int fd); | 243 | int ndelay_off(int fd); |
244 | void xdup2(int, int); | ||
244 | void xmove_fd(int, int); | 245 | void xmove_fd(int, int); |
245 | 246 | ||
246 | 247 | ||
@@ -288,8 +289,7 @@ ssize_t xsendto(int s, const void *buf, size_t len, const struct sockaddr *to, | |||
288 | * time out. Linux does not allow multiple live binds on same ip:port | 289 | * time out. Linux does not allow multiple live binds on same ip:port |
289 | * regardless of SO_REUSEADDR (unlike some other flavors of Unix). | 290 | * regardless of SO_REUSEADDR (unlike some other flavors of Unix). |
290 | * Turn it on before you call bind(). */ | 291 | * Turn it on before you call bind(). */ |
291 | //TODO: it seems like in Linux this never fails. Change to void, eliminate error checks | 292 | void setsockopt_reuseaddr(int fd); /* On Linux this never fails. */ |
292 | int setsockopt_reuseaddr(int fd); | ||
293 | int setsockopt_broadcast(int fd); | 293 | int setsockopt_broadcast(int fd); |
294 | /* NB: returns port in host byte order */ | 294 | /* NB: returns port in host byte order */ |
295 | unsigned bb_lookup_port(const char *port, const char *protocol, unsigned default_port); | 295 | unsigned bb_lookup_port(const char *port, const char *protocol, unsigned default_port); |
@@ -360,14 +360,14 @@ void set_nport(len_and_sockaddr *lsa, unsigned port); | |||
360 | /* Retrieve sin[6]_port or return -1 for non-INET[6] lsa's */ | 360 | /* Retrieve sin[6]_port or return -1 for non-INET[6] lsa's */ |
361 | int get_nport(const struct sockaddr *sa); | 361 | int get_nport(const struct sockaddr *sa); |
362 | /* Reverse DNS. Returns NULL on failure. */ | 362 | /* Reverse DNS. Returns NULL on failure. */ |
363 | char* xmalloc_sockaddr2host(const struct sockaddr *sa, socklen_t salen); | 363 | char* xmalloc_sockaddr2host(const struct sockaddr *sa); |
364 | /* This one doesn't append :PORTNUM */ | 364 | /* This one doesn't append :PORTNUM */ |
365 | char* xmalloc_sockaddr2host_noport(const struct sockaddr *sa, socklen_t salen); | 365 | char* xmalloc_sockaddr2host_noport(const struct sockaddr *sa); |
366 | /* This one also doesn't fall back to dotted IP (returns NULL) */ | 366 | /* This one also doesn't fall back to dotted IP (returns NULL) */ |
367 | char* xmalloc_sockaddr2hostonly_noport(const struct sockaddr *sa, socklen_t salen); | 367 | char* xmalloc_sockaddr2hostonly_noport(const struct sockaddr *sa); |
368 | /* inet_[ap]ton on steroids */ | 368 | /* inet_[ap]ton on steroids */ |
369 | char* xmalloc_sockaddr2dotted(const struct sockaddr *sa, socklen_t salen); | 369 | char* xmalloc_sockaddr2dotted(const struct sockaddr *sa); |
370 | char* xmalloc_sockaddr2dotted_noport(const struct sockaddr *sa, socklen_t salen); | 370 | char* xmalloc_sockaddr2dotted_noport(const struct sockaddr *sa); |
371 | // "old" (ipv4 only) API | 371 | // "old" (ipv4 only) API |
372 | // users: traceroute.c hostname.c - use _list_ of all IPs | 372 | // users: traceroute.c hostname.c - use _list_ of all IPs |
373 | struct hostent *xgethostbyname(const char *name); | 373 | struct hostent *xgethostbyname(const char *name); |