extern.h revision 1.77
11.77Sroy/* $NetBSD: extern.h,v 1.77 2009/07/13 19:05:41 roy Exp $ */ 21.43Slukem 31.43Slukem/*- 41.76Slukem * Copyright (c) 1996-2009 The NetBSD Foundation, Inc. 51.43Slukem * All rights reserved. 61.43Slukem * 71.43Slukem * This code is derived from software contributed to The NetBSD Foundation 81.43Slukem * by Luke Mewburn. 91.43Slukem * 101.43Slukem * Redistribution and use in source and binary forms, with or without 111.43Slukem * modification, are permitted provided that the following conditions 121.43Slukem * are met: 131.43Slukem * 1. Redistributions of source code must retain the above copyright 141.43Slukem * notice, this list of conditions and the following disclaimer. 151.43Slukem * 2. Redistributions in binary form must reproduce the above copyright 161.43Slukem * notice, this list of conditions and the following disclaimer in the 171.43Slukem * documentation and/or other materials provided with the distribution. 181.43Slukem * 191.43Slukem * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 201.43Slukem * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 211.43Slukem * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 221.43Slukem * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 231.43Slukem * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 241.43Slukem * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 251.43Slukem * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 261.43Slukem * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 271.43Slukem * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 281.43Slukem * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 291.43Slukem * POSSIBILITY OF SUCH DAMAGE. 301.43Slukem */ 311.32Sitojun 321.40Slukem/*- 331.40Slukem * Copyright (c) 1994 The Regents of the University of California. 341.32Sitojun * All rights reserved. 351.40Slukem * 361.32Sitojun * Redistribution and use in source and binary forms, with or without 371.32Sitojun * modification, are permitted provided that the following conditions 381.32Sitojun * are met: 391.32Sitojun * 1. Redistributions of source code must retain the above copyright 401.32Sitojun * notice, this list of conditions and the following disclaimer. 411.32Sitojun * 2. Redistributions in binary form must reproduce the above copyright 421.32Sitojun * notice, this list of conditions and the following disclaimer in the 431.32Sitojun * documentation and/or other materials provided with the distribution. 441.62Sagc * 3. Neither the name of the University nor the names of its contributors 451.32Sitojun * may be used to endorse or promote products derived from this software 461.32Sitojun * without specific prior written permission. 471.40Slukem * 481.40Slukem * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 491.32Sitojun * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 501.32Sitojun * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 511.40Slukem * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 521.32Sitojun * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 531.32Sitojun * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 541.32Sitojun * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 551.32Sitojun * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 561.32Sitojun * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 571.32Sitojun * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 581.32Sitojun * SUCH DAMAGE. 591.40Slukem * 601.40Slukem * @(#)extern.h 8.3 (Berkeley) 10/9/94 611.32Sitojun */ 621.4Stls 631.40Slukem/* 641.40Slukem * Copyright (C) 1997 and 1998 WIDE Project. 651.1Scgd * All rights reserved. 661.66Slukem * 671.1Scgd * Redistribution and use in source and binary forms, with or without 681.1Scgd * modification, are permitted provided that the following conditions 691.1Scgd * are met: 701.1Scgd * 1. Redistributions of source code must retain the above copyright 711.1Scgd * notice, this list of conditions and the following disclaimer. 721.1Scgd * 2. Redistributions in binary form must reproduce the above copyright 731.1Scgd * notice, this list of conditions and the following disclaimer in the 741.1Scgd * documentation and/or other materials provided with the distribution. 751.40Slukem * 3. Neither the name of the project nor the names of its contributors 761.1Scgd * may be used to endorse or promote products derived from this software 771.1Scgd * without specific prior written permission. 781.66Slukem * 791.40Slukem * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND 801.1Scgd * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 811.1Scgd * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 821.40Slukem * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE 831.1Scgd * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 841.1Scgd * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 851.1Scgd * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 861.1Scgd * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 871.1Scgd * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 881.1Scgd * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 891.1Scgd * SUCH DAMAGE. 901.1Scgd */ 911.1Scgd 921.21Sthorpejstruct sockaddr; 931.26Sitohystruct tm; 941.55Sitojunstruct addrinfo; 951.1Scgd 961.54Slukemvoid abort_remote(FILE *); 971.54Slukemvoid abort_squared(int); 981.54Slukemvoid abortpt(int); 991.54Slukemvoid abortxfer(int); 1001.54Slukemvoid account(int, char **); 1011.55Sitojunvoid ai_unmapped(struct addrinfo *); 1021.54Slukemint another(int *, char ***, const char *); 1031.54Slukemint auto_fetch(int, char **); 1041.56Slukemint auto_put(int, char **, const char *); 1051.54Slukemvoid blkfree(char **); 1061.54Slukemvoid cd(int, char **); 1071.54Slukemvoid cdup(int, char **); 1081.54Slukemvoid changetype(int, int); 1091.54Slukemvoid cleanuppeer(void); 1101.54Slukemvoid cmdabort(int); 1111.54Slukemvoid cmdtimeout(int); 1121.54Slukemvoid cmdscanner(void); 1131.60Sisint command(const char *, ...) 1141.60Sis __attribute__((__format__(__printf__, 1, 2))); 1151.29Scgd#ifndef NO_EDITCOMPLETE 1161.54Slukemunsigned char complete(EditLine *, int); 1171.54Slukemvoid controlediting(void); 1181.29Scgd#endif /* !NO_EDITCOMPLETE */ 1191.54Slukemvoid crankrate(int); 1201.54SlukemFILE *dataconn(const char *); 1211.54Slukemvoid delete(int, char **); 1221.54Slukemvoid disconnect(int, char **); 1231.54Slukemvoid do_chmod(int, char **); 1241.54Slukemvoid do_umask(int, char **); 1251.54Slukemvoid domacro(int, char **); 1261.54Slukemvoid doproxy(int, char **); 1271.58Slukemvoid feat(int, char **); 1281.54Slukemvoid fget(int, char **); 1291.63Slukemint fileindir(const char *, const char *); 1301.54Slukemint foregroundproc(void); 1311.54Slukemvoid formatbuf(char *, size_t, const char *); 1321.54Slukemvoid ftpvis(char *, size_t, const char *, size_t); 1331.54Slukemint ftp_login(const char *, const char *, const char *); 1341.54Slukemvoid get(int, char **); 1351.54Slukemstruct cmd *getcmd(const char *); 1361.54Slukemint getit(int, char **, int, const char *); 1371.77Sroyint get_line(FILE *, char *, size_t, const char **); 1381.54Slukemstruct option *getoption(const char *); 1391.54Slukemchar *getoptionvalue(const char *); 1401.58Slukemvoid getremoteinfo(void); 1411.54Slukemint getreply(int); 1421.54Slukemchar *globulize(const char *); 1431.54Slukemchar *gunique(const char *); 1441.54Slukemvoid help(int, char **); 1451.76Slukemchar *hookup(const char *, const char *); 1461.54Slukemvoid idlecmd(int, char **); 1471.54Slukemint initconn(void); 1481.54Slukemvoid intr(int); 1491.54Slukemint isipv6addr(const char *); 1501.54Slukemvoid list_vertical(StringList *); 1511.54Slukemvoid lcd(int, char **); 1521.54Slukemvoid lostpeer(int); 1531.54Slukemvoid lpage(int, char **); 1541.54Slukemvoid lpwd(int, char **); 1551.54Slukemvoid ls(int, char **); 1561.54Slukemvoid macdef(int, char **); 1571.54Slukemvoid makeargv(void); 1581.54Slukemvoid makedir(int, char **); 1591.54Slukemvoid mdelete(int, char **); 1601.54Slukemvoid mget(int, char **); 1611.54Slukemvoid mls(int, char **); 1621.58Slukemvoid mlst(int, char **); 1631.54Slukemvoid modtime(int, char **); 1641.54Slukemvoid mput(int, char **); 1651.68Slukemconst char *onoff(int); 1661.58Slukemvoid opts(int, char **); 1671.54Slukemvoid newer(int, char **); 1681.54Slukemvoid page(int, char **); 1691.54Slukemint parserate(int, char **, int); 1701.54Slukemchar *prompt(void); 1711.54Slukemvoid proxabort(int); 1721.54Slukemvoid proxtrans(const char *, const char *, const char *); 1731.54Slukemvoid psabort(int); 1741.54Slukemvoid pswitch(int); 1751.54Slukemvoid put(int, char **); 1761.54Slukemvoid pwd(int, char **); 1771.54Slukemvoid quit(int, char **); 1781.54Slukemvoid quote(int, char **); 1791.54Slukemvoid quote1(const char *, int, char **); 1801.54Slukemvoid recvrequest(const char *, const char *, const char *, 1811.54Slukem const char *, int, int); 1821.54Slukemvoid reget(int, char **); 1831.68Slukemchar *remglob(char **, int, const char **); 1841.57Slukemtime_t remotemodtime(const char *, int); 1851.54Slukemoff_t remotesize(const char *, int); 1861.54Slukemvoid removedir(int, char **); 1871.54Slukemvoid renamefile(int, char **); 1881.54Slukemvoid reset(int, char **); 1891.54Slukemvoid restart(int, char **); 1901.72Slukemconst char *rfc2822time(const struct tm *); 1911.54Slukemvoid rmthelp(int, char **); 1921.54Slukemvoid rmtstatus(int, char **); 1931.54Slukemchar *rprompt(void); 1941.69Slukemint ruserpass(const char *, char **, char **, char **); 1951.54Slukemvoid sendrequest(const char *, const char *, const char *, int); 1961.54Slukemvoid setascii(int, char **); 1971.54Slukemvoid setbell(int, char **); 1981.54Slukemvoid setbinary(int, char **); 1991.54Slukemvoid setcase(int, char **); 2001.54Slukemvoid setcr(int, char **); 2011.54Slukemvoid setdebug(int, char **); 2021.54Slukemvoid setedit(int, char **); 2031.54Slukemvoid setepsv4(int, char **); 2041.75Sskdvoid setepsv6(int, char **); 2051.75Sskdvoid setepsv(int, char **); 2061.54Slukemvoid setform(int, char **); 2071.54Slukemvoid setftmode(int, char **); 2081.54Slukemvoid setgate(int, char **); 2091.54Slukemvoid setglob(int, char **); 2101.54Slukemvoid sethash(int, char **); 2111.54Slukemvoid setnmap(int, char **); 2121.54Slukemvoid setntrans(int, char **); 2131.54Slukemvoid setoption(int, char **); 2141.54Slukemvoid setpassive(int, char **); 2151.54Slukemvoid setpeer(int, char **); 2161.54Slukemvoid setport(int, char **); 2171.54Slukemvoid setpreserve(int, char **); 2181.54Slukemvoid setprogress(int, char **); 2191.54Slukemvoid setprompt(int, char **); 2201.54Slukemvoid setrate(int, char **); 2211.54Slukemvoid setrunique(int, char **); 2221.54Slukemvoid setstruct(int, char **); 2231.54Slukemvoid setsunique(int, char **); 2241.54Slukemvoid settenex(int, char **); 2251.54Slukemvoid settrace(int, char **); 2261.54Slukemvoid setttywidth(int); 2271.54Slukemvoid settype(int, char **); 2281.54Slukemvoid setupsockbufsize(int); 2291.54Slukemvoid setverbose(int, char **); 2301.54Slukemvoid setxferbuf(int, char **); 2311.76Slukemvoid set_option(const char *, const char *, int); 2321.54Slukemvoid shell(int, char **); 2331.54Slukemvoid site(int, char **); 2341.54Slukemvoid sizecmd(int, char **); 2351.54Slukemchar *slurpstring(void); 2361.54Slukemvoid status(int, char **); 2371.54Slukemint strsuftoi(const char *); 2381.54Slukemvoid syst(int, char **); 2391.54Slukemint togglevar(int, char **, int *, const char *); 2401.54Slukemvoid unsetoption(int, char **); 2411.63Slukemvoid updatelocalcwd(void); 2421.63Slukemvoid updateremotecwd(void); 2431.54Slukemvoid usage(void); 2441.54Slukemvoid user(int, char **); 2451.70Schristosint ftp_connect(int, const struct sockaddr *, socklen_t); 2461.70Schristosint ftp_listen(int, int); 2471.70Schristosint ftp_poll(struct pollfd *, int, int); 2481.70Schristosvoid *ftp_malloc(size_t); 2491.70SchristosStringList *ftp_sl_init(void); 2501.70Schristosvoid ftp_sl_add(StringList *, char *); 2511.70Schristoschar *ftp_strdup(const char *); 252