version 1.8.56.1, 2012/04/23 16:48:56 |
version 1.8.56.2, 2012/04/23 23:40:41 |
Line 44 int rfc931_timeout = RFC931_TIMEOUT; |
|
Line 44 int rfc931_timeout = RFC931_TIMEOUT; |
|
|
|
static jmp_buf timebuf; |
static jmp_buf timebuf; |
|
|
static FILE *fsocket(int, int, int); |
static FILE *fsocket __P((int, int, int)); |
static void timeout(int); |
static void timeout __P((int)); |
|
|
/* fsocket - open stdio stream on top of socket */ |
/* fsocket - open stdio stream on top of socket */ |
|
|
static FILE * |
static FILE *fsocket(domain, type, protocol) |
fsocket(int domain, int type, int protocol) |
int domain; |
|
int type; |
|
int protocol; |
{ |
{ |
int s; |
int s; |
FILE *fp; |
FILE *fp; |
Line 69 fsocket(int domain, int type, int protoc |
|
Line 71 fsocket(int domain, int type, int protoc |
|
|
|
/* timeout - handle timeouts */ |
/* timeout - handle timeouts */ |
|
|
static void |
static void timeout(sig) |
timeout(int sig) |
int sig; |
{ |
{ |
longjmp(timebuf, sig); |
longjmp(timebuf, sig); |
} |
} |
|
|
/* rfc931 - return remote user name, given socket structures */ |
/* rfc931 - return remote user name, given socket structures */ |
|
|
void |
void rfc931(rmt_sin, our_sin, dest) |
rfc931(struct sockaddr *rmt_sin, struct sockaddr *our_sin, char *dest) |
struct sockaddr *rmt_sin; |
|
struct sockaddr *our_sin; |
|
char *dest; |
{ |
{ |
unsigned rmt_port; |
unsigned rmt_port; |
unsigned our_port; |
unsigned our_port; |
Line 89 rfc931(struct sockaddr *rmt_sin, struct |
|
Line 93 rfc931(struct sockaddr *rmt_sin, struct |
|
char *cp; |
char *cp; |
char *result = unknown; |
char *result = unknown; |
FILE *fp; |
FILE *fp; |
volatile int salen; |
int salen; |
u_short * volatile rmt_portp; |
u_short *rmt_portp; |
u_short * volatile our_portp; |
u_short *our_portp; |
|
|
/* address family must be the same */ |
/* address family must be the same */ |
if (rmt_sin->sa_family != our_sin->sa_family) { |
if (rmt_sin->sa_family != our_sin->sa_family) { |