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/*- |
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 *); |
177char *ftpd_strdup(const char *); |
178void yyerror(char *); 179 180#ifdef SUPPORT_UTMP 181struct utmp; 182 |
183void ftpd_initwtmp(void); |
184void ftpd_logwtmp(const char *, const char *, const char *); |
185void ftpd_login(const struct utmp *); 186int ftpd_logout(const char *); |
187#endif 188 189#ifdef SUPPORT_UTMPX 190struct utmpx; |
191struct sockinet; |
192 |
193void ftpd_initwtmpx(void); 194void ftpd_logwtmpx(const char *, const char *, const char *, 195 struct sockinet *, int, int); |
196void ftpd_loginx(const struct utmpx *); |
197int ftpd_logoutx(const char *, int, int); |
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 */ |
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, |
263 UMASK */ |
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 |
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 */ |
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; |
321GLOBAL int ftpd_debug; |
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 --- |