11.84Schristos/* $NetBSD: extern.h,v 1.84 2024/10/04 18:06:53 christos Exp $ */ 21.43Slukem 31.43Slukem/*- 41.83Smlelstv * Copyright (c) 1996-2023 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 account(int, char **); 981.55Sitojunvoid ai_unmapped(struct addrinfo *); 991.54Slukemint another(int *, char ***, const char *); 1001.54Slukemint auto_fetch(int, char **); 1011.56Slukemint auto_put(int, char **, const char *); 1021.54Slukemvoid blkfree(char **); 1031.54Slukemvoid cd(int, char **); 1041.54Slukemvoid cdup(int, char **); 1051.54Slukemvoid changetype(int, int); 1061.54Slukemvoid cleanuppeer(void); 1071.54Slukemvoid cmdabort(int); 1081.54Slukemvoid cmdtimeout(int); 1091.54Slukemvoid cmdscanner(void); 1101.60Sisint command(const char *, ...) 1111.60Sis __attribute__((__format__(__printf__, 1, 2))); 1121.29Scgd#ifndef NO_EDITCOMPLETE 1131.54Slukemunsigned char complete(EditLine *, int); 1141.54Slukemvoid controlediting(void); 1151.29Scgd#endif /* !NO_EDITCOMPLETE */ 1161.54Slukemvoid crankrate(int); 1171.54SlukemFILE *dataconn(const char *); 1181.54Slukemvoid delete(int, char **); 1191.54Slukemvoid disconnect(int, char **); 1201.54Slukemvoid do_chmod(int, char **); 1211.54Slukemvoid do_umask(int, char **); 1221.54Slukemvoid domacro(int, char **); 1231.54Slukemvoid doproxy(int, char **); 1241.58Slukemvoid feat(int, char **); 1251.54Slukemvoid fget(int, char **); 1261.63Slukemint fileindir(const char *, const char *); 1271.54Slukemint foregroundproc(void); 1281.54Slukemvoid formatbuf(char *, size_t, const char *); 1291.54Slukemvoid ftpvis(char *, size_t, const char *, size_t); 1301.54Slukemint ftp_login(const char *, const char *, const char *); 1311.54Slukemvoid get(int, char **); 1321.54Slukemstruct cmd *getcmd(const char *); 1331.54Slukemint getit(int, char **, int, const char *); 1341.77Sroyint get_line(FILE *, char *, size_t, const char **); 1351.54Slukemstruct option *getoption(const char *); 1361.54Slukemchar *getoptionvalue(const char *); 1371.58Slukemvoid getremoteinfo(void); 1381.54Slukemint getreply(int); 1391.54Slukemchar *globulize(const char *); 1401.84Schristoschar *gunique(char *); 1411.54Slukemvoid help(int, char **); 1421.76Slukemchar *hookup(const char *, const char *); 1431.54Slukemvoid idlecmd(int, char **); 1441.54Slukemint initconn(void); 1451.79Sjoerg__dead void intr(int); 1461.54Slukemint isipv6addr(const char *); 1471.54Slukemvoid list_vertical(StringList *); 1481.54Slukemvoid lcd(int, char **); 1491.54Slukemvoid lostpeer(int); 1501.54Slukemvoid lpage(int, char **); 1511.54Slukemvoid lpwd(int, char **); 1521.54Slukemvoid ls(int, char **); 1531.54Slukemvoid macdef(int, char **); 1541.54Slukemvoid makeargv(void); 1551.54Slukemvoid makedir(int, char **); 1561.54Slukemvoid mdelete(int, char **); 1571.54Slukemvoid mget(int, char **); 1581.54Slukemvoid mls(int, char **); 1591.58Slukemvoid mlst(int, char **); 1601.54Slukemvoid modtime(int, char **); 1611.54Slukemvoid mput(int, char **); 1621.68Slukemconst char *onoff(int); 1631.58Slukemvoid opts(int, char **); 1641.54Slukemvoid newer(int, char **); 1651.54Slukemvoid page(int, char **); 1661.78Slukemconst char *parse_rfc2616time(struct tm *, const char *); 1671.54Slukemint parserate(int, char **, int); 1681.54Slukemchar *prompt(void); 1691.79Sjoerg__dead void proxabort(int); 1701.54Slukemvoid proxtrans(const char *, const char *, const char *); 1711.54Slukemvoid psabort(int); 1721.54Slukemvoid pswitch(int); 1731.54Slukemvoid put(int, char **); 1741.54Slukemvoid pwd(int, char **); 1751.54Slukemvoid quit(int, char **); 1761.81Smrgvoid justquit(void) __dead; 1771.54Slukemvoid quote(int, char **); 1781.54Slukemvoid quote1(const char *, int, char **); 1791.84Schristosvoid recvrequest(const char *, char *, const char *, 1801.54Slukem const char *, int, int); 1811.54Slukemvoid reget(int, char **); 1821.68Slukemchar *remglob(char **, int, const char **); 1831.57Slukemtime_t remotemodtime(const char *, int); 1841.54Slukemoff_t remotesize(const char *, int); 1851.54Slukemvoid removedir(int, char **); 1861.54Slukemvoid renamefile(int, char **); 1871.54Slukemvoid reset(int, char **); 1881.54Slukemvoid restart(int, char **); 1891.72Slukemconst char *rfc2822time(const struct tm *); 1901.54Slukemvoid rmthelp(int, char **); 1911.54Slukemvoid rmtstatus(int, char **); 1921.54Slukemchar *rprompt(void); 1931.69Slukemint ruserpass(const char *, char **, char **, char **); 1941.54Slukemvoid sendrequest(const char *, const char *, const char *, int); 1951.54Slukemvoid setascii(int, char **); 1961.54Slukemvoid setbell(int, char **); 1971.54Slukemvoid setbinary(int, char **); 1981.54Slukemvoid setcase(int, char **); 1991.54Slukemvoid setcr(int, char **); 2001.54Slukemvoid setdebug(int, char **); 2011.54Slukemvoid setedit(int, char **); 2021.54Slukemvoid setepsv4(int, char **); 2031.75Sskdvoid setepsv6(int, char **); 2041.75Sskdvoid setepsv(int, char **); 2051.54Slukemvoid setform(int, char **); 2061.54Slukemvoid setftmode(int, char **); 2071.54Slukemvoid setgate(int, char **); 2081.54Slukemvoid setglob(int, char **); 2091.54Slukemvoid sethash(int, char **); 2101.54Slukemvoid setnmap(int, char **); 2111.54Slukemvoid setntrans(int, char **); 2121.54Slukemvoid setoption(int, char **); 2131.54Slukemvoid setpassive(int, char **); 2141.54Slukemvoid setpeer(int, char **); 2151.54Slukemvoid setport(int, char **); 2161.54Slukemvoid setpreserve(int, char **); 2171.54Slukemvoid setprogress(int, char **); 2181.54Slukemvoid setprompt(int, char **); 2191.54Slukemvoid setrate(int, char **); 2201.54Slukemvoid setrunique(int, char **); 2211.54Slukemvoid setstruct(int, char **); 2221.54Slukemvoid setsunique(int, char **); 2231.54Slukemvoid settenex(int, char **); 2241.54Slukemvoid settrace(int, char **); 2251.54Slukemvoid setttywidth(int); 2261.54Slukemvoid settype(int, char **); 2271.54Slukemvoid setupsockbufsize(int); 2281.54Slukemvoid setverbose(int, char **); 2291.54Slukemvoid setxferbuf(int, char **); 2301.76Slukemvoid set_option(const char *, const char *, int); 2311.54Slukemvoid shell(int, char **); 2321.54Slukemvoid site(int, char **); 2331.54Slukemvoid sizecmd(int, char **); 2341.54Slukemchar *slurpstring(void); 2351.54Slukemvoid status(int, char **); 2361.54Slukemint strsuftoi(const char *); 2371.54Slukemvoid syst(int, char **); 2381.54Slukemint togglevar(int, char **, int *, const char *); 2391.54Slukemvoid unsetoption(int, char **); 2401.63Slukemvoid updatelocalcwd(void); 2411.63Slukemvoid updateremotecwd(void); 2421.54Slukemvoid user(int, char **); 2431.80Sisint ftp_connect(int, const struct sockaddr *, socklen_t, int); 2441.70Schristosint ftp_listen(int, int); 2451.70Schristosint ftp_poll(struct pollfd *, int, int); 2461.83Smlelstvint ftp_truthy(const char *, const char *, int); 2471.82Schristos#ifndef SMALL 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 *); 2521.82Schristos#else 2531.82Schristos#define ftp_malloc(a) malloc(a); 2541.82Schristos#define ftp_sl_init() sl_init() 2551.82Schristos#define ftp_sl_add(a, b) sl_add((a), (b)) 2561.82Schristos#define ftp_strdup(a) strdup(a) 2571.82Schristos#endif 258