1/*	$NetBSD: extern.h,v 1.12 2009/11/15 10:12:37 lukem Exp $	*/
2/*	from	NetBSD: extern.h,v 1.77 2009/07/13 19:05:41 roy Exp	*/
3
4/*-
5 * Copyright (c) 1996-2009 The NetBSD Foundation, Inc.
6 * All rights reserved.
7 *
8 * This code is derived from software contributed to The NetBSD Foundation
9 * by Luke Mewburn.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 * 1. Redistributions of source code must retain the above copyright
15 *    notice, this list of conditions and the following disclaimer.
16 * 2. Redistributions in binary form must reproduce the above copyright
17 *    notice, this list of conditions and the following disclaimer in the
18 *    documentation and/or other materials provided with the distribution.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
21 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
22 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 * POSSIBILITY OF SUCH DAMAGE.
31 */
32
33/*-
34 * Copyright (c) 1994 The Regents of the University of California.
35 * All rights reserved.
36 *
37 * Redistribution and use in source and binary forms, with or without
38 * modification, are permitted provided that the following conditions
39 * are met:
40 * 1. Redistributions of source code must retain the above copyright
41 *    notice, this list of conditions and the following disclaimer.
42 * 2. Redistributions in binary form must reproduce the above copyright
43 *    notice, this list of conditions and the following disclaimer in the
44 *    documentation and/or other materials provided with the distribution.
45 * 3. Neither the name of the University nor the names of its contributors
46 *    may be used to endorse or promote products derived from this software
47 *    without specific prior written permission.
48 *
49 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
50 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
51 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
52 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
53 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
54 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
55 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
56 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
57 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
58 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
59 * SUCH DAMAGE.
60 *
61 *	@(#)extern.h	8.3 (Berkeley) 10/9/94
62 */
63
64/*
65 * Copyright (C) 1997 and 1998 WIDE Project.
66 * All rights reserved.
67 *
68 * Redistribution and use in source and binary forms, with or without
69 * modification, are permitted provided that the following conditions
70 * are met:
71 * 1. Redistributions of source code must retain the above copyright
72 *    notice, this list of conditions and the following disclaimer.
73 * 2. Redistributions in binary form must reproduce the above copyright
74 *    notice, this list of conditions and the following disclaimer in the
75 *    documentation and/or other materials provided with the distribution.
76 * 3. Neither the name of the project nor the names of its contributors
77 *    may be used to endorse or promote products derived from this software
78 *    without specific prior written permission.
79 *
80 * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
81 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
82 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
83 * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
84 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
85 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
86 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
87 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
88 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
89 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
90 * SUCH DAMAGE.
91 */
92
93struct sockaddr;
94struct tm;
95struct addrinfo;
96
97void	abort_remote(FILE *);
98void	abort_squared(int);
99void	abortpt(int);
100void	abortxfer(int);
101void	account(int, char **);
102void	ai_unmapped(struct addrinfo *);
103int	another(int *, char ***, const char *);
104int	auto_fetch(int, char **);
105int	auto_put(int, char **, const char *);
106void	blkfree(char **);
107void	cd(int, char **);
108void	cdup(int, char **);
109void	changetype(int, int);
110void	cleanuppeer(void);
111void	cmdabort(int);
112void	cmdtimeout(int);
113void	cmdscanner(void);
114int	command(const char *, ...)
115     ;
116#ifndef NO_EDITCOMPLETE
117unsigned char complete(EditLine *, int);
118void	controlediting(void);
119#endif /* !NO_EDITCOMPLETE */
120void	crankrate(int);
121FILE   *dataconn(const char *);
122void	delete(int, char **);
123void	disconnect(int, char **);
124void	do_chmod(int, char **);
125void	do_umask(int, char **);
126void	domacro(int, char **);
127void	doproxy(int, char **);
128void	feat(int, char **);
129void	fget(int, char **);
130int	fileindir(const char *, const char *);
131int	foregroundproc(void);
132void	formatbuf(char *, size_t, const char *);
133void	ftpvis(char *, size_t, const char *, size_t);
134int	ftp_login(const char *, const char *, const char *);
135void	get(int, char **);
136struct cmd *getcmd(const char *);
137int	getit(int, char **, int, const char *);
138int	get_line(FILE *, char *, size_t, const char **);
139struct option *getoption(const char *);
140char   *getoptionvalue(const char *);
141void	getremoteinfo(void);
142int	getreply(int);
143char   *globulize(const char *);
144char   *gunique(const char *);
145void	help(int, char **);
146char   *hookup(const char *, const char *);
147void	idlecmd(int, char **);
148int	initconn(void);
149void	intr(int);
150int	isipv6addr(const char *);
151void	list_vertical(StringList *);
152void	lcd(int, char **);
153void	lostpeer(int);
154void	lpage(int, char **);
155void	lpwd(int, char **);
156void	ls(int, char **);
157void	macdef(int, char **);
158void	makeargv(void);
159void	makedir(int, char **);
160void	mdelete(int, char **);
161void	mget(int, char **);
162void	mls(int, char **);
163void	mlst(int, char **);
164void	modtime(int, char **);
165void	mput(int, char **);
166const char *onoff(int);
167void	opts(int, char **);
168void	newer(int, char **);
169void	page(int, char **);
170int	parserate(int, char **, int);
171char   *prompt(void);
172void	proxabort(int);
173void	proxtrans(const char *, const char *, const char *);
174void	psabort(int);
175void	pswitch(int);
176void	put(int, char **);
177void	pwd(int, char **);
178void	quit(int, char **);
179void	quote(int, char **);
180void	quote1(const char *, int, char **);
181void	recvrequest(const char *, const char *, const char *,
182	    const char *, int, int);
183void	reget(int, char **);
184char   *remglob(char **, int, const char **);
185time_t	remotemodtime(const char *, int);
186off_t	remotesize(const char *, int);
187void	removedir(int, char **);
188void	renamefile(int, char **);
189void	reset(int, char **);
190void	restart(int, char **);
191const char *rfc2822time(const struct tm *);
192void	rmthelp(int, char **);
193void	rmtstatus(int, char **);
194char   *rprompt(void);
195int	ruserpass(const char *, char **, char **, char **);
196void	sendrequest(const char *, const char *, const char *, int);
197void	setascii(int, char **);
198void	setbell(int, char **);
199void	setbinary(int, char **);
200void	setcase(int, char **);
201void	setcr(int, char **);
202void	setdebug(int, char **);
203void	setedit(int, char **);
204void	setepsv4(int, char **);
205void	setepsv6(int, char **);
206void	setepsv(int, char **);
207void	setform(int, char **);
208void	setftmode(int, char **);
209void	setgate(int, char **);
210void	setglob(int, char **);
211void	sethash(int, char **);
212void	setnmap(int, char **);
213void	setntrans(int, char **);
214void	setoption(int, char **);
215void	setpassive(int, char **);
216void	setpeer(int, char **);
217void	setport(int, char **);
218void	setpreserve(int, char **);
219void	setprogress(int, char **);
220void	setprompt(int, char **);
221void	setrate(int, char **);
222void	setrunique(int, char **);
223void	setstruct(int, char **);
224void	setsunique(int, char **);
225void	settenex(int, char **);
226void	settrace(int, char **);
227void	setttywidth(int);
228void	settype(int, char **);
229void	setupsockbufsize(int);
230void	setverbose(int, char **);
231void	setxferbuf(int, char **);
232void	set_option(const char *, const char *, int);
233void	shell(int, char **);
234void	site(int, char **);
235void	sizecmd(int, char **);
236char   *slurpstring(void);
237void	status(int, char **);
238int	strsuftoi(const char *);
239void	syst(int, char **);
240int	togglevar(int, char **, int *, const char *);
241void	unsetoption(int, char **);
242void	updatelocalcwd(void);
243void	updateremotecwd(void);
244void	usage(void);
245void	user(int, char **);
246int	ftp_connect(int, const struct sockaddr *, socklen_t);
247int	ftp_listen(int, int);
248int	ftp_poll(struct pollfd *, int, int);
249void   *ftp_malloc(size_t);
250StringList *ftp_sl_init(void);
251void	ftp_sl_add(StringList *, char *);
252char   *ftp_strdup(const char *);
253