diff options
Diffstat (limited to 'include/libbb.h')
-rw-r--r-- | include/libbb.h | 11 |
1 files changed, 11 insertions, 0 deletions
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 { | |||
321 | #endif | 321 | #endif |
322 | }; | 322 | }; |
323 | } len_and_sockaddr; | 323 | } len_and_sockaddr; |
324 | enum { | ||
325 | LSA_SIZEOF_SA = sizeof( | ||
326 | union { | ||
327 | struct sockaddr sa; | ||
328 | struct sockaddr_in sin; | ||
329 | #if ENABLE_FEATURE_IPV6 | ||
330 | struct sockaddr_in6 sin6; | ||
331 | #endif | ||
332 | } | ||
333 | ) | ||
334 | }; | ||
324 | /* Create stream socket, and allocated suitable lsa | 335 | /* Create stream socket, and allocated suitable lsa |
325 | * (lsa of correct size and lsa->sa.sa_family (AF_INET/AF_INET6)) */ | 336 | * (lsa of correct size and lsa->sa.sa_family (AF_INET/AF_INET6)) */ |
326 | int xsocket_stream(len_and_sockaddr **lsap); | 337 | int xsocket_stream(len_and_sockaddr **lsap); |