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