ReactOS
0.4.16-dev-125-g798ea90
ftp_var.h
Go to the documentation of this file.
1
//#include <winsock.h>
2
#include <setjmp.h>
3
#include <time.h>
4
5
#include "
fake.h
"
6
#include "
prototypes.h
"
7
8
//typedef void (*Sig_t)(int);
9
10
/* The following defines are from ftp.h and telnet.h from bsd.h */
11
/* All relevent copyrights below apply. */
12
13
#define IAC 255
14
#define DONT 254
15
#define DO 253
16
#define WONT 252
17
#define WILL 251
18
#define SB 250
19
#define GA 249
20
#define EL 248
21
#define EC 247
22
#define AYT 246
23
#define AO 245
24
#define IP 244
25
#define BREAK 243
26
#define DM 242
27
#define NOP 241
28
#define SE 240
29
#define EOR 239
30
#define ABORT 238
31
#define SUSP 237
32
#define xEOF 236
33
34
35
#define MAXPATHLEN 255
36
#define TYPE_A 'A'
37
#define TYPE_I 'I'
38
#define TYPE_E 'E'
39
#define TYPE_L 'L'
40
41
#define PRELIM 1
42
#define COMPLETE 2
43
#define CONTINUE 3
44
#define TRANSIENT 4
45
46
#define MODE_S 1
47
#define MODE_B 2
48
#define MODE_C 3
49
50
#define STRU_F 1
51
#define STRU_R 2
52
#define STRU_P 3
53
54
#define FORM_N 1
55
#define FORM_T 2
56
#define FORM_C 3
57
58
59
/*
60
* Copyright (c) 1985 Regents of the University of California.
61
* All rights reserved.
62
*
63
* Redistribution and use in source and binary forms are permitted
64
* provided that the above copyright notice and this paragraph are
65
* duplicated in all such forms and that any documentation,
66
* advertising materials, and other materials related to such
67
* distribution and use acknowledge that the software was developed
68
* by the University of California, Berkeley. The name of the
69
* University may not be used to endorse or promote products derived
70
* from this software without specific prior written permission.
71
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
72
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
73
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
74
*
75
* @(#)ftp_var.h 5.5 (Berkeley) 6/29/88
76
*/
77
78
/*
79
* FTP global variables.
80
*/
81
82
/*
83
* Options and other state info.
84
*/
85
extern
int
trace
;
/* trace packets exchanged */
86
extern
int
hash
;
/* print # for each buffer transferred */
87
extern
int
sendport
;
/* use PORT cmd for each data connection */
88
extern
int
verbose
;
/* print messages coming back from server */
89
extern
int
connected
;
/* connected to server */
90
extern
int
fromatty
;
/* input is from a terminal */
91
extern
int
interactive
;
/* interactively prompt on m* cmds */
92
extern
int
debug
;
/* debugging level */
93
extern
int
bell
;
/* ring bell on cmd completion */
94
extern
int
doglob
;
/* glob local file names */
95
extern
int
proxy
;
/* proxy server connection active */
96
extern
int
proxflag
;
/* proxy connection exists */
97
extern
int
sunique
;
/* store files on server with unique name */
98
extern
int
runique
;
/* store local files with unique name */
99
extern
int
mcase
;
/* map upper to lower case for mget names */
100
extern
int
ntflag
;
/* use ntin ntout tables for name translation */
101
extern
int
mapflag
;
/* use mapin mapout templates on file names */
102
extern
int
code
;
/* return/reply code for ftp command */
103
extern
int
crflag
;
/* if 1, strip car. rets. on ascii gets */
104
extern
char
pasv
[64];
/* passive port for proxy data connection */
105
extern
int
passivemode
;
/* passive mode enabled */
106
extern
char
*
altarg
;
/* argv[1] with no shell-like preprocessing */
107
extern
char
ntin
[17];
/* input translation table */
108
extern
char
ntout
[17];
/* output translation table */
109
110
extern
char
mapin
[
MAXPATHLEN
];
/* input map template */
111
extern
char
mapout
[
MAXPATHLEN
];
/* output map template */
112
extern
char
typename
[32];
/* name of file transfer type */
113
extern
int
type
;
/* file transfer type */
114
extern
char
structname
[32];
/* name of file transfer structure */
115
extern
int
stru
;
/* file transfer structure */
116
extern
char
formname
[32];
/* name of file transfer format */
117
extern
int
form
;
/* file transfer format */
118
extern
char
modename
[32];
/* name of file transfer mode */
119
extern
int
mode
;
/* file transfer mode */
120
extern
char
bytename
[32];
/* local byte size in ascii */
121
extern
int
bytesize
;
/* local byte size in binary */
122
123
extern
jmp_buf
toplevel
;
/* non-local goto stuff for cmd scanner */
124
125
extern
char
line
[200];
/* input line buffer */
126
extern
char
*
stringbase
;
/* current scan point in line buffer */
127
extern
char
argbuf
[200];
/* argument storage buffer */
128
extern
char
*
argbase
;
/* current storage point in arg buffer */
129
extern
int
margc
;
/* count of arguments on input line */
130
extern
const
char
*
margv
[20];
/* args parsed from input line */
131
extern
int
cpend
;
/* flag: if != 0, then pending server reply */
132
extern
int
mflag
;
/* flag: if != 0, then active multi command */
133
134
extern
int
options
;
/* used during socket creation */
135
136
/*
137
* Format of command table.
138
*/
139
struct
cmd
{
140
const
char
*
c_name
;
/* name of command */
141
const
char
*
c_help
;
/* help string */
142
char
c_bell
;
/* give bell when command completes */
143
char
c_conn
;
/* must be connected to use command */
144
char
c_proxy
;
/* proxy server may execute */
145
void
(*
c_handler
)(
int
argc
,
const
char
*
argv
[]);
/* function to call */
146
};
147
148
struct
macel
{
149
char
mac_name
[9];
/* macro name */
150
char
*
mac_start
;
/* start of macro in macbuf */
151
char
*
mac_end
;
/* end of macro in macbuf */
152
};
153
154
extern
int
macnum
;
/* number of defined macros */
155
extern
struct
macel
macros
[16];
156
extern
char
macbuf
[4096];
157
158
#if defined(__ANSI__) || defined(sparc)
159
typedef
void
sig_t
;
160
#else
161
typedef
int
sig_t
;
162
#endif
163
164
typedef
int
uid_t
;
165
argc
static int argc
Definition:
ServiceArgs.c:12
jmp_buf
_JBTYPE jmp_buf[_JBLEN]
Definition:
setjmp.h:186
fake.h
formname
char formname[32]
Definition:
main.c:88
verbose
int verbose
Definition:
main.c:60
passivemode
int passivemode
Definition:
main.c:68
mcase
int mcase
Definition:
main.c:72
proxy
int proxy
Definition:
main.c:67
mode
int mode
Definition:
main.c:91
altarg
char * altarg
Definition:
main.c:78
argbuf
char argbuf[200]
Definition:
main.c:99
pasv
char pasv[64]
Definition:
main.c:77
margv
const char * margv[20]
Definition:
main.c:102
mapin
char mapin[MAXPATHLEN]
Definition:
main.c:82
crflag
int crflag
Definition:
main.c:76
code
int code
Definition:
main.c:75
macnum
int macnum
Definition:
main.c:108
sunique
int sunique
Definition:
main.c:70
argbase
char * argbase
Definition:
main.c:100
bell
int bell
Definition:
main.c:65
ntin
char ntin[17]
Definition:
main.c:79
ntout
char ntout[17]
Definition:
main.c:80
macbuf
char macbuf[4096]
Definition:
main.c:110
form
int form
Definition:
main.c:89
proxflag
int proxflag
Definition:
main.c:69
hash
int hash
Definition:
main.c:58
stru
int stru
Definition:
main.c:87
options
int options
Definition:
main.c:106
trace
int trace
Definition:
main.c:57
runique
int runique
Definition:
main.c:71
cpend
int cpend
Definition:
main.c:103
macros
struct macel macros[16]
Definition:
main.c:109
connected
int connected
Definition:
main.c:61
mapout
char mapout[MAXPATHLEN]
Definition:
main.c:83
fromatty
int fromatty
Definition:
main.c:62
mflag
int mflag
Definition:
finger.c:66
mapflag
int mapflag
Definition:
main.c:74
ntflag
int ntflag
Definition:
main.c:73
debug
int debug
Definition:
main.c:64
bytesize
int bytesize
Definition:
main.c:93
margc
int margc
Definition:
main.c:101
modename
char modename[32]
Definition:
main.c:90
type
int type
Definition:
main.c:85
stringbase
char * stringbase
Definition:
main.c:98
sig_t
int sig_t
Definition:
ftp_var.h:161
doglob
int doglob
Definition:
main.c:66
MAXPATHLEN
#define MAXPATHLEN
Definition:
ftp_var.h:35
structname
char structname[32]
Definition:
main.c:86
toplevel
jmp_buf toplevel
Definition:
main.c:95
sendport
int sendport
Definition:
main.c:117
interactive
int interactive
Definition:
main.c:63
bytename
char bytename[32]
Definition:
main.c:92
uid_t
int uid_t
Definition:
ftp_var.h:164
void
Definition:
nsiface.idl:2307
argv
#define argv
Definition:
mplay32.c:18
prototypes.h
cmd
Definition:
ftp_var.h:139
cmd::c_bell
char c_bell
Definition:
ftp_var.h:142
cmd::c_handler
void(* c_handler)(int argc, const char *argv[])
Definition:
ftp_var.h:145
cmd::c_proxy
char c_proxy
Definition:
ftp_var.h:144
cmd::c_help
const char * c_help
Definition:
ftp_var.h:141
cmd::c_conn
char c_conn
Definition:
ftp_var.h:143
cmd::c_name
const char * c_name
Definition:
ftp_var.h:140
line
Definition:
parser.c:49
macel
Definition:
ftp_var.h:148
macel::mac_name
char mac_name[9]
Definition:
ftp_var.h:149
macel::mac_start
char * mac_start
Definition:
ftp_var.h:150
macel::mac_end
char * mac_end
Definition:
ftp_var.h:151
base
applications
network
ftp
ftp_var.h
Generated on Mon Oct 14 2024 06:02:26 for ReactOS by
1.9.6