xref: /freebsd/crypto/heimdal/appl/ftp/ftp/extern.h (revision e0c4386e)
1 /*-
2  * Copyright (c) 1994 The Regents of the University of California.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  * 1. Redistributions of source code must retain the above copyright
9  *    notice, this list of conditions and the following disclaimer.
10  * 2. Redistributions in binary form must reproduce the above copyright
11  *    notice, this list of conditions and the following disclaimer in the
12  *    documentation and/or other materials provided with the distribution.
13  * 3. All advertising materials mentioning features or use of this software
14  *    must display the following acknowledgement:
15  *	This product includes software developed by the University of
16  *	California, Berkeley and its contributors.
17  * 4. Neither the name of the University nor the names of its contributors
18  *    may be used to endorse or promote products derived from this software
19  *    without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31  * SUCH DAMAGE.
32  *
33  *	@(#)extern.h	8.3 (Berkeley) 10/9/94
34  */
35 
36 /* $Id$ */
37 
38 #include <setjmp.h>
39 #include <stdlib.h>
40 #ifdef TIME_WITH_SYS_TIME
41 #include <sys/time.h>
42 #include <time.h>
43 #elif defined(HAVE_SYS_TIME_H)
44 #include <sys/time.h>
45 #else
46 #include <time.h>
47 #endif
48 #ifdef HAVE_SYS_SELECT_H
49 #include <sys/select.h>
50 #endif
51 
52 void    abort_remote (FILE *);
53 void    abortpt (int);
54 void    abortrecv (int);
55 void	account (int, char **);
56 int	another (int *, char ***, char *);
57 void	blkfree (char **);
58 void	cd (int, char **);
59 void	cdup (int, char **);
60 void	changetype (int, int);
61 void	cmdabort (int);
62 void	cmdscanner (int);
63 int	command (char *fmt, ...)
64     __attribute__ ((format (printf, 1,2)));
65 int	confirm (char *, char *);
66 FILE   *dataconn (const char *);
67 void	delete (int, char **);
68 void	disconnect (int, char **);
69 void	do_chmod (int, char **);
70 void	do_umask (int, char **);
71 void	domacro (int, char **);
72 char   *domap (char *);
73 void	doproxy (int, char **);
74 char   *dotrans (char *);
75 int     empty (fd_set *, int);
76 void	fatal (char *);
77 void	get (int, char **);
78 struct cmd *getcmd (char *);
79 int	getit (int, char **, int, char *);
80 int	getreply (int);
81 int	globulize (char **);
82 char   *gunique (char *);
83 void	help (int, char **);
84 char   *hookup (const char *, int);
85 void	ftp_idle (int, char **);
86 int     initconn (void);
87 void	intr (int);
88 void	lcd (int, char **);
89 int	login (char *);
90 RETSIGTYPE	lostpeer (int);
91 void	ls (int, char **);
92 void	macdef (int, char **);
93 void	makeargv (void);
94 void	makedir (int, char **);
95 void	mdelete (int, char **);
96 void	mget (int, char **);
97 void	mls (int, char **);
98 void	modtime (int, char **);
99 void	mput (int, char **);
100 char   *onoff (int);
101 void	newer (int, char **);
102 void    proxtrans (char *, char *, char *);
103 void    psabort (int);
104 void    pswitch (int);
105 void    ptransfer (char *, long, struct timeval *, struct timeval *);
106 void	put (int, char **);
107 void	pwd (int, char **);
108 void	quit (int, char **);
109 void	quote (int, char **);
110 void	quote1 (char *, int, char **);
111 void    recvrequest (char *, char *, char *, char *, int, int);
112 void	reget (int, char **);
113 char   *remglob (char **, int);
114 void	removedir (int, char **);
115 void	renamefile (int, char **);
116 void    reset (int, char **);
117 void	restart (int, char **);
118 void	rmthelp (int, char **);
119 void	rmtstatus (int, char **);
120 int	ruserpassword (char *, char **, char **, char **);
121 void    sendrequest (char *, char *, char *, char *, int);
122 void	setascii (int, char **);
123 void	setbell (int, char **);
124 void	setbinary (int, char **);
125 void	setcase (int, char **);
126 void	setcr (int, char **);
127 void	setdebug (int, char **);
128 void	setform (int, char **);
129 void	setftmode (int, char **);
130 void	setglob (int, char **);
131 void	sethash (int, char **);
132 void	setnmap (int, char **);
133 void	setntrans (int, char **);
134 void	setpassive (int, char **);
135 void	setpeer (int, char **);
136 void	setport (int, char **);
137 void	setprompt (int, char **);
138 void	setrunique (int, char **);
139 void	setstruct (int, char **);
140 void	setsunique (int, char **);
141 void	settenex (int, char **);
142 void	settrace (int, char **);
143 void	settype (int, char **);
144 void	setverbose (int, char **);
145 void	shell (int, char **);
146 void	site (int, char **);
147 void	sizecmd (int, char **);
148 char   *slurpstring (void);
149 void	status (int, char **);
150 void	syst (int, char **);
151 void    tvsub (struct timeval *, struct timeval *, struct timeval *);
152 void	user (int, char **);
153 
154 extern jmp_buf	abortprox;
155 extern int	abrtflag;
156 extern struct	cmd cmdtab[];
157 extern FILE	*cout;
158 extern int	data;
159 extern char    *home;
160 extern jmp_buf	jabort;
161 extern int	proxy;
162 extern char	reply_string[];
163 extern off_t	restart_point;
164 extern int	NCMDS;
165 
166 extern char 	username[32];
167 extern char	myhostname[];
168 extern char	*mydomain;
169 
170 void afslog (int, char **);
171 void kauth (int, char **);
172 void kdestroy (int, char **);
173 void klist (int, char **);
174 void krbtkfile (int, char **);
175