#include #include #include "socket.h" #include "in.h" #include #include #include #include #include extern int errno ; char *rfhost ; static char buf[BUFSIZ] ; static struct saddr_in sin ; static int s ; static FILE *sfp = NULL ; #define TIMEOUT 60 /* seconds */ #define REPLY 'A' #define ERR 'E' #define RFOPEN 00001 #define RFCLOSE 00002 #define RFCREAT 00004 #define RFREAD 00010 #define RFWRITE 00020 #define RFSEEK 00040 #define RFSTAT 00100 #define RFACCESS 00200 #define RDOPEN 01000 #define RDCLOSE 02000 #define RDCREAT 04000 #define RDSEEK 010000 static struct rreq { u_long type ; u_short flags ; u_short fd ; u_long offset ; u_long count ; } req ; #define SVC "rfs" #define PROTO "tcp" #define RBIT 0100