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