Deleted Added
full compact
extern.h (133936) extern.h (161764)
1/* $NetBSD: extern.h,v 1.50 2004-08-09 12:56:47 lukem Exp $ */
1/* $NetBSD: extern.h,v 1.55 2006/02/01 14:20:12 christos 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/*-
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.
35 * Copyright (c) 1997-2005 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 *);
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 *);
177char *ftpd_strdup(const char *);
178void yyerror(char *);
179
180#ifdef SUPPORT_UTMP
181struct utmp;
182
178void yyerror(char *);
179
180#ifdef SUPPORT_UTMP
181struct utmp;
182
183void ftpd_initwtmp(void);
183void ftpd_logwtmp(const char *, const char *, const char *);
184void ftpd_logwtmp(const char *, const char *, const char *);
184void ftpd_login(const struct utmp *ut);
185int ftpd_logout(const char *line);
185void ftpd_login(const struct utmp *);
186int ftpd_logout(const char *);
186#endif
187
188#ifdef SUPPORT_UTMPX
189struct utmpx;
187#endif
188
189#ifdef SUPPORT_UTMPX
190struct utmpx;
191struct sockinet;
190
192
193void ftpd_initwtmpx(void);
194void ftpd_logwtmpx(const char *, const char *, const char *,
195 struct sockinet *, int, int);
191void ftpd_loginx(const struct utmpx *);
196void ftpd_loginx(const struct utmpx *);
192void ftpd_logwtmpx(const char *, const char *, const char *, int, int);
197int ftpd_logoutx(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 */
198#endif
199
200#include <netinet/in.h>
201
202#if defined(__NetBSD__)
203# define HAVE_SETPROCTITLE 1
204# define HAVE_SOCKADDR_SA_LEN 1
205#endif

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

251 CLASS_GUEST,
252 CLASS_CHROOT,
253 CLASS_REAL
254} class_ft;
255
256typedef enum {
257 FLAG_checkportcmd = 1<<0, /* Check port commands */
258 FLAG_denyquick = 1<<1, /* Check ftpusers(5) before PASS */
254 FLAG_modify = 1<<2, /* Allow CHMOD, DELE, MKD, RMD, RNFR,
259 FLAG_hidesymlinks = 1<<2, /* For symbolic links, list the file
260 or directory the link references
261 rather than the link itself */
262 FLAG_modify = 1<<3, /* Allow CHMOD, DELE, MKD, RMD, RNFR,
255 UMASK */
263 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
264 FLAG_passive = 1<<4, /* Allow PASV mode */
265 FLAG_private = 1<<5, /* Don't publish class info in STAT */
266 FLAG_sanenames = 1<<6, /* Restrict names of uploaded files */
267 FLAG_upload = 1<<7, /* 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 */
268 APPE, STOR, STOU */
269} classflag_t;
270
271#define CURCLASS_FLAGS_SET(x) (curclass.flags |= (FLAG_ ## x))
272#define CURCLASS_FLAGS_CLR(x) (curclass.flags &= ~(FLAG_ ## x))
273#define CURCLASS_FLAGS_ISSET(x) (curclass.flags & (FLAG_ ## x))
274
275struct ftpclass {

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

293 LLT rateget; /* Get (RETR) transfer rate throttle */
294 LLT rateput; /* Put (STOR) transfer rate throttle */
295 LLT timeout; /* Default timeout */
296 class_ft type; /* Class type */
297 mode_t umask; /* Umask to use */
298 LLT mmapsize; /* mmap window size */
299 LLT readsize; /* data read size */
300 LLT writesize; /* data write size */
301 LLT recvbufsize; /* SO_RCVBUF 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;
302 LLT sendbufsize; /* SO_SNDBUF size */
303 LLT sendlowat; /* SO_SNDLOWAT size */
304};
305
306extern void ftp_loop(void) __attribute__ ((noreturn));
307extern void ftp_handle_line(char *);
308
309#ifndef GLOBAL
310#define GLOBAL extern
311#endif
312
313
314GLOBAL struct sockinet ctrl_addr;
315GLOBAL struct sockinet data_dest;
316GLOBAL struct sockinet data_source;
317GLOBAL struct sockinet his_addr;
318GLOBAL struct sockinet pasv_addr;
319GLOBAL int connections;
320GLOBAL struct ftpclass curclass;
312GLOBAL int debug;
321GLOBAL int ftpd_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 ---
322GLOBAL char *emailaddr;
323GLOBAL int form;
324GLOBAL int gidcount; /* number of entries in gidlist[] */
325GLOBAL gid_t *gidlist;
326GLOBAL int hasyyerrored;
327GLOBAL char hostname[MAXHOSTNAMELEN+1];
328GLOBAL char homedir[MAXPATHLEN];
329#ifdef KERBEROS5

--- 58 unchanged lines hidden ---