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 #include <setjmp.h> 52b528cefcSMark Murray #ifdef HAVE_PWD_H 53b528cefcSMark Murray #include <pwd.h> 54b528cefcSMark Murray #endif 55b528cefcSMark Murray 56b528cefcSMark Murray #ifdef HAVE_LIMITS_H 57b528cefcSMark Murray #include <limits.h> 58b528cefcSMark Murray #endif 59b528cefcSMark Murray 60b528cefcSMark Murray #ifndef NBBY 61b528cefcSMark Murray #define NBBY CHAR_BIT 62b528cefcSMark Murray #endif 63b528cefcSMark Murray 64b528cefcSMark Murray void abor(void); 65b528cefcSMark Murray void blkfree(char **); 66b528cefcSMark Murray char **copyblk(char **); 67b528cefcSMark Murray void cwd(char *); 68b528cefcSMark Murray void do_delete(char *); 69b528cefcSMark Murray void dologout(int); 70b528cefcSMark Murray void eprt(char *); 71b528cefcSMark Murray void epsv(char *); 72b528cefcSMark Murray void fatal(char *); 73b528cefcSMark Murray int filename_check(char *); 74b528cefcSMark Murray int ftpd_pclose(FILE *); 75b528cefcSMark Murray FILE *ftpd_popen(char *, char *, int, int); 76b528cefcSMark Murray char *ftpd_getline(char *, int); 77b528cefcSMark Murray void ftpd_logwtmp(char *, char *, char *); 78b528cefcSMark Murray void lreply(int, const char *, ...) 795e9cd1aeSAssar Westerlund __attribute__ ((format (printf, 2, 3))); 80b528cefcSMark Murray void makedir(char *); 81b528cefcSMark Murray void nack(char *); 82b528cefcSMark Murray void nreply(const char *, ...) 835e9cd1aeSAssar Westerlund __attribute__ ((format (printf, 1, 2))); 84b528cefcSMark Murray void pass(char *); 85b528cefcSMark Murray void pasv(void); 86b528cefcSMark Murray void perror_reply(int, const char *); 87b528cefcSMark Murray void pwd(void); 88b528cefcSMark Murray void removedir(char *); 89b528cefcSMark Murray void renamecmd(char *, char *); 90b528cefcSMark Murray char *renamefrom(char *); 91b528cefcSMark Murray void reply(int, const char *, ...) 925e9cd1aeSAssar Westerlund __attribute__ ((format (printf, 2, 3))); 93b528cefcSMark Murray void retrieve(const char *, char *); 94b528cefcSMark Murray void send_file_list(char *); 95b528cefcSMark Murray void setproctitle(const char *, ...) 965e9cd1aeSAssar Westerlund __attribute__ ((format (printf, 1, 2))); 97b528cefcSMark Murray void statcmd(void); 98b528cefcSMark Murray void statfilecmd(char *); 99b528cefcSMark Murray void do_store(char *, char *, int); 100b528cefcSMark Murray void upper(char *); 101b528cefcSMark Murray void user(char *); 102b528cefcSMark Murray void yyerror(char *); 103b528cefcSMark Murray 104b528cefcSMark Murray void list_file(char*); 105b528cefcSMark Murray 106b528cefcSMark Murray void kauth(char *, char*); 107b528cefcSMark Murray void klist(void); 108b528cefcSMark Murray void cond_kdestroy(void); 109b528cefcSMark Murray void kdestroy(void); 110b528cefcSMark Murray void krbtkfile(const char *tkfile); 111b528cefcSMark Murray void afslog(const char *cell); 112b528cefcSMark Murray void afsunlog(void); 113b528cefcSMark Murray 114b528cefcSMark Murray int find(char *); 115b528cefcSMark Murray 1168373020dSJacques Vidrine int builtin_ls(FILE*, const char*); 117b528cefcSMark Murray 118b528cefcSMark Murray int do_login(int code, char *passwd); 119b528cefcSMark Murray int klogin(char *name, char *password); 120b528cefcSMark Murray 121b528cefcSMark Murray const char *ftp_rooted(const char *path); 122b528cefcSMark Murray 123b528cefcSMark Murray extern struct sockaddr *ctrl_addr, *his_addr; 124b528cefcSMark Murray extern char hostname[]; 125b528cefcSMark Murray 126b528cefcSMark Murray extern struct sockaddr *data_dest; 127b528cefcSMark Murray extern int logged_in; 128b528cefcSMark Murray extern struct passwd *pw; 129b528cefcSMark Murray extern int guest; 130b528cefcSMark Murray extern int logging; 131b528cefcSMark Murray extern int type; 132b528cefcSMark Murray extern int oobflag; 133b528cefcSMark Murray extern off_t file_size; 134b528cefcSMark Murray extern off_t byte_count; 135b528cefcSMark Murray extern jmp_buf urgcatch; 136b528cefcSMark Murray 137b528cefcSMark Murray extern int form; 138b528cefcSMark Murray extern int debug; 139b528cefcSMark Murray extern int ftpd_timeout; 140b528cefcSMark Murray extern int maxtimeout; 141b528cefcSMark Murray extern int pdata; 142b528cefcSMark Murray extern char hostname[], remotehost[]; 143b528cefcSMark Murray extern char proctitle[]; 144b528cefcSMark Murray extern int usedefault; 145b528cefcSMark Murray extern int transflag; 146b528cefcSMark Murray extern char tmpline[]; 147b528cefcSMark Murray 148b528cefcSMark Murray #endif /* _EXTERN_H_ */ 149