diff options
Diffstat (limited to '')
| -rw-r--r-- | src/usr.bin/nc/atomicio.c | 2 | ||||
| -rw-r--r-- | src/usr.bin/nc/netcat.c | 3 | ||||
| -rw-r--r-- | src/usr.bin/nc/socks.c | 11 |
3 files changed, 10 insertions, 6 deletions
diff --git a/src/usr.bin/nc/atomicio.c b/src/usr.bin/nc/atomicio.c index 02289f0a2a..4437b6717b 100644 --- a/src/usr.bin/nc/atomicio.c +++ b/src/usr.bin/nc/atomicio.c | |||
| @@ -29,6 +29,8 @@ | |||
| 29 | #include <errno.h> | 29 | #include <errno.h> |
| 30 | #include <unistd.h> | 30 | #include <unistd.h> |
| 31 | 31 | ||
| 32 | ssize_t atomicio(ssize_t (*f)(int, void *, size_t), int fd, void *_s, size_t n); | ||
| 33 | |||
| 32 | /* | 34 | /* |
| 33 | * ensure all of data on socket comes through. f==read || f==write | 35 | * ensure all of data on socket comes through. f==read || f==write |
| 34 | */ | 36 | */ |
diff --git a/src/usr.bin/nc/netcat.c b/src/usr.bin/nc/netcat.c index 8e02196c3a..41de61fb33 100644 --- a/src/usr.bin/nc/netcat.c +++ b/src/usr.bin/nc/netcat.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: netcat.c,v 1.60 2003/07/07 14:12:18 avsm Exp $ */ | 1 | /* $OpenBSD: netcat.c,v 1.61 2003/07/07 21:36:23 deraadt Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2001 Eric Jackson <ericj@monkey.org> | 3 | * Copyright (c) 2001 Eric Jackson <ericj@monkey.org> |
| 4 | * | 4 | * |
| @@ -220,7 +220,6 @@ main(int argc, char *argv[]) | |||
| 220 | hints.ai_flags |= AI_NUMERICHOST; | 220 | hints.ai_flags |= AI_NUMERICHOST; |
| 221 | } | 221 | } |
| 222 | 222 | ||
| 223 | |||
| 224 | if (xflag) { | 223 | if (xflag) { |
| 225 | if (uflag) | 224 | if (uflag) |
| 226 | errx(1, "no proxy support for UDP mode"); | 225 | errx(1, "no proxy support for UDP mode"); |
diff --git a/src/usr.bin/nc/socks.c b/src/usr.bin/nc/socks.c index 25779d2e99..a6b4fdd7e3 100644 --- a/src/usr.bin/nc/socks.c +++ b/src/usr.bin/nc/socks.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: socks.c,v 1.7 2003/06/03 20:49:29 deraadt Exp $ */ | 1 | /* $OpenBSD: socks.c,v 1.8 2003/07/07 21:36:23 deraadt Exp $ */ |
| 2 | 2 | ||
| 3 | /* | 3 | /* |
| 4 | * Copyright (c) 1999 Niklas Hallqvist. All rights reserved. | 4 | * Copyright (c) 1999 Niklas Hallqvist. All rights reserved. |
| @@ -46,9 +46,12 @@ | |||
| 46 | #define SOCKS_MAXCMDSZ 10 | 46 | #define SOCKS_MAXCMDSZ 10 |
| 47 | 47 | ||
| 48 | int remote_connect(char *, char *, struct addrinfo); | 48 | int remote_connect(char *, char *, struct addrinfo); |
| 49 | int socks_connect(char *host, char *port, struct addrinfo hints, | ||
| 50 | char *proxyhost, char *proxyport, struct addrinfo proxyhints, | ||
| 51 | int socksv); | ||
| 49 | 52 | ||
| 50 | static in_addr_t | 53 | static in_addr_t |
| 51 | decode_addr (const char *s) | 54 | decode_addr(const char *s) |
| 52 | { | 55 | { |
| 53 | struct hostent *hp = gethostbyname (s); | 56 | struct hostent *hp = gethostbyname (s); |
| 54 | struct in_addr retval; | 57 | struct in_addr retval; |
| @@ -61,7 +64,7 @@ decode_addr (const char *s) | |||
| 61 | } | 64 | } |
| 62 | 65 | ||
| 63 | static in_port_t | 66 | static in_port_t |
| 64 | decode_port (const char *s) | 67 | decode_port(const char *s) |
| 65 | { | 68 | { |
| 66 | struct servent *sp; | 69 | struct servent *sp; |
| 67 | in_port_t port; | 70 | in_port_t port; |
| @@ -79,7 +82,7 @@ decode_port (const char *s) | |||
| 79 | } | 82 | } |
| 80 | 83 | ||
| 81 | int | 84 | int |
| 82 | socks_connect (char *host, char *port, struct addrinfo hints, | 85 | socks_connect(char *host, char *port, struct addrinfo hints, |
| 83 | char *proxyhost, char *proxyport, struct addrinfo proxyhints, | 86 | char *proxyhost, char *proxyport, struct addrinfo proxyhints, |
| 84 | int socksv) | 87 | int socksv) |
| 85 | { | 88 | { |
