diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-03-12 22:14:34 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-03-12 22:14:34 +0000 |
commit | 4e6d5117b839cef41cd3919966f95bf25d24d8d9 (patch) | |
tree | 277c292905fefcdf40530c8c29e87d6b8c5f7864 /include/libbb.h | |
parent | 4e6c8120a53709c4a352db42e997303844c74584 (diff) | |
download | busybox-w32-4e6d5117b839cef41cd3919966f95bf25d24d8d9.tar.gz busybox-w32-4e6d5117b839cef41cd3919966f95bf25d24d8d9.tar.bz2 busybox-w32-4e6d5117b839cef41cd3919966f95bf25d24d8d9.zip |
inetd: make it NOMMU-capable and IPv6-friendly. Lots of renames
of variable/function names
Total: -2474 bytes
text data bss dec hex filename
802215 661 7452 810328 c5d58 busybox_old
800120 661 7428 808209 c5511 busybox_unstripped
Diffstat (limited to 'include/libbb.h')
-rw-r--r-- | include/libbb.h | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/include/libbb.h b/include/libbb.h index 6e10cdc41..3c53e5e68 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -390,6 +390,7 @@ typedef struct len_and_sockaddr { | |||
390 | } u; | 390 | } u; |
391 | } len_and_sockaddr; | 391 | } len_and_sockaddr; |
392 | enum { | 392 | enum { |
393 | LSA_LEN_SIZE = offsetof(len_and_sockaddr, u), | ||
393 | LSA_SIZEOF_SA = sizeof( | 394 | LSA_SIZEOF_SA = sizeof( |
394 | union { | 395 | union { |
395 | struct sockaddr sa; | 396 | struct sockaddr sa; |
@@ -405,7 +406,12 @@ enum { | |||
405 | * af == AF_UNSPEC will result in trying to create IPv6 socket, | 406 | * af == AF_UNSPEC will result in trying to create IPv6 socket, |
406 | * and if kernel doesn't support it, IPv4. | 407 | * and if kernel doesn't support it, IPv4. |
407 | */ | 408 | */ |
408 | int xsocket_type(len_and_sockaddr **lsap, USE_FEATURE_IPV6(int af,) int sock_type); | 409 | #if ENABLE_FEATURE_IPV6 |
410 | int xsocket_type(len_and_sockaddr **lsap, int af, int sock_type); | ||
411 | #else | ||
412 | int xsocket_type(len_and_sockaddr **lsap, int sock_type); | ||
413 | #define xsocket_type(lsap, af, sock_type) xsocket_type((lsap), (sock_type)) | ||
414 | #endif | ||
409 | int xsocket_stream(len_and_sockaddr **lsap); | 415 | int xsocket_stream(len_and_sockaddr **lsap); |
410 | /* Create server socket bound to bindaddr:port. bindaddr can be NULL, | 416 | /* Create server socket bound to bindaddr:port. bindaddr can be NULL, |
411 | * numeric IP ("N.N.N.N") or numeric IPv6 address, | 417 | * numeric IP ("N.N.N.N") or numeric IPv6 address, |
@@ -430,14 +436,13 @@ len_and_sockaddr* host2sockaddr(const char *host, int port); | |||
430 | /* Version which dies on error */ | 436 | /* Version which dies on error */ |
431 | len_and_sockaddr* xhost2sockaddr(const char *host, int port); | 437 | len_and_sockaddr* xhost2sockaddr(const char *host, int port); |
432 | len_and_sockaddr* xdotted2sockaddr(const char *host, int port); | 438 | len_and_sockaddr* xdotted2sockaddr(const char *host, int port); |
433 | #if ENABLE_FEATURE_IPV6 | ||
434 | /* Same, useful if you want to force family (e.g. IPv6) */ | 439 | /* Same, useful if you want to force family (e.g. IPv6) */ |
440 | #if !ENABLE_FEATURE_IPV6 | ||
441 | #define host_and_af2sockaddr(host, port, af) host2sockaddr((host), (port)) | ||
442 | #define xhost_and_af2sockaddr(host, port, af) xhost2sockaddr((host), (port)) | ||
443 | #else | ||
435 | len_and_sockaddr* host_and_af2sockaddr(const char *host, int port, sa_family_t af); | 444 | len_and_sockaddr* host_and_af2sockaddr(const char *host, int port, sa_family_t af); |
436 | len_and_sockaddr* xhost_and_af2sockaddr(const char *host, int port, sa_family_t af); | 445 | len_and_sockaddr* xhost_and_af2sockaddr(const char *host, int port, sa_family_t af); |
437 | #else | ||
438 | /* [we evaluate af: think about "host_and_af2sockaddr(..., af++)"] */ | ||
439 | #define host_and_af2sockaddr(host, port, af) ((void)(af), host2sockaddr((host), (port))) | ||
440 | #define xhost_and_af2sockaddr(host, port, af) ((void)(af), xhost2sockaddr((host), (port))) | ||
441 | #endif | 446 | #endif |
442 | /* Assign sin[6]_port member if the socket is an AF_INET[6] one, | 447 | /* Assign sin[6]_port member if the socket is an AF_INET[6] one, |
443 | * otherwise no-op. Useful for ftp. | 448 | * otherwise no-op. Useful for ftp. |