You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mod_ftp-commits@incubator.apache.org by ji...@apache.org on 2005/10/06 13:17:04 UTC

svn commit: r306631 [2/8] - in /incubator/mod_ftp/trunk: ./ conf/ docs/ include/ modules/ patches/ src/ tests/ tests/conf/ tests/logs/ tests/tests/ utils/ utils/ftp_proxy/ utils/static_build/ utils/stresstest/

Added: incubator/mod_ftp/trunk/config.sub
URL: http://svn.apache.org/viewcvs/incubator/mod_ftp/trunk/config.sub?rev=306631&view=auto
==============================================================================
--- incubator/mod_ftp/trunk/config.sub (added)
+++ incubator/mod_ftp/trunk/config.sub Thu Oct  6 06:16:28 2005
@@ -0,0 +1,1362 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+#   Free Software Foundation, Inc.
+
+timestamp='2001-04-20'
+
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine.  It does not imply ALL GNU software can.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Please send patches to <co...@gnu.org>.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support.  The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+       $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <co...@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit 0 ;;
+    --version | -v )
+       echo "$version" ; exit 0 ;;
+    --help | --h* | -h )
+       echo "$usage"; exit 0 ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help"
+       exit 1 ;;
+
+    *local*)
+       # First pass through any local machine types.
+       echo $1
+       exit 0;;
+
+    * )
+       break ;;
+  esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+    exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+    exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+  nto-qnx* | linux-gnu* | storm-chaos* | os2-emx*)
+    os=-$maybe_os
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+    ;;
+  *)
+    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+    if [ $basic_machine != $1 ]
+    then os=`echo $1 | sed 's/.*-/-/'`
+    else os=; fi
+    ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work.  We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+	-sun*os*)
+		# Prevent following clause from handling this invalid input.
+		;;
+	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+	-apple | -axis)
+		os=
+		basic_machine=$1
+		;;
+	-sim | -cisco | -oki | -wec | -winbond)
+		os=
+		basic_machine=$1
+		;;
+	-scout)
+		;;
+	-wrs)
+		os=-vxworks
+		basic_machine=$1
+		;;
+	-hiux*)
+		os=-hiuxwe2
+		;;
+	-sco5)
+		os=-sco3.2v5
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco4)
+		os=-sco3.2v4
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco3.2.[4-9]*)
+		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco3.2v[4-9]*)
+		# Don't forget version if it is 3.2v4 or newer.
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco*)
+		os=-sco3.2v2
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-udk*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-isc)
+		os=-isc2.2
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-clix*)
+		basic_machine=clipper-intergraph
+		;;
+	-isc*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-lynx*)
+		os=-lynxos
+		;;
+	-ptx*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+		;;
+	-windowsnt*)
+		os=`echo $os | sed -e 's/windowsnt/winnt/'`
+		;;
+	-psos*)
+		os=-psos
+		;;
+	-mint | -mint[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+	# Recognize the basic CPU types without company name.
+	# Some are omitted here because they have special meanings below.
+	tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc \
+	        | arm | arme[lb] | arm[bl]e | armv[2345] | armv[345][lb] | strongarm | xscale \
+		| pyramid | mn10200 | mn10300 | tron | a29k \
+		| 580 | i960 | h8300 \
+		| x86 | ppcbe | mipsbe | mipsle | shbe | shle \
+		| hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
+		| hppa64 \
+		| alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \
+		| alphaev6[78] \
+		| we32k | ns16k | clipper | i370 | sh | sh[34] \
+		| powerpc | powerpcle \
+		| 1750a | dsp16xx | pdp10 | pdp11 \
+		| mips16 | mips64 | mipsel | mips64el \
+		| mips64orion | mips64orionel | mipstx39 | mipstx39el \
+		| mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
+		| mips64vr5000 | miprs64vr5000el | mcore | s390 | s390x \
+		| sparc | sparclet | sparclite | sparc64 | sparcv9 | sparcv9b \
+		| v850 | c4x \
+		| thumb | d10v | d30v | fr30 | avr | openrisc | tic80 \
+		| pj | pjl | h8500)
+		basic_machine=$basic_machine-unknown
+		;;
+	m6811 | m68hc11 | m6812 | m68hc12)
+		# Motorola 68HC11/12.
+		basic_machine=$basic_machine-unknown
+		os=-none
+		;;
+	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | w65)
+		;;
+
+	# We use `pc' rather than `unknown'
+	# because (1) that's what they normally are, and
+	# (2) the word "unknown" tends to confuse beginning users.
+	i*86 | x86_64)
+	  basic_machine=$basic_machine-pc
+	  ;;
+	# Object if more than one company name word.
+	*-*-*)
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		exit 1
+		;;
+	# Recognize the basic CPU types with company name.
+	# FIXME: clean up the formatting here.
+	vax-* | tahoe-* | i*86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
+	      | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | c[123]* \
+	      | arm-*  | armbe-* | armle-* | armv*-* | strongarm-* | xscale-* \
+	      | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
+	      | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
+	      | xmp-* | ymp-* \
+	      | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* \
+	      | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \
+	      | hppa2.0n-* | hppa64-* \
+	      | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \
+	      | alphaev6[78]-* \
+	      | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
+	      | clipper-* | orion-* \
+	      | sparclite-* | pdp10-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
+	      | sparc64-* | sparcv9-* | sparcv9b-* | sparc86x-* \
+	      | mips16-* | mips64-* | mipsel-* \
+	      | mips64el-* | mips64orion-* | mips64orionel-* \
+	      | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
+	      | mipstx39-* | mipstx39el-* | mcore-* \
+	      | f30[01]-* | f700-* | s390-* | s390x-* | sv1-* | t3e-* \
+	      | [cjt]90-* \
+	      | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
+	      | thumb-* | v850-* | d30v-* | tic30-* | tic80-* | c30-* | fr30-* \
+	      | bs2000-* | tic54x-* | c54x-* | x86_64-* | pj-* | pjl-*)
+		;;
+	# Recognize the various machine names and aliases which stand
+	# for a CPU type and a company and sometimes even an OS.
+	386bsd)
+		basic_machine=i386-unknown
+		os=-bsd
+		;;
+	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+		basic_machine=m68000-att
+		;;
+	3b*)
+		basic_machine=we32k-att
+		;;
+	a29khif)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	adobe68k)
+		basic_machine=m68010-adobe
+		os=-scout
+		;;
+	alliant | fx80)
+		basic_machine=fx80-alliant
+		;;
+	altos | altos3068)
+		basic_machine=m68k-altos
+		;;
+	am29k)
+		basic_machine=a29k-none
+		os=-bsd
+		;;
+	amdahl)
+		basic_machine=580-amdahl
+		os=-sysv
+		;;
+	amiga | amiga-*)
+		basic_machine=m68k-unknown
+		;;
+	amigaos | amigados)
+		basic_machine=m68k-unknown
+		os=-amigaos
+		;;
+	amigaunix | amix)
+		basic_machine=m68k-unknown
+		os=-sysv4
+		;;
+	apollo68)
+		basic_machine=m68k-apollo
+		os=-sysv
+		;;
+	apollo68bsd)
+		basic_machine=m68k-apollo
+		os=-bsd
+		;;
+	aux)
+		basic_machine=m68k-apple
+		os=-aux
+		;;
+	balance)
+		basic_machine=ns32k-sequent
+		os=-dynix
+		;;
+	convex-c1)
+		basic_machine=c1-convex
+		os=-bsd
+		;;
+	convex-c2)
+		basic_machine=c2-convex
+		os=-bsd
+		;;
+	convex-c32)
+		basic_machine=c32-convex
+		os=-bsd
+		;;
+	convex-c34)
+		basic_machine=c34-convex
+		os=-bsd
+		;;
+	convex-c38)
+		basic_machine=c38-convex
+		os=-bsd
+		;;
+	cray | ymp)
+		basic_machine=ymp-cray
+		os=-unicos
+		;;
+	cray2)
+		basic_machine=cray2-cray
+		os=-unicos
+		;;
+	[cjt]90)
+		basic_machine=${basic_machine}-cray
+		os=-unicos
+		;;
+	crds | unos)
+		basic_machine=m68k-crds
+		;;
+	cris | cris-* | etrax*)
+		basic_machine=cris-axis
+		;;
+	da30 | da30-*)
+		basic_machine=m68k-da30
+		;;
+	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+		basic_machine=mips-dec
+		;;
+	delta | 3300 | motorola-3300 | motorola-delta \
+	      | 3300-motorola | delta-motorola)
+		basic_machine=m68k-motorola
+		;;
+	delta88)
+		basic_machine=m88k-motorola
+		os=-sysv3
+		;;
+	dpx20 | dpx20-*)
+		basic_machine=rs6000-bull
+		os=-bosx
+		;;
+	dpx2* | dpx2*-bull)
+		basic_machine=m68k-bull
+		os=-sysv3
+		;;
+	ebmon29k)
+		basic_machine=a29k-amd
+		os=-ebmon
+		;;
+	elxsi)
+		basic_machine=elxsi-elxsi
+		os=-bsd
+		;;
+	encore | umax | mmax)
+		basic_machine=ns32k-encore
+		;;
+	es1800 | OSE68k | ose68k | ose | OSE)
+		basic_machine=m68k-ericsson
+		os=-ose
+		;;
+	fx2800)
+		basic_machine=i860-alliant
+		;;
+	genix)
+		basic_machine=ns32k-ns
+		;;
+	gmicro)
+		basic_machine=tron-gmicro
+		os=-sysv
+		;;
+	go32)
+		basic_machine=i386-pc
+		os=-go32
+		;;
+	h3050r* | hiux*)
+		basic_machine=hppa1.1-hitachi
+		os=-hiuxwe2
+		;;
+	h8300hms)
+		basic_machine=h8300-hitachi
+		os=-hms
+		;;
+	h8300xray)
+		basic_machine=h8300-hitachi
+		os=-xray
+		;;
+	h8500hms)
+		basic_machine=h8500-hitachi
+		os=-hms
+		;;
+	harris)
+		basic_machine=m88k-harris
+		os=-sysv3
+		;;
+	hp300-*)
+		basic_machine=m68k-hp
+		;;
+	hp300bsd)
+		basic_machine=m68k-hp
+		os=-bsd
+		;;
+	hp300hpux)
+		basic_machine=m68k-hp
+		os=-hpux
+		;;
+	hp3k9[0-9][0-9] | hp9[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hp9k2[0-9][0-9] | hp9k31[0-9])
+		basic_machine=m68000-hp
+		;;
+	hp9k3[2-9][0-9])
+		basic_machine=m68k-hp
+		;;
+	hp9k6[0-9][0-9] | hp6[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hp9k7[0-79][0-9] | hp7[0-79][0-9])
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k78[0-9] | hp78[0-9])
+		# FIXME: really hppa2.0-hp
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+		# FIXME: really hppa2.0-hp
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[0-9][13679] | hp8[0-9][13679])
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[0-9][0-9] | hp8[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hppa-next)
+		os=-nextstep3
+		;;
+	hppaosf)
+		basic_machine=hppa1.1-hp
+		os=-osf
+		;;
+	hppro)
+		basic_machine=hppa1.1-hp
+		os=-proelf
+		;;
+	i370-ibm* | ibm*)
+		basic_machine=i370-ibm
+		;;
+# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
+	i*86v32)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv32
+		;;
+	i*86v4*)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv4
+		;;
+	i*86v)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv
+		;;
+	i*86sol2)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-solaris2
+		;;
+	i386mach)
+		basic_machine=i386-mach
+		os=-mach
+		;;
+	i386-vsta | vsta)
+		basic_machine=i386-unknown
+		os=-vsta
+		;;
+	iris | iris4d)
+		basic_machine=mips-sgi
+		case $os in
+		    -irix*)
+			;;
+		    *)
+			os=-irix4
+			;;
+		esac
+		;;
+	isi68 | isi)
+		basic_machine=m68k-isi
+		os=-sysv
+		;;
+	m88k-omron*)
+		basic_machine=m88k-omron
+		;;
+	magnum | m3230)
+		basic_machine=mips-mips
+		os=-sysv
+		;;
+	merlin)
+		basic_machine=ns32k-utek
+		os=-sysv
+		;;
+	mingw32)
+		basic_machine=i386-pc
+		os=-mingw32
+		;;
+	miniframe)
+		basic_machine=m68000-convergent
+		;;
+	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
+	mipsel*-linux*)
+		basic_machine=mipsel-unknown
+		os=-linux-gnu
+		;;
+	mips*-linux*)
+		basic_machine=mips-unknown
+		os=-linux-gnu
+		;;
+	mips3*-*)
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+		;;
+	mips3*)
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+		;;
+	mmix*)
+		basic_machine=mmix-knuth
+		os=-mmixware
+		;;
+	monitor)
+		basic_machine=m68k-rom68k
+		os=-coff
+		;;
+	msdos)
+		basic_machine=i386-pc
+		os=-msdos
+		;;
+	mvs)
+		basic_machine=i370-ibm
+		os=-mvs
+		;;
+	ncr3000)
+		basic_machine=i486-ncr
+		os=-sysv4
+		;;
+	netbsd386)
+		basic_machine=i386-unknown
+		os=-netbsd
+		;;
+	netwinder)
+		basic_machine=armv4l-rebel
+		os=-linux
+		;;
+	news | news700 | news800 | news900)
+		basic_machine=m68k-sony
+		os=-newsos
+		;;
+	news1000)
+		basic_machine=m68030-sony
+		os=-newsos
+		;;
+	news-3600 | risc-news)
+		basic_machine=mips-sony
+		os=-newsos
+		;;
+	necv70)
+		basic_machine=v70-nec
+		os=-sysv
+		;;
+	next | m*-next )
+		basic_machine=m68k-next
+		case $os in
+		    -nextstep* )
+			;;
+		    -ns2*)
+		      os=-nextstep2
+			;;
+		    *)
+		      os=-nextstep3
+			;;
+		esac
+		;;
+	nh3000)
+		basic_machine=m68k-harris
+		os=-cxux
+		;;
+	nh[45]000)
+		basic_machine=m88k-harris
+		os=-cxux
+		;;
+	nindy960)
+		basic_machine=i960-intel
+		os=-nindy
+		;;
+	mon960)
+		basic_machine=i960-intel
+		os=-mon960
+		;;
+	nonstopux)
+		basic_machine=mips-compaq
+		os=-nonstopux
+		;;
+	np1)
+		basic_machine=np1-gould
+		;;
+	nsr-tandem)
+		basic_machine=nsr-tandem
+		;;
+	op50n-* | op60c-*)
+		basic_machine=hppa1.1-oki
+		os=-proelf
+		;;
+	OSE68000 | ose68000)
+		basic_machine=m68000-ericsson
+		os=-ose
+		;;
+	os68k)
+		basic_machine=m68k-none
+		os=-os68k
+		;;
+	pa-hitachi)
+		basic_machine=hppa1.1-hitachi
+		os=-hiuxwe2
+		;;
+	paragon)
+		basic_machine=i860-intel
+		os=-osf
+		;;
+	pbd)
+		basic_machine=sparc-tti
+		;;
+	pbb)
+		basic_machine=m68k-tti
+		;;
+        pc532 | pc532-*)
+		basic_machine=ns32k-pc532
+		;;
+	pentium | p5 | k5 | k6 | nexgen)
+		basic_machine=i586-pc
+		;;
+	pentiumpro | p6 | 6x86 | athlon)
+		basic_machine=i686-pc
+		;;
+	pentiumii | pentium2)
+		basic_machine=i686-pc
+		;;
+	pentium-* | p5-* | k5-* | k6-* | nexgen-*)
+		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentiumpro-* | p6-* | 6x86-* | athlon-*)
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentiumii-* | pentium2-*)
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pn)
+		basic_machine=pn-gould
+		;;
+	power)	basic_machine=power-ibm
+		;;
+	ppc)	basic_machine=powerpc-unknown
+	        ;;
+	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppcle | powerpclittle | ppc-le | powerpc-little)
+		basic_machine=powerpcle-unknown
+	        ;;
+	ppcle-* | powerpclittle-*)
+		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ps2)
+		basic_machine=i386-ibm
+		;;
+	pw32)
+		basic_machine=i586-unknown
+		os=-pw32
+		;;
+	rom68k)
+		basic_machine=m68k-rom68k
+		os=-coff
+		;;
+	rm[46]00)
+		basic_machine=mips-siemens
+		;;
+	rtpc | rtpc-*)
+		basic_machine=romp-ibm
+		;;
+	sa29200)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	sequent)
+		basic_machine=i386-sequent
+		;;
+	sh)
+		basic_machine=sh-hitachi
+		os=-hms
+		;;
+	sparclite-wrs)
+		basic_machine=sparclite-wrs
+		os=-vxworks
+		;;
+	sps7)
+		basic_machine=m68k-bull
+		os=-sysv2
+		;;
+	spur)
+		basic_machine=spur-unknown
+		;;
+	st2000)
+		basic_machine=m68k-tandem
+		;;
+	stratus)
+		basic_machine=i860-stratus
+		os=-sysv4
+		;;
+	sun2)
+		basic_machine=m68000-sun
+		;;
+	sun2os3)
+		basic_machine=m68000-sun
+		os=-sunos3
+		;;
+	sun2os4)
+		basic_machine=m68000-sun
+		os=-sunos4
+		;;
+	sun3os3)
+		basic_machine=m68k-sun
+		os=-sunos3
+		;;
+	sun3os4)
+		basic_machine=m68k-sun
+		os=-sunos4
+		;;
+	sun4os3)
+		basic_machine=sparc-sun
+		os=-sunos3
+		;;
+	sun4os4)
+		basic_machine=sparc-sun
+		os=-sunos4
+		;;
+	sun4sol2)
+		basic_machine=sparc-sun
+		os=-solaris2
+		;;
+	sun3 | sun3-*)
+		basic_machine=m68k-sun
+		;;
+	sun4)
+		basic_machine=sparc-sun
+		;;
+	sun386 | sun386i | roadrunner)
+		basic_machine=i386-sun
+		;;
+	sv1)
+		basic_machine=sv1-cray
+		os=-unicos
+		;;
+	symmetry)
+		basic_machine=i386-sequent
+		os=-dynix
+		;;
+	t3e)
+		basic_machine=t3e-cray
+		os=-unicos
+		;;
+	tic54x | c54x*)
+		basic_machine=tic54x-unknown
+		os=-coff
+		;;
+	tx39)
+		basic_machine=mipstx39-unknown
+		;;
+	tx39el)
+		basic_machine=mipstx39el-unknown
+		;;
+	tower | tower-32)
+		basic_machine=m68k-ncr
+		;;
+	udi29k)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	ultra3)
+		basic_machine=a29k-nyu
+		os=-sym1
+		;;
+	v810 | necv810)
+		basic_machine=v810-nec
+		os=-none
+		;;
+	vaxv)
+		basic_machine=vax-dec
+		os=-sysv
+		;;
+	vms)
+		basic_machine=vax-dec
+		os=-vms
+		;;
+	vpp*|vx|vx-*)
+               basic_machine=f301-fujitsu
+               ;;
+	vxworks960)
+		basic_machine=i960-wrs
+		os=-vxworks
+		;;
+	vxworks68)
+		basic_machine=m68k-wrs
+		os=-vxworks
+		;;
+	vxworks29k)
+		basic_machine=a29k-wrs
+		os=-vxworks
+		;;
+	w65*)
+		basic_machine=w65-wdc
+		os=-none
+		;;
+	w89k-*)
+		basic_machine=hppa1.1-winbond
+		os=-proelf
+		;;
+	xmp)
+		basic_machine=xmp-cray
+		os=-unicos
+		;;
+        xps | xps100)
+		basic_machine=xps100-honeywell
+		;;
+	z8k-*-coff)
+		basic_machine=z8k-unknown
+		os=-sim
+		;;
+	none)
+		basic_machine=none-none
+		os=-none
+		;;
+
+# Here we handle the default manufacturer of certain CPU types.  It is in
+# some cases the only manufacturer, in others, it is the most popular.
+	w89k)
+		basic_machine=hppa1.1-winbond
+		;;
+	op50n)
+		basic_machine=hppa1.1-oki
+		;;
+	op60c)
+		basic_machine=hppa1.1-oki
+		;;
+	mips)
+		if [ x$os = x-linux-gnu ]; then
+			basic_machine=mips-unknown
+		else
+			basic_machine=mips-mips
+		fi
+		;;
+	romp)
+		basic_machine=romp-ibm
+		;;
+	rs6000)
+		basic_machine=rs6000-ibm
+		;;
+	vax)
+		basic_machine=vax-dec
+		;;
+	pdp10)
+		# there are many clones, so DEC is not a safe bet
+		basic_machine=pdp10-unknown
+		;;
+	pdp11)
+		basic_machine=pdp11-dec
+		;;
+	we32k)
+		basic_machine=we32k-att
+		;;
+	sh3 | sh4)
+		basic_machine=sh-unknown
+		;;
+	sparc | sparcv9 | sparcv9b)
+		basic_machine=sparc-sun
+		;;
+        cydra)
+		basic_machine=cydra-cydrome
+		;;
+	orion)
+		basic_machine=orion-highlevel
+		;;
+	orion105)
+		basic_machine=clipper-highlevel
+		;;
+	mac | mpw | mac-mpw)
+		basic_machine=m68k-apple
+		;;
+	pmac | pmac-mpw)
+		basic_machine=powerpc-apple
+		;;
+	c4x*)
+		basic_machine=c4x-none
+		os=-coff
+		;;
+	*-unknown)
+		# Make sure to match an already-canonicalized machine name.
+		;;
+	*)
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		exit 1
+		;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+	*-digital*)
+		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+		;;
+	*-commodore*)
+		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+		;;
+	*)
+		;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+        # First match some system type aliases
+        # that might get confused with valid system types.
+	# -solaris* is a basic system type, with this one exception.
+	-solaris1 | -solaris1.*)
+		os=`echo $os | sed -e 's|solaris1|sunos4|'`
+		;;
+	-solaris)
+		os=-solaris2
+		;;
+	-svr4*)
+		os=-sysv4
+		;;
+	-unixware*)
+		os=-sysv4.2uw
+		;;
+	-gnu/linux*)
+		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+		;;
+	# First accept the basic system types.
+	# The portable systems comes first.
+	# Each alternative MUST END IN A *, to match a version number.
+	# -sysv* is not here because it comes later, after sysvr4.
+	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
+	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+	      | -aos* \
+	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+	      | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
+	      | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+	      | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
+	      | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
+	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -os2*)
+	# Remember, each alternative MUST END IN *, to match a version number.
+		;;
+	-qnx*)
+		case $basic_machine in
+		    x86-* | i*86-*)
+			;;
+		    *)
+			os=-nto$os
+			;;
+		esac
+		;;
+	-nto*)
+		os=-nto-qnx
+		;;
+	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
+	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+		;;
+	-mac*)
+		os=`echo $os | sed -e 's|mac|macos|'`
+		;;
+	-linux*)
+		os=`echo $os | sed -e 's|linux|linux-gnu|'`
+		;;
+	-sunos5*)
+		os=`echo $os | sed -e 's|sunos5|solaris2|'`
+		;;
+	-sunos6*)
+		os=`echo $os | sed -e 's|sunos6|solaris3|'`
+		;;
+	-opened*)
+		os=-openedition
+		;;
+	-wince*)
+		os=-wince
+		;;
+	-osfrose*)
+		os=-osfrose
+		;;
+	-osf*)
+		os=-osf
+		;;
+	-utek*)
+		os=-bsd
+		;;
+	-dynix*)
+		os=-bsd
+		;;
+	-acis*)
+		os=-aos
+		;;
+	-386bsd)
+		os=-bsd
+		;;
+	-ctix* | -uts*)
+		os=-sysv
+		;;
+	-ns2 )
+	        os=-nextstep2
+		;;
+	-nsk*)
+		os=-nsk
+		;;
+	# Preserve the version number of sinix5.
+	-sinix5.*)
+		os=`echo $os | sed -e 's|sinix|sysv|'`
+		;;
+	-sinix*)
+		os=-sysv4
+		;;
+	-triton*)
+		os=-sysv3
+		;;
+	-oss*)
+		os=-sysv3
+		;;
+	-svr4)
+		os=-sysv4
+		;;
+	-svr3)
+		os=-sysv3
+		;;
+	-sysvr4)
+		os=-sysv4
+		;;
+	# This must come after -sysvr4.
+	-sysv*)
+		;;
+	-ose*)
+		os=-ose
+		;;
+	-es1800*)
+		os=-ose
+		;;
+	-xenix)
+		os=-xenix
+		;;
+        -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+	        os=-mint
+		;;
+	-none)
+		;;
+	*)
+		# Get rid of the `-' at the beginning of $os.
+		os=`echo $os | sed 's/[^-]*-//'`
+		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+		exit 1
+		;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system.  Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+	*-acorn)
+		os=-riscix1.2
+		;;
+	arm*-rebel)
+		os=-linux
+		;;
+	arm*-semi)
+		os=-aout
+		;;
+	pdp10-*)
+		os=-tops20
+		;;
+        pdp11-*)
+		os=-none
+		;;
+	*-dec | vax-*)
+		os=-ultrix4.2
+		;;
+	m68*-apollo)
+		os=-domain
+		;;
+	i386-sun)
+		os=-sunos4.0.2
+		;;
+	m68000-sun)
+		os=-sunos3
+		# This also exists in the configure program, but was not the
+		# default.
+		# os=-sunos4
+		;;
+	m68*-cisco)
+		os=-aout
+		;;
+	mips*-cisco)
+		os=-elf
+		;;
+	mips*-*)
+		os=-elf
+		;;
+	*-tti)	# must be before sparc entry or we get the wrong os.
+		os=-sysv3
+		;;
+	sparc-* | *-sun)
+		os=-sunos4.1.1
+		;;
+	*-be)
+		os=-beos
+		;;
+	*-ibm)
+		os=-aix
+		;;
+	*-wec)
+		os=-proelf
+		;;
+	*-winbond)
+		os=-proelf
+		;;
+	*-oki)
+		os=-proelf
+		;;
+	*-hp)
+		os=-hpux
+		;;
+	*-hitachi)
+		os=-hiux
+		;;
+	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+		os=-sysv
+		;;
+	*-cbm)
+		os=-amigaos
+		;;
+	*-dg)
+		os=-dgux
+		;;
+	*-dolphin)
+		os=-sysv3
+		;;
+	m68k-ccur)
+		os=-rtu
+		;;
+	m88k-omron*)
+		os=-luna
+		;;
+	*-next )
+		os=-nextstep
+		;;
+	*-sequent)
+		os=-ptx
+		;;
+	*-crds)
+		os=-unos
+		;;
+	*-ns)
+		os=-genix
+		;;
+	i370-*)
+		os=-mvs
+		;;
+	*-next)
+		os=-nextstep3
+		;;
+        *-gould)
+		os=-sysv
+		;;
+        *-highlevel)
+		os=-bsd
+		;;
+	*-encore)
+		os=-bsd
+		;;
+        *-sgi)
+		os=-irix
+		;;
+        *-siemens)
+		os=-sysv4
+		;;
+	*-masscomp)
+		os=-rtu
+		;;
+	f30[01]-fujitsu | f700-fujitsu)
+		os=-uxpv
+		;;
+	*-rom68k)
+		os=-coff
+		;;
+	*-*bug)
+		os=-coff
+		;;
+	*-apple)
+		os=-macos
+		;;
+	*-atari*)
+		os=-mint
+		;;
+	*)
+		os=-none
+		;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer.  We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+	*-unknown)
+		case $os in
+			-riscix*)
+				vendor=acorn
+				;;
+			-sunos*)
+				vendor=sun
+				;;
+			-aix*)
+				vendor=ibm
+				;;
+			-beos*)
+				vendor=be
+				;;
+			-hpux*)
+				vendor=hp
+				;;
+			-mpeix*)
+				vendor=hp
+				;;
+			-hiux*)
+				vendor=hitachi
+				;;
+			-unos*)
+				vendor=crds
+				;;
+			-dgux*)
+				vendor=dg
+				;;
+			-luna*)
+				vendor=omron
+				;;
+			-genix*)
+				vendor=ns
+				;;
+			-mvs* | -opened*)
+				vendor=ibm
+				;;
+			-ptx*)
+				vendor=sequent
+				;;
+			-vxsim* | -vxworks*)
+				vendor=wrs
+				;;
+			-aux*)
+				vendor=apple
+				;;
+			-hms*)
+				vendor=hitachi
+				;;
+			-mpw* | -macos*)
+				vendor=apple
+				;;
+			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+				vendor=atari
+				;;
+		esac
+		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+		;;
+esac
+
+echo $basic_machine$os
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:

