version 1.17, 2000/09/26 18:53:13 |
version 1.18, 2000/12/01 02:25:58 |
|
|
#include <netinet/in_systm.h> |
#include <netinet/in_systm.h> |
#include <netinet/ip.h> |
#include <netinet/ip.h> |
#include <arpa/inet.h> |
#include <arpa/inet.h> |
|
#include <arpa/nameser.h> |
#include <netdb.h> /* hostent, gethostby*, getservby* */ |
#include <netdb.h> /* hostent, gethostby*, getservby* */ |
#include <stdio.h> |
#include <stdio.h> |
#include <string.h> |
#include <string.h> |
|
|
#include <setjmp.h> |
#include <setjmp.h> |
#include <signal.h> |
#include <signal.h> |
#include <fcntl.h> |
#include <fcntl.h> |
|
#include <resolv.h> |
#include <stdarg.h> |
#include <stdarg.h> |
#include <stdlib.h> |
#include <stdlib.h> |
#include <unistd.h> |
#include <unistd.h> |
|
|
* trick for getting the RTT. [I got that idea from pluvius, and warped it.] |
* trick for getting the RTT. [I got that idea from pluvius, and warped it.] |
* Return either the original fd, or clean up and return -1. |
* Return either the original fd, or clean up and return -1. |
*/ |
*/ |
|
int |
udptest(fd, where) |
udptest(fd, where) |
int fd; |
int fd; |
struct in_addr *where; |
struct in_addr *where; |
|
|
*/ |
*/ |
void |
void |
nlog(doexit, fmt) |
nlog(doexit, fmt) |
|
int doexit; |
char *fmt; |
char *fmt; |
{ |
{ |
va_list args; |
va_list args; |
|
|
|
|
void |
void |
usage(doexit) |
usage(doexit) |
|
int doexit; |
{ |
{ |
fprintf(stderr, "netcat - [v1.10]\n"); |
fprintf(stderr, "netcat - [v1.10]\n"); |
fprintf(stderr, "nc [-lnrtuvz] [-e command] [-g intermediates]\n"); |
fprintf(stderr, "nc [-lnrtuvz] [-e command] [-g intermediates]\n"); |