1b528cefcSMark Murray /*- 2b528cefcSMark Murray * Copyright (c) 1992, 1993 3b528cefcSMark Murray * The Regents of the University of California. All rights reserved. 4b528cefcSMark Murray * 5b528cefcSMark Murray * Redistribution and use in source and binary forms, with or without 6b528cefcSMark Murray * modification, are permitted provided that the following conditions 7b528cefcSMark Murray * are met: 8b528cefcSMark Murray * 1. Redistributions of source code must retain the above copyright 9b528cefcSMark Murray * notice, this list of conditions and the following disclaimer. 10b528cefcSMark Murray * 2. Redistributions in binary form must reproduce the above copyright 11b528cefcSMark Murray * notice, this list of conditions and the following disclaimer in the 12b528cefcSMark Murray * documentation and/or other materials provided with the distribution. 13b528cefcSMark Murray * 3. All advertising materials mentioning features or use of this software 14b528cefcSMark Murray * must display the following acknowledgement: 15b528cefcSMark Murray * This product includes software developed by the University of 16b528cefcSMark Murray * California, Berkeley and its contributors. 17b528cefcSMark Murray * 4. Neither the name of the University nor the names of its contributors 18b528cefcSMark Murray * may be used to endorse or promote products derived from this software 19b528cefcSMark Murray * without specific prior written permission. 20b528cefcSMark Murray * 21b528cefcSMark Murray * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 22b528cefcSMark Murray * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23b528cefcSMark Murray * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24b528cefcSMark Murray * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 25b528cefcSMark Murray * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26b528cefcSMark Murray * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27b528cefcSMark Murray * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28b528cefcSMark Murray * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29b528cefcSMark Murray * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30b528cefcSMark Murray * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31b528cefcSMark Murray * SUCH DAMAGE. 32b528cefcSMark Murray * 33b528cefcSMark Murray * @(#)extern.h 8.2 (Berkeley) 4/4/94 34b528cefcSMark Murray */ 35b528cefcSMark Murray 36b528cefcSMark Murray #ifndef _EXTERN_H_ 37b528cefcSMark Murray #define _EXTERN_H_ 38b528cefcSMark Murray 39b528cefcSMark Murray #ifdef HAVE_SYS_TYPES_H 40b528cefcSMark Murray #include <sys/types.h> 41b528cefcSMark Murray #endif 42b528cefcSMark Murray #ifdef HAVE_NETINET_IN_H 43b528cefcSMark Murray #include <netinet/in.h> 44b528cefcSMark Murray #endif 45b528cefcSMark Murray #ifdef HAVE_NETDB_H 46b528cefcSMark Murray #include <netdb.h> 47b528cefcSMark Murray #endif 48b528cefcSMark Murray 49b528cefcSMark Murray #include <stdio.h> 50b528cefcSMark Murray #include <stdarg.h> 51b528cefcSMark Murray #ifdef HAVE_PWD_H 52b528cefcSMark Murray #include <pwd.h> 53b528cefcSMark Murray #endif 54b528cefcSMark Murray 55b528cefcSMark Murray #ifdef HAVE_LIMITS_H 56b528cefcSMark Murray #include <limits.h> 57b528cefcSMark Murray #endif 58b528cefcSMark Murray 59b528cefcSMark Murray #ifndef NBBY 60b528cefcSMark Murray #define NBBY CHAR_BIT 61b528cefcSMark Murray #endif 62b528cefcSMark Murray 63b528cefcSMark Murray void abor(void); 64b528cefcSMark Murray void blkfree(char **); 65b528cefcSMark Murray char **copyblk(char **); 66*ae771770SStanislav Sedov void cwd(const char *); 67b528cefcSMark Murray void do_delete(char *); 68b528cefcSMark Murray void dologout(int); 69b528cefcSMark Murray void eprt(char *); 70b528cefcSMark Murray void epsv(char *); 71b528cefcSMark Murray void fatal(char *); 72b528cefcSMark Murray int filename_check(char *); 73b528cefcSMark Murray int ftpd_pclose(FILE *); 74b528cefcSMark Murray FILE *ftpd_popen(char *, char *, int, int); 75b528cefcSMark Murray char *ftpd_getline(char *, int); 76b528cefcSMark Murray void ftpd_logwtmp(char *, char *, char *); 77b528cefcSMark Murray void lreply(int, const char *, ...) 785e9cd1aeSAssar Westerlund __attribute__ ((format (printf, 2, 3))); 79b528cefcSMark Murray void makedir(char *); 80b528cefcSMark Murray void nack(char *); 81b528cefcSMark Murray void nreply(const char *, ...) 825e9cd1aeSAssar Westerlund __attribute__ ((format (printf, 1, 2))); 83b528cefcSMark Murray void pass(char *); 84b528cefcSMark Murray void pasv(void); 85b528cefcSMark Murray void perror_reply(int, const char *); 86b528cefcSMark Murray void pwd(void); 87b528cefcSMark Murray void removedir(char *); 88b528cefcSMark Murray void renamecmd(char *, char *); 89b528cefcSMark Murray char *renamefrom(char *); 90b528cefcSMark Murray void reply(int, const char *, ...) 915e9cd1aeSAssar Westerlund __attribute__ ((format (printf, 2, 3))); 92b528cefcSMark Murray void retrieve(const char *, char *); 93b528cefcSMark Murray void send_file_list(char *); 94b528cefcSMark Murray void setproctitle(const char *, ...) 955e9cd1aeSAssar Westerlund __attribute__ ((format (printf, 1, 2))); 96b528cefcSMark Murray void statcmd(void); 97b528cefcSMark Murray void statfilecmd(char *); 98b528cefcSMark Murray void do_store(char *, char *, int); 99b528cefcSMark Murray void upper(char *); 100b528cefcSMark Murray void user(char *); 101b528cefcSMark Murray void yyerror(char *); 102b528cefcSMark Murray 103b528cefcSMark Murray void list_file(char*); 104b528cefcSMark Murray 105b528cefcSMark Murray void kauth(char *, char*); 106b528cefcSMark Murray void klist(void); 107b528cefcSMark Murray void cond_kdestroy(void); 108b528cefcSMark Murray void kdestroy(void); 109b528cefcSMark Murray void krbtkfile(const char *tkfile); 110c19800e8SDoug Rabson void afslog(const char *, int); 111b528cefcSMark Murray void afsunlog(void); 112b528cefcSMark Murray 113c19800e8SDoug Rabson extern int do_destroy_tickets; 114c19800e8SDoug Rabson extern char *k5ccname; 115c19800e8SDoug Rabson 116b528cefcSMark Murray int find(char *); 117b528cefcSMark Murray 1188373020dSJacques Vidrine int builtin_ls(FILE*, const char*); 119b528cefcSMark Murray 120b528cefcSMark Murray int do_login(int code, char *passwd); 121b528cefcSMark Murray int klogin(char *name, char *password); 122b528cefcSMark Murray 123b528cefcSMark Murray const char *ftp_rooted(const char *path); 124b528cefcSMark Murray 125b528cefcSMark Murray extern struct sockaddr *ctrl_addr, *his_addr; 126b528cefcSMark Murray extern char hostname[]; 127b528cefcSMark Murray 128b528cefcSMark Murray extern struct sockaddr *data_dest; 129b528cefcSMark Murray extern int logged_in; 130b528cefcSMark Murray extern struct passwd *pw; 131b528cefcSMark Murray extern int guest; 132*ae771770SStanislav Sedov extern int dochroot; 133b528cefcSMark Murray extern int logging; 134b528cefcSMark Murray extern int type; 135b528cefcSMark Murray extern off_t file_size; 136b528cefcSMark Murray extern off_t byte_count; 137c19800e8SDoug Rabson extern int ccc_passed; 138b528cefcSMark Murray 139b528cefcSMark Murray extern int form; 140b528cefcSMark Murray extern int debug; 141b528cefcSMark Murray extern int ftpd_timeout; 142b528cefcSMark Murray extern int maxtimeout; 143b528cefcSMark Murray extern int pdata; 144b528cefcSMark Murray extern char hostname[], remotehost[]; 145b528cefcSMark Murray extern char proctitle[]; 146b528cefcSMark Murray extern int usedefault; 147b528cefcSMark Murray extern char tmpline[]; 148*ae771770SStanislav Sedov extern int paranoid; 149b528cefcSMark Murray 150b528cefcSMark Murray #endif /* _EXTERN_H_ */ 151