Propchange: incubator/mod_ftp/trunk/config.sub
------------------------------------------------------------------------------
    svn:executable = 

Added: incubator/mod_ftp/trunk/configure.in
URL: http://svn.apache.org/viewcvs/incubator/mod_ftp/trunk/configure.in?rev=306631&view=auto
==============================================================================
--- incubator/mod_ftp/trunk/configure.in (added)
+++ incubator/mod_ftp/trunk/configure.in Thu Oct  6 06:16:28 2005
@@ -0,0 +1,46 @@
+AC_INIT(src/mod_ftp.c)	
+AM_INIT_AUTOMAKE(covalent_ftp, 3.0.2)
+AM_CONFIG_HEADER(include/ftp_config.h:config.in)
+
+AM_MAINTAINER_MODE
+AM_PROG_LIBTOOL
+AC_PROG_CC
+
+AC_HEADER_STDC
+AC_CHECK_HEADERS( \
+sys/ioctl.h \
+sys/socket.h \
+sys/sockio.h \
+)
+
+AC_PROG_GCC_TRADITIONAL
+AC_CHECK_FUNCS(fchmod)
+
+COVL_MAINTAINER_MODE
+COVL_CONFIG_NICE(config.nice)
+COVL_CHECK_APACHE20
+COVL_CHECK_LICENSE
+COVL_CHECK_BEAVER([],AC_MSG_RESULT(--with-beaver not given))
+COVL_CHECK_PYTEST(tests)
+COVL_CHECK_SNMP
+
+FTPDIR=`pwd`
+
+CPPFLAGS="$CPPFLAGS $APACHE20_CPPFLAGS $APR_CPPFLAGS $APU_CPPFLAGS"
+CFLAGS="$CFLAGS $APR_CFLAGS"
+
+AIX_SHLIB_LDFLAGS="" 
+case "$host" in
+  *-ibm-aix4*|*-ibm-aix5.1*)
+    AIX_SHLIB_LDFLAGS="-Wl,-G"
+    ;;
+esac
+
+AC_SUBST(FTPDIR)
+AC_SUBST(CPPFLAGS)
+AC_SUBST(CFLAGS)
+AC_SUBST(LIBS)
+AC_SUBST(AIX_SHLIB_LDFLAGS)
+
+AC_OUTPUT(Makefile src/Makefile modules/Makefile tests/Makefile
+	  tests/conf/httpd.conf tests/conf/loadmodules.conf)

Propchange: incubator/mod_ftp/trunk/configure.in
------------------------------------------------------------------------------
    svn:executable = 

Added: incubator/mod_ftp/trunk/docs/apache-directives.txt
URL: http://svn.apache.org/viewcvs/incubator/mod_ftp/trunk/docs/apache-directives.txt?rev=306631&view=auto
==============================================================================
--- incubator/mod_ftp/trunk/docs/apache-directives.txt (added)
+++ incubator/mod_ftp/trunk/docs/apache-directives.txt Thu Oct  6 06:16:28 2005
@@ -0,0 +1,399 @@
+
+Apache Directives
+Author: Ryan Morgan 6/17/2001
+
+This document breaks down the configuration directives used when configuring
+an Apache virtualhost for use with Covalent's content protocols.  This
+document is broken down into 3 main sections; the Apache core,
+access checking, and logging.  Each section starts with a short description
+of what that section is going to cover with links to technical documentation.
+Next, a list of directives is given with check boxes for compatibility
+with Covalents content protocols. Finally, an example is given of how these 
+directives are used.
+
+Please note that all descriptions of directives come from the Apache
+documentation project, located at: http://httpd.apache.org/docs-2.0/
+
+Apache Core
+-----------
+
+Description:
+------------
+This section describes the Apache directives used to setup a server to
+serve content using Covalent's content modules.  This section also
+describes the use of MPM's, and how they are configured.
+
+Apache Core:
+------------
+  mod_core: Core Apache directives
+  http://httpd.apache.org/docs-2.0/mod/core.html
+
+Apache MPMs:
+------------
+  threaded: MPM with Threading via Pthreads 
+  http://httpd.apache.org/docs-2.0/mod/threaded.html
+
+  mpm_winnt: MPM for use on Windows NT.
+  http://httpd.apache.org/docs-2.0/mod/mpm_winnt.html
+
+  prefork: MPM that uses the forking model, similar to Apache 1.3
+
+Environment Variables:
+----------------------
+The FTP module adds 2 new useful env-vars to the Apache environment:
+'do_transfer_log'  and 'ftp_transfer_ok'.
+
+  do_transfer_log:
+    Exists (and with a value of '1') if the FTP command involves
+    the transfer of a file or contect (eg: STOR).
+  ftp_transfer_ok:
+    Has a value of '1' if the file transfer was successful (not aborted
+    by the user or abnormally terminated); has a value of '0' if the
+    transfer was *not* successful.
+
+Compatibility:
+--------------
+
+Legend:
+-------
+x - Compatible
+* - Not compatible now, but will be before 1.0 release
+# - Compatible with exceptions
+- - Not Compatible
+
+Module    Directive                FTP    AV
+-----     ---------                ---    ---
+mod_core  AccessFileName            x      x
+          AddDefaultCharset         -      x   
+          AddModule                 x      x
+          AllowOverride             x      x 
+          AuthName                  x      x
+          AuthType                  x      x
+          ClearModuleList           x      x 
+          ContentDigest             -      -
+          CoreDumpDirectory         x      x
+          DefaultType               -      -
+          <Directory>               x      x
+          <DirectoryMatch>          x      x
+          DocumentRoot              x      x
+          ErrorDocument             -      x
+          ErrorLog                  x      x
+          <Files>                   x      x
+          <FilesMatch>              x      x
+          HostNameLookups           x      x
+          IdentityCheck             x      x
+          <IfDefine>                x      x
+          <IfModule>                x      x
+          Include                   x      x   
+          KeepAlive                 -      x
+          KeepAliveTimeout          -      x 
+          <Limit>                   *      *    
+          <LimitExcept>             *      *
+          LimitRequestBody          -      x
+          LimitRequestFields        -      x  
+          LimitRequestFieldsize     -      x
+          LimitRequestLine          -      x
+          LimitXMLRequestBody       -      -
+          <Location>                x      x
+          <LocationMatch>           x      x
+          LogLevel                  x      x
+          MaxKeepAliveRequests      x      x
+          NameVirtualHost           -      x
+          Options                   x      x  
+          Port                      x      x
+          Require                   x      x
+          RLimitCPU                 x      x
+          RLimitMEM                 x      x
+          RLimitNPROC               x      x
+          Satisfy                   x      x
+          ScriptInterpreterSource   x      -  
+          ServerAdmin               x      x
+          ServerAlias               x      x
+          ServerName                x      x
+          ServerPath                x      x
+          ServerRoot                x      x
+          ServerSignature           x      x
+          ServerTokens              x      x
+          SetInputFilter            -      -
+          SetOutputFilter           -      -
+          TimeOut                   -      x
+          UseCanonicalName          -      -      
+          <VirtualHost>             x      x
+
+threaded
+          All threaded MPM directives are compatible.
+
+mpm_winnt
+          All mpm_winnt MPM directives are compatible.
+
+prefork
+          All prefork MPM directives are compatible.
+
+Usage Examples:
+---------------
+
+The following is an example of how these directives are used within
+the Apache config file (httpd.conf).
+
+ServerRoot "/home/apache"
+
+<IfModule prefork.c>
+  StartServers        5
+  MinSpareServers     5
+  MaxSpareServers     10
+  MaxClients          20
+  MaxRequestsPerChild 0
+</IfModule>
+
+<IfModule threaded.c>
+  StartServers        3
+  MaxClients          8
+  MinSpareThreads     5
+  MaxSpareThreads     10
+  ThreadsPerChild     25
+  MaxRequestsPerChild 0
+</IfModule>
+
+# Tell Apache to listen on port 21 for FTP requests and
+# port 554 for RTSP requests.
+
+Listen 192.168.1.1:21
+Listen 192.168.1.1:554
+
+# Define our FTP VirtualHost
+
+<VirtualHost 192.168.1.1:21>
+
+  # Define protocol (FTP On)
+
+  ServerAdmin ftp-admin@your.address
+  DocumentRoot "/home/apache/ftp"
+  ErrorLog "/home/apache/logs/ftp_error_log"
+  LogLevel warn
+
+  <Location />
+    AuthName "FTP Authentication"
+    AutyType basic
+    # Specific auth module directives here
+    
+  </Location>
+
+</VirtualHost>
+
+# Define a RTSP VirtualHost
+<VirtualHost 192.168.1.1:554>
+
+  # Define protocol (RTSP On)
+
+  ServerAdmin av-admin@your.address
+  DocumentRoot "/home/apache/av"
+  ErrorLog "/home/apache/logs/av_error_log
+
+  # No access control
+
+</VirtualHost>
+
+Access Control
+--------------
+
+Description:
+------------
+This section describes how Access control modules distributed with Apache
+interact with Covalent content modules.  See these links for information 
+about the Access control modules that are distributed with Apache.
+
+mod_access: Access control based on client hostname or IP address. 
+http://httpd.apache.org/docs-2.0/mod/mod_access.html
+
+mod_auth: User authentication using text files. 
+http://httpd.apache.org/docs-2.0/mod/mod_auth.html
+
+mod_auth_dbm: User authentication using DBM files.
+http://httpd.apache.org/docs-2.0/mod/mod_auth_dbm.html
+
+mod_auth_db: User authentication using Berkeley DB files. 
+http://httpd.apache.org/docs-2.0/mod/mod_auth_dbm.html
+
+mod_auth_anon: Anonymous user access to authenticated areas.
+http://httpd.apache.org/docs-2.0/mod/mod_auth_dbm.html
+
+mod_auth_digest: MD5 authentication
+http://httpd.apache.org/docs-2.0/mod/mod_auth_dbm.html
+
+covalent_auth: Pluggable authentication and authorization module
+
+NOTE:
+The authentication modules are used for authenticating users into the
+FTP server, but can also be used on a per directory basis.  The FTP
+server uses the Location '/' for user logins.  If no authentication is
+setup for this Location, any user is allowed to login with any username
+and password.
+
+Compatiblity:
+-------------
+
+All authentication, authorization, and access checking modules are 
+compatible, but note the above paragraph on how the Location '/' is
+used in the FTP server.
+
+Usage Examples:
+---------------
+
+The following is an example of how these directives are used within
+the Apache config file (httpd.conf).
+
+#
+# Normal file based authentication.  This requires that the user create
+# a password file using htaccess.  This requires mod_auth.  Note that
+# since the Location for this is '/', this authentication is used when
+# the user logs onto the FTP server.
+#
+#<Location />
+#    AuthType basic
+#    AuthUserFile "/tmp/htpasswd.users"
+#    AuthName "FTP Authentication"
+#    require valid-user
+#</Location>
+
+#
+# Anonymous ftp access.  This requires mod_auth_anon.  Note that
+# since the Location for this is '/', this authentication is used when
+# the user logs onto the FTP server.
+#
+#<Location />
+#    AuthName "Use 'anonymous' and email address for guest entry"
+#    AuthType basic
+#
+#    Anonymous anonymous guest
+#    Anonymous_MustGiveEmail on
+#    Anonymous_LogEmail on
+#
+#    # More anonymous options that are not necessilary needed.
+#    Anonymous_VerifyEmail off
+#    Anonymous_NoUserId off
+#    Anonymous_Authoritative off
+#
+#    # Require that the user is valid
+#    require valid-user
+#
+#</Location>
+
+# Deny all users from a protected directory.  This requires mod_access.
+# Since this is for the Location /protected this authentication will not
+# apply to user logins, only for commands that try to access that location.
+# For example, with the following configuration, the command 'cd /protected'
+# would return 'Permission denied'.
+#
+#<Location /protected>
+#    deny from all
+#</Location>
+
+
+Logging
+-------
+
+Description:
+------------
+This section describes how logging is to be done when using Covalent's
+content protocols.  For now we are only defining how logging is to be
+done using the FTP server.
+
+mod_log_config:
+http://httpd.apache.org/docs/mod/mod_log_config.html
+
+The logging infrastructure in the FTP server takes advantage of Apache's
+logging modules.  By default a sensible LogFormat is defined, and a
+CustomLog is used to ftp style transfer and command logs.  To ensure that
+the ftp module only logs the appropriate requests, mod_setenvif is used
+to check the request, and set a flag for logging if needed.  Error logs
+are used in the same manner as Apache's error logs. (Although ErrorLog
+is defined by the core)
+
+All of the '%' directives that mod_log_config defines are valid for logging
+with the exception of the cookie based and header based directives.
+For a full list see the Apache documentation at the location listed above.
+In addition to the '%' directives defined by mod_log_config, the FTP module
+also defines a few '%' directives that can be used to add additional info
+into the logfile.  These '%' directives are as follows:
+
+%..M  The mode that was used to transfer the file.
+      A single character is printed, a (ascii) or b (binary)
+%..F  Any action that was taken on the file (concationated as needed)
+         C - file was compressed.
+         U - file was uncompressed.
+         T - file was tarred.
+         _ - no action taken.
+%..d  Direction the file was sent.
+         o - outgoing
+         i - incoming
+%..W  How the file was accessed.
+         r - real
+         a - anonymous
+         g - guest
+%..S    Service name, usually 'ftp'
+%..Z    Authentication method
+         0 - no auth
+         1 - rfc931 auth
+%..Y    Authenticated user id
+         * - if not available
+
+Compatibility:
+--------------
+
+Legend:
+-------
+x - Compatible
+* - Not compatible now, but will be before 1.0 release
+# - Compatible with exceptions
+- - Not Compatible
+
+Module          Directive                FTP    AV
+-----           ---------                ---    ---
+mod_log_config  CookieLog                 -      - 
+                CustomLog                 x      x  
+                LogFormat                 x      x
+                TransferLog               -      -
+
+Usage Examples:
+---------------
+
+#Setup the error_log for this virtualhost.
+ErrorLog     logs/ftp_error_log
+
+# Define the formats for the command log and transfer log
+#
+# The command log
+# The command log has the format "user [x.x.x.x] command"
+# For example: "anonymous [127.0.0.1] CWD /incoming"
+
+LogFormat    "%u [%a] %r" command_log_fmt
+
+#
+# The transfer log
+# This command log is equivalent to wu-ftpd's default transfer log.
+
+LogFormat  "%{%b %e %H:%M:%S %Y}t %T %a %B %U %M %F %d %W %u %S %Z %Y" transfer_log_fmt
+
+#
+#
+# Now that the formats for the logs are defined, tell Apache when to do the
+# logging.
+#
+# Log the commands of users logged in anonymously.
+
+SetEnvIf remote_user anonymous do_command_log
+CustomLog logs/ftp_command_log command_log_fmt env=do_command_log
+
+#
+# Log the command of all users
+
+CustomLog logs/ftp_command_log command_log_fmt
+
+# The transfer log.
+#
+# We only want to log the RETR and STOR methods.
+
+SetEnvIfNoCase request_method RETR do_transfer_log
+SetEnvIfNoCase request_method STOR do_transfer_log
+CustomLog logs/ftp_transfer_log transfer_log_fmt env=do_transfer_log
+

Propchange: incubator/mod_ftp/trunk/docs/apache-directives.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/mod_ftp/trunk/docs/ftp-directives.txt
URL: http://svn.apache.org/viewcvs/incubator/mod_ftp/trunk/docs/ftp-directives.txt?rev=306631&view=auto
==============================================================================
--- incubator/mod_ftp/trunk/docs/ftp-directives.txt (added)
+++ incubator/mod_ftp/trunk/docs/ftp-directives.txt Thu Oct  6 06:16:28 2005
@@ -0,0 +1,380 @@
+
+FTP Directives
+Author: Ryan Morgan 5/2/2001
+
+This document only describes the directives that the FTP module provides.
+Since FTP is closely tied into Apache many of the core directives can
+also be used for configuring the FTP module, but those are not covered
+here.
+
+For usage examples, see ftp.sample.conf in the toplevel conf directory.
+
+------------------------------------------------------------------------------
+FTP directive
+Syntax: FTP On|Off
+Context: Server Config
+Default: Off
+Compatibility: 2.0
+
+This directive may be used in the main server, or from within any Virtual
+Host.  This directive tells Apache to serve FTP content on this virtualhost.
+
+------------------------------------------------------------------------------
+FTPUmask directive
+Syntax: FTPUmask umask
+Context: Server Config
+Default: 022
+Compatibility: 2.0
+
+The FTPUmask directive tells Apache what permissions to use by default on
+uploaded files.  Note that since Apache is running as a single user
+that files that are uploaded will be able to be deleted by default, if 
+deletion is enabled for that location.
+
+------------------------------------------------------------------------------
+FTPTimeoutLogin directive
+Syntax: FTPTimeoutLogin seconds
+Context: Server Config
+Default: 120
+Compatibility: 2.0
+
+The FTPTimeoutLogin directive tells the server how many seconds to wait
+to receive a login command from the client.  If the user does not send
+a login command in the specified time interval, the connection is dropped.
+
+------------------------------------------------------------------------------
+FTPTimeoutIdle directive
+Syntax: FTPTimeoutIdle seconds
+Context: Server Config
+Default: 600
+Compatibility: 2.0
+
+The FTPTimeoutIdle directive tells the server how many seconds to allow a
+user to be idle.  If this time interval is exceeded, the connection is
+dropped.
+
+------------------------------------------------------------------------------
+FTPTimeoutData directive
+Syntax: FTPTimeoutData seconds
+Context: Server Config
+Default: 300
+Compatibility: 2.0
+
+The FTPTimeoutData directive tells the server how long to allow a data
+connection to be open (for a file listing or file transfer) without any
+data being sent.  If this time limit is exceeded, the data connection will
+be dropped.
+
+This does not close the control connection, so the user will be able to
+issue the request again.  This only closes the data connection.
+
+------------------------------------------------------------------------------
+FTPMaxLoginAttempts directive
+Syntax: FTPMaxLoginAttempts maxlogins
+Context: Server Config
+Default: 3
+Compatibility: 2.0
+
+The FTPMaxLoginAttempts directive controls the number of times a user is
+allowed to attempt logging in.  If this number is hit, the connection will
+be dropped, and the user will be forced to reconnect to the server.
+
+------------------------------------------------------------------------------
+FTPImplicitSSL directive
+Syntax: FTPImplicitSSL On|Off
+Context: Server Config
+Default: Off
+Compatibility: 2.1
+
+The FTPImplicitSSL directive determines the security on the control
+connection when the user connects.  When set to 'On', the user is
+expected to connect using SSL.  When set to off, the user must connect
+unsecurely, and issue the AUTH command to start a secure session.
+
+------------------------------------------------------------------------------
+FTPOptions directive
+Syntax FTPOptions <option1> <option2> ..
+Context: Server Config
+Compatiblity: 2.1
+
+The FTPOptions directive sets per server options
+
+Current options:
+
+RequireSSL (Compatibility: 2.1)
+
+  This option requires the client to issue an AUTH command to switch to
+  SSL before sending any password information.  This is much like 
+  implicit SSL in that it forces the client to use SSL to send password
+  information.  The difference is that using RequireSSL will allow a
+  client to connect without SSL, but then issue the AUTH SSL command
+  before sending the username and password.
+
+CheckMaxClients (Compatibility 2.2)
+
+  When enabled, the server will check if the server is full.  If so, the 
+  client is denied login.  When this is not enabled, the client will sit on 
+  the accept queue waiting for another client to disconnect.
+
+RemoveUserGroup (Compatibility 2.2)
+
+  When enabled, the server will not look up usernames and groups for 
+  directory listings.  Only the uid and gid will be printed.
+
+NLSTShowDirs (Compatibility 2.2)
+
+  When enabled NLST requests will show directories as well as files. The
+  default behaviour is to only show files.  This is when clients send 
+  different commands for 'ls' and 'dir'. (such as Solaris clients). Note
+  that enabling this will break mget requests.
+
+NLSTIsLIST (Compatibility 2.2.1)
+
+  When enabled the output of NLST will be identical to LIST requests.
+  Like NLISTShowDirs this directive is useful for use with clients that
+  send different commands for 'ls' and 'dir' (such as Solaris clients)
+  Note that enabling this will break mget requests.
+
+CreateHomeDirs (Compatibility 2.2.2)
+
+  When this option is specified, user home directories will be automatically
+  created in the directory specified by FTPHomeDir.  If FTPHomeDir is not
+  specified, this option has no effect.  See the documentation on FTPHomeDir
+  for more information on that directive.
+
+  NOTE: Using this option on an anonymous site is dangerous, and not advised.
+        This is because a directory will be created for each unique user that
+        logs into the server.
+
+ShowUnAuthorizedFiles (Compatibility 2.3)
+
+  When this option is specified, the LST command will show files that the user
+  does not have authorization to retrieve, and directories that the user does
+  not have authorization to cd into.  This makes our FTP server act like most
+  standard FTP servers, in that users can see all files/directories, even
+  those they do not have access to.
+
+------------------------------------------------------------------------------
+FTPPASVaddr directive
+Syntax: FTPPASVaddr <ip address>
+Context: Server Config
+Default: none
+Compatibility: 2.2
+
+The FTPPASVaddr directive allows the administrator to specify a different
+address to be sent on replies to PASV requests.  This is particularily useful
+when the FTP server is sitting behind a firewall.
+
+------------------------------------------------------------------------------
+FTPPASVbindaddr directive
+Syntax: FTPPASVbindaddr <ip address>
+Context: Server Config
+Default: none
+Compatibility: 2.2
+
+Identical to FTPPASVaddr, but with FTPPASVbindaddr the server will also try 
+to bind() to the given IP address
+
+------------------------------------------------------------------------------
+FTPBannerMessage directive
+Syntax: FTPBannerMessage msg|file:path/to/file
+Context: Server Config
+Default: none
+Compatibility: 2.2
+
+Set a message that will be displayed to the client on the initial connection.
+This can either be a string, or a path to a file.  The message can contain
+a varity of meta-characters.
+
+%T local time (form Mon Apr 29 20:36:48 2002)
+%C current working directory
+%h Remote Host
+%L Local Host
+%E Server administrator (as given by ServerAdmin)
+%a Remote IP-address
+%A Local IP-address
+%u Remote user
+%f Number of files transferred
+%t Total number of bytes downloaded
+%x Number of data transfers
+%b Total traffic for the session. (both control and data)
+
+------------------------------------------------------------------------------
+FTPExitMessage directive
+Syntax: FTPExitMessage msg|file:path/to/file
+Context: Server Config
+Default: none
+Compatibility: 2.2
+
+Set a message that will be displayed to the client on client disconnect.
+This can either be a string, or a path to a file.  The message can contain
+a varity of meta-characters.  See the documentation on FTPBannerMessage
+for details on what meta-characters are available.
+
+An example:
+
+<VirtualHost _default_:21>
+
+   ...
+
+   FTPExitMessage file:conf/ftp_exit
+
+</VirtualHost>
+
+Where conf/ftp_exit would have the following:
+
+You have transferred %t bytes in %f files
+Total traffic for this session was %b in %x transfers.
+Thank you for using the FTP service on %L
+
+------------------------------------------------------------------------------
+FTPReadmeMessage directive
+Syntax: FTPReadmeMessage msg|file:path/to/file
+Context: Server Config, Directory Block, .htaccess
+Default: none
+Compatibility: 2.2
+
+Set a message to be displayed to the client when entering a new directory.
+This can be either a string, or a path to a file.  The message can contain
+a varity of meta-characters.  See the documentation on FTPBannerMessage 
+details on which meta-characters are available.
+
+An example:
+
+<Directory /home/ftp>
+   FTPReadmeMessage file:conf/ftp_readme
+</Directory>
+
+<Directory /home/ftp/incoming>
+   FTPReadmeMessage "You are currently in %C"
+</Directory>
+
+When this directive is placed in the server config the readme message will
+apply to all directories.  When used in .htaccess or in a directory config
+only that directory will inherit the readme message.
+
+Configuring a directory for a readme message will also override any global
+readme messages.
+
+------------------------------------------------------------------------------
+FTPHomeDir directive
+Syntax: FTPHomeDir /home
+Context: Server Config
+Default: none
+Compatibility: 2.2.2
+
+This directive defines where user home directories are located.  This path
+must be absolute, but note that it is relative to the configured document
+root.  For example, 'FTPHomeDir /home' would cause the ftp module to look
+for a home directory in $document_root/home/username.  The home directory
+must have the same name as the user that has logged in.
+
+If the home directory for a user does not exist, and FTPHomeDir has been
+specified, an error will be logged, and the user will be placed in the
+root ("/") directory.  If you would like to create the home directory on
+the fly, use the FTPOptions CreateHomeDirs directive.  See the documentation
+on that directive for more information.
+
+------------------------------------------------------------------------------
+FTPPasvRange directive
+Syntx: FTPPasvRange number number
+Context: Server Config
+Default: none
+Compatibility: 2.3.0
+
+This directive defines the port range to be used for passive connections.
+This directive is useful in envrionments where administrators only want to
+open a specific range of ports on a firewall.
+
+------------------------------------------------------------------------------
+FTPJailUser directive
+Syntax: FTPJailUser On|Off
+Context: Server Config
+Default: Off
+Compatibility: 2.3.0
+
+This directive locks the user in the directory tree that they were placed in
+on login.  The user will have full access to any sub-directories under the
+default directory, but they will not be able to cd up at all.  This can be
+very powerful when used with the FTPHomeDir directive, as it places the user
+in their home directory, and then locks them into that directory.  If the
+FTPHomeDir directive is not used, then FTPJailUser has no effect.
+
+------------------------------------------------------------------------------
+FTPActiveRange directive
+Syntax: FTPActiveRange min [max]
+Context: Server Config
+Default: none
+Compatibility: 2.3.0
+
+This directive defines the ports that the server will use when making an
+active connection to the client.  The directive will accept one or two
+arguments.  If only one argument is given, then the server will always use
+that port, for example "FTPActiveRange 20" will force the server to use
+port 20.  If two arguments are given, then the server will treat it as 
+a range of ports to be used, for example "FTPActiveRange 20 50", will
+allow the server to use any port between 20 and 50, inclusive.  If this
+directive is not specified, then the server will use random high-numbered
+ports.
+
+------------------------------------------------------------------------------
+dir-name option to Require directive
+Syntax: Require user dir-name
+Context: option to Require
+Default: none
+Compatibility: 2.3.0
+
+This is different than all other FTP directives, as it is an option to a
+core directive.  This directive associates a directory name with a user name,
+so that only users with the same name as the directory are allowed access to
+the directory.  The goal is to configure strong security for user's home
+directories without forcing every directory to have a special Require line.
+
+Note:  This directive only works within <DirectoryMatch > containers.  It is
+meant to be used as follows:
+
+    <DirectoryMatch /usr/local/ftp/home/*>
+        Require user dir-name admin
+    </DirectoryMatch>
+
+This configuration will mean that for the directory /usr/local/ftp/home/rbb, 
+only the users rbb and admin will be allowed access.  For the directory 
+/usr/local/ftp/home/rmorgan, only rmorgan and admin will be allowed access, 
+etc.
+
+------------------------------------------------------------------------------
+FTPLimitLoginUser directive
+Syntax: FTPLimitLoginUser number
+Context: Server Config
+Default: 0 (unlimited)
+Compatibility: 2.4.0
+
+This directive allows the administrator to limit the number of
+concurrent/simultaneous logins of a single FTP user. For example,
+if set to 3, then no single FTP account would be allowed to
+have more than 3 concurrent logins (including the guest/anonymous
+account).
+
+------------------------------------------------------------------------------
+FTPLimitLoginServer directive
+Syntax: FTPLimitLoginServer number
+Context: Server Config
+Default: 0 (unlimited)
+Compatibility: 2.4.0
+
+This directive allows the administrator to limit the total number of
+concurrent/simultaneous FTP logins. For example, if set to 10, no
+more than 10 FTP logins would be allowed.
+
+------------------------------------------------------------------------------
+FTPLimitDBFile directive
+Syntax: FTPLimitDBFile file-path
+Context: Server Config
+Default: logs/ftplogins
+Compatibility: 2.4.0
+
+To allow for the above 'FTPLimitLoginUser' and 'FTPLimitLoginServer'
+capability, the FTP server uses a small DBM file to store login
+data. This directive determines the filename-path of that
+database file. If either FTPLimit directive is used, this must
+point to a valid file-location.

Propchange: incubator/mod_ftp/trunk/docs/ftp-directives.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/mod_ftp/trunk/docs/ftp-directives.txt
------------------------------------------------------------------------------
    svn:executable = 

Added: incubator/mod_ftp/trunk/docs/overall.txt
URL: http://svn.apache.org/viewcvs/incubator/mod_ftp/trunk/docs/overall.txt?rev=306631&view=auto
==============================================================================
--- incubator/mod_ftp/trunk/docs/overall.txt (added)
+++ incubator/mod_ftp/trunk/docs/overall.txt Thu Oct  6 06:16:28 2005
@@ -0,0 +1,42 @@
+
+FTP Overall
+Author: Ryan Morgan 5/12/2001
+
+The ftp module can be added to any Apache 2.0 installation, and will allow
+the server to service both HTTP and FTP requests.  This allows system
+administrators to consolidate their web services into a single a single server
+which allows for easier configuration and management.
+
+We have defined the following usage scenarios:
+
+    1. Combined HTTP and FTP Server.  Some people may only distribute their
+       files using HTTP.  The FTP module will allow visitors to download the
+       same content available on the web using FTP.  Since the FTP module
+       is part of Apache, the same user authentication can be used.
+ 
+    2. Stand alone FTP Server.  The ftp module will offer administrators easy
+       configuration if they are familiar with Apache's configuration style.
+       The FTP module can also send dynamic data generated by cgi scripts,
+       php, mod_perl, or mod_snake.
+
+    3. Strategically, it puts the Covalent products into a different market.
+       That means it also competes with products like IIS that run on Windows
+       platforms are also multi protocol, such as HTTP and FTP.
+
+The major parts of the ftp module are defined in this directory.
+
+1. overall.txt
+
+   This document.  Describes the module at a high level, and breaks down
+   everything into manageable parts.
+
+2. ftp-directives.txt
+
+   The directives document describe the different configuration directives
+   available through the ftp module.
+
+3. apache-directives.txt
+
+   This document gives links to documentation for all Apache modules and
+   directives that can be used with the FTP module.  Any differences from
+   HTTP or limitaions are noted here.

Propchange: incubator/mod_ftp/trunk/docs/overall.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/mod_ftp/trunk/docs/overall.txt
------------------------------------------------------------------------------
    svn:executable = 

Added: incubator/mod_ftp/trunk/docs/ssl-info.txt
URL: http://svn.apache.org/viewcvs/incubator/mod_ftp/trunk/docs/ssl-info.txt?rev=306631&view=auto
==============================================================================
--- incubator/mod_ftp/trunk/docs/ssl-info.txt (added)
+++ incubator/mod_ftp/trunk/docs/ssl-info.txt Thu Oct  6 06:16:28 2005
@@ -0,0 +1,7 @@
+
+"Securing FTP with TLS" Internet Draft home page:
+http://www.ford-hutchinson.com/~fh-1-pfh/ftps-ext.html
+
+This page is the definitive source for information regarding FTP over SSL/TLS
+
+

Propchange: incubator/mod_ftp/trunk/docs/ssl-info.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/mod_ftp/trunk/include/.cvsignore
URL: http://svn.apache.org/viewcvs/incubator/mod_ftp/trunk/include/.cvsignore?rev=306631&view=auto
==============================================================================
--- incubator/mod_ftp/trunk/include/.cvsignore (added)
+++ incubator/mod_ftp/trunk/include/.cvsignore Thu Oct  6 06:16:28 2005
@@ -0,0 +1,3 @@
+ftp_config.h
+ftp_protocol.h
+stamp-h

Propchange: incubator/mod_ftp/trunk/include/.cvsignore
------------------------------------------------------------------------------
    svn:executable = 

Added: incubator/mod_ftp/trunk/include/ftp_glob.h
URL: http://svn.apache.org/viewcvs/incubator/mod_ftp/trunk/include/ftp_glob.h?rev=306631&view=auto
==============================================================================
--- incubator/mod_ftp/trunk/include/ftp_glob.h (added)
+++ incubator/mod_ftp/trunk/include/ftp_glob.h Thu Oct  6 06:16:28 2005
@@ -0,0 +1,102 @@
+/*
+ * Original: /repoman/r/ncvs/src/include/glob.h,v 1.3.6.3 2002/09/18 14:13:30 mikeh Exp $
+ */
+
+/*
+ * Copyright (c) 1989, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Guido van Rossum.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)glob.h	8.1 (Berkeley) 6/2/93
+ * $FreeBSD: /repoman/r/ncvs/src/include/glob.h,v 1.3.6.3 2002/09/18 14:13:30 mikeh Exp $
+ */
+
+#ifndef _FTP_GLOB_H_
+#define	_FTP_GLOB_H_
+
+struct stat;
+typedef struct {
+	int gl_pathc;		/* Count of total paths so far. */
+	int gl_matchc;		/* Count of paths matching pattern. */
+	int gl_offs;		/* Reserved at beginning of gl_pathv. */
+	int gl_flags;		/* Copy of flags parameter to glob. */
+	char **gl_pathv;	/* List of paths matching pattern. */
+				/* Copy of errfunc parameter to glob. */
+	int (*gl_errfunc) (const char *, int);
+
+	/*
+	 * Alternate filesystem access methods for glob; replacement
+	 * versions of closedir(3), readdir(3), opendir(3), stat(2)
+	 * and lstat(2).
+	 */
+	void (*gl_closedir) (void *);
+	struct dirent *(*gl_readdir) (void *);
+	void *(*gl_opendir) (const char *);
+	int (*gl_lstat) (const char *, struct stat *);
+	int (*gl_stat) (const char *, struct stat *);
+} ftp_glob_t;
+
+/* Believed to have been introduced in 1003.2-1992 */
+#define	FTP_GLOB_APPEND		0x0001	/* Append to output from previous call. */
+#define	FTP_GLOB_DOOFFS		0x0002	/* Use gl_offs. */
+#define	FTP_GLOB_ERR		0x0004	/* Return on error. */
+#define	FTP_GLOB_MARK		0x0008	/* Append / to matching directories. */
+#define	FTP_GLOB_NOCHECK	0x0010	/* Return pattern itself if nothing matches. */
+#define	FTP_GLOB_NOSORT		0x0020	/* Don't sort. */
+#define	FTP_GLOB_NOESCAPE	0x2000	/* Disable backslash escaping. */
+
+/* Error values returned by glob(3) */
+#define	FTP_GLOB_NOSPACE	(-1)	/* Malloc call failed. */
+#define	FTP_GLOB_ABORTED	(-2)	/* Unignored error. */
+#define	FTP_GLOB_NOMATCH	(-3)	/* No match and FTP_GLOB_NOCHECK was not set. */
+#define	FTP_GLOB_NOSYS		(-4)	/* Obsolete: source comptability only. */
+
+#define	FTP_GLOB_ALTDIRFUNC	0x0040	/* Use alternately specified directory funcs. */
+#define	FTP_GLOB_BRACE		0x0080	/* Expand braces ala csh. */
+#define	FTP_GLOB_MAGCHAR	0x0100	/* Pattern had globbing characters. */
+#define	FTP_GLOB_NOMAGIC	0x0200	/* FTP_GLOB_NOCHECK without magic chars (csh). */
+#define	FTP_GLOB_QUOTE		0x0400	/* Quote special chars with \. */
+#define	FTP_GLOB_TILDE		0x0800	/* Expand tilde names from the passwd file. */
+#define	FTP_GLOB_LIMIT		0x1000	/* limit number of returned paths */
+/* Include '.' and '..' in search patterns. Without this
+ * flag, they must be explicitly matched */
+#define	FTP_GLOB_PERIOD		0x4000
+
+/* source compatibility, these are the old names */
+#define FTP_GLOB_MAXPATH	FTP_GLOB_LIMIT
+#define	FTP_GLOB_ABEND		FTP_GLOB_ABORTED
+
+int	ftp_glob (const char *, int, int (*)(const char *, int), ftp_glob_t *);
+void	ftp_globfree (ftp_glob_t *);
+
+#endif /* !_FTP_GLOB_H_ */

Propchange: incubator/mod_ftp/trunk/include/ftp_glob.h
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/mod_ftp/trunk/include/ftp_glob.h
------------------------------------------------------------------------------
    svn:executable = 

Added: incubator/mod_ftp/trunk/include/mod_ftp.h
URL: http://svn.apache.org/viewcvs/incubator/mod_ftp/trunk/include/mod_ftp.h?rev=306631&view=auto
==============================================================================
--- incubator/mod_ftp/trunk/include/mod_ftp.h (added)
+++ incubator/mod_ftp/trunk/include/mod_ftp.h Thu Oct  6 06:16:28 2005
@@ -0,0 +1,560 @@
+/* Copyright 1999-2005 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * Original Copyright (c) Covalent Technologies 2001-2005
+ *
+ * FTP Protocol module for Apache 2.0
+ */
+
+#ifndef MOD_FTP_H
+#define MOD_FTP_H
+
+/* FTP header has a couple of defines... on win32
+   rather than including it, we'll just hack em in
+   ourselves
+ */
+#ifdef WIN32
+#define	TYPE_A		1	/* ASCII */
+#define	TYPE_I		3	/* image */
+#else
+#include <arpa/ftp.h>
+#endif
+
+#ifndef CORE_PRIVATE
+#define CORE_PRIVATE
+#endif
+
+/* Apache headers */
+#include "apr_buckets.h"
+#include "util_filter.h"
+#include "util_ebcdic.h"
+#include "apr_strings.h"
+#include "apr_hooks.h"
+#include "apr_hash.h"
+#include "apr_user.h"
+#include "apr_lib.h"
+#include "apr_inherit.h"
+#include "apr_compat.h"
+#include "apr_poll.h"
+#include "ap_config.h"
+#include "ap_mmn.h"
+#include "httpd.h"
+#include "http_config.h"
+#include "http_log.h"
+#include "http_main.h"
+#include "http_core.h"
+#include "http_connection.h"
+#include "http_request.h"
+#include "http_protocol.h"
+#include "scoreboard.h"
+
+#include "mod_log_config.h"
+
+/* FTP Reply Codes */
+
+#define FTP_REPLY_RESTART_MARKER          110
+#define FTP_REPLY_SERVICE_READY_IN_N_MIN  120
+#define FTP_REPLY_DATA_ALREADY_OPEN       125
+#define FTP_REPLY_FILE_STATUS_OK          150
+#define FTP_REPLY_COMMAND_OK              200
+#define FTP_REPLY_NOT_IMPLEMENTED         202
+#define FTP_REPLY_SYSTEM_STATUS           211
+#define FTP_REPLY_DIRECTORY_STATUS        212
+#define FTP_REPLY_FILE_STATUS             213
+#define FTP_REPLY_HELP_MESSAGE            214
+#define FTP_REPLY_SYSTEM_TYPE             215
+#define FTP_REPLY_SERVICE_READY           220
+#define FTP_REPLY_CONTROL_CLOSE           221
+#define FTP_REPLY_DATA_OPEN               225
+#define FTP_REPLY_DATA_CLOSE              226
+#define FTP_REPLY_PASSIVE_MODE            227
+#define FTP_REPLY_USER_LOGGED_IN          230
+#define FTP_REPLY_USER_LOGGED_IN_SECURE   232
+#define FTP_REPLY_SECURITY_EXCHANGE_DONE  234
+#define FTP_REPLY_COMPLETED               250
+#define FTP_REPLY_PATH_CREATED            257
+#define FTP_REPLY_USER_OK                 331
+#define FTP_REPLY_NEED_ACCOUNT            332
+#define FTP_REPLY_PENDING                 350
+#define FTP_REPLY_SERVICE_NOT_AVAILABLE   421
+#define FTP_REPLY_CANNOT_OPEN_DATACONN    425
+#define FTP_REPLY_TRANSFER_ABORTED        426
+#define FTP_REPLY_FILE_BUSY               450
+#define FTP_REPLY_LOCAL_ERROR             451
+#define FTP_REPLY_INSUFFICIENT_SPACE      452
+#define FTP_REPLY_COMMAND_UNRECOGNIZED    500
+#define FTP_REPLY_SYNTAX_ERROR            501
+#define FTP_REPLY_COMMAND_NOT_IMPLEMENTED 502
+#define FTP_REPLY_BAD_SEQUENCE            503
+#define FTP_REPLY_COMMAND_NOT_IMPL_PARAM  504
+#define FTP_REPLY_NOT_LOGGED_IN           530
+#define FTP_REPLY_NEED_ACCOUNT_TO_STORE   532
+#define FTP_REPLY_PROT_NOT_SUPPORTED      536
+#define FTP_REPLY_FILE_NOT_FOUND          550
+#define FTP_REPLY_PAGE_TYPE_UNKNOWN       551
+#define FTP_REPLY_EXEEDED_STORAGE         552
+#define FTP_REPLY_FILENAME_NOT_ALLOWED    553
+
+/*
+ * FTP_NEED_* - Values used for filter bitmasks
+ *
+ */
+
+#define FTP_NEED_BYTERANGE      (1 << 1)
+#define FTP_NEED_CONTENT_LENGTH (1 << 2)
+#define FTP_NEED_CRLF           (1 << 4)
+#define FTP_NEED_DATA_OUT       (1 << 5)
+/*
+ * FTP_MSG_* - Text for sending back to the client.  These include 
+ *             metacharacters to enforce rigidity of layout.
+ */
+
+#define FTP_MSG_PERM_DENIED  "%s: Permission denied"
+#define FTP_MSG_NOT_A_DIR    "%s: Not a directory"
+#define FTP_MSG_NOSUCHFILE   "%s: No such file or directory"
+#define FTP_MSG_OPENASCII    "Opening ASCII mode data connection for file list"
+#define FTP_MSG_SUCCESS      "%s: Command successful"
+#define FTP_MSG_NOTPLAIN     "%s: Not a plain file"
+#define FTP_MSG_DIR_CREAT    "\"%s\" new directory created"
+#define FTP_MSG_DIR_CUR      "\"%s\" is current directory"
+#define FTP_MSG_HELP_SYNTAX  "Syntax: %s %s"
+#define FTP_MSG_HELP         "Direct comments to %s"
+#define FTP_MSG_NOTIMPL      "%s: Command not implemented"
+#define FTP_MSG_NOTALLOWED   "Permission denied: %s not allowed here"
+
+#define FTP_DEFAULT_DBFILE   "logs/ftplogins"
+/*
+ * FTP_OPT_* - FTP server options
+ *
+ */
+#define FTP_OPT_NONE             0
+#define FTP_OPT_REQUIRESSL      (1 << 0) /* Require AUTH before USER/PASS */
+#define FTP_OPT_CHECKMAXCLIENTS (1 << 1) /* Check if the server is full */
+#define FTP_OPT_REMOVEUSERGROUP (1 << 2) /* Fill in user/group information
+                                          * on directory listings */
+#define FTP_OPT_NLSTSHOWDIRS    (1 << 3) /* Show directories on NLST 
+                                          * requests */
+#define FTP_OPT_NLSTISLIST      (1 << 4) /* Maps NLST directly to LIST */
+#define FTP_OPT_CREATEHOMEDIRS  (1 << 5) /* Create home dirs on the fly */
+#define FTP_OPT_SHOWUNAUTH      (1 << 6) /* Show unauthorized files in LIST */
+#define FTP_OPT_LISTISNLST      (1 << 7) /* Maps LiST directly to NLST */
+#define FTP_OPT_ALLOWPROXYPORT  (1 << 8) /* Allow PORT connections other than client's */
+#define FTP_OPT_ALLOWPROXYPASV  (1 << 9) /* Allow PASV connections other than client's */
+
+/* Supported FTP AUTH mechanisms. */
+#define FTP_AUTH_NONE         0
+#define FTP_AUTH_SSL          1
+#define FTP_AUTH_TLS          2
+
+/* Data protection levels */
+#define FTP_PROT_CLEAR        0
+#define FTP_PROT_SAFE         1
+#define FTP_PROT_CONFIDENTIAL 2
+#define FTP_PROT_PRIVATE      3
+
+/* SSL Filter name */
+#define FTP_SSL_FILTER        "SSL/TLS Filter"
+
+#if defined(WIN32) && defined(FTP_DECLARE_EXPORT)
+#define FTP_DECLARE_DATA __declspec(dllexport)
+#define FTP_DECLARE(fn)  __declspec(dllexport) fn
+#elif defined(WIN32)
+#define FTP_DECLARE_DATA __declspec(dllimport)
+#define FTP_DECLARE(fn)  __declspec(dllimport) fn
+#else
+#define FTP_DECLARE_DATA 
+#define FTP_DECLARE(fn)  fn
+#endif
+
+extern module FTP_DECLARE_DATA ftp_module;
+
+typedef struct ftp_server_config ftp_server_config;
+typedef struct ftp_dir_config ftp_dir_config;
+typedef struct ftp_connection ftp_connection;
+typedef struct ftp_direntry ftp_direntry;
+
+typedef enum {
+    FTP_LIMIT_OK,
+    FTP_LIMIT_HIT_PERUSER,
+    FTP_LIMIT_HIT_PERIP,
+    FTP_LIMIT_HIT_PERSERVER,
+    FTP_LIMIT_ERROR
+}
+ftp_loginlimit_t;
+
+/* Directory entry structure.  Used for directory listings */
+struct ftp_direntry
+{
+    const char *name;           /* Just the name of the file (foo.c) */
+    const char *modestring;
+    char datestring[13];        /* Date srings have a fixed length */
+    char *username;
+    char *groupname;
+    apr_off_t size; 
+    apr_off_t csize;
+    apr_int32_t  nlink;
+    struct ftp_direntry *child; /* For decending */
+    struct ftp_direntry *next;
+};
+
+/* The main ftp server configuration */
+struct ftp_server_config
+{
+    int enabled;
+    int timeout_login;
+    int timeout_idle;
+    int timeout_data;
+    int max_login_attempts;
+    int implicit_ssl;
+    int options;
+    int pasv_min;
+    int pasv_max;
+    int data_block_size;
+    apr_fileperms_t fileperms;
+    char *pasv_addr;
+    char *pasv_bindaddr;
+    const char *banner_message;
+    int banner_message_isfile;
+    const char *exit_message;
+    int exit_message_isfile;
+    const char *homedir;
+    const char *docrootenv;
+    int jailuser;
+    int active_min;
+    int active_max;
+    int limit_peruser;
+    int limit_perip;
+    int limit_perserver;
+    const char *limitdbfile;
+};
+
+struct ftp_dir_config
+{
+    const char *readme;
+    const char *path;
+    int readme_isfile;
+};
+
+/* 
+ * FTP connection structure.  Each connection to the server will
+ * have an ftp_connection structure associated with it.
+ */
+struct ftp_connection
+{
+    /* The connection, needed since we don't always have a request_rec */
+    conn_rec *connection;
+
+    /* Stow the original server for reset with the USER command */
+    server_rec *orig_server;
+    
+    /* User information */
+    int logged_in;
+    const char *user;
+    const char *authorization;
+    int login_attempts;
+    int close_connection;
+
+    /* Security information */
+    int auth;     /* The AUTH type.  One of NONE/SSL/TLS */
+    int pbsz;     /* Data protection buffer size.  Usually zero. */
+    int prot;     /* Data channel protection level. C/S/E/P */
+    int is_secure;
+    void *ssl_input_ctx;
+    void *ssl_output_ctx;
+
+    /* Directory information */
+    const char *cwd;
+
+    /* Filter information */
+    int filter_mask;
+
+    /* Connection stats */
+    int files;
+    apr_off_t traffic;
+    apr_off_t bytes;
+    int transfers;
+
+    /* User defined connection timeout values */
+    int timeout;
+
+    /* For data transfers */
+    apr_off_t restart_point;
+    apr_sockaddr_t *clientsa;
+    apr_socket_t *csock;      /* The socket we connect/accept from */
+
+    /* Notes for response handling.  Yes, it's a bit of a hack. */
+    const char *response_notes;
+
+    const char *sending_file; /* The file we are currently sending */
+    apr_socket_t *datasock;   /* The data socket we send/recv on */
+    int in_sending;           /* Set by the filter once a file is in transit */
+    
+    /* Storage for the RNFR command.  */
+    const char *rename_from;
+
+    /* FTP transmission parameters */
+    int type;
+    /* When did we create the passive connection?  This is used 
+     * as a passive v.s. active (-1) flag, and within the process_request 
+     * loop to make sure that the passive connection isn't open indefinately.
+     */
+    apr_time_t passive_created;
+
+    /* The look-ahead for the next command, since it doesn't have 
+     * it's own request_rec just yet
+     */
+    apr_socket_t *cntlsock;   /* The control socket we must watch */
+    apr_pool_t *next_pool;
+    apr_bucket_brigade *next_bb;
+    char *next_request;
+    apr_size_t next_reqsize;
+};
+
+#define FTP_DEFAULT_UMASK (APR_GWRITE | APR_WWRITE)
+#define FTP_UNSPEC        -2
+#define FTP_TIMEOUT_LOGIN 120
+#define FTP_TIMEOUT_IDLE  600
+#define FTP_TIMEOUT_DATA  300
+#define FTP_MAX_LOGINS    3
+#define FTP_MAX_TRIES     10 /* Maximum number of times to retry on
+                                failed bind() and connect() */
+
+#define FTP_DATA_BLOCK_SIZE  48000 /* Size in bytes to read at a time
+                                      on the data channel */
+/* Wrappers for module_config
+ *
+ * mod_ftp.c
+ */
+#define ftp_get_module_config(v) \
+    ap_get_module_config(v, &ftp_module)
+#define ftp_set_module_config(v,val) \
+    ap_set_module_config(v, &ftp_module, val)
+
+extern ap_filter_rec_t *ftp_input_filter_handle;
+
+/* Routines for handling incoming connections
+ * 
+ * ftp_connection.c
+ */
+int ftp_process_connection(conn_rec *c);
+
+/* Routines for handling FTP requests 
+ *
+ * ftp_request.c 
+ */
+void ftp_process_request(request_rec *r);
+
+/* Routines specific to the FTP Protocol 
+ * 
+ * ftp_protocol.c 
+ */
+request_rec *ftp_read_request(ftp_connection *fc);
+apr_status_t ftp_read_ahead_request(ftp_connection *fc);
+apr_status_t ftp_reply(ftp_connection *fc, ap_filter_t *out_filter, 
+                       apr_pool_t *p, int n, int l, const char *fmt, ...);
+conn_rec *ftp_open_dataconn(request_rec *r, int write_not_read);
+apr_status_t ftp_show_file(ap_filter_t *out_filter, apr_pool_t *p, int code, 
+                           ftp_connection *fc, const char *file);
+void ftp_send_response(request_rec *r, int res);
+void ftp_data_init(conn_rec *c, ftp_connection *fc);
+apr_status_t ftp_ssl_init(conn_rec *c);
+int ftp_have_ssl(void);
+
+/* FTP command handlers registration.
+ */
+void ftp_register_core_cmds(apr_pool_t *pool);
+
+/* Routines for handling implementation of login limits.
+ * Note that the actual Mutexing functions and DB file
+ * functions are non-public.
+ *
+ * ftp_limitlogin.c
+ */
+apr_status_t ftp_mutexdb_init(server_rec *s, apr_pool_t *p);
+apr_status_t ftp_mutexdb_child_init(server_rec *s, apr_pool_t *p);
+apr_status_t ftp_mutexdb_cleanup(void *dummy);
+ftp_loginlimit_t ftp_limitlogin_check(const char *user, request_rec *r);
+int ftp_limitlogin_loggedout(const char *user, conn_rec *c);
+
+/* FTP utilities
+ *
+ * ftp_util.c
+ */
+#ifdef FTP_NO_GLOB
+struct ftp_direntry *ftp_direntry_get(request_rec *r);
+#else
+struct ftp_direntry *ftp_direntry_get_glob(request_rec *r, const char *pat);
+#endif /* FTP_NO_GLOB */
+
+void ftp_set_authorization(request_rec *r);
+int ftp_set_uri(request_rec *r, const char *arg);
+
+#ifdef WIN32
+#define mode_t int
+#endif
+
+mode_t ftp_unix_perms2mode(apr_fileperms_t perms);
+apr_fileperms_t ftp_unix_mode2perms(mode_t mode);
+
+char *ftp_toupper(apr_pool_t *p, const char *s);
+int ftp_check_maxclients(request_rec *r);
+
+/* FTP filters
+ *
+ * ftp_filters.c
+ */
+apr_status_t ftp_data_out_filter(ap_filter_t * f, apr_bucket_brigade * bb);
+apr_status_t ftp_crlf_filter(ap_filter_t *f, apr_bucket_brigade *bb);
+apr_status_t ftp_protocol_filter(ap_filter_t *f, apr_bucket_brigade *b,
+                              ap_input_mode_t mode, apr_read_type_e block,
+                              apr_off_t readbytes);
+apr_bucket *ftp_bucket_datasock_create(ftp_connection *fc,
+                                       apr_bucket_alloc_t *list);
+extern const apr_bucket_type_t ftp_bucket_type_datasock;
+
+/* FTP logging hooks into mod_log_config
+ *
+ * ftp_log.c
+ */
+const char *ftp_log_transfer_mode(request_rec *r, char *a);
+const char *ftp_log_action_flags(request_rec *r, char *a);
+const char *ftp_log_transfer_direction(request_rec *r, char *a);
+const char *ftp_log_accessed_anonymously(request_rec *r, char *a);
+const char *ftp_log_service_name(request_rec *r, char *a);
+const char *ftp_log_auth_method(request_rec *r, char *a);
+const char *ftp_log_auth_user_id(request_rec *r, char *a);
+
+/* dirlist stuff */
+#define FTP_MODESTRING_LEN 11  /* # of chars in a modestring, with \0 */
+#define FTP_UNKNOWN_MODESTRING "??????????"
+#define FTP_MAX_MODESTRING ((APR_UREAD  | APR_UWRITE | APR_UEXECUTE | \
+                             APR_GREAD  | APR_GWRITE | APR_GEXECUTE | \
+                             APR_WREAD  | APR_WWRITE | APR_WEXECUTE | \
+                             APR_USETID | APR_GSETID | APR_WSTICKY) + 1)
+
+/* FTP message functions for dealing with client messages
+ *
+ * ftp_message.c
+ */
+void ftp_message_generate(ftp_connection *fc, const char *inbuf,
+                          char *outbuf, size_t outlen);
+
+/* inet_pton functionallity ripped straight out of APR
+ *
+ * ftp_inet_pton.c
+ */
+int ftp_inet_pton(int af, const char *src, void *dst);
+
+/* FTP hooks */
+
+/* Flags for each FTP command handler.
+ *
+ * FTP_TAKE0 - This command takes no arguments.
+ * FTP_TAKE1 - This command takes a single argument.
+ * FTP_NEED_LOGIN - The user needs to be logged in to execute this command.
+ * FTP_DATA_INTR - The current data transfer is interrupted by this command.
+ */
+#define FTP_TAKE0            (1 << 0)
+#define FTP_TAKE1            (1 << 1)
+#define FTP_NEED_LOGIN       (1 << 2)
+#define FTP_DATA_INTR        (1 << 3)
+
+/* FTP command handler ordering */
+#define FTP_HOOK_FIRST  10
+#define FTP_HOOK_MIDDLE 20
+#define FTP_HOOK_LAST   30
+
+
+typedef int ftp_hook_fn(request_rec *r, const char *arg);
+
+/*
+ * This is the generic registration function, 
+ * see ftp_hook_cmd or ftp_hook_cmd_alias.
+ */
+FTP_DECLARE(void) ftp_hook_cmd_any(const char *key, ftp_hook_fn *pf, 
+                                   const char *alias, int order, 
+                                   int flags, const char *help);
+
+/*
+ * This this the main hook that is used to hook into mod_ftp.  The
+ * key is the command, i.e. "DELE".  The ftp_hook_fn is the function 
+ * pointer that will handle this request.  The flags variable is an 
+ * integer that is used to tell the dispatcher (ftp_run_cmd) properties
+ * about the handler that is about to be run.  These flags include 
+ * whether the user needs to be logged in, and how many arguments we 
+ * expect the command to have. See the flags above for details.  The 
+ * final argument is the help string that will be displayed if the user
+ * does "HELP cmd".
+ */
+#define ftp_hook_cmd(aliascmd, pf, order, flags, desc) \
+    ftp_hook_cmd_any((aliascmd), (pf), NULL, (order), \
+                     (flags), (desc))
+
+/*
+ * This this the alternate hook that is used to hook command aliases
+ * into mod_ftp.  The key is the aliased command, i.e. "XPWD".  
+ * The ftp_hook_fn is used instead to store the base command, i.e. "PWD".
+ * The flags variable is an integer that is used to tell the dispatcher 
+ * (ftp_run_cmd) properties about the handler that is about to be run.  
+ * These flags must match the base command hook registration.  This macro
+ * will always add FTP_ALIAS_CMD to the flags.  See the flags above for 
+ * details of other flags.  The final argument is the help string that will 
+ * be displayed if the user does "HELP cmd".
+ */
+#define ftp_hook_cmd_alias(aliascmd, basecmd, order, flags, desc) \
+    ftp_hook_cmd_any((aliascmd), NULL, (basecmd), (order), \
+                     (flags) , (desc))
+
+/*
+ * This is the function that translates ftp aliased methods.
+ * It will retreive the base command from the cmd hash.
+ */
+const char *ftp_get_cmd_alias(const char *key);
+
+/*
+ * This is the function that runs the ftp handler.  It will iterate through
+ * the linked list of entries that returned from the cmd hash.
+ */
+int ftp_run_cmd(request_rec *r, const char *key);
+
+/*
+ * This function reports (true|false) if a given command should
+ * abort an active data transfer
+ */
+int ftp_cmd_abort_data(const char *key);
+
+typedef struct ftp_cmd_entry ftp_cmd_entry;
+
+/*
+ * The FTP command structure contains useful information about the FTP
+ * handler.  This information is filled out when a command is registered
+ * using ftp_hook_cmd(), which also puts the handler into the global hash.
+ */
+struct ftp_cmd_entry
+{
+    const char *key;                  /* The key, e.g. "DELE" */
+    ftp_hook_fn *pf;                  /* Pointer to the handler */
+    const char *alias;                /* The aliased command e.g. "CDUP" */
+    int order;                        /* Handler ordering */
+    int flags;                        /* Flags for this command.  See FTP_
+                                       * defines above
+                                       */
+    const char *help;                 /* Help string for this command */
+    struct ftp_cmd_entry *next;       /* Pointer to the next handler */
+};
+
+#endif

Propchange: incubator/mod_ftp/trunk/include/mod_ftp.h
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/mod_ftp/trunk/include/mod_ftp.h
------------------------------------------------------------------------------
    svn:executable =