1 /* $NetBSD: extern.h,v 1.13 2013/05/05 11:17:30 lukem Exp $ */ 2 /* from NetBSD: extern.h,v 1.80 2012/07/04 06:09:37 is 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 93 struct sockaddr; 94 struct tm; 95 struct addrinfo; 96 97 void abort_remote(FILE *); 98 void account(int, char **); 99 void ai_unmapped(struct addrinfo *); 100 int another(int *, char ***, const char *); 101 int auto_fetch(int, char **); 102 int auto_put(int, char **, const char *); 103 void blkfree(char **); 104 void cd(int, char **); 105 void cdup(int, char **); 106 void changetype(int, int); 107 void cleanuppeer(void); 108 void cmdabort(int); 109 void cmdtimeout(int); 110 void cmdscanner(void); 111 int command(const char *, ...) 112 ; 113 #ifndef NO_EDITCOMPLETE 114 unsigned char complete(EditLine *, int); 115 void controlediting(void); 116 #endif /* !NO_EDITCOMPLETE */ 117 void crankrate(int); 118 FILE *dataconn(const char *); 119 void delete(int, char **); 120 void disconnect(int, char **); 121 void do_chmod(int, char **); 122 void do_umask(int, char **); 123 void domacro(int, char **); 124 void doproxy(int, char **); 125 void feat(int, char **); 126 void fget(int, char **); 127 int fileindir(const char *, const char *); 128 int foregroundproc(void); 129 void formatbuf(char *, size_t, const char *); 130 void ftpvis(char *, size_t, const char *, size_t); 131 int ftp_login(const char *, const char *, const char *); 132 void get(int, char **); 133 struct cmd *getcmd(const char *); 134 int getit(int, char **, int, const char *); 135 int get_line(FILE *, char *, size_t, const char **); 136 struct option *getoption(const char *); 137 char *getoptionvalue(const char *); 138 void getremoteinfo(void); 139 int getreply(int); 140 char *globulize(const char *); 141 char *gunique(const char *); 142 void help(int, char **); 143 char *hookup(const char *, const char *); 144 void idlecmd(int, char **); 145 int initconn(void); 146 __dead void intr(int); 147 int isipv6addr(const char *); 148 void list_vertical(StringList *); 149 void lcd(int, char **); 150 void lostpeer(int); 151 void lpage(int, char **); 152 void lpwd(int, char **); 153 void ls(int, char **); 154 void macdef(int, char **); 155 void makeargv(void); 156 void makedir(int, char **); 157 void mdelete(int, char **); 158 void mget(int, char **); 159 void mls(int, char **); 160 void mlst(int, char **); 161 void modtime(int, char **); 162 void mput(int, char **); 163 const char *onoff(int); 164 void opts(int, char **); 165 void newer(int, char **); 166 void page(int, char **); 167 const char *parse_rfc2616time(struct tm *, const char *); 168 int parserate(int, char **, int); 169 char *prompt(void); 170 __dead void proxabort(int); 171 void proxtrans(const char *, const char *, const char *); 172 void psabort(int); 173 void pswitch(int); 174 void put(int, char **); 175 void pwd(int, char **); 176 void quit(int, char **); 177 void quote(int, char **); 178 void quote1(const char *, int, char **); 179 void recvrequest(const char *, const char *, const char *, 180 const char *, int, int); 181 void reget(int, char **); 182 char *remglob(char **, int, const char **); 183 time_t remotemodtime(const char *, int); 184 off_t remotesize(const char *, int); 185 void removedir(int, char **); 186 void renamefile(int, char **); 187 void reset(int, char **); 188 void restart(int, char **); 189 const char *rfc2822time(const struct tm *); 190 void rmthelp(int, char **); 191 void rmtstatus(int, char **); 192 char *rprompt(void); 193 int ruserpass(const char *, char **, char **, char **); 194 void sendrequest(const char *, const char *, const char *, int); 195 void setascii(int, char **); 196 void setbell(int, char **); 197 void setbinary(int, char **); 198 void setcase(int, char **); 199 void setcr(int, char **); 200 void setdebug(int, char **); 201 void setedit(int, char **); 202 void setepsv4(int, char **); 203 void setepsv6(int, char **); 204 void setepsv(int, char **); 205 void setform(int, char **); 206 void setftmode(int, char **); 207 void setgate(int, char **); 208 void setglob(int, char **); 209 void sethash(int, char **); 210 void setnmap(int, char **); 211 void setntrans(int, char **); 212 void setoption(int, char **); 213 void setpassive(int, char **); 214 void setpeer(int, char **); 215 void setport(int, char **); 216 void setpreserve(int, char **); 217 void setprogress(int, char **); 218 void setprompt(int, char **); 219 void setrate(int, char **); 220 void setrunique(int, char **); 221 void setstruct(int, char **); 222 void setsunique(int, char **); 223 void settenex(int, char **); 224 void settrace(int, char **); 225 void setttywidth(int); 226 void settype(int, char **); 227 void setupsockbufsize(int); 228 void setverbose(int, char **); 229 void setxferbuf(int, char **); 230 void set_option(const char *, const char *, int); 231 void shell(int, char **); 232 void site(int, char **); 233 void sizecmd(int, char **); 234 char *slurpstring(void); 235 void status(int, char **); 236 int strsuftoi(const char *); 237 void syst(int, char **); 238 int togglevar(int, char **, int *, const char *); 239 void unsetoption(int, char **); 240 void updatelocalcwd(void); 241 void updateremotecwd(void); 242 void user(int, char **); 243 int ftp_connect(int, const struct sockaddr *, socklen_t, int); 244 int ftp_listen(int, int); 245 int ftp_poll(struct pollfd *, int, int); 246 void *ftp_malloc(size_t); 247 StringList *ftp_sl_init(void); 248 void ftp_sl_add(StringList *, char *); 249 char *ftp_strdup(const char *); 250