1 /*
   2  * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
   3  * Use is subject to license terms.
   4  */
   5 
   6 #pragma ident   "%Z%%M% %I%     %E% SMI"
   7 
   8 /****************************************************************************    
   9   Copyright (c) 1999,2000 WU-FTPD Development Group.  
  10   All rights reserved.
  11    
  12   Portions Copyright (c) 1980, 1985, 1988, 1989, 1990, 1991, 1993, 1994  
  13     The Regents of the University of California. 
  14   Portions Copyright (c) 1993, 1994 Washington University in Saint Louis.  
  15   Portions Copyright (c) 1996, 1998 Berkeley Software Design, Inc.  
  16   Portions Copyright (c) 1989 Massachusetts Institute of Technology.  
  17   Portions Copyright (c) 1998 Sendmail, Inc.  
  18   Portions Copyright (c) 1983, 1995, 1996, 1997 Eric P.  Allman.  
  19   Portions Copyright (c) 1997 by Stan Barber.  
  20   Portions Copyright (c) 1997 by Kent Landfield.  
  21   Portions Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997  
  22     Free Software Foundation, Inc.    
  23    
  24   Use and distribution of this software and its source code are governed   
  25   by the terms and conditions of the WU-FTPD Software License ("LICENSE").  
  26    
  27   If you did not receive a copy of the license, it may be obtained online  
  28   at http://www.wu-ftpd.org/license.html.  
  29    
  30   $Id: extensions.h,v 1.12 2000/07/01 18:17:39 wuftpd Exp $  
  31    
  32 ****************************************************************************/
  33 #define LOG_IN  0
  34 #define C_WD    1
  35 #define BANNER  2
  36 
  37 #ifndef ALIGN
  38 #define ALIGN(x)        ((x) + (sizeof(long) - (x) % sizeof(long)))
  39 #endif
  40 
  41 #define O_COMPRESS              (1 << 0)  /* file was compressed */
  42 #define O_UNCOMPRESS            (1 << 1)  /* file was uncompressed */
  43 #define O_TAR                   (1 << 2)  /* file was tar'ed */
  44 
  45 #define MAXARGS         50
  46 #define MAXKWLEN        20
  47 
  48 struct aclmember {
  49     struct aclmember *next;
  50     char keyword[MAXKWLEN];
  51     char *arg[MAXARGS];
  52 };
  53 
  54 #define ARG0    entry->arg[0]
  55 #define ARG1    entry->arg[1]
  56 #define ARG2    entry->arg[2]
  57 #define ARG3    entry->arg[3]
  58 #define ARG4    entry->arg[4]
  59 #define ARG5    entry->arg[5]
  60 #define ARG6    entry->arg[6]
  61 #define ARG7    entry->arg[7]
  62 #define ARG8    entry->arg[8]
  63 #define ARG9    entry->arg[9]
  64 #define ARG     entry->arg
  65 
  66 /* Header at start of PID file */
  67 struct pidfile_header {
  68     int     count;
  69     time_t  last_checked;
  70 };
  71 
  72 /* File transfer logging (xferlog) */
  73 #include <sys/param.h>
  74 
  75 #define MAXXFERSTRLEN   (MAXPATHLEN + 1024)
  76 #define MAXSPACTCHARS   4
  77 
  78 struct xferstat {
  79     char    *filename;
  80     char    access_mode;
  81     char    completion;
  82     char    transfer_direction;
  83     char    transfer_type;
  84     char    special_action[MAXSPACTCHARS];
  85     int     auth;
  86     int     transfer_time;
  87     off_t   filesize;
  88     off_t   restart_offset;
  89     off_t   transfer_bytes;
  90 };
  91 extern int xferdone;
  92 extern char xferlog_format[];
  93 extern struct xferstat xfervalues;
  94 
  95 /* Type values for the various passive modes supported by the server */
  96 #define TYPE_PASV       0
  97 #ifdef INET6
  98 #define TYPE_EPSV       1
  99 #define TYPE_LPSV       2
 100 #endif
 101 
 102 #ifdef QUOTA
 103 #ifdef TIME_WITH_SYS_TIME
 104 #include <time.h>
 105 #include <sys/time.h>
 106 #else
 107 #ifdef HAVE_SYS_TIME_H
 108 #include <sys/time.h>
 109 #else
 110 #include <time.h>
 111 #endif
 112 #endif
 113 
 114 #ifdef IRIX
 115 #define QUOTA_BLOCKS
 116 #define QUOTA_DEVICE
 117 #include <mntent.h>
 118 #include <sys/quota.h>
 119 #endif
 120 
 121 #ifdef SOLARIS_2
 122 #define QUOTA_BLOCKS
 123 #define QUOTA_DEVICE
 124 #define HAS_OLDSTYLE_GETMNTENT
 125 #define HAS_NO_QUOTACTL
 126 #include <sys/mntent.h>
 127 #include <sys/mnttab.h>
 128 #include <sys/fs/ufs_quota.h>
 129 #include <sys/types.h>
 130 #include <sys/stat.h>
 131 #include <fcntl.h>
 132 #endif
 133 
 134 #ifdef SUNOS
 135 #define QUOTA_BLOCKS
 136 #define QUOTA_DEVICE
 137 #include <mntent.h>
 138 #include <ufs/quota.h>
 139 #endif
 140 
 141 #ifdef AIX
 142 #include <jfs/quota.h>
 143 #endif
 144 
 145 #ifdef DIGITAL
 146 #include <ufs/quota.h>
 147 #endif
 148 
 149 #ifdef BSDI
 150 #include <ufs/ufs/quota.h>
 151 #endif
 152 
 153 #ifdef LINUX
 154 #define QUOTA_DEVICE
 155 #include <mntent.h>
 156 #include <asm/types.h>
 157 #ifdef HAVE_SYS_QUOTA_H
 158 #include <sys/quota.h>
 159 #else
 160 #include <linux/quota.h>
 161 #endif
 162 #endif
 163 
 164 #ifdef HAVE_FCNTL_H
 165 #include <fcntl.h>
 166 #endif
 167 #ifdef HAVE_SYS_QUOTA_H         /* This is defined only in the autoconf'ed build */
 168 #include <sys/quota.h>
 169 #endif
 170 #ifdef HAVE_MNTENT_H
 171 #include <mntent.h>
 172 #endif
 173 
 174 #endif /* QUOTA */