net.c File Reference

#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/wait.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <fcntl.h>
#include <signal.h>
#include <errno.h>
#include <net/netlib.h>
#include <net/hton.h>
#include <net/gen/netdb.h>
#include <net/gen/in.h>
#include <net/gen/inet.h>
#include <net/gen/tcp.h>
#include <net/gen/tcp_io.h>
#include "ftp.h"
#include "file.h"
#include "net.h"

Include dependency graph for net.c:

Go to the source code of this file.

Defines

#define hiword(x)   ((u16_t)((x) >> 16))
#define loword(x)   ((u16_t)(x & 0xffff))
#define hibyte(x)   (((x) >> 8) & 0xff)
#define lobyte(x)   ((x) & 0xff)

Functions

 _PROTOTYPE (void donothing,(int sig))
void NETinit ()
int DOopen ()
int DOclose ()
int DOquit ()
void donothing (int sig)
int DOdata (char *datacom, char *file, int direction, int fd)

Variables

static int ftpcomm_fd
static ipaddr_t myip
static ipaddr_t hostip
static char host [256]
static int lpid


Define Documentation

#define hibyte x   )     (((x) >> 8) & 0xff)
 

Referenced by doPASV().

#define hiword x   )     ((u16_t)((x) >> 16))
 

Referenced by doPASV().

#define lobyte x   )     ((x) & 0xff)
 

Referenced by doPASV().

#define loword x   )     ((u16_t)(x & 0xffff))
 

Referenced by doPASV().


Function Documentation

_PROTOTYPE void  donothing,
(int sig
 

int DOclose  ) 
 

Definition at line 166 of file net.c.

References close, fclose(), fpcommin, fpcommout, linkopen, loggedin, and printf.

Referenced by DOquit().

int DOdata char *  datacom,
char *  file,
int  direction,
int  fd
 

Definition at line 202 of file net.c.

References atoi, buff, close, DOcommand(), dummy, ftpdata_fd, getenv(), HTONS, i, NULL, O_RDWR, open, passive, perror(), printf, reply, s, strchr, and tcp_device.

Referenced by DOappe(), DOlist(), DOMretr(), DOMstor(), DOnlst(), DOretr(), DOrretr(), DOrstor(), DOstor(), and DOstou().

void donothing int  sig  ) 
 

Definition at line 197 of file net.c.

int DOopen  ) 
 

Definition at line 68 of file net.c.

References close, cmdargc, cmdargv, DOgetreply(), fclose(), fdopen(), fpcommin, fpcommout, fprintf(), getenv(), gethostbyname, getservbyname(), hostent::h_length, inet_addr(), ioctl, linkopen, memcpy(), NULL, NWIOGTCPCONF, NWIOSTCPCONF, NWIOTCPCONN, nwio_tcpconf::nwtc_flags, NWTC_LP_SEL, nwio_tcpconf::nwtc_remaddr, nwio_tcpconf::nwtc_remport, NWTC_SET_RA, NWTC_SET_RP, nwio_tcpcl::nwtcl_flags, O_RDWR, open, perror(), printf, readline(), s, stderr, strncpy(), and tcp_device.

Referenced by main().

int DOquit  ) 
 

Definition at line 183 of file net.c.

References DOclose(), DOcommand(), exit(), linkopen, printf, and s.

void NETinit  ) 
 

Definition at line 40 of file net.c.

References close, exit(), getenv(), ioctl, NULL, NWIOGTCPCONF, nwio_tcpconf::nwtc_locaddr, O_RDWR, open, perror(), s, TCP_DEVICE, and tcp_device.

Referenced by main().


Variable Documentation

int ftpcomm_fd [static]
 

Definition at line 34 of file net.c.

char host[256] [static]
 

Definition at line 37 of file net.c.

Referenced by getanswer(), gethostent(), getinfo(), main(), netfinger(), proxy(), and write_log().

ipaddr_t hostip [static]
 

Definition at line 36 of file net.c.

int lpid [static]
 

Definition at line 38 of file net.c.

Referenced by CleanUpPasv(), and DataConnect().

ipaddr_t myip [static]
 

Definition at line 35 of file net.c.


Generated on Fri Apr 14 23:03:22 2006 for minix by  doxygen 1.4.6