extern.h revision 1.16 1 1.16 lukem /* $NetBSD: extern.h,v 1.16 1999/05/17 15:14:54 lukem Exp $ */
2 1.2 cgd
3 1.1 deraadt /*-
4 1.1 deraadt * Copyright (c) 1992, 1993
5 1.1 deraadt * The Regents of the University of California. All rights reserved.
6 1.1 deraadt *
7 1.1 deraadt * Redistribution and use in source and binary forms, with or without
8 1.1 deraadt * modification, are permitted provided that the following conditions
9 1.1 deraadt * are met:
10 1.1 deraadt * 1. Redistributions of source code must retain the above copyright
11 1.1 deraadt * notice, this list of conditions and the following disclaimer.
12 1.1 deraadt * 2. Redistributions in binary form must reproduce the above copyright
13 1.1 deraadt * notice, this list of conditions and the following disclaimer in the
14 1.1 deraadt * documentation and/or other materials provided with the distribution.
15 1.1 deraadt * 3. All advertising materials mentioning features or use of this software
16 1.1 deraadt * must display the following acknowledgement:
17 1.1 deraadt * This product includes software developed by the University of
18 1.1 deraadt * California, Berkeley and its contributors.
19 1.1 deraadt * 4. Neither the name of the University nor the names of its contributors
20 1.1 deraadt * may be used to endorse or promote products derived from this software
21 1.1 deraadt * without specific prior written permission.
22 1.1 deraadt *
23 1.1 deraadt * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
24 1.1 deraadt * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25 1.1 deraadt * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26 1.1 deraadt * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
27 1.1 deraadt * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28 1.1 deraadt * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29 1.1 deraadt * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 1.1 deraadt * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 1.1 deraadt * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 1.1 deraadt * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 1.1 deraadt * SUCH DAMAGE.
34 1.1 deraadt *
35 1.2 cgd * @(#)extern.h 8.2 (Berkeley) 4/4/94
36 1.1 deraadt */
37 1.1 deraadt
38 1.1 deraadt void blkfree __P((char **));
39 1.5 lukem char *conffilename __P((const char *));
40 1.1 deraadt char **copyblk __P((char **));
41 1.10 mycroft void cwd __P((const char *));
42 1.16 lukem void delete __P((const char *));
43 1.3 lukem char *do_conversion __P((const char *));
44 1.1 deraadt void dologout __P((int));
45 1.16 lukem void fatal __P((const char *));
46 1.1 deraadt int ftpd_pclose __P((FILE *));
47 1.3 lukem FILE *ftpd_popen __P((char *, char *, int));
48 1.1 deraadt char *getline __P((char *, int, FILE *));
49 1.16 lukem void logcmd __P((const char *, off_t, const char *, const char *,
50 1.16 lukem const struct timeval *, const char *));
51 1.9 mycroft void logwtmp __P((const char *, const char *, const char *));
52 1.1 deraadt void lreply __P((int, const char *, ...));
53 1.16 lukem void makedir __P((const char *));
54 1.4 christos void parse_conf __P((char *));
55 1.16 lukem void pass __P((const char *));
56 1.1 deraadt void passive __P((void));
57 1.10 mycroft void perror_reply __P((int, const char *));
58 1.1 deraadt void pwd __P((void));
59 1.16 lukem void removedir __P((const char *));
60 1.16 lukem void renamecmd __P((const char *, const char *));
61 1.1 deraadt char *renamefrom __P((char *));
62 1.1 deraadt void reply __P((int, const char *, ...));
63 1.16 lukem void retrieve __P((const char *, const char *));
64 1.16 lukem void send_file_list __P((const char *));
65 1.3 lukem void show_chdir_messages __P((int));
66 1.1 deraadt void statcmd __P((void));
67 1.16 lukem void statfilecmd __P((const char *));
68 1.16 lukem void store __P((const char *, const char *, int));
69 1.16 lukem void user __P((const char *));
70 1.12 lukem char *xstrdup __P((const char *));
71 1.1 deraadt void yyerror __P((char *));
72 1.3 lukem
73 1.3 lukem #define CLASS_CHROOT "chroot"
74 1.3 lukem #define CLASS_GUEST "guest"
75 1.3 lukem #define CLASS_REAL "real"
76 1.3 lukem
77 1.3 lukem struct ftpconv {
78 1.3 lukem struct ftpconv *next;
79 1.4 christos char *suffix; /* Suffix of requested name */
80 1.4 christos char *types; /* Valid file types */
81 1.4 christos char *disable; /* File to disable conversions */
82 1.4 christos char *command; /* Command to do the conversion */
83 1.3 lukem };
84 1.3 lukem
85 1.3 lukem struct ftpclass {
86 1.7 lukem int checkportcmd; /* Check PORT commands are valid */
87 1.4 christos char *classname; /* Current class */
88 1.3 lukem struct ftpconv *conversions; /* List of conversions */
89 1.4 christos char *display; /* Files to display upon chdir */
90 1.3 lukem unsigned int maxtimeout; /* Maximum permitted timeout */
91 1.3 lukem int modify; /* Allow dele, mkd, rmd, umask, chmod */
92 1.4 christos char *notify; /* Files to notify about upon chdir */
93 1.8 tv int passive; /* Allow pasv */
94 1.3 lukem unsigned int timeout; /* Default timeout */
95 1.3 lukem mode_t umask; /* Umask to use */
96 1.3 lukem };
97 1.11 lukem
98 1.11 lukem extern int yyparse __P((void));
99 1.11 lukem
100 1.11 lukem extern char cbuf[];
101 1.11 lukem extern struct ftpclass curclass;
102 1.11 lukem extern struct sockaddr_in data_dest;
103 1.11 lukem extern int debug;
104 1.11 lukem extern int form;
105 1.11 lukem extern int guest;
106 1.11 lukem extern int hasyyerrored;
107 1.11 lukem extern struct sockaddr_in his_addr;
108 1.11 lukem extern char hostname[];
109 1.11 lukem #ifdef KERBEROS5
110 1.11 lukem extern krb5_context kcontext;
111 1.11 lukem #endif
112 1.11 lukem extern int logged_in;
113 1.11 lukem extern int logging;
114 1.11 lukem extern int pdata;
115 1.11 lukem extern char proctitle[];
116 1.11 lukem extern struct passwd *pw;
117 1.11 lukem extern char remotehost[];
118 1.11 lukem extern off_t restart_point;
119 1.11 lukem extern char tmpline[];
120 1.14 kleink extern sig_atomic_t transflag;
121 1.11 lukem extern int type;
122 1.11 lukem extern int usedefault;
123 1.11 lukem extern const char version[];
124 1.16 lukem
125 1.16 lukem extern off_t total_data_in, total_data_out, total_data;
126 1.16 lukem extern off_t total_files_in, total_files_out, total_files;
127 1.16 lukem extern off_t total_bytes_in, total_bytes_out, total_bytes;
128 1.16 lukem extern off_t total_xfers_in, total_xfers_out, total_xfers;
129 1.16 lukem
130 1.16 lukem
131 1.16 lukem #define PLURAL(s) ((s) == 1 ? "" : "s")
132