Initial revision

This commit is contained in:
hsn 2003-09-09 12:11:24 +00:00
parent 1273c9fff5
commit 86c16ecb3a
2 changed files with 249 additions and 0 deletions

139
FILES Normal file
View File

@ -0,0 +1,139 @@
Complete content of the FSP package:
--------------------------------------------------
ChangeLog A list of all the changes made to the source code
seperated by version.
FILES This list.
INFO Information about the purpose of FSP
INSTALL Installation instructions for FSP
PROTOCOL Unofficial FSP protocol definition
MACHINES Where FSP compiles out of box
faq.html FSP FAQ
Makefile.in input file for building makefile from configure script.
Makefile.am file for generating Makefile.in
aclocal.m4 Automake macros
install-sh A shell script for installation.
setup CSH script for initializing FSP (Unix).
config.status GNU autoconf that will be regenerated every time configure
is run. It is used to regenerate the same configuration as
before.
configure SH script generated by GNU autoconf from configure.in used
to test certain parameters of the operating system in order
to enable compilation with the minimum of human
intervention.
configure.ac Input script to autoconf used to generate configure.
fspd.conf An example fspd.conf file suitable for copying and editing.
bsd_src/ Directory containing additional sources derived from
those in public archive on uunet.uu.net. Most sources
are modified to deal with FSP or some architectures.
Makefile.in input file for building makefile from configure script.
cmp.c BSD compare routines.
find.c Source for BSD find.
fnmatch.c filename matching functions for BSD find.
function.c BSD find function parser.
glob.c modified BSD globbing routine.
ls.c Modified ls source.
operator.c operator parsing code for BSD find.
option.c option parsing for BSD find.
print.c Directory print routines, modified for VMS.
random.c BSD random/srandom functions.
util.c additional util routines for ls.
client/ Code common to all clients
Makefile.in input file for building makefile from configure script.
lib.c Core routines of the client library.
lock.c Simple file locking code to do client multi-plexing.
util.c Supplementry routines of the client library.
clients/ Code for the standalone and merged client versions
Makefile.in input file for building makefile from configure script.
fcatcmd.c These compiles into individual client utilities.
fcdcmd.c Those with a "cmd" in their name will require
fducmd.c shell alias wrappers either because they do their own
ffindcmdc file globbing on argv based on directory information
fgetcmd.c gotten from the server or because the modify the
fgrabcmd.c environment variables (fcdcmd and fhostcmd)
fhostcmd.c
flscmd.c
fmkdir.c
fprocmd.c
fput.c
frmcmd.c
frmdircmd.c
fver.c
merge.c This file is used to call the other client programs
when program merging option is used. Rather than
compiling into individual client utility programs,
users may opt to build a single program which
contains all client funtionalities, which are to
be distinguished at run time by the name used to
activate the program. Significant space saving can
be achieved on some machines.
common/ Directory containing code used in both server and clients
Makefile.in input file for building makefile from configure script.
strdup.c Unix strdup function.
udp_io.c Lowest level routines that deal with the unix inet
sockets. Some changes might be needed to get it
running with other network implementations.
include/ Directory containing all include files.
bsd_extern.h External definitions for all the functions from bsd_src dir.
c_extern.h External definitions for all the functions from client dir.
client_conf.h Client options that need to be manually configured.
client_def.h Definition for the client code.
co_extern.h External definitions for all the functions from common dir.
common_def.h Definitions common to both the server code and the
client code.
find.h definitions for the BSD find command.
ls.h definitions for the BSD ls command.
my-string.h Headerfile to avoid some bogus redefinitions of strings.
proto.h function prototyping headers.
s_extern.h External definitions for all the functions from server dir.
server_conf.h Server options that need to be manually configured.
server_def.h Definitions for the server code.
tweak.h System dependent configurations options. This file will
be automatically generated from tweak.h.in when the
configure script is run.
tweak.h.in input file to configure script used to generate tweak.h
version.h header file containing FSP version information.
man/ Manual pages for the FSP clients/server.
Makefile Unix makefile for installing the man pages in the proper
place.
Man pages
fcat.1
fcatcmd.1
fcd.1
fcdcmd.1
fdu.1
fducmd.1
ffind.1
ffindcmd.1
fget.1
fgetcmd.1
fgrab.1
fgrabcmd.1
fhost.1
fhostcmd.1
fls.1
flscmd.1
fmkdir.1
fpro.1
fprocmd.1
fput.1
frm.1
frmcmd.1
frmdir.1
frmdircmd.1
fspd.1
fver.1
fsp_prof.5
server/ Files needed to compile the FSPD server
Makefile Unix Makefile for compiling the server.
conf.c fspd configuration file reading routines.
file.c Server routines for file i/o.
filecache.c fp-caching routines.
host.c Server routines for maintaining client database.
lib.c Server routines for inet socket i/o.
main.c Server main routine and dispatch loop.

110
include/tweak.h Normal file
View File

@ -0,0 +1,110 @@
#ifndef _FSP_TWEAK_H_
#define _FSP_TWEAK_H_ 1
#include "config.h"
#ifndef HAVE_FSEEKO
/* fallback to old fseek if no fseeko is available */
#define fseeko fseek
#endif
#ifdef STAT_MACROS_BROKEN
#define S_ISREG(mode) ((mode) & S_IFREG)
#define S_ISDIR(mode) ((mode) & S_IFDIR)
#endif
#define FSP_STAT stat
#define fexist(A) (!access(A,F_OK))
#define touch(A) close(open(A,O_CREAT,0600))
#ifdef min
#undef min
#endif
#define min(x,y) ((x) < (y) ? (x) : (y))
#if defined(HAVE_DIRENT_H)
#define HAVE_STRUCT_DIRENT 1
#else
#undef HAVE_STRUCT_DIRENT
#endif
#ifdef HAVE_TZFILE_H
#include <tzfile.h>
#endif
#ifndef SECSPERDAY
#define SECSPERDAY (long)60*60*24
#endif
#ifndef DAYSPERNYEAR
#define DAYSPERNYEAR 365
#endif
#if defined(HAVE_D_INO) && !defined(HAVE_D_FILENO)
#define d_fileno d_ino
#else
#if !defined(HAVE_D_INO) && defined(HAVE_D_FILENO)
#define d_ino d_fileno
#endif
#endif
#if !defined(BYTE)
#if SIZEOF_CHAR == 1
#define BYTE char
#elif SIZEOF_VOID == 1
#define BYTE void
#else
#error "Need 1 byte wide type"
#endif
#endif
/****************************************************************************
* Macros to read and write multi-byte fields from the message header.
****************************************************************************/
#if SIZEOF_SHORT == 2
#define WORD_TYPE_2 unsigned short
#else
#if SIZEOF_UNSIGNED == 2
#define WORD_TYPE_2 unsigned
#endif
#endif
#if SIZEOF_LONG == 4
#define WORD_TYPE_4 unsigned long
#else
#if SIZEOF_UNSIGNED == 4
#define WORD_TYPE_4 unsigned
#endif
#endif
#ifdef WORD_TYPE_4
/* there is an integer type of size 4 */
#define BB_READ4(V) ntohl(*(WORD_TYPE_4 *)(V))
#define BB_WRITE4(V,A) *(WORD_TYPE_4 *)(V) = htonl(A)
#else
/* there is no integer type of size 4 */
#define BB_READ4(V) ((((V)[0] << 24) & 0xff000000) + \
(((V)[1] << 16) & 0x00ff0000) + \
(((V)[2] << 8) & 0x0000ff00) + \
(((V)[3] ) & 0x000000ff))
#define BB_WRITE4(V,A) ((V)[0] = ((A) >> 24) & 0xff, \
(V)[1] = ((A) >> 16) & 0xff, \
(V)[2] = ((A) >> 8) & 0xff, \
(V)[3] = ((A) ) & 0xff)
#endif
#ifdef WORD_TYPE_2
/* there is an integer type of size 2 */
#define BB_READ2(V) ntohs(*(WORD_TYPE_2 *)(V))
#define BB_WRITE2(V,A) *(WORD_TYPE_2 *)(V) = htons(A)
#else
/* there is no integer type of size 2 */
#define BB_READ2(V) ((((V)[0] << 8) & 0xff00) + \
(((V)[1] ) & 0x00ff))
#define BB_WRITE2(V,A) ((V)[0] = ((A) >> 8) & 0xff, \
(V)[1] = ((A) ) & 0xff)
#endif
#include "proto.h"
#endif /* _FSP_TWEAK_H_ */