diff options
author | Ron Yorston <rmy@pobox.com> | 2012-03-22 15:48:57 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2012-03-22 15:48:57 +0000 |
commit | 9db164d6e39050d09f38288c6045cd2a2cbf6d63 (patch) | |
tree | ea5dc2d28d15da0de25c197ed7d059c3656af1a0 /networking | |
parent | 1118c95535ea51961437089fc3dece5ab4ea7e1b (diff) | |
parent | d84b175cb6948eb17f847313bf912174e2f934e1 (diff) | |
download | busybox-w32-9db164d6e39050d09f38288c6045cd2a2cbf6d63.tar.gz busybox-w32-9db164d6e39050d09f38288c6045cd2a2cbf6d63.tar.bz2 busybox-w32-9db164d6e39050d09f38288c6045cd2a2cbf6d63.zip |
Merge commit 'd84b175cb6948eb17f847313bf912174e2f934e1' into merge
Conflicts:
include/platform.h
Diffstat (limited to 'networking')
-rw-r--r-- | networking/dnsd.c | 2 | ||||
-rw-r--r-- | networking/ping.c | 16 | ||||
-rw-r--r-- | networking/tcpudp.c | 6 | ||||
-rw-r--r-- | networking/telnet.c | 19 |
4 files changed, 37 insertions, 6 deletions
diff --git a/networking/dnsd.c b/networking/dnsd.c index d80306d3d..fe98400f7 100644 --- a/networking/dnsd.c +++ b/networking/dnsd.c | |||
@@ -30,7 +30,7 @@ | |||
30 | //usage: "\n -s Send successful replies only. Use this if you want" | 30 | //usage: "\n -s Send successful replies only. Use this if you want" |
31 | //usage: "\n to use /etc/resolv.conf with two nameserver lines:" | 31 | //usage: "\n to use /etc/resolv.conf with two nameserver lines:" |
32 | //usage: "\n nameserver DNSD_SERVER" | 32 | //usage: "\n nameserver DNSD_SERVER" |
33 | //usage: "\n nameserver NORNAL_DNS_SERVER" | 33 | //usage: "\n nameserver NORMAL_DNS_SERVER" |
34 | 34 | ||
35 | #include "libbb.h" | 35 | #include "libbb.h" |
36 | #include <syslog.h> | 36 | #include <syslog.h> |
diff --git a/networking/ping.c b/networking/ping.c index d75747984..efd4f210b 100644 --- a/networking/ping.c +++ b/networking/ping.c | |||
@@ -29,6 +29,22 @@ | |||
29 | #include <netinet/ip_icmp.h> | 29 | #include <netinet/ip_icmp.h> |
30 | #include "libbb.h" | 30 | #include "libbb.h" |
31 | 31 | ||
32 | #ifdef __BIONIC__ | ||
33 | /* should be in netinet/ip_icmp.h */ | ||
34 | # define ICMP_DEST_UNREACH 3 /* Destination Unreachable */ | ||
35 | # define ICMP_SOURCE_QUENCH 4 /* Source Quench */ | ||
36 | # define ICMP_REDIRECT 5 /* Redirect (change route) */ | ||
37 | # define ICMP_ECHO 8 /* Echo Request */ | ||
38 | # define ICMP_TIME_EXCEEDED 11 /* Time Exceeded */ | ||
39 | # define ICMP_PARAMETERPROB 12 /* Parameter Problem */ | ||
40 | # define ICMP_TIMESTAMP 13 /* Timestamp Request */ | ||
41 | # define ICMP_TIMESTAMPREPLY 14 /* Timestamp Reply */ | ||
42 | # define ICMP_INFO_REQUEST 15 /* Information Request */ | ||
43 | # define ICMP_INFO_REPLY 16 /* Information Reply */ | ||
44 | # define ICMP_ADDRESS 17 /* Address Mask Request */ | ||
45 | # define ICMP_ADDRESSREPLY 18 /* Address Mask Reply */ | ||
46 | #endif | ||
47 | |||
32 | //config:config PING | 48 | //config:config PING |
33 | //config: bool "ping" | 49 | //config: bool "ping" |
34 | //config: default y | 50 | //config: default y |
diff --git a/networking/tcpudp.c b/networking/tcpudp.c index a2b8c958c..3df6a98d8 100644 --- a/networking/tcpudp.c +++ b/networking/tcpudp.c | |||
@@ -36,14 +36,14 @@ | |||
36 | //usage:#define tcpsvd_full_usage "\n\n" | 36 | //usage:#define tcpsvd_full_usage "\n\n" |
37 | //usage: "Create TCP socket, bind to IP:PORT and listen\n" | 37 | //usage: "Create TCP socket, bind to IP:PORT and listen\n" |
38 | //usage: "for incoming connection. Run PROG for each connection.\n" | 38 | //usage: "for incoming connection. Run PROG for each connection.\n" |
39 | //usage: "\n IP IP to listen on. '0' = all" | 39 | //usage: "\n IP IP to listen on, 0 = all" |
40 | //usage: "\n PORT Port to listen on" | 40 | //usage: "\n PORT Port to listen on" |
41 | //usage: "\n PROG ARGS Program to run" | 41 | //usage: "\n PROG ARGS Program to run" |
42 | //usage: "\n -l NAME Local hostname (else looks up local hostname in DNS)" | 42 | //usage: "\n -l NAME Local hostname (else looks up local hostname in DNS)" |
43 | //usage: "\n -u USER[:GRP] Change to user/group after bind" | 43 | //usage: "\n -u USER[:GRP] Change to user/group after bind" |
44 | //usage: "\n -c N Handle up to N connections simultaneously" | 44 | //usage: "\n -c N Handle up to N connections simultaneously" |
45 | //usage: "\n -b N Allow a backlog of approximately N TCP SYNs" | 45 | //usage: "\n -b N Allow a backlog of approximately N TCP SYNs" |
46 | //usage: "\n -C N[:MSG] Allow only up to N connections from the same IP." | 46 | //usage: "\n -C N[:MSG] Allow only up to N connections from the same IP" |
47 | //usage: "\n New connections from this IP address are closed" | 47 | //usage: "\n New connections from this IP address are closed" |
48 | //usage: "\n immediately. MSG is written to the peer before close" | 48 | //usage: "\n immediately. MSG is written to the peer before close" |
49 | //usage: "\n -h Look up peer's hostname" | 49 | //usage: "\n -h Look up peer's hostname" |
@@ -56,7 +56,7 @@ | |||
56 | //usage: "Create UDP socket, bind to IP:PORT and wait\n" | 56 | //usage: "Create UDP socket, bind to IP:PORT and wait\n" |
57 | //usage: "for incoming packets. Run PROG for each packet,\n" | 57 | //usage: "for incoming packets. Run PROG for each packet,\n" |
58 | //usage: "redirecting all further packets with same peer ip:port to it.\n" | 58 | //usage: "redirecting all further packets with same peer ip:port to it.\n" |
59 | //usage: "\n IP IP to listen on. '0' = all" | 59 | //usage: "\n IP IP to listen on, 0 = all" |
60 | //usage: "\n PORT Port to listen on" | 60 | //usage: "\n PORT Port to listen on" |
61 | //usage: "\n PROG ARGS Program to run" | 61 | //usage: "\n PROG ARGS Program to run" |
62 | //usage: "\n -l NAME Local hostname (else looks up local hostname in DNS)" | 62 | //usage: "\n -l NAME Local hostname (else looks up local hostname in DNS)" |
diff --git a/networking/telnet.c b/networking/telnet.c index 6dd0de53a..e8e51dce4 100644 --- a/networking/telnet.c +++ b/networking/telnet.c | |||
@@ -40,10 +40,25 @@ | |||
40 | #include <netinet/in.h> | 40 | #include <netinet/in.h> |
41 | #include "libbb.h" | 41 | #include "libbb.h" |
42 | 42 | ||
43 | #ifdef __BIONIC__ | ||
44 | /* should be in arpa/telnet.h */ | ||
45 | # define IAC 255 /* interpret as command: */ | ||
46 | # define DONT 254 /* you are not to use option */ | ||
47 | # define DO 253 /* please, you use option */ | ||
48 | # define WONT 252 /* I won't use option */ | ||
49 | # define WILL 251 /* I will use option */ | ||
50 | # define SB 250 /* interpret as subnegotiation */ | ||
51 | # define SE 240 /* end sub negotiation */ | ||
52 | # define TELOPT_ECHO 1 /* echo */ | ||
53 | # define TELOPT_SGA 3 /* suppress go ahead */ | ||
54 | # define TELOPT_TTYPE 24 /* terminal type */ | ||
55 | # define TELOPT_NAWS 31 /* window size */ | ||
56 | #endif | ||
57 | |||
43 | #ifdef DOTRACE | 58 | #ifdef DOTRACE |
44 | #define TRACE(x, y) do { if (x) printf y; } while (0) | 59 | # define TRACE(x, y) do { if (x) printf y; } while (0) |
45 | #else | 60 | #else |
46 | #define TRACE(x, y) | 61 | # define TRACE(x, y) |
47 | #endif | 62 | #endif |
48 | 63 | ||
49 | enum { | 64 | enum { |