From 992e05b6f070562d83f9238b227e1ddbf951c9af Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Tue, 3 Apr 2007 01:13:04 +0000 Subject: udpsvd: more work on it. works in limited testing. --- include/libbb.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include/libbb.h') diff --git a/include/libbb.h b/include/libbb.h index b802e01d3..e5413b1a4 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -321,6 +321,17 @@ typedef struct len_and_sockaddr { #endif }; } len_and_sockaddr; +enum { + LSA_SIZEOF_SA = sizeof( + union { + struct sockaddr sa; + struct sockaddr_in sin; +#if ENABLE_FEATURE_IPV6 + struct sockaddr_in6 sin6; +#endif + } + ) +}; /* Create stream socket, and allocated suitable lsa * (lsa of correct size and lsa->sa.sa_family (AF_INET/AF_INET6)) */ int xsocket_stream(len_and_sockaddr **lsap); -- cgit v1.2.3