summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-04-03 01:13:04 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-04-03 01:13:04 +0000
commit992e05b6f070562d83f9238b227e1ddbf951c9af (patch)
treec64729c60f929f3007b4ed93543291b52cb50a02 /include
parentcea0a8bccbb0d98eb0e7423e6fff0d8529db8efe (diff)
downloadbusybox-w32-992e05b6f070562d83f9238b227e1ddbf951c9af.tar.gz
busybox-w32-992e05b6f070562d83f9238b227e1ddbf951c9af.tar.bz2
busybox-w32-992e05b6f070562d83f9238b227e1ddbf951c9af.zip
udpsvd: more work on it. works in limited testing.
Diffstat (limited to 'include')
-rw-r--r--include/libbb.h11
-rw-r--r--include/usage.h27
2 files changed, 29 insertions, 9 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;
324enum {
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)) */
326int xsocket_stream(len_and_sockaddr **lsap); 337int xsocket_stream(len_and_sockaddr **lsap);
diff --git a/include/usage.h b/include/usage.h
index cec2dd766..bab14f5c3 100644
--- a/include/usage.h
+++ b/include/usage.h
@@ -3326,32 +3326,41 @@ USE_FEATURE_RUN_PARTS_FANCY("\n -l Prints names of all matching files even when
3326 "1\n" 3326 "1\n"
3327 3327
3328#define tcpsvd_trivial_usage \ 3328#define tcpsvd_trivial_usage \
3329 "[-hpEvv] [-c n] [-C n:msg] [-b n] [-u user] [-l name] ip port prog..." 3329 "[-hEv] [-c n] [-C n:msg] [-b n] [-u user] [-l name] ip port prog..."
3330/* with not-implemented options: */ 3330/* with not-implemented options: */
3331/* "[-hpEvv] [-c n] [-C n:msg] [-b n] [-u user] [-l name] [-i dir|-x cdb] [ -t sec] ip port prog..." */ 3331/* "[-hpEvv] [-c n] [-C n:msg] [-b n] [-u user] [-l name] [-i dir|-x cdb] [ -t sec] ip port prog..." */
3332#define tcpsvd_full_usage \ 3332#define tcpsvd_full_usage \
3333 "tcpsvd creates TCP/IP socket, binds it to host:port\n" \ 3333 "Creates TCP socket, binds it to host:port and listens on in\n" \
3334 "and listens on in for incoming connections. For each connection\n" \ 3334 "for incoming connections. For each connection it runs prog" \
3335 "it runs prog" \
3336 "\n" \ 3335 "\n" \
3337 "\nip IP to listen on. '0' = 'all'" \ 3336 "\nip IP to listen on. '0' = all" \
3338 "\nport Port to listen on" \ 3337 "\nport Port to listen on" \
3339 "\nprog [arg] Program to run for each connection" \ 3338 "\nprog [arg] Program to run" \
3340 "\n-l name Local hostname (else looks up local hostname in DNS)" \ 3339 "\n-l name Local hostname (else looks up local hostname in DNS)" \
3341 "\n-u user[:group] Change to user/group after bind" \ 3340 "\n-u user[:group] Change to user/group after bind" \
3342 "\n-c n Handle up to n connections simultaneously" \ 3341 "\n-c n Handle up to n connections simultaneously" \
3343 "\n-C n[:msg] Allow only up to n connections from the same IP" \ 3342 "\n-C n[:msg] Allow only up to n connections from the same IP" \
3344 "\n New connections from this IP address are closed" \ 3343 "\n New connections from this IP address are closed" \
3345 "\n immediately. 'msg' is written to the peer before close" \ 3344 "\n immediately. 'msg' is written to the peer before close" \
3346 "\n-h Look up peer's hostname in DNS" \ 3345 "\n-h Look up peer's hostname" \
3347 "\n-b n Allow a backlog of approximately n TCP SYNs" \ 3346 "\n-b n Allow a backlog of approximately n TCP SYNs" \
3348 "\n-E Do not set up TCP-related environment variables" \ 3347 "\n-E Do not set up TCP-related environment variables" \
3349 "\n-v Verbose" 3348 "\n-v Verbose"
3350 3349
3351#define udpsvd_trivial_usage \ 3350#define udpsvd_trivial_usage \
3352 "TODO" 3351 "[-hv] [-u user] [-l name] host port prog"
3353#define udpsvd_full_usage \ 3352#define udpsvd_full_usage \
3354 "TODO" 3353 "Creates UDP socket, binds it to host:port and listens on in\n" \
3354 "for incoming packets. When packet arrives it runs prog.\n" \
3355 "When prog exits, it start to listen on the socket again" \
3356 "\n" \
3357 "\nip IP to listen on. '0' = all" \
3358 "\nport Port to listen on" \
3359 "\nprog [arg] Program to run" \
3360 "\n-l name Local hostname (else looks up local hostname in DNS)" \
3361 "\n-u user[:group] Change to user/group after bind" \
3362 "\n-h Look up peer's hostname" \
3363 "\n-v Verbose"
3355 3364
3356#define tftp_trivial_usage \ 3365#define tftp_trivial_usage \
3357 "[OPTION]... HOST [PORT]" 3366 "[OPTION]... HOST [PORT]"