Deleted Added
sdiff udiff text old ( 133936 ) new ( 161764 )
full compact
1/* $NetBSD: extern.h,v 1.50 2004-08-09 12:56:47 lukem Exp $ */
2
3/*-
4 * Copyright (c) 1992, 1993
5 * The Regents of the University of California. All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:

--- 17 unchanged lines hidden (view full) ---

27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * SUCH DAMAGE.
30 *
31 * @(#)extern.h 8.2 (Berkeley) 4/4/94
32 */
33
34/*-
35 * Copyright (c) 1997-2004 The NetBSD Foundation, Inc.
36 * All rights reserved.
37 *
38 * This code is derived from software contributed to The NetBSD Foundation
39 * by Luke Mewburn.
40 *
41 * Redistribution and use in source and binary forms, with or without
42 * modification, are permitted provided that the following conditions
43 * are met:

--- 125 unchanged lines hidden (view full) ---

169void send_file_list(const char *);
170void show_chdir_messages(int);
171void sizecmd(const char *);
172void statcmd(void);
173void statfilecmd(const char *);
174void statxfer(void);
175void store(const char *, const char *, int);
176void user(const char *);
177char *xstrdup(const char *);
178void yyerror(char *);
179
180#ifdef SUPPORT_UTMP
181struct utmp;
182
183void ftpd_logwtmp(const char *, const char *, const char *);
184void ftpd_login(const struct utmp *ut);
185int ftpd_logout(const char *line);
186#endif
187
188#ifdef SUPPORT_UTMPX
189struct utmpx;
190
191void ftpd_loginx(const struct utmpx *);
192void ftpd_logwtmpx(const char *, const char *, const char *, int, int);
193#endif
194
195#include <netinet/in.h>
196
197#if defined(__NetBSD__)
198# define HAVE_SETPROCTITLE 1
199# define HAVE_SOCKADDR_SA_LEN 1
200#endif

--- 45 unchanged lines hidden (view full) ---

246 CLASS_GUEST,
247 CLASS_CHROOT,
248 CLASS_REAL
249} class_ft;
250
251typedef enum {
252 FLAG_checkportcmd = 1<<0, /* Check port commands */
253 FLAG_denyquick = 1<<1, /* Check ftpusers(5) before PASS */
254 FLAG_modify = 1<<2, /* Allow CHMOD, DELE, MKD, RMD, RNFR,
255 UMASK */
256 FLAG_passive = 1<<3, /* Allow PASV mode */
257 FLAG_private = 1<<4, /* Don't publish class info in STAT */
258 FLAG_sanenames = 1<<5, /* Restrict names of uploaded files */
259 FLAG_upload = 1<<6, /* As per modify, but also allow
260 APPE, STOR, STOU */
261} classflag_t;
262
263#define CURCLASS_FLAGS_SET(x) (curclass.flags |= (FLAG_ ## x))
264#define CURCLASS_FLAGS_CLR(x) (curclass.flags &= ~(FLAG_ ## x))
265#define CURCLASS_FLAGS_ISSET(x) (curclass.flags & (FLAG_ ## x))
266
267struct ftpclass {

--- 17 unchanged lines hidden (view full) ---

285 LLT rateget; /* Get (RETR) transfer rate throttle */
286 LLT rateput; /* Put (STOR) transfer rate throttle */
287 LLT timeout; /* Default timeout */
288 class_ft type; /* Class type */
289 mode_t umask; /* Umask to use */
290 LLT mmapsize; /* mmap window size */
291 LLT readsize; /* data read size */
292 LLT writesize; /* data write size */
293 LLT sendbufsize; /* SO_SNDBUF size */
294 LLT sendlowat; /* SO_SNDLOWAT size */
295};
296
297extern void ftp_loop(void) __attribute__ ((noreturn));
298extern void ftp_handle_line(char *);
299
300#ifndef GLOBAL
301#define GLOBAL extern
302#endif
303
304
305GLOBAL struct sockinet ctrl_addr;
306GLOBAL struct sockinet data_dest;
307GLOBAL struct sockinet data_source;
308GLOBAL struct sockinet his_addr;
309GLOBAL struct sockinet pasv_addr;
310GLOBAL int connections;
311GLOBAL struct ftpclass curclass;
312GLOBAL int debug;
313GLOBAL char *emailaddr;
314GLOBAL int form;
315GLOBAL int gidcount; /* number of entries in gidlist[] */
316GLOBAL gid_t *gidlist;
317GLOBAL int hasyyerrored;
318GLOBAL char hostname[MAXHOSTNAMELEN+1];
319GLOBAL char homedir[MAXPATHLEN];
320#ifdef KERBEROS5

--- 58 unchanged lines hidden ---