Intial commit

This commit is contained in:
Mario Fetka
2024-05-27 16:13:40 +02:00
parent f8dc12b10a
commit d71d446104
2495 changed files with 539746 additions and 0 deletions

27
prospero/ACKNOWLEDGEMENTS Normal file
View File

@@ -0,0 +1,27 @@
We would like to thank the following people for bug fixes, for porting
Prospero to other machine types (and feeding back the changes), or for
adding new features.
Eric Anderson SURAnet
Joseph Boykin Encore Computer Corporation
Benjamin Britt University of Southern California (ISI)
Kwynn Buess University of Southern California (ISI)
Sio-Man Cheang University of Southern California (ISI)
Steve Cliffe University of Wollongong, Australia
John Curran NSF Network Service Center (NNSC)
Alan Emtage Bunyip Information Systems
George Ferguson University of Rochester
Manjiry Gadagkar University of Southern California
Bill Heelan Bunyip Information Systems
Sanjay Joshi University of Southern California
Jonathan Kamens MIT Project Athena
Brendan Kehoe Cygnus
Dan King University of Southern California
Case Larsen Lawrence Berkeley Laboratory
Gaute Nessan University of Tromsoe, Norway
Mitra Pandora Systems
Rainer Orth University of Cologne, Germany
Bob Smart CSIRO, Australia
Prasad Upasani University of Southern California (ISI)
-- Clifford Neuman and Steven Augart

268
prospero/CHANGES Normal file
View File

@@ -0,0 +1,268 @@
Changes since Alpha.5.2b:
Documentation about the list structures is now present in the library manual.
NAMED ACLs are new.
Database internals have changed: dsrobject() format for files.
Databases now call dsrobject(). Databases now use NAMED acls for
their database ACLs.
Bug fixed: connection ID now reset upon each fork.
PROSPERO-CONTENTS access method added.
Code ported to SOLARIS and SCO dialects of UNIX.
Changes from Alpha.5.2a to Alpha.5.2b:
Fixed bug where GOPHER-GW would sometimes crash with a segmentation
fault, depending on your compiler's implementation of ANSI C
variable-length argument lists.
Made Mail/Save/Print features work correctly in the menu browser.
They no longer open the same file twice, and they now handle errors
appropriately.
Changed output format for vls -A; should be less confusing. Multiple
tokens in a SEQUENCE are now separated with ' ; '.
ARDP library now works correctly even if you make an ARDP call, then
fork and make ARDP calls in the child processes. This used to break.
This was causing great trouble to potential collaborators.
Fixed ACL checking bugs in Version 1 backwards compatability stuff
(server/dirsrv_v1()). These bugs were introduced in Alpha.5.2.
Changes from Alpha.5.2 to Alpha.5.2a:
Major bug fix: Message fragmentation and reassembly seem to be
finally fixed correctly. They now work even for messages which do not
contain a newline somewhere within them, and work both for the client
and for the server.
Minor bug fixed in way FORWARDED response is given on the server; this
won't affect current users much, since forwarding pointers are still
not in widespread use.
Minor bugs fixed in lower levels of ARDP library; these do not affect
people who were not directly using the ARDP library.
Changes between Beta.5.1 and Alpha.5.2:
The MENU browser interface and GOPHER-GW gateway are new. See the README file
or doc/gopher.ann or the user's manual.
Link attributes can now be added to all links, including those which
are stored in native UNIX directories (for example the anonymous FTP
area). The link target (FILE/DIRECTORY) is now tested and returned
for all links in a directory, even if they are in native unix
directories. The directory server used to, as an efficiency hack, not
bother statting big native directories, but would sometimes lie and
claim directories were actually FILEs. This information is cached on
the server for most directories. If PSRV_CACHE_NATIVE is defined,
then this cacheing will occur even for entirely native directories.
OBJECT attributes are cached in cached directories.
Bugs fixed in Kerberos version 5 support. There is a new definition
in pserver.h, KERBEROS_SRVTAB.
Disabled return of connection ID for V4 clients. This change
compensates for a bug in some V4 clients due to the use of an
incorrect type (signed long vs. unsigned short) as the connection ID.
This change has no effect on the V5 protocol. However, it does make a
number of older clients, including most versions of the xarchie client,
work with the new code.
The server's CREATE-OBJECT function with the DIRECTORY option now
creates the subdirectory first and only then creates a link to it.
This keeps a link to nowhere from appearing in case of a system crash
during the directory creation process.
The server function dswdir() that writes out modified directories now
writes them out to a temporary file and then atomically renames it to
the correct filename. This means that in case of running out of disk
space or other system failure, no information will be lost and the
directory state will remain consistent. This feature was inspired
after PROSPERO.ISI.EDU's main disk filled up and a Prospero directory
that belonged to the implementor of this feature (swa) was affected.
A number of places in the code which used to store protocol messages
in static buffers now store them in dynamically allocated buffers.
Attributes and protocol messages now can have arbitrarily long tokens
in them. This change affected enough places in the code that we have
made the first release containing it an Alpha (Alpha.5.2); the default
prospero.tar.Z file still points to Beta.5.1.
NEWVS used to work incorrectly when making a new virtual system that
was to have multiple principals in the initial ACL. Fixed.
The old pkl and psrvchat commands have been replaced by the new
'padmin' command. Padmin can be used to administer a Prospero server
(kill it, restart it, set the message of the day). It can also be
used by a programmer to send raw Prospero protocol messages to the
server (with the -command option) and by anybody to retrieve the
message of the day (with the -get MOTD option). Documentation in the
user's manual.
p__vfsetup and p__vcd now let you explicitly override your SHELL
environment variable with '-s sh' or '-s csh' flags. gen_vfsetup and
p__vfsetup now generate commands which by default include the -s sh or
-s csh flag as appropriate. The old hack of checking your SHELL
environment variable in the absence of such a flag will stick around
for a while, but will probably go away in a future release. This
feature was inspired by a problem that a user who had renamed his
shell experienced.
rd_vlink(".") now works correctly; this fixes the behavior of set_acl
and list_acl.
list_acl and set_acl don't dump core any more when called with
incorrect arguments. In addition, they are now more flexible about
how arguments may be specified. Fixed case where some legal arguments
to set_acl sometimes segfaulted.
Compiling with HPUX prototypes used to generate warnings of the form:
"warning: argument passing of non-const * pointer from const *". It
doesn't any more.
Compiling under HPUX used to generate warnings about the arguments to
select() and bcopy() and wait(); it doesn't any more.
Enhancement to lib/pfs/p__req.c: userids not in the passwd database
are sent across the network as uid#<decimal number> instead of as
*nobody*.
Changes between Alpha.5.1 and Beta.5.1:
One bug fix: The server's CREATE-OBJECT command used to reuse
directory names even if there were still active links to those
directories. It now generates new unique names. As a result, the
following sequence will no longer destroy the contents of the new
directory tlink:
vmkdir test
vln some-file test/some-file
vln test tlink
vrm test
vmkdir test
Changes between Alpha.5.0 and Alpha.5.1:
A special stripped-down FTP only version of the release is now
available, for sites that want to publish their anonymous FTP archive
areas through Prospero and don't want to worry about the full gamut of
configuration options.
The user-level name format has been enhanced. Special characters in
user-level names ('#', ':', '/', '(', ')', and now '\') can be quoted
by preceding them with a backslash ('\'). This change will be useful
as more new databases with unusual names are integrated into the
propero naming network. The library routines p_uln_index() and
p_uln_rindex() have been added to help in manipulating the new name
format.
get_vdir() now takes a pointer to a list of tokens as its acomp
argument instead of a single string with slash separating the multiple
components. This makes the code much cleaner and solves the problem
of get_vdir() reading files whose user-level names contain slashes.
A similar change has been made to the database function code on the server.
The code sending names across the network has been improved; Spaces in
file names sent across the network still occasionally caused problems
in the Alpha 5.0 release; they no longer do in Alpha 5.1.
A new type of link has been added: INVISIBLE links. You can make them
by giving the new '-i' option to vln. You can list them by giving the
new '-i' option to vls. They are just like dot files in UNIX, except
that their names can have any format.
A new LOCAL access method has been added. Along with it is a new
definition in pserver.h called SHARED_PREFIXES. This definition,
among other things, makes it very easy to retrieve files through NFS
on systems that run an automount demon.
VGET can now retrieve files using any access method. VGET used to not
know about AFS or NFS.
The psite.h file now also contains a new option for special
applications, PCOMPAT_SUPPORT_FTP. If defined, routines linked with
the pcompat library (such as our version of CAT) will prompt for an
FTP username and password if necessary in order to access a file. In
other words, they, too, can retrieve with any access method.
Some unusual cases involving forwarding of links and expansion of
union links have been fixed.
The server logging has been improved slightly.
The protocol has been extended so that it is easier to add new types
of FIELD attributes and so that multiple-component names are sent in a
cleaner fashion. Alpha 5.0 clients continue to work, as do pre-5.0 clients.
AIX support for the server has been added.
CHANGES between Beta.4.2 and Alpha.5.0:
This release speaks version 5 and version 1 of the Prospero protocol.
Previous releases have all spoken only version 1. The new server is
backwards-compatable with clients speaking the previous version
(version 1) of the prospero protocol. This is described in greater
depth in the document server/COMPATABILITY. The clients only speak
version 5 and will not work with servers still speaking only
version 1. There have been many updates in the new version of the
protocol.
This release can be configured to perform authentication of users
using Kerberos version 5. Version 5 is still experimental; version 4
is not supported.
This release supports Archie 3 servers in addition to the older Archie 2.
Quoting of names internally in the Prospero protocol is now fully
supported (it was not in previous versions of Prospero). Therefore,
host-specific object names may now have spaces or other strange
characters in them, as may attribute names and values and filenames.
This release includes support for PREDEFINED filters that run on the
server side. Such filters solve the security problems that have
plagued filters in the past. A later release will come with a number
of predefined standard server and client
This release includes support for remotely modifying link and object
attributes with the library routines pset_at() and pset_linkat() and
the user program SET_ATR.
VLN now handles external links rather differently from the way it used
to. To make an external link to a file reachable by anonymous FTP,
type:
vln -e AFTP hostname name-on-that-host BINARY new-name
or
vln -e AFTP hostname name-on-that-host TEXT new-name
Until we finish revising the user's manual, contact us with questions
about the new vln and about set_atr.
AF has not been ported to the new release and will probably never be.
Filters have changed quite a bit. You can add filters to links by
using the SET_ATR program with the -linkprec and -filter options to
modify the FILTER attribute on the link of interest.
Client developers should note that some of the fields in some of the
structures have been renamed or changed in format. FILTER and PATTRIB
structures have been introduced.
See the file doc/v5.announcement for a discussion of additional
changes.
This release of Prospero includes a standalone client to query archie
servers. See the README file.
This release also includes an alternative ls. To compile first build
Prospero (either with or without the compatibility library), then
connect to the user subdirectory and type make als. als is still
under development by Steve Cliffe (steve@cs.uow.edu.au). Please send
any comments or bug reports related to als to him. Eventually, the
vls command will be replaced by als.

21
prospero/FILES Normal file
View File

@@ -0,0 +1,21 @@
.gdbinit
.purify
ACKNOWLEDGEMENTS
CHANGES
FILES
INSTALLATION
INSTALLATION_s
INSTALLATION_u
Makefile-list
Makefile.dist
Makefile_u
README
SUPPORTED
app
doc
include
lib
misc
pfs_threads.doc
server
user

6
prospero/INSTALLATION Normal file
View File

@@ -0,0 +1,6 @@
This release may be built as a client and server, or as a client only.
If building the client and server, please refer to INSTALLATION_s.
If building the client only, you should move Makefile_u to Makefile.
You may then remove the directories server and lib/psrv. You should
then refer to the file INSTALLATION_u.

156
prospero/INSTALLATION_s Normal file
View File

@@ -0,0 +1,156 @@
Instructions for installing the Prospero server:
This distribution includes the source code for the Prospero server and
client.
You must compile this release using ANSI C, since it makes use of the ANSI C
variable-length argument list facilities and of the ANSI prototypes.
A future release may be compilable under both ANSI and traditional C,
using a conversion program. If you feel like modifying the ansi2knr
conversion program to perform such a conversion, we would be delighted
to hear from you.
In order to install the server you will need a user-id to run it
under. I would suggest creating a new account with the name "pfs" or
"prospero" (but this is not required). The account does not need to
be loginable. The directory associated with this user-id will be used
to store shadow information.
Put this in the group you want to run the binaries - we suggest "pfs" or
"prospero".
You may also want to add the following entry to /etc/services. It is
not absolutely necessary to do so since the server will default to the
correct port if this entry is missing.
dirsrv 1525/udp # The Prospero directory service
IMPORTANT: THE FILE plog.h DEFINES THE CONFIGURATION FOR THE
INFORMATION TO BE LOGGED FOR EACH TYPE OF PROSPERO QUERY. AS
DISTRIBUTED, PROSPERO IS CONFIGURED TO LOG LOTS OF INFORMATION,
INCLUDING THE NAMES OF CLIENTS AND THE SPECIFIC COMMANDS ISSUED. THIS
INFORMATION SHOULD BE CONSIDERED SENSITIVE AND YOU MUST PROTECT THE
LOGFILE. ADDITIONALLY, YOU SHOULD CONFIGURE THE SERVER TO LOG ONLY
THE INFORMATION YOU ACTUALLY NEED. THIS CAN BE ACCOMPLISHED BY
EDITING THE DEFINITION OF INITIAL_LOG_VECTOR IN plog.h.
To tailor the server to your systems's configuration, edit the file
include/psite.h and include/pserver.h (this has changed since Prospero
release 4). The definitions that are of particular importance for
this distribution in psite.h are P_BINARIES and P_PATH. Note that
this distribution is intended to be configured as (a remote) part of
the ISI.EDU guest site. Thus, there are few changes to be made to
this file. If you wish to run your own Prospero site (not just your
own Prospero server), you should contact info-prospero@isi.edu to
obtain the proper distribution. If you will be using Kerberos version
5 authentication in your clients, #define P_KERBEROS. If you will be
using Kerberos authentication on the server, define PSRV_KERBEROS.
Note that, at this time, most sites are still using the older Kerberos
version 4 protocol, which this release does not support.
In pserver.h the definitions of imporance are P_DIRSRV_BINARY,
PSRV_HOSTNAME, PSRV_USER_ID, PSRV_LOGFILE, PSRV_ROOT, PSRV_FSHADOW,
PSRV_FSTORAGE, and AFTPDIRECTORY.
If you want to run a Gopher/Prospero gateway on your machine, then
define PSRV_GOPHER_GW in include/pserver.h, uncomment the appropriate
definition of SUBDIR in lib/psrv/Makefile, and uncomment the
appropriate definition of DB_LIBS in server/Makefile.
Next, edit include/pmachine.h. This file defines some of the machine
and OS specific parameters needed by Prospero.
Then edit the top level Makefile. First set any machine-specific
parameters. If you're installing the binaries under HP-UX or another
system which lacks a BSD-like INSTALL, redefine the INSTALL macro as
discussed in the Makefile. If you're on an AIX system redefine the
MACHDEF macro as discussed in the Makefile. If you're on a MIPS or
VAX ULTRIX system, you may also need to define the MACHDEF macro as
discussed in the Makefile.
Now set the installation parameters in the top level Makefile. Set
P_BINARIES to the directory in which the binaries are to be installed.
OWNER and GROUP should be set to the intended owner and group for the
Prospero binaries. TOPDIR is the name of the directory that will
contain the shadow subdirectory. (i.e. if P_FSHADOW is
/usr/pfs/shadow, then TOPDIR should be /usr/pfs). If you will be
using Kerberos version 5, KRB_LIBS and K_INC must be defined
appropriately for your site. This release must be compiled with an
ANSI compiler; therefore, the default is 'gcc'. If you're using
another compiler, you may want to change the definitions of CC and
CFLAGS.
If you are running the server in multi-threaded mode, you must
edit include/pthreads/pthread.h to include the full pathname of files.
If you will be building the PFS compatibility library (which redefines
open and several other library functions), you will have to:
a) remove the definition of P_NO_PCOMPAT from include/psite.h.
b) replace lib/pcompat/Makefile with lib/pcompat/Makefile.pcompat
c) replace app/Makefile with app/Makefile.pcompat
d) In addition, some systems will require a change to the SC_REDEF variable
definition in app/Makefile.pcompat.
Next, move back to the top level directory for the distribution and
type 'make'. Once the distribution has been successfully built, type
'make install'. If you are running a previous release of Prospero,
rename P_BINARIES to P_BINARIES.old before you 'make install', and
keep P_BINARIES.old around for a while in case you need to revert to
the previous version of Prospero.
The program pstart figures out the appropriate arguments for the
server, sets its UID to that under which the server is to run, and
starts dirsrv. By making pstart setuid and setgid to the ID under
which the server will run, any user will be able to start/restart the
server. You should start the server whenever your system is booted.
pstart may be called from the system startup. It will immediately set
its user and group IDs to that for the server.
If you are running a pre-version-5 prospero server in other than read
only mode, you will need to convert your old directory shadow
hierarchy to the new file format. Instructions for doing this are in
server/shadowcvt.doc. If your old server was read only, you do
not need to do this conversion.
The directory app contains the code for versions of cat and ls which
may be linked with the compatability library. Other programs may also
be linked with the compatability library, but filenames hardcoded into
those programs (or the libraries they call) might be resolved using
Prospero, causing unexpected behavior if those names do not identify
the same files in the active virtual system.
The directory "doc" contains the source to (a) a manual on using the
Prospero file system, (b) a manual describing version 5 of the
Prospero protocol, and (c) a terse description of the functions in the
Prospero library. The file "getting-started.txt" in that directory
contains enough information to get started. The file ".virt-sys" in
that directory contains a reference to a guest virtual system at the
USC Information Sciences Institute. This may be copied to your home
directory. If you would like your own virtual system contact
pfs-administrator@isi.edu.
Bug reports should be sent to:
bug-prospero@isi.edu
Requests or queries about the release should be sent to:
info-prospero@isi.edu
Requests for creation of virtual systems stored at the USC Information
Sciences Institute guest site, or requests to establish one's own
Prospero site should be sent to:
pfs-administrator@isi.edu
A public mailing list has been set up for discussion of Prospero.
Among other things, this list can be used to announce directories of
information that users have created and wish to share. The name of
the list is:
prospero@isi.edu
Requests for addition or deletions should be sent to:
prospero-request@isi.edu

96
prospero/INSTALLATION_u Normal file
View File

@@ -0,0 +1,96 @@
Instructions for installing the Prospero applications
This distribution includes the source code for the Prospero applications.
Select a directory in which the Prospero binaries will be installed.
The path of this directory will be compiled into some of the programs.
To tailor the applications to your systems's configuration, edit the
file include/psite.h (this has changed significantly since the last
release). The only definitions that should be applicable to you in
section 1 are P_BINARIES and P_PATH. If you will be using the default
site for the storage of virtual systems (which is likely to be the
case if you retrieved the client only distribution), there should be
no changes in section 2 either.
Next, edit include/pmachine.h. This file defines some of the machine
and OS specific parameters needed by Prospero.
Make sure that you have replaced the top level Makefile by Makefile_u.
Then edit the top level Makefile. First set any machine-specific
parameters. If you're installing the binaries under HP-UX or another
system which lacks a BSD-like INSTALL, redefine the INSTALL macro as
discussed in the Makefile. If you're on an AIX system redefine the
MACHDEF macro as discussed in the Makefile. If you're on a MIPS or
VAX ULTRIX system, you may also need to define the MACHDEF macro as
discussed in the Makefile.
Now set the installation parameters in the top level Makefile. Set
P_BINARIES to the directory in which the binaries are to be installed.
OWNER and GROUP should be set to the intended owner and group for the
Pospero binaries. This release must be compiled with an ANSI
compiler; therefore, the default is 'gcc'. If you're using another
compiler, you may want to change the definitions of CC and CFLAGS. We
set CFLAGS to enable debugging by default in order to facilitate bug
reporting. If you are low on diskspace, you may want to redefine
CFLAGS to turn off the inclusion of debugging information in the
executables, and you may want to strip the resulting executables.
If you will be building the PFS compatibility library (which redefines
open and several other library functions), you will have to:
a) remove the definition of P_NO_PCOMPAT from include/psite.h.
b) replace lib/pcompat/Makefile with lib/pcompat/Makefile.pcompat
c) replace app/Makefile with app/Makefile.pcompat
d) In addition, some systems will require a change to the SC_REDEF variable
definition in app/Makefile.pcompat.
Next, move back to the top level directory for the distribution and
type 'make'. Once the distribution has been successfully built, type
'make install'. If you are running a previous release of prospero,
rename P_BINARIES to P_BINARIES.old before you 'make install', and
keep P_BINARIES.old around for a while in case you need to revert to
the previous version of Prospero.
The directory app contains the code for versions of cat and ls which
may be linked with the compatability library. Other programs may also
be linked with the compatability library, but filenames hardcoded into
those programs (or the libraries they call) might be resolved using
Prospero, causing unexpected behavior if those names do not identify
the same files in the active virtual system.
The directory "doc" contains the source to (a) a manual on using the
Prospero file system, (b) a manual describing version 5 of the
Prospero protocol, and (c) a terse description of the functions in the
Prospero library. The file "getting-started.txt" in that directory
contains enough information to get started. The file ".virt-sys" in
that directory contains a reference to a guest virtual system at the
USC Information Sciences Institute. This may be copied to your home
directory. If you would like your own virtual system contact
pfs-administrator@isi.edu.
Bug reports should be sent to:
bug-prospero@isi.edu
Requests or queries about the release should be sent to:
info-prospero@isi.edu
Requests for creation of virtual systems stored at the USC Information
Sciences Institute guest site, or requests to establish one's own
Prospero site should be sent to:
pfs-administrator@isi.edu
A public mailing list has been set up for discussion of Prospero.
Among other things, this list can be used to announce directories of
information that users have created and wish to share. The name of
the list is:
prospero@isi.edu
Requests for addition or deletions should be sent to:
prospero-request@isi.edu

66
prospero/Makefile Executable file
View File

@@ -0,0 +1,66 @@
#
# Copyright (c) 1991-1994 by the University of Southern California
#
# For copying and distribution information, please see the file
# <usc-license.h>.
#
#
# This is the top level Makefile for the Prospero Directory Service.
# Include configuration options.
SOURCEBASE = .
include Makefile.config
# Programs that live in subdirectories, and have makefiles of their own.
# The ordering is important here; libraries are built before the parts of
# Prospero that have to be linked with them are.
# put OPTIONAL_LIB_SUBDIRS at the end here, because lib/psrv/wais_gw contains
# executables that are needed by WAIS.
LIB_SUBDIRS = \
lib/pfs \
lib/ardp \
lib/psrv \
lib/filters \
$(OPTIONAL_LIB_SUBDIRS)
BIN_SUBDIRS = \
$(OPTIONAL_BIN_SUBDIRS) \
server \
user
SUBDIRS = \
$(LIB_SUBDIRS) \
$(BIN_SUBDIRS)
all: all_subdirs
install: installdirs installfiles
installdirs:
-mkdir $(DIR755) $(DIR1777)
-chown $(OWNER) $(DIR755) $(DIR1777)
-chgrp $(GROUP) $(DIR755) $(DIR1777)
-chmod 755 $(DIR755)
-chmod 1777 $(DIR1777)
# alternative version of above if you have a good version of (INSTALL) available:
#-for i in $(DIR755) ; \
# do $(INSTALL) -d -o $(OWNER) -g $(GROUP) -m 755 $$i ;\
# done
#-for i in $(DIR1777) ; \
# do $(INSTALL) -d -o $(OWNER) -g $(GROUP) -m 1777 $$i ;\
# done
installfiles:
-for i in $(BINSUBDIRS); do \
(cd $$i; \
$(MAKE) $(PASTHRU) install); \
done
# Dependencies

453
prospero/Makefile.boilerplate Executable file
View File

@@ -0,0 +1,453 @@
#/*
# * Copyright (c) 1991-1994 by the University of Southern California
# *
# * For copying and distribution information, please see the file
# * <usc-license.h>.
# */
#
# This is the boilerplate Makefile for the Prospero Directory Service.
# It contains generic targets so that they do not have to be repeated
# for each inferior makefile.
#
## ENVIRONMENT ASSUMPTIONS
# Every Makefile in Prospero has (possibly unset) variables in it
# named PROGS, SPECIAL_PROGS, DATA_FILE_TARGETS, OTHERPROGS,
# CFILES, OBJECTS, SUBDIRS, SOURCEBASE
# PROGS:
# These are the programs which follow the default rule for making and
# which are installed by default. They will be deleted during cleanup.
# SPECIAL_PROGS:
# These are also installed by default, but it have their own special rules
# for making. They will be deleted during cleanup.
# DATA_FILE_TARGETS:
# Targets made that are installed in the bin (with mode 644 or 664) but
# are not executables. They will be deleted
# during cleanup.
# General-purpose libraries are DATA_FILE_TARGETS
# OTHERTARGETS:
# These programs and other targets also follow the default making rules,
# but are not installed by default. They will be deleted during cleanup.
# SPECIAL_OTHERTARGETS:
# These programs and other targets are not installed by default.
# They have their own special rule sets for making. They will be deleted
# during cleanup.
# Special-purpose libraries are DATA_FILE_TARGETS
# SUBDIRS:
# Subdirectories that this Makefile will recursively execute in.
# SOURCEBASE:
# A relative path up to the top-level Makefile.
# Every Prospero Makefile:
#
# Every Prospero Makefile must have a line labelled '# Dependencies',
# after which the 'setdependencies' development utility is free to write.
# It must have a first target named 'all' and another target named 'install'
# The 'install' target does not currently install libraries. Perhaps later.
# Unclear what the users want here.
## ADDITIONAL CONVENTIONS
# The targets ending in _LIB are real file names of single libraries that
# Prospero is compiled with.
# Targets ending in _LIBS are linker command lines.
# They refer to libraries in the Prospero distribution (_LIB libraries)
# and to system libraries ("-lm", especially).
# They also may contain "-u" linker flags.
# Each target ending in _LIBS has a matching _LIBS_DEPENDENCIES
# That refers to files in this distribution (i.e., everything that may
# change during the development process.) They contain no -l or -u.
##############################################################################
##############################################################################
##############################################################################
#
# This top-level dependency is important so that we will always run
# 'all' as our top dependency, and so that Makefile.boilerplate can
# be included into a regular Makefile, irrespective of order.
boilerplate_all: all
###
### VARIABLES used by all Makefiles.
###
# Do not change this line.
# CFLAGS set up above. This adds stuff to it.
CFLAGS = $(CCFLAGS) $(INCS) $(MACHDEF)
#### SED-SCRIPT
# We pipe compilation jobs passed on to subdirectories
# through this sed script in order to precede CC and GCC error
# messages with the full pathname name of the file at fault.
# This lets EMACS's (next-error) function visit compilation errors that
# occur in subdirectories.
SED_SCRIPT = sed -e '/^[a-z0123456789_\/\.]*\.[ch]:/s,^,'$$i'\/,'
##### Prospero Include Files
P_INC = -I$(SOURCEBASE)/include
# Used by all subsidiary makefiles on an as-needed basis.
INCS = $(P_INC) $(K_INC)
### All of these are passed through to the children/descendants.
### These are all the items which might be set differently in
### Makefile.config, and therefore have to be passed on to
### descendants when they change.
## PASTHRU is officially dead now, because it is incompatible with never
## having to specify the old SOURCEBASE. --swa, 5/8/94
##
#PASTHRU = \
# AR="$(AR)" \
# AR_FLAGS="$(AR_FLAGS)" \
# CC="$(CC)" \
# CFLAGS="$(CFLAGS)" \
# COMPILER_PREPENDS_C_SYMBOLS_WITH_UNDERSCORE="$(COMPILER_PREPENDS_C_SYMBOLS_WITH_UNDERSCORE)" \
# GENERATION="$(GENERATION)" \
# GENERATIONSUFFIX="$(GENERATIONSUFFIX)" \
# GROUP=$(GROUP) \
# INSTALL="$(INSTALL)" \
# KRB_LIBS="$(KRB_LIBS)" \
# LIBS="$(LIBS)" \
# MACHDEF="$(MACHDEF)" MAKE=$(MAKE) \
# MORE_USER_PROGS="$(MORE_USER_PROGS)" \
# MORE_SERVER_PROGS="$(MORE_SERVER_PROGS)" \
# OWNER=$(OWNER) \
# P_BINARIES="$(P_BINARIES)" \
# RANLIB="$(RANLIB)" \
# RM="$(RM)"
# VCACHE_LIBS="$(VCACHE_LIBS)" \
# VCACHE_LIBS_DEPENDENCIES="$(VCACHE_LIBS_DEPENDENCIES)" \
# WCFLAGS="$(WCFLAGS)"
# The targets ending in _LIB are real file names of single libraries that
# Prospero is compiled with.
PFS_LIB = $(SOURCEBASE)/lib/pfs/libpfs.a
FIL_LIB = $(SOURCEBASE)/lib/filters/libfilter.a
CMP_LIB = $(SOURCEBASE)/lib/pcompat/libpcompat.a
RDP_LIB = $(SOURCEBASE)/lib/ardp/libardp.a
SRV_LIB = $(SOURCEBASE)/lib/psrv/libpsrv.a
VCACHE_LIB = $(SOURCEBASE)/user/vcache/libpvcache.a
GOPHER_GW_LIB = $(SOURCEBASE)/lib/psrv/gopher_gw/libpgoph_gw.a
WAIS_GW_LIB = $(SOURCEBASE)/lib/psrv/wais_gw/libpwais_gw.a
# For ARCHIE servers, version 3. To use this, you will need to get the ARCHIE
# distribution from Bunyip Information Systems.
#ARCHIE2_LIB = $(SOURCEBASE)/lib/psrv/archie2/libpsarchie.a
# For ARCHIE servers, version 3. To use this, you will need to get the ARCHIE
# distribution from Bunyip Information Systems.
#ARCHIE3_PSARCHIE_LIB = $(SOURCEBASE)/lib/psrv/archie3/libpsarchie.a
ARCHIE3_PARCHIE_LIB = $(SOURCEBASE)/lib/psrv/archie3/libparchie.a
#### LIBRARIES USED FOR ACTUALLY LINKING AND DEPENDENCIES
## PFS_VCACHE_LIBS
# Libraries to use if you link with LIBPFS and you use the VCACHE library.
# This is usually referred to indirectly, through USE_PFS_VCACHE_LIBS,
# which is defined in Makefile.config
# PFS_VCACHE_LIBS is a list of all the libraries one needs in order to access
# the PFS library if it is linked with the VCACHE library.
# The libpvcache library (Special purpose hack) has the vcache2a() function
# as its only entry point.
# Documentation on the content of this entry:
# "-u $(COMPILER_PREPENDS_C_SYMBOLS_WITH_UNDERSCORE)vcache2a" is
# because of cross-dependencies between $(VCACHE_LIB) and $(PFS_LIB)
# "-u $(COMPILER_PREPENDS_C_SYMBOLS_WITH_UNDERSCORE)waisRetrieveFileByHsoname"
# is not strictly necessary. It serves as a reminder of why we're
# including $(WAIS_GW_LIB).
# We need to integrate the WAIS library (at least
# waisRetrieveFileByHsoname) in with libpvcache.
# -lm is needed for $(WAIS_GW_LIB)
# It is unclear to me why we need to GOPHER_GW_LIB
PFS_VCACHE_LIBS = \
-u $(COMPILER_PREPENDS_C_SYMBOLS_WITH_UNDERSCORE)vcache2a \
$(VCACHE_LIB) \
$(GOPHER_GW_LIB) \
-u $(COMPILER_PREPENDS_C_SYMBOLS_WITH_UNDERSCORE)waisRetrieveFileByHsoname \
$(WAIS_GW_LIB) -lm \
$(PFS_LIBS)
# VCACHE_LIBS_DEPENDENCIES
# Bits of Prospero that, if they change, mean that vcache-lib-using
# programs should be recompiled too. This is used by the Makefile
# dependencies.
PFS_VCACHE_LIBS_DEPENDENCIES = \
$(VCACHE_LIB) \
$(GOPHER_GW_LIB) \
$(WAIS_GW_LIB) \
$(PFS_LIBS_DEPENDENCIES)
### PFS_LIBS
### This library is used by any programs that want to link with the normal
### Prospero PFS library.
### This refers to USE_VCACHE_LIBS and USE_VCACHE_LIBS_DEPENDENCIES, in
### "Makefile.config"
### This does NOT include anything having to do with the VCACHE library.
### Makefile.config sets USE_VCACHE_LIBS to either PFS_LIBS or to
### PFS_VCACHE_LIBS
# Documentation on the content of this entry:
# "-u $(COMPILER_PREPENDS_C_SYMBOLS_WITH_UNDERSCORE)stequal" is here
# because the ARDP DNS caching uses "stequal" to make its
# comparisons.
# "-u $(COMPILER_PREPENDS_C_SYMBOLS_WITH_UNDERSCORE)plog" is because
# of cross-dependencies between SRV_LIB and PFS_LIB. There is a
# call to plog() from ardp_accept(). Will be fixed in next full
# release.
# "-u $(COMPILER_PREPENDS_C_SYMBOLS_WITH_UNDERSCORE)pafree" is because
# the $(RDP_LIB) depends upon the 'pafree' function in PFS_LIB.
# $(LIBS) is here because of SCOUNIX, which needs "-lsocket"
PFS_LIBS = \
-u $(COMPILER_PREPENDS_C_SYMBOLS_WITH_UNDERSCORE)plog \
$(SRV_LIB) \
-u ${COMPILER_PREPENDS_C_SYMBOLS_WITH_UNDERSCORE}stequal \
-u ${COMPILER_PREPENDS_C_SYMBOLS_WITH_UNDERSCORE}pafree \
-u ${COMPILER_PREPENDS_C_SYMBOLS_WITH_UNDERSCORE}sindex \
$(PFS_LIB) \
$(FIL_LIB) \
$(RDP_LIB) \
$(KRB_LIBS) \
$(LIBS)
PFS_LIBS_DEPENDENCIES = \
$(SRV_LIB) \
$(PFS_LIB) \
$(FIL_LIB) \
$(RDP_LIB) \
$(KRB_LIBS_DEPENDENCIES) \
$(LIBS_DEPENDENCIES)
### SRV_LIBS
### This library is used by any server program that needs PFS and PSRV
### libraries. (i.e., by DIRSRV). DIRSRV does not do file retrieval, so
### we won't need VCACHE_LIBS here.
### This is used only by programs in the 'server' directory of the Prospero
### distribution.
###
# After RDP_LIB's use of plog() is fixed, change to this one:
#SRV_LIBS = \
# $(SERVER_DB_LIBS) \
# $(PFS_LIBS) \
# $(SRV_LIB)
#For now:
# Note that SERVER_DB_LIBS precedes PFS_LIBS so that server DB library
# functions can easily refer to PFS library functions.
#SRV_LIBS = $(SERVER_DB_LIBS) $(PFS_LIBS)
SRV_LIBS = $(SERVER_DB_LIBS)\
$(ARCHIE_ROOT)/lib/libpsarchie/$(SYSTYPE)/libpsarchie.a\
$(ARCHIE_ROOT)/lib/libparchie/$(SYSTYPE)/libparchie.a\
$(ARCHIE_ROOT)/lib/startdb/$(SYSTYPE)/libstartdb.a\
$(ARCHIE_ROOT)/lib/archsearch/$(SYSTYPE)/libarchsearch.a\
$(ARCHIE_ROOT)/lib/libarchie/$(SYSTYPE)/libarchie.a\
$(ARCHIE_ROOT)/lib/archstridx/$(SYSTYPE)/libarchstridx.a\
$(ARCHIE_ROOT)/lib/patrie/$(SYSTYPE)/libpatrie.a\
$(ARCHIE_ROOT)/webindex/lib/$(SYSTYPE)/libwebindex.a\
$(BERKDB_ROOT)/$(SYSTYPE)/libdb.a \
$(PFS_LIBS) -lm
# -u ${COMPILER_PREPENDS_C_SYMBOLS_WITH_UNDERSCORE}verify_acl_list
# -u ${COMPILER_PREPENDS_C_SYMBOLS_WITH_UNDERSCORE}acl_message
# $(LIBPARCHIE_MODULE)/$(SYSTYPE)/libparchie.a\
# ../../wais/libpwais.a \
# ../../freeWAIS/bin/client.a \
# ../../freeWAIS/bin/inv.a \
# ../../freeWAIS/bin/wais.a \
# ../../freeWAIS/bin/libftw.a \
# After RDP_LIB's use of plog() is fixed, change to this one:
#SRV_LIBS_DEPENDENCIES = \
# $(SERVER_DB_LIBS_DEPENDENCIES) \
# $(PFS_LIBS_DEPENDENCIES) \
# $(SRV_LIB)
#For now:
SRV_LIBS_DEPENDENCIES = \
$(SERVER_DB_LIBS_DEPENDENCIES) \
$(PFS_LIBS_DEPENDENCIES)
### CMP_LIBS
### These libraries are used by programs that link with the compatibility
### library. Such programs do not need anything else magic.
### The distribution only invokes this in app/Makefile.
# The -u refers to system calls that are redefined by the compatibility
# library.
CMP_LIBS = \
-u $(COMPILER_PREPENDS_C_SYMBOLS_WITH_UNDERSCORE)open \
-u $(COMPILER_PREPENDS_C_SYMBOLS_WITH_UNDERSCORE)stat \
-u $(COMPILER_PREPENDS_C_SYMBOLS_WITH_UNDERSCORE)lstat \
-u $(COMPILER_PREPENDS_C_SYMBOLS_WITH_UNDERSCORE)creat \
-u $(COMPILER_PREPENDS_C_SYMBOLS_WITH_UNDERSCORE)execve \
$(CMP_LIB) \
$(USE_PFS_VCACHE_LIBS)
CMP_LIBS_DEPENDENCIES = $(CMP_LIB) $(USE_PFS_VCACHE_LIBS_DEPENDENCIES)
#### Directories used by "installdirs" dependency.
#### note that installdirs assumes 'mkdir -p' exists.
####
DIR755 = $(PSRV_SHADOW) $(PSRV_STORAGE) $(PSRV_SECURITY) $(P_BINARIES)
VCACHE_DIR1755 = $(P_CACHE)/p $(P_CACHE)/vc $(P_CACHE)/tmp
DIR1777 = $(VCACHE_DIR1777)
###
### RULES used by all Makefiles
###
##
## This rule is always used to make OBJECTS from the matching "c" files.
##
## Not needed any more, because with our new conventional use of CFLAGS,
## this is now an implicit rule.
# ${OBJECTS}:
# ${CC} ${CFLAGS} $*.c
## if Makefile.config changes, recompile everything.
## For this rule to have any effect, Makefile.boilerplate must be included
## after $(OBJECTS) is set.
##$(OBJECTS): $(SOURCEBASE)/Makefile.config
# This is a generic go-through-all-subdirs function. It replaces a number
# of special cases.
SUBDIRS_MAKE_START = for i in $(SUBDIRS) $$unset_dummy_sh_variable; do (cd $$i; echo making in `pwd` ; $(MAKE)
SUBDIRS_MAKE_END = ); done
## These are now generic Makefile boilerplate.
## These are all the files that might be generated during the compilation
## process.
## GENERATED_FILES is not referred to outside of this Makefile; it is a
## macro because it is used by the 'clean:' and 'hide:' targets that follow.
## XXX These might also need to be added: *.o makedep
GENERATED_FILES=tags TAGS *~ a.out core $(OBJECTS) $(PROGS) $(SPECIAL_PROGS) $(DATA_FILE_TARGETS) $(OTHERTARGETS) $(SPECIAL_OTHERTARGETS) *.old *.new *.backup *.syms
clean:
rm -f $(GENERATED_FILES)
$(SUBDIRS_MAKE_START) clean $(SUBDIRS_MAKE_END)
# for i in $(SUBDIRS) $$unset_dummy_sh_variable; do (cd $$i; $(MAKE) clean); done
# Piping this through SED hides the many error messages from files not found.
# mv -f isn't the same as RM -f; no way to make MV not complain about unfound
# files, so we'd have to write our own.
hide:
-mkdir .hide
-(mv -f $(GENERATED_FILES) .hide ; \
$(SUBDIRS_MAKE_START) hide $(SUBDIRS_MAKE_END)) 2>&1 | \
sed -e '/^mv:.*: Cannot access: No such file or directory$$/d' \
-e '/^\*\*\* Error code 1 (ignored)$$/d' \
-e '/^mkdir: .hide: File exists$$/d'
# for i in $(SUBDIRS) $$unset_dummy_sh_variable; \
# do (cd $$i; $(MAKE) hide); done 2>&1 | \
# sed -e '/^mv:.*: Cannot access: No such file or directory$$/d' \
# -e '/^\*\*\* Error code 1 (ignored)$$/d' \
# -e '/^mkdir: .hide: File exists$$/d'
unhide:
-mv .hide/* .hide/.??* .
-rmdir .hide
$(SUBDIRS_MAKE_START) unhide 2>&1 | $(SED_SCRIPT) $(SUBDIRS_MAKE_END)
## Making all subdirs.
all_subdirs:
$(SUBDIRS_MAKE_START) ${PASTHRU} all 2>&1 | $(SED_SCRIPT) $(SUBDIRS_MAKE_END)
##
## I do not use these for development; I use emacs TAGS exclusively.
## EMACS tags are not part of the general boilerplate.
## that's because they're all stuck in the top-level directory.
## Send fixes to these if you want them to be generally useful for VI-oriented
## developers.
newtags:
-rm -f tags
touch tags
find `pwd` -name "*\.[ch]" -exec ctags -a {} \;
# Target has problems: depends on itself (recursively)
tags: *.c *.h
[ -f tags ] && \
find `pwd` -name "*\.[ch]" -newer tags -exec ctags -u {} \; || \
$(MAKE) newtags
## A nice generic EMACS TAGS rule that I might follow later.
##TAGS:
## etags `find . -name "*\.[ch]" -print`
# A different tags file in each subdirectory.
etags: TAGS
$(SUBDIRS_MAKE_START) etags $(SUBDIRS_MAKE_END)
TAGS: $(CFILES)
etags $(CFILES) $(SOURCEBASE)/misc/empty.c
###
### Rules and macros for checking out code with RCS
### This is in practice never used by me, but I throw it in here in case
### one day someone misses it. Presumably BCN had a good reason for having
### it here. --swa (hey, bcn, take a look and see if you will ever use
### this again, ok? --swa) XXX
CODE = $(CFILES) Makefile
src: $(CODE)
$(CODE):
co -q $@
###
### Things still to be done XXXX
### none of these urgent.
### Fix archie2 and archie3/makefile after rest are consistent.
### handle INSTALL Dependency appropriately, with or without libraries.
### currently, 'install' is in sad shape.
### rm to $(RM)
### ar to $(AR)
### fix WAIS copyright
### Have BCN look at CODE and src: dependency
## intriguing comment in WAIS makefile. Would like to take a look at this
## (re: configuration)
# at WAIS Inc, this is done automatically by the shared .cshrc script
# see /usr/local/shared/shared.cshrc
# figure out why mitra stuck in the gopher_gw_lib. Fix that dependency

View File

@@ -0,0 +1 @@
Makefile.config.sunos-5.3

440
prospero/Makefile.config.aix-2 Executable file
View File

@@ -0,0 +1,440 @@
#
#/*
# * Copyright (c) 1991-1994 by the University of Southern California
# *
# * For copying and distribution information, please see the file
# * <usc-license.h>.
# */
#
# This is the master configuration Makefile for the
# Prospero Directory Service. It replaces the former practice of always
# having to modify a number of independent makefiles.
#######################################################################
# I) Machine and Operating-System dependent options. Check these. #
# The defaults are correct for SunOS. #
#######################################################################
# Also need to configure the LIBS entry in section II according to your
# operating system.
#### INSTALL
# This definition of install is useful if you do not plan to throw away
# debugging information. It will work on systems with a build-in install.
INSTALL = install
# If space is at a premium and you want the binaries stripped of their
# symbol tables and other debugging informaiton when they're installed,
# use the following definition of INSTALL instead. If you are going to throw
# away the debugging information anyway, he definition of CFLAGS below should
# not include the -g option, which means 'include debugging information'.
# INSTALL = install -s
# If you're using HP-UX (or other systems without a BSD-like 'install'
# command, use the version we provide in the misc subdirectory of this
# distribution.
# INSTALL = sh /usr/pfs/source/misc/install.sh
#### OWNER
# The owner of the binaries that will be installed.
OWNER = pfs
#### GROUP
# The group that the binaries to be installed should be set to.
GROUP = pfs
#### RANLIB
# Some systems (notably SCO Unix, Solaris, SGI, and other Sys-V Unices) do not
# need "ranlib" to be run on an archived library after "ar". If your system
# is one of them, define this as "echo" or "true". Otherwise define it
# as "ranlib".
RANLIB = ranlib
#### AR
## your archiving program. You should not need to change this.
AR = ar
# Define this if you feel like making AR verbose when it builds the libraries.
# This will give you extra info as it's chugging along.
# AR_VERBOSE_FLAG=v
ARFLAGS = r$(AR_VERBOSE_FLAG)
#### MACHDEF
#
# This is used to set certain #defines that might be needed by any file
# you're compiling with.
# Generally this is used when certain C compilers require magic things to be
# #defined, or when some general Prospero include file needs a special fix for
# a particular architecture.
# AIX:
# If you're using AIX, set MACHDEF to be this:
MACHDEF = -DAIX
#
# ULTRIX:
# The system include files on Ultrix systems depend on the compiler predefining
# __LANGUAGE_C, __mips or __vax, and, if on a MIPS system,
# __MIPSEL for the little-endian version and __MIPSEB for the big-endian
# version. The version of GCC I was using did not predefine these constants,
# although the system's C compiler did. If you are on an ULTRIX system and
# encounter errors involving 'struct sigcontext' or '.w_Retcode' being
# undefined, set MACHDEF to include these definitions. One of the following
# three choices will work, depending upon your configuration.
# MACHDEF = -D__mips -D__MIPSEL -D__LANGUAGE_C
# MACHDEF = -D__mips -D__MIPSEB -D__LANGUAGE_C
# MACHDEF = -D__vax -D__LANGUAGE_C
#
# ULTRIX:
# In addition, under Ultrix4.2 using GCC version 1.37.1 OSF 1.9.2.13, I
# encountered a bug explained in <include/pprot.h>. Add this to the
# definition of MACHDEF if you get error messages complaining that NULL
# has been redefined.
# -DCONFLICT_BETWEEN_DEFINITION_OF_NULL_IN_SYS_PARAM_H_AND_STDDEF_H
# MACHDEF = # empty for most systems
#### COMPILER_PREPENDS_C_SYMBOLS_WITH_UNDERSCORE
# Many BSD-derived C compilers prepend C symbols with an _, and require that
# the _ be present as an argument to the linker's -u flag. Many
# SysV-derived compilers don't do that. Some Prospero Makefiles (notably, the
# compatibility library) use the linker's -u flag.
# BSD:
# On Suns running SunOS and on the VAX use this definition:
# COMPILER_PREPENDS_C_SYMBOLS_WITH_UNDERSCORE=_
# SYSV:
# On Suns running SOLARIS and on the MIPS, use this empty definition:
COMPILER_PREPENDS_C_SYMBOLS_WITH_UNDERSCORE=
#### MAKE
# You should not need to explicity set this, unless your version of MAKE is
# broken. This is even true if you're using an unusual version of MAKE
# that your system doesn't call 'make'.
# MAKE = make
#######################################################################
# II) Configuration-dependent options (these all MUST be set) #
#######################################################################
# lib/psrv/wais_gw should be added if you're using WAIS or even if you
# just want your clients to be able to retrieve WAIS files directly.
# It is enabled by default so that the WAIS retrieval will work properly
# (I have not tested this configuratin without them)
# Added to BIN subdirs rather than to LIB subdirs because there are executables
# in it. (XXX not sure what they do; mitraism. --swa)
# "app" should be added if you're using the compatability library and want
# to build the versions of CAT and LS that are specially linked with Prospero.
# "pcompat" and "app" won't work with SCO UNIX or AIX or SOLARIS, because they
# need syscall.h.
#
# If you add "app", then add "lib/pcompat" to OPTIONAL_LIB_SUBDIRS
#
# XXX pcompat and app not fully supported in this prerelease. Fix later.
# --swa XXX
OPTIONAL_BIN_SUBDIRS = lib/psrv/wais_gw # app
# Add lib/psrv/gopher_gw if you're running a server with GOPHER-GW enabled.
# Add lib/psrv/archie2 if you're running an archie version 2 server.
# Add lib/psrv/archie3 if you're running an archie version 3 server.
# Add lib/pcompat for the compatibility library. (see note above)
OPTIONAL_LIB_SUBDIRS = lib/psrv/wais_gw lib/psrv/gopher_gw
# These options are used only by 'make install' and 'make installbinaries'
#### TOPDIR
# The top of the Prospero data files. You will only use this if you're
# running the Prospero server.
TOPDIR = /pfs
#### P_BINARIES:
# Location where Prospero binaries should be put by the 'install' target.
P_BINARIES = $(TOPDIR)/bin
#### SOURCEBASE
# The directory in which the top-level Prospero makefile exists. This is the
# root of the Prospero build directory/source directory you're using.
# The Prospero Makefiles use this to compute library and include-file
# pathnames for the linker and compiler.
# This actually does not need to be defined; each include file defines its own.
# SOURCEBASE = /nfs/gost/build/10Mar94+19Apr94.patched
#### KERBEROS (K_INC, KRB_LIBS, KRB_LIBS_DEPENDENCIES)
# Use the following definitions if you want Kerberos Version 5
# authentication.
# The location of the Kerberos version 5 libraries and include files will vary
# from machine to machine.
# We don't enable the Kerberos libraries and include files by default because
# searching the huge Kerberos libraries substantially slows down the linker.
# K_INC = -I/nfs/kerberos/v5/include
# KRB_LIBS = -L/nfs/kerberos/v5/lib -lkrb5 -lcrypto /nfs/kerberos/v5/extlib/libisode.a
# Only need to set the dependencies if your Kerberos libraries might change
# out from under you (this is the case at ISI, where Kerberos development is
# ongoing).
# KRB_LIBS_DEPENDENCIES=/nfs/kerberos/v5/lib/libkrb5.a /nfs/kerberos/v5/lib/libcrypto.a /nfs/kerberos/v5/extlib/libisode.a
# Use the following definitions if you don't want Kerberos.
K_INC =
KRB_LIBS =
KRB_LIBS_DEPENDENCIES =
##
## LIBS
##
## Special libraries needed by some operating systems.
##
##
# SCOUNIX: Need -lsocket, -lcrypt_i
# LIBS = -lsocket -lcrypt_i -lm
# SOLARIS: Need -lsocket -lnsl
# LIBS = -lsocket -lnsl
# Under SunOS no libraries are necessary.
LIBS=
# There are usually not dependencies, unless you think the libraries
# you're using might change under you.
LIBS_DEPENDENCIES=
#### Add the threads library we use to the LIBS list.
## not all versions of MAKE support +=
## If you're running multi-threaded using the FSU pthreads package, make
## sure that lib/fsu_pthreads/lib/libpthreads.a and lib/malloc/gmalloc.o
## are included.
# LIBS += /nfs/pfs/prospero.build/sun4/lib/fsu_pthreads/lib/libpthreads.a /nfs/pfs/prospero.build/sun4/lib/malloc/gmalloc.o -lm
# LIBS_DEPENDENCIES += $(SOURCEBASE)/lib/fsu_pthreads/lib/libpthreads.a $(SOURCEBASE)/lib/malloc/gmalloc.o
## if running multi-threaded under SOLARIS, add -lthread to LIBS:
# LIBS += -lthread
##If you're working with another threads package, make sure
## that that particular package's libraries are included.
#### MORE_USER_PROGS
# A set of additional user programs that are compiled by default.
# By default, this is unset.
# If you have gotten your own site distribution, then you will want to add
# "newvs" and "newpsite" to this list.
MORE_USER_PROGS = newvs
# MORE_USER_PROGS =
#### MORE_SERVER_PROGS
# A set of additional programs in the SERVER directory
# that should be compiled by default.
# By default, this is unset.
# If you are running a Prospero server using the Prospero Password
# authentication mechanism, then add pw_edit to this list.
# MORE_SERVER_PROGS = pw_edit
MORE_SERVER_PROGS =
#### SERVER_DB_LIBS
# These databases are linked with the server. You must also make the
# appropriate changes to <pserver.h>
# For ARCHIE servers, version 2. To use this, you will need to get the ARCHIE
# distribution from Bunyip Information Systems.
#SERVER_DB_LIBS= $(ARCHIE2_LIB)
#SERVER_DB_LIBS_DEPENDENCIES= $(ARCHIE2_LIB)
# For ARCHIE servers, version 3. To use this, you will need to get the ARCHIE
# distribution from Bunyip Information Systems.
#SERVER_DB_LIBS= $(ARCHIE3_PARCHIE_LIB) $(ARCHIE3_PSARCHIE_LIB)
#SERVER_DB_LIBS_DEPENDENCIES= $(ARCHIE3_PARCHIE_LIB) $(ARCHIE3_PSARCHIE_LIB)
# Unimplemented format to read GOPHER data files; this does not work yet
# and probably never will since it has been supserseded by the GOPHER-GW.
#SERVER_DB_LIBS= $(SOURCEBASE)/lib/psrv/gopher/libpgopher.a
# For just GOPHER-GW
SERVER_DB_LIBS= $(GOPHER_GW_LIB)
SERVER_DB_LIBS_DEPENDENCIES = $(GOPHER_GW_LIB)
# For just WAIS
# note that wais uses -lm
#SERVER_DB_LIBS= $(WAIS_GW_LIB) -lm
#SERVER_DB_LIBS_DEPENDENCIES = $(WAIS_GW_LIB)
# For GOPHER-GW and WAIS
#SERVER_DB_LIBS= $(GOPHER_GW_LIB) $(WAIS_GW_LIB) -lm
#SERVER_DB_LIBS_DEPENDENCIES= $(GOPHER_GW_LIB) $(WAIS_GW_LIB)
# On SOLARIS 2.3: Note - that this is not thread safe, unless it uses libm.so
# not libm.a. See "man ciel" - this hasn't been checked yet
# For no server libraries.
#SERVER_LIBS =
#SERVER_LIBS_DEPENDENCIES =
###########################################################################
# III) DEVELOPMENT OPTIONS #
# You will generally not want to modify these options unless you are #
# a Prospero developer
###########################################################################
##
## GENERATION and GENERATIONSUFFIX
## This is a special program that installs new binaries without corrupting
## existing ones that might be running. It also renames the existing files
## to .o or .oo
# GENERATION=true IGNORE THIS
GENERATION =/nfs/pfs/dev/tools/generation
# leave suffix empty normally.
# leave it to + for the mitra-style GENERATION command.
GENERATIONSUFFIX=
# GENERATIONSUFFIX=+
##
## an 'install' dependency clearly goes here. yank out from all makefiles.
##
##
## COMPILER SETUP and FLAGS
##
## Compiler choice. Prospero must be compiled with an ANSI C compiler.
## We usually use GCC.
## Use 'xlc' on an RS6000.
CC = gcc
# Debugging is turned off in the default distribution in order to keep things
# reasonably small.
# If you encounter segmentation faults or other problems, we may ask you to
# reset this to '-g', 'make clean', and recompile the binaries so that we can
# get a stack trace and other useful debugging information.
## WARNINGS
# Warnings on here have been checked for most, if not all of the code
# This does not work on SunOS 4.1.3., because the include files don't prototype
# all the functions. Has been tested under Solaris.
# GCCWARN = -Wimplicit
GCCWARN=
# Compiling with these will generate lots of warnings
GCCTRY = -Wformat -Wshadow -Wreturn-type
# -O -Wuninitialized # -Wuninitialized is not supported without -O
GCCNO = -Wredundant-decls -Wstrict-prototypes
# -ggdb3 to compile with full GDB debugging information.
# -g for adequate debugging information.
# -pg for performance monitoring
# -O for optimization
# For ARCHIE, use -O3
# CFLAGS = -ggdb3
CCFLAGS = $(GCCWARN) $(GCCTRY) $(BASEDEFINES)
## Additional stuff added to CFLAGS in Makefile.boilerplate.
##
## The WAIS gateway code has notions of how to be configured that differ
## from the rest of Prospero.
## If using that code, please set WCFLAGS. It is set by default to an
## appropriate value.
## WCFLAGS will be appended to the regular CFLAGS for just the
## lib/psrv/wais_gw/Makefile.
#-Dmacros for using macros rather than functions in certain inner loops
# RS6000's require adding -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_ALL_SOURCE
# Data Generals require adding -DDG
# WCFLAGS = -UM_XENIX -DSCOUNIX -Dmacros -DIN_RMG
# IN_RMG is used to specify only to compile parts needed for RMG (that is,
# only the parts needed for the Prospero WAIS client gateway.)
# Some of the non-RMG parts are not thread safe yet
WCFLAGS = -DIN_RMG -Dmacros
##
## CACHING definitions.
##
### CLIENT SIDE CACHING
# If you are using the special client side CACHING option (see section 3
# of <psite.h>) then you will need to put the non-empty versions of
# these three macros in place.
# If you are a Prospero novice, leave the defaults present. The caching code
# is still experimental.
## You will not normally alter this, but it can be done if you want to change
## the name. If you do, then also alter P_CACHE_P, P_CACHE_VC, and P_CACHE_TMP
## in section 3 of <psite.h>.
P_CACHE_P = $(TOPDIR)/vcache/p
P_CACHE_VC = $(TOPDIR)/vcache/vc
P_CACHE_TMP = $(TOPDIR)/vcache/tmp
### VCACHE PROGRAM or LIBRARY?
# If you're using the PVACHE LIBRARY, then you need to use the first definition
# Use the second if you are not.
# This is normally not set and you normally will not need to
# make use of it. See section (3) of <psite.h>
# These libraries will be linked with any Prospero client that retrieves data
# using an ACCESS-METHOD.
# In the distribution, they are linked with "menu", "vget", "vcache",
# and programs that use the compatibility library.
# Programs that don't retrieve data (e.g., PSTATUS) can be linked with either
# USE_VCACHE_LIBS or with PFS_LIBS.
# USE_VCACHE_LIBS = $(PFS_VCACHE_LIBS)
USE_VCACHE_LIBS = $(PFS_LIBS)
# Change this in parallel with USE_VCACHE_LIBS.
# USE_VCACHE_LIBS_DEPENDENCIES = $(PFS_VCACHE_LIBS_DEPENDENCIES)
USE_VCACHE_LIBS_DEPENDENCIES = $(PFS_LIBS_DEPENDENCIES)
####
#### If you change the definitions of PSRV_SHADOW, PSRV_STORAGE, or
#### PSRV_SECURITY in <pserver.h>, you must change these to match.
#### These are normally not changed.
#### This is used by the 'installdirs' dependency.
PSRV_SHADOW=$(TOPDIR)/shadow
PSRV_STORAGE=$(TOPDIR)/pfsdat
PSRV_SECURITY=$(TOPDIR)/security
#### INSTALL_EXE_MODE
#### Mode for executables to be set to when installed. It would be quite odd
#### for you to want to change this, but you can if you want to.
INSTALL_EXE_MODE = 755
#### INSTALL_DATA_MODE
#### Mode for non-executables to be set to when installed. It would be quite odd
#### for you to want to change this, but you can if you want to.
INSTALL_DATA_MODE = 644
###
include $(SOURCEBASE)/Makefile.boilerplate

440
prospero/Makefile.config.dist Executable file
View File

@@ -0,0 +1,440 @@
#
#/*
# * Copyright (c) 1991-1994 by the University of Southern California
# *
# * For copying and distribution information, please see the file
# * <usc-license.h>.
# */
#
# This is the master configuration Makefile for the
# Prospero Directory Service. It replaces the former practice of always
# having to modify a number of independent makefiles.
#######################################################################
# I) Machine and Operating-System dependent options. Check these. #
# The defaults are correct for SunOS. #
#######################################################################
# Also need to configure the LIBS entry in section II according to your
# operating system.
#### INSTALL
# This definition of install is useful if you do not plan to throw away
# debugging information. It will work on systems with a build-in install.
INSTALL = install
# If space is at a premium and you want the binaries stripped of their
# symbol tables and other debugging informaiton when they're installed,
# use the following definition of INSTALL instead. If you are going to throw
# away the debugging information anyway, he definition of CFLAGS below should
# not include the -g option, which means 'include debugging information'.
# INSTALL = install -s
# If you're using HP-UX (or other systems without a BSD-like 'install'
# command, use the version we provide in the misc subdirectory of this
# distribution.
# INSTALL = sh /usr/pfs/source/misc/install.sh
#### OWNER
# The owner of the binaries that will be installed.
OWNER = pfs
#### GROUP
# The group that the binaries to be installed should be set to.
GROUP = pfs
#### RANLIB
# Some systems (notably SCO Unix, Solaris, SGI, and other Sys-V Unices) do not
# need "ranlib" to be run on an archived library after "ar". If your system
# is one of them, define this as "echo" or "true". Otherwise define it
# as "ranlib".
RANLIB = ranlib
#### AR
## your archiving program. You should not need to change this.
AR = ar
# Define this if you feel like making AR verbose when it builds the libraries.
# This will give you extra info as it's chugging along.
# AR_VERBOSE_FLAG=v
ARFLAGS = r$(AR_VERBOSE_FLAG)
#### MACHDEF
#
# This is used to set certain #defines that might be needed by any file
# you're compiling with.
# Generally this is used when certain C compilers require magic things to be
# #defined, or when some general Prospero include file needs a special fix for
# a particular architecture.
# AIX:
# If you're using AIX, set MACHDEF to be this:
# MACHDEF = -DAIX
#
# ULTRIX:
# The system include files on Ultrix systems depend on the compiler predefining
# __LANGUAGE_C, __mips or __vax, and, if on a MIPS system,
# __MIPSEL for the little-endian version and __MIPSEB for the big-endian
# version. The version of GCC I was using did not predefine these constants,
# although the system's C compiler did. If you are on an ULTRIX system and
# encounter errors involving 'struct sigcontext' or '.w_Retcode' being
# undefined, set MACHDEF to include these definitions. One of the following
# three choices will work, depending upon your configuration.
# MACHDEF = -D__mips -D__MIPSEL -D__LANGUAGE_C
# MACHDEF = -D__mips -D__MIPSEB -D__LANGUAGE_C
# MACHDEF = -D__vax -D__LANGUAGE_C
#
# ULTRIX:
# In addition, under Ultrix4.2 using GCC version 1.37.1 OSF 1.9.2.13, I
# encountered a bug explained in <include/pprot.h>. Add this to the
# definition of MACHDEF if you get error messages complaining that NULL
# has been redefined.
# -DCONFLICT_BETWEEN_DEFINITION_OF_NULL_IN_SYS_PARAM_H_AND_STDDEF_H
MACHDEF = # empty for most systems
#### COMPILER_PREPENDS_C_SYMBOLS_WITH_UNDERSCORE
# Many BSD-derived C compilers prepend C symbols with an _, and require that
# the _ be present as an argument to the linker's -u flag. Many
# SysV-derived compilers don't do that. Some Prospero Makefiles (notably, the
# compatibility library) use the linker's -u flag.
# BSD:
# On Suns running SunOS and on the VAX use this definition:
COMPILER_PREPENDS_C_SYMBOLS_WITH_UNDERSCORE=_
# SYSV:
# On Suns running SOLARIS and on the MIPS, use this empty definition:
# COMPILER_PREPENDS_C_SYMBOLS_WITH_UNDERSCORE=
#### MAKE
# You should not need to explicity set this, unless your version of MAKE is
# broken. This is even true if you're using an unusual version of MAKE
# that your system doesn't call 'make'.
# MAKE = make
#######################################################################
# II) Configuration-dependent options (these all MUST be set) #
#######################################################################
# lib/psrv/wais_gw should be added if you're using WAIS or even if you
# just want your clients to be able to retrieve WAIS files directly.
# It is enabled by default so that the WAIS retrieval will work properly
# (I have not tested this configuratin without them)
# Added to BIN subdirs rather than to LIB subdirs because there are executables
# in it. (XXX not sure what they do; mitraism. --swa)
# "app" should be added if you're using the compatability library and want
# to build the versions of CAT and LS that are specially linked with Prospero.
# "pcompat" and "app" won't work with SCO UNIX or AIX or SOLARIS, because they
# need syscall.h.
#
# If you add "app", then add "lib/pcompat" to OPTIONAL_LIB_SUBDIRS
#
# XXX pcompat and app not fully supported in this prerelease. Fix later.
# --swa XXX
OPTIONAL_BIN_SUBDIRS = lib/psrv/wais_gw # app
# Add lib/psrv/gopher_gw if you're running a server with GOPHER-GW enabled.
# Add lib/psrv/archie2 if you're running an archie version 2 server.
# Add lib/psrv/archie3 if you're running an archie version 3 server.
# Add lib/pcompat for the compatibility library. (see note above)
OPTIONAL_LIB_SUBDIRS =
# These options are used only by 'make install' and 'make installbinaries'
#### TOPDIR
# The top of the Prospero data files. You will only use this if you're
# running the Prospero server.
TOPDIR = /usr/pfs
#### P_BINARIES:
# Location where Prospero binaries should be put by the 'install' target.
P_BINARIES = $(TOPDIR)/bin
#### SOURCEBASE
# The directory in which the top-level Prospero makefile exists. This is the
# root of the Prospero build directory/source directory you're using.
# The Prospero Makefiles use this to compute library and include-file
# pathnames for the linker and compiler.
# This actually does not need to be defined; each include file defines its own.
# SOURCEBASE = /nfs/gost/build/10Mar94+19Apr94.patched
#### KERBEROS (K_INC, KRB_LIBS, KRB_LIBS_DEPENDENCIES)
# Use the following definitions if you want Kerberos Version 5
# authentication.
# The location of the Kerberos version 5 libraries and include files will vary
# from machine to machine.
# We don't enable the Kerberos libraries and include files by default because
# searching the huge Kerberos libraries substantially slows down the linker.
# K_INC = -I/nfs/kerberos/v5/include
# KRB_LIBS = -L/nfs/kerberos/v5/lib -lkrb5 -lcrypto /nfs/kerberos/v5/extlib/libisode.a
# Only need to set the dependencies if your Kerberos libraries might change
# out from under you (this is the case at ISI, where Kerberos development is
# ongoing).
# KRB_LIBS_DEPENDENCIES=/nfs/kerberos/v5/lib/libkrb5.a /nfs/kerberos/v5/lib/libcrypto.a /nfs/kerberos/v5/extlib/libisode.a
# Use the following definitions if you don't want Kerberos.
K_INC =
KRB_LIBS =
KRB_LIBS_DEPENDENCIES =
##
## LIBS
##
## Special libraries needed by some operating systems.
##
##
# SCOUNIX: Need -lsocket, -lcrypt_i
# LIBS = -lsocket -lcrypt_i -lm
# SOLARIS: Need -lsocket -lnsl
# LIBS = -lsocket -lnsl
# Under SunOS no libraries are necessary.
LIBS=
# There are usually not dependencies, unless you think the libraries
# you're using might change under you.
LIBS_DEPENDENCIES=
#### Add the threads library we use to the LIBS list.
## not all versions of MAKE support +=
## If you're running multi-threaded using the FSU pthreads package, make
## sure that lib/fsu_pthreads/lib/libpthreads.a and lib/malloc/gmalloc.o
## are included.
# LIBS += /nfs/pfs/prospero.build/sun4/lib/fsu_pthreads/lib/libpthreads.a /nfs/pfs/prospero.build/sun4/lib/malloc/gmalloc.o -lm
# LIBS_DEPENDENCIES += $(SOURCEBASE)/lib/fsu_pthreads/lib/libpthreads.a $(SOURCEBASE)/lib/malloc/gmalloc.o
## if running multi-threaded under SOLARIS, add -lthread to LIBS:
# LIBS += -lthread
##If you're working with another threads package, make sure
## that that particular package's libraries are included.
#### MORE_USER_PROGS
# A set of additional user programs that are compiled by default.
# By default, this is unset.
# If you have gotten your own site distribution, then you will want to add
# "newvs" and "newpsite" to this list.
MORE_USER_PROGS = newvs
# MORE_USER_PROGS =
#### MORE_SERVER_PROGS
# A set of additional programs in the SERVER directory
# that should be compiled by default.
# By default, this is unset.
# If you are running a Prospero server using the Prospero Password
# authentication mechanism, then add pw_edit to this list.
# MORE_SERVER_PROGS = pw_edit
MORE_SERVER_PROGS =
#### SERVER_DB_LIBS
# These databases are linked with the server. You must also make the
# appropriate changes to <pserver.h>
# For ARCHIE servers, version 2. To use this, you will need to get the ARCHIE
# distribution from Bunyip Information Systems.
#SERVER_DB_LIBS= $(ARCHIE2_LIB)
#SERVER_DB_LIBS_DEPENDENCIES= $(ARCHIE2_LIB)
# For ARCHIE servers, version 3. To use this, you will need to get the ARCHIE
# distribution from Bunyip Information Systems.
#SERVER_DB_LIBS= $(ARCHIE3_PARCHIE_LIB) $(ARCHIE3_PSARCHIE_LIB)
#SERVER_DB_LIBS_DEPENDENCIES= $(ARCHIE3_PARCHIE_LIB) $(ARCHIE3_PSARCHIE_LIB)
# Unimplemented format to read GOPHER data files; this does not work yet
# and probably never will since it has been supserseded by the GOPHER-GW.
#SERVER_DB_LIBS= $(SOURCEBASE)/lib/psrv/gopher/libpgopher.a
# For just GOPHER-GW
SERVER_DB_LIBS= $(GOPHER_GW_LIB)
SERVER_DB_LIBS_DEPENDENCIES = $(GOPHER_GW_LIB)
# For just WAIS
# note that wais uses -lm
#SERVER_DB_LIBS= $(WAIS_GW_LIB) -lm
#SERVER_DB_LIBS_DEPENDENCIES = $(WAIS_GW_LIB)
# For GOPHER-GW and WAIS
#SERVER_DB_LIBS= $(GOPHER_GW_LIB) $(WAIS_GW_LIB) -lm
#SERVER_DB_LIBS_DEPENDENCIES= $(GOPHER_GW_LIB) $(WAIS_GW_LIB)
# On SOLARIS 2.3: Note - that this is not thread safe, unless it uses libm.so
# not libm.a. See "man ciel" - this hasn't been checked yet
# For no server libraries.
#SERVER_LIBS =
#SERVER_LIBS_DEPENDENCIES =
###########################################################################
# III) DEVELOPMENT OPTIONS #
# You will generally not want to modify these options unless you are #
# a Prospero developer
###########################################################################
##
## GENERATION and GENERATIONSUFFIX
## This is a special program that installs new binaries without corrupting
## existing ones that might be running. It also renames the existing files
## to .o or .oo
GENERATION=true IGNORE THIS
# GENERATION =/nfs/pfs/dev/tools/generation
# leave suffix empty normally.
# leave it to + for the mitra-style GENERATION command.
GENERATIONSUFFIX=
# GENERATIONSUFFIX=+
##
## an 'install' dependency clearly goes here. yank out from all makefiles.
##
##
## COMPILER SETUP and FLAGS
##
## Compiler choice. Prospero must be compiled with an ANSI C compiler.
## We usually use GCC.
## Use 'xlc' on an RS6000.
CC = gcc
# Debugging is turned off in the default distribution in order to keep things
# reasonably small.
# If you encounter segmentation faults or other problems, we may ask you to
# reset this to '-g', 'make clean', and recompile the binaries so that we can
# get a stack trace and other useful debugging information.
## WARNINGS
# Warnings on here have been checked for most, if not all of the code
# This does not work on SunOS 4.1.3., because the include files don't prototype
# all the functions. Has been tested under Solaris.
# GCCWARN = -Wimplicit
GCCWARN=
# Compiling with these will generate lots of warnings
GCCTRY = -Wformat -Wshadow -Wreturn-type
# -O -Wuninitialized # -Wuninitialized is not supported without -O
GCCNO = -Wredundant-decls -Wstrict-prototypes
# -ggdb3 to compile with full GDB debugging information.
# -g for adequate debugging information.
# -pg for performance monitoring
# -O for optimization
# For ARCHIE, use -O3
CFLAGS = -ggdb3
# CFLAGS = -ggdb3 $(GCCWARN) $(GCCTRY)
## Additional stuff added to CFLAGS in Makefile.boilerplate.
##
## The WAIS gateway code has notions of how to be configured that differ
## from the rest of Prospero.
## If using that code, please set WCFLAGS. It is set by default to an
## appropriate value.
## WCFLAGS will be appended to the regular CFLAGS for just the
## lib/psrv/wais_gw/Makefile.
#-Dmacros for using macros rather than functions in certain inner loops
# RS6000's require adding -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_ALL_SOURCE
# Data Generals require adding -DDG
# WCFLAGS = -UM_XENIX -DSCOUNIX -Dmacros -DIN_RMG
# IN_RMG is used to specify only to compile parts needed for RMG (that is,
# only the parts needed for the Prospero WAIS client gateway.)
# Some of the non-RMG parts are not thread safe yet
WCFLAGS = -DIN_RMG -Dmacros
##
## CACHING definitions.
##
### CLIENT SIDE CACHING
# If you are using the special client side CACHING option (see section 3
# of <psite.h>) then you will need to put the non-empty versions of
# these three macros in place.
# If you are a Prospero novice, leave the defaults present. The caching code
# is still experimental.
## You will not normally alter this, but it can be done if you want to change
## the name. If you do, then also alter P_CACHE_P, P_CACHE_VC, and P_CACHE_TMP
## in section 3 of <psite.h>.
P_CACHE_P = $(TOPDIR)/vcache/p
P_CACHE_VC = $(TOPDIR)/vcache/vc
P_CACHE_TMP = $(TOPDIR)/vcache/tmp
### VCACHE PROGRAM or LIBRARY?
# If you're using the PVACHE LIBRARY, then you need to use the first definition
# Use the second if you are not.
# This is normally not set and you normally will not need to
# make use of it. See section (3) of <psite.h>
# These libraries will be linked with any Prospero client that retrieves data
# using an ACCESS-METHOD.
# In the distribution, they are linked with "menu", "vget", "vcache",
# and programs that use the compatibility library.
# Programs that don't retrieve data (e.g., PSTATUS) can be linked with either
# USE_VCACHE_LIBS or with PFS_LIBS.
# USE_VCACHE_LIBS = $(PFS_VCACHE_LIBS)
USE_VCACHE_LIBS = $(PFS_LIBS)
# Change this in parallel with USE_VCACHE_LIBS.
# USE_VCACHE_LIBS_DEPENDENCIES = $(PFS_VCACHE_LIBS_DEPENDENCIES)
USE_VCACHE_LIBS_DEPENDENCIES = $(PFS_LIBS_DEPENDENCIES)
####
#### If you change the definitions of PSRV_SHADOW, PSRV_STORAGE, or
#### PSRV_SECURITY in <pserver.h>, you must change these to match.
#### These are normally not changed.
#### This is used by the 'installdirs' dependency.
PSRV_SHADOW=$(TOPDIR)/shadow
PSRV_STORAGE=$(TOPDIR)/pfsdat
PSRV_SECURITY=$(TOPDIR)/security
#### INSTALL_EXE_MODE
#### Mode for executables to be set to when installed. It would be quite odd
#### for you to want to change this, but you can if you want to.
INSTALL_EXE_MODE = 755
#### INSTALL_DATA_MODE
#### Mode for non-executables to be set to when installed. It would be quite odd
#### for you to want to change this, but you can if you want to.
INSTALL_DATA_MODE = 644
###
include $(SOURCEBASE)/Makefile.boilerplate

View File

@@ -0,0 +1,440 @@
#
#/*
# * Copyright (c) 1991-1994 by the University of Southern California
# *
# * For copying and distribution information, please see the file
# * <usc-license.h>.
# */
#
# This is the master configuration Makefile for the
# Prospero Directory Service. It replaces the former practice of always
# having to modify a number of independent makefiles.
#######################################################################
# I) Machine and Operating-System dependent options. Check these. #
# The defaults are correct for SunOS. #
#######################################################################
# Also need to configure the LIBS entry in section II according to your
# operating system.
#### INSTALL
# This definition of install is useful if you do not plan to throw away
# debugging information. It will work on systems with a build-in install.
INSTALL = install
# If space is at a premium and you want the binaries stripped of their
# symbol tables and other debugging informaiton when they're installed,
# use the following definition of INSTALL instead. If you are going to throw
# away the debugging information anyway, he definition of CFLAGS below should
# not include the -g option, which means 'include debugging information'.
# INSTALL = install -s
# If you're using HP-UX (or other systems without a BSD-like 'install'
# command, use the version we provide in the misc subdirectory of this
# distribution.
# INSTALL = sh /usr/pfs/source/misc/install.sh
#### OWNER
# The owner of the binaries that will be installed.
# OWNER = pfs
OWNER = swa
#### GROUP
# The group that the binaries to be installed should be set to.
# GROUP = pfs
GROUP = prospsrc
#### RANLIB
# Some systems (notably SCO Unix, Solaris, SGI, and other Sys-V Unices) do not
# need "ranlib" to be run on an archived library after "ar". If your system
# is one of them, define this as "echo" or "true". Otherwise define it
# as "ranlib".
RANLIB = ranlib
#### AR
## your archiving program. You should not need to change this.
AR = ar
# Define this if you feel like making AR verbose when it builds the libraries.
# This will give you extra info as it's chugging along.
# AR_VERBOSE_FLAG=v
ARFLAGS = r$(AR_VERBOSE_FLAG)
#### MACHDEF
#
# This is used to set certain #defines that might be needed by any file
# you're compiling with.
# Generally this is used when certain C compilers require magic things to be
# #defined, or when some general Prospero include file needs a special fix for
# a particular architecture.
# AIX:
# If you're using AIX, set MACHDEF to be this:
# MACHDEF = -DAIX
#
# ULTRIX:
# The system include files on Ultrix systems depend on the compiler predefining
# __LANGUAGE_C, __mips or __vax, and, if on a MIPS system,
# __MIPSEL for the little-endian version and __MIPSEB for the big-endian
# version. The version of GCC I was using did not predefine these constants,
# although the system's C compiler did. If you are on an ULTRIX system and
# encounter errors involving 'struct sigcontext' or '.w_Retcode' being
# undefined, set MACHDEF to include these definitions. One of the following
# three choices will work, depending upon your configuration.
# MACHDEF = -D__mips -D__MIPSEL -D__LANGUAGE_C
# MACHDEF = -D__mips -D__MIPSEB -D__LANGUAGE_C
# MACHDEF = -D__vax -D__LANGUAGE_C
#
# ULTRIX:
# In addition, under Ultrix4.2 using GCC version 1.37.1 OSF 1.9.2.13, I
# encountered a bug explained in <include/pprot.h>. Add this to the
# definition of MACHDEF if you get error messages complaining that NULL
# has been redefined.
# -DCONFLICT_BETWEEN_DEFINITION_OF_NULL_IN_SYS_PARAM_H_AND_STDDEF_H
MACHDEF = # empty for most systems
#### COMPILER_PREPENDS_C_SYMBOLS_WITH_UNDERSCORE
# Many BSD-derived C compilers prepend C symbols with an _, and require that
# the _ be present as an argument to the linker's -u flag. Many
# SysV-derived compilers don't do that. Some Prospero Makefiles (notably, the
# compatibility library) use the linker's -u flag.
# BSD:
# On Suns running SunOS and on the VAX use this definition:
COMPILER_PREPENDS_C_SYMBOLS_WITH_UNDERSCORE=_
# SYSV:
# On Suns running SOLARIS and on the MIPS, use this empty definition:
# COMPILER_PREPENDS_C_SYMBOLS_WITH_UNDERSCORE=
#### MAKE
# You should not need to explicity set this, unless your version of MAKE is
# broken. This is even true if you're using an unusual version of MAKE
# that your system doesn't call 'make'.
# MAKE = make
#######################################################################
# II) Configuration-dependent options (these all MUST be set) #
#######################################################################
# lib/psrv/wais_gw should be added if you're using WAIS or even if you
# just want your clients to be able to retrieve WAIS files directly.
# It is enabled by default so that the WAIS retrieval will work properly
# Added to BIN subdirs rather than to LIB subdirs because there are executables
# in it. (XXX not sure what they do. --swa)
# "app" should be added if you're using the compatability library and want
# to build the versions of CAT and LS that are specially linked with Prospero.
# "pcompat" and "app" won't work with SCO UNIX or AIX or SOLARIS, because they
# need syscall.h.
#
# If you add "app", then add "lib/pcompat" to OPTIONAL_LIB_SUBDIRS
#
# XXX pcompat and app not fully supported in this prerelease. Fix later.
# --swa XXX
#OPTIONAL_BIN_SUBDIRS = lib/psrv/wais_gw # app
# Add lib/psrv/gopher_gw if you're running a server with GOPHER-GW enabled.
# Add lib/psrv/archie2 if you're running an archie version 2 server.
# Add lib/psrv/archie3 if you're running an archie version 3 server.
# Add lib/pcompat for the compatibility library. (see note above)
#OPTIONAL_LIB_SUBDIRS = lib/psrv/wais_gw lib/pcompat lib/psrv/gopher_gw
# These options are used only by 'make install' and 'make installbinaries'
#### TOPDIR
# The top of the Prospero data files. You will only use this if you're
# running the Prospero server.
TOPDIR = /pfs
#### P_BINARIES:
# Location where Prospero binaries should be put by the 'install' target.
P_BINARIES = $(TOPDIR)/bin
#### SOURCEBASE
# The directory in which the top-level Prospero makefile exists. This is the
# root of the Prospero build directory/source directory you're using.
# The Prospero Makefiles use this to compute library and include-file
# pathnames for the linker and compiler.
# This actually does not need to be defined; each include file defines its own.
# SOURCEBASE = /nfs/gost/build/10Mar94+19Apr94.patched
#### KERBEROS (K_INC, KRB_LIBS, KRB_LIBS_DEPENDENCIES)
# Use the following definitions if you want Kerberos Version 5
# authentication.
# The location of the Kerberos version 5 libraries and include files will vary
# from machine to machine.
# We don't enable the Kerberos libraries and include files by default because
# searching the huge Kerberos libraries substantially slows down the linker.
# K_INC = -I/nfs/kerberos/v5/include
# KRB_LIBS = -L/nfs/kerberos/v5/lib -lkrb5 -lcrypto /nfs/kerberos/v5/extlib/libisode.a
# Only need to set the dependencies if your Kerberos libraries might change
# out from under you (this is the case at ISI, where Kerberos development is
# ongoing).
# KRB_LIBS_DEPENDENCIES=/nfs/kerberos/v5/lib/libkrb5.a /nfs/kerberos/v5/lib/libcrypto.a /nfs/kerberos/v5/extlib/libisode.a
# Use the following definitions if you don't want Kerberos.
K_INC =
KRB_LIBS =
KRB_LIBS_DEPENDENCIES =
##
## LIBS
##
## Special libraries needed by some operating systems.
##
##
# SCOUNIX: Need -lsocket, -lcrypt_i
# LIBS = -lsocket -lcrypt_i -lm
# SOLARIS: Need -lsocket -lnsl
# LIBS = -lsocket -lnsl
# Under SunOS no libraries are necessary.
LIBS=
# There are usually not dependencies, unless you think the libraries
# you're using might change under you.
LIBS_DEPENDENCIES=
#### Add the threads library we use to the LIBS list.
## not all versions of MAKE support +=
## If you're running multi-threaded using the FSU pthreads package, make
## sure that lib/fsu_pthreads/lib/libpthreads.a and lib/malloc/gmalloc.o
## are included.
# LIBS += /nfs/pfs/prospero.build/sun4/lib/fsu_pthreads/lib/libpthreads.a /nfs/pfs/prospero.build/sun4/lib/malloc/gmalloc.o -lm
# LIBS_DEPENDENCIES += $(SOURCEBASE)/lib/fsu_pthreads/lib/libpthreads.a $(SOURCEBASE)/lib/malloc/gmalloc.o
## if running multi-threaded under SOLARIS, add -lthread to LIBS:
# LIBS += -lthread
##If you're working with another threads package, make sure
## that that particular package's libraries are included.
#### MORE_USER_PROGS
# A set of additional user programs that are compiled by default.
# By default, this is unset.
# If you have gotten your own site distribution, then you will want to add
# "newvs" and "newpsite" to this list.
MORE_USER_PROGS = newvs
# MORE_USER_PROGS =
#### MORE_SERVER_PROGS
# A set of additional programs in the SERVER directory
# that should be compiled by default.
# By default, this is unset.
# If you are running a Prospero server using the Prospero Password
# authentication mechanism, then add pw_edit to this list.
# MORE_SERVER_PROGS = pw_edit
MORE_SERVER_PROGS =
#### SERVER_DB_LIBS
# These databases are linked with the server. You must also make the
# appropriate changes to <pserver.h>
# For ARCHIE servers, version 2. To use this, you will need to get the ARCHIE
# distribution from Bunyip Information Systems.
#SERVER_DB_LIBS= $(ARCHIE2_LIB)
#SERVER_DB_LIBS_DEPENDENCIES= $(ARCHIE2_LIB)
# For ARCHIE servers, version 3. To use this, you will need to get the ARCHIE
# distribution from Bunyip Information Systems.
#SERVER_DB_LIBS= $(ARCHIE3_LIB1) $(ARCHIE3_LIB2)
#SERVER_DB_LIBS_DEPENDENCIES= $(ARCHIE3_LIB1) $(ARCHIE3_LIB2)
# Unimplemented format to read GOPHER data files; this does not work yet
# and probably never will since it has been supserseded by the GOPHER-GW.
#SERVER_DB_LIBS= $(SOURCEBASE)/lib/psrv/gopher/libpgopher.a
# For just GOPHER-GW
SERVER_DB_LIBS= $(GOPHER_GW_LIB)
SERVER_DB_LIBS_DEPENDENCIES = $(GOPHER_GW_LIB)
# For just WAIS
# note that wais uses -lm
#SERVER_DB_LIBS= $(WAIS_GW_LIB) -lm
#SERVER_DB_LIBS_DEPENDENCIES = $(WAIS_GW_LIB)
# For GOPHER-GW and WAIS
#SERVER_DB_LIBS= $(GOPHER_GW_LIB) $(WAIS_GW_LIB) -lm
#SERVER_DB_LIBS_DEPENDENCIES= $(GOPHER_GW_LIB) $(WAIS_GW_LIB)
# On SOLARIS 2.3: Note - that this is not thread safe, unless it uses libm.so
# not libm.a. See "man ciel" - this hasn't been checked yet
# For no server libraries.
#SERVER_LIBS =
#SERVER_LIBS_DEPENDENCIES =
###########################################################################
# III) DEVELOPMENT OPTIONS #
# You will generally not want to modify these options unless you are #
# a Prospero developer
###########################################################################
##
## GENERATION and GENERATIONSUFFIX
## This is a special program that installs new binaries without corrupting
## existing ones that might be running. It also renames the existing files
## to .o or .oo
# GENERATION=true IGNORE THIS
GENERATION =/nfs/pfs/dev/tools/generation
# leave suffix empty normally.
# leave it to + for the mitra-style GENERATION command.
# GENERATIONSUFFIX=
GENERATIONSUFFIX=+
##
## an 'install' dependency clearly goes here. yank out from all makefiles.
##
##
## COMPILER SETUP and FLAGS
##
## Compiler choice. Prospero must be compiled with an ANSI C compiler.
## We usually use GCC.
## Use 'xlc' on an RS6000.
CC = gcc
# Debugging is turned off in the default distribution in order to keep things
# reasonably small.
# If you encounter segmentation faults or other problems, we may ask you to
# reset this to '-g', 'make clean', and recompile the binaries so that we can
# get a stack trace and other useful debugging information.
## WARNINGS
# Warnings on here have been checked for most, if not all of the code
# This does not work on SunOS 4.1.3., because the include files don't prototype
# all the functions. Has been tested under Solaris.
# GCCWARN = -Wimplicit
GCCWARN=
# Compiling with these will generate lots of warnings
GCCTRY = -Wformat -Wshadow -Wreturn-type
# -O -Wuninitialized # -Wuninitialized is not supported without -O
GCCNO = -Wredundant-decls -Wstrict-prototypes
# -ggdb3 to compile with full GDB debugging information.
# -g for adequate debugging information.
# -pg for performance monitoring
# -O for optimization
# CFLAGS =
CCFLAGS = -ggdb3 $(GCCWARN) $(GCCTRY) -O3 -DSUNOS # -DCOREDUMP
## Additional stuff added to CFLAGS in Makefile.boilerplate.
##
## The WAIS gateway code has notions of how to be configured that differ
## from the rest of Prospero.
## If using that code, please set WCFLAGS. It is set by default to an
## appropriate value.
## WCFLAGS will be appended to the regular CFLAGS for just the
## lib/psrv/wais_gw/Makefile.
#-Dmacros for using macros rather than functions in certain inner loops
# RS6000's require adding -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_ALL_SOURCE
# Data Generals require adding -DDG
# WCFLAGS = -UM_XENIX -DSCOUNIX -Dmacros -DIN_RMG
# IN_RMG is used to specify only to compile parts needed for RMG (that is,
# only the parts needed for the Prospero WAIS client gateway.)
# Some of the non-RMG parts are not thread safe yet
WCFLAGS = -DIN_RMG -Dmacros
##
## CACHING definitions.
##
### CLIENT SIDE CACHING
# If you are using the special client side CACHING option (see section 3
# of <psite.h>) then you will need to put the non-empty versions of
# these three macros in place.
# If you are a Prospero novice, leave the defaults present. The caching code
# is still experimental.
## You will not normally alter this, but it can be done if you want to change
## the name. If you do, then also alter P_CACHE_P, P_CACHE_VC, and P_CACHE_TMP
## in section 3 of <psite.h>.
P_CACHE_P = $(TOPDIR)/vcache/p
P_CACHE_VC = $(TOPDIR)/vcache/vc
P_CACHE_TMP = $(TOPDIR)/vcache/tmp
### VCACHE PROGRAM or LIBRARY?
# If you're using the PVACHE LIBRARY, then you need to use the first definition
# Use the second if you are not.
# This is normally not set and you normally will not need to
# make use of it. See section (3) of <psite.h>
# These libraries will be linked with any Prospero client that retrieves data
# using an ACCESS-METHOD.
# In the distribution, they are linked with "menu", "vget", "vcache",
# and programs that use the compatibility library.
# Programs that don't retrieve data (e.g., PSTATUS) can be linked with either
# USE_VCACHE_LIBS or with PFS_LIBS.
# USE_VCACHE_LIBS = $(PFS_VCACHE_LIBS)
USE_VCACHE_LIBS = $(PFS_LIBS)
# Change this in parallel with USE_VCACHE_LIBS.
# USE_VCACHE_LIBS_DEPENDENCIES = $(PFS_VCACHE_LIBS_DEPENDENCIES)
USE_VCACHE_LIBS_DEPENDENCIES = $(PFS_LIBS_DEPENDENCIES)
####
#### If you change the definitions of PSRV_SHADOW, PSRV_STORAGE, or
#### PSRV_SECURITY in <pserver.h>, you must change these to match.
#### These are normally not changed.
#### This is used by the 'installdirs' dependency.
PSRV_SHADOW=$(TOPDIR)/shadow
PSRV_STORAGE=$(TOPDIR)/pfsdat
PSRV_SECURITY=$(TOPDIR)/security
#### INSTALL_EXE_MODE
#### Mode for executables to be set to when installed. It would be quite odd
#### for you to want to change this, but you can if you want to.
INSTALL_EXE_MODE = 755
#### INSTALL_DATA_MODE
#### Mode for non-executables to be set to when installed. It would be quite odd
#### for you to want to change this, but you can if you want to.
INSTALL_DATA_MODE = 644
###
include $(SOURCEBASE)/Makefile.boilerplate

View File

@@ -0,0 +1,440 @@
#
#/*
# * Copyright (c) 1991-1994 by the University of Southern California
# *
# * For copying and distribution information, please see the file
# * <usc-license.h>.
# */
#
# This is the master configuration Makefile for the
# Prospero Directory Service. It replaces the former practice of always
# having to modify a number of independent makefiles.
#######################################################################
# I) Machine and Operating-System dependent options. Check these. #
# The defaults are correct for SunOS. #
#######################################################################
# Also need to configure the LIBS entry in section II according to your
# operating system.
#### INSTALL
# This definition of install is useful if you do not plan to throw away
# debugging information. It will work on systems with a build-in install.
INSTALL = install
# If space is at a premium and you want the binaries stripped of their
# symbol tables and other debugging informaiton when they're installed,
# use the following definition of INSTALL instead. If you are going to throw
# away the debugging information anyway, he definition of CFLAGS below should
# not include the -g option, which means 'include debugging information'.
# INSTALL = install -s
# If you're using HP-UX (or other systems without a BSD-like 'install'
# command, use the version we provide in the misc subdirectory of this
# distribution.
# INSTALL = sh /usr/pfs/source/misc/install.sh
#### OWNER
# The owner of the binaries that will be installed.
# OWNER = pfs
OWNER = swa
#### GROUP
# The group that the binaries to be installed should be set to.
# GROUP = pfs
GROUP = prospsrc
#### RANLIB
# Some systems (notably SCO Unix, Solaris, SGI, and other Sys-V Unices) do not
# need "ranlib" to be run on an archived library after "ar". If your system
# is one of them, define this as "echo" or "true". Otherwise define it
# as "ranlib".
RANLIB = ranlib
#### AR
## your archiving program. You should not need to change this.
AR = ar
# Define this if you feel like making AR verbose when it builds the libraries.
# This will give you extra info as it's chugging along.
# AR_VERBOSE_FLAG=v
ARFLAGS = r$(AR_VERBOSE_FLAG)
#### MACHDEF
#
# This is used to set certain #defines that might be needed by any file
# you're compiling with.
# Generally this is used when certain C compilers require magic things to be
# #defined, or when some general Prospero include file needs a special fix for
# a particular architecture.
# AIX:
# If you're using AIX, set MACHDEF to be this:
# MACHDEF = -DAIX
#
# ULTRIX:
# The system include files on Ultrix systems depend on the compiler predefining
# __LANGUAGE_C, __mips or __vax, and, if on a MIPS system,
# __MIPSEL for the little-endian version and __MIPSEB for the big-endian
# version. The version of GCC I was using did not predefine these constants,
# although the system's C compiler did. If you are on an ULTRIX system and
# encounter errors involving 'struct sigcontext' or '.w_Retcode' being
# undefined, set MACHDEF to include these definitions. One of the following
# three choices will work, depending upon your configuration.
# MACHDEF = -D__mips -D__MIPSEL -D__LANGUAGE_C
# MACHDEF = -D__mips -D__MIPSEB -D__LANGUAGE_C
# MACHDEF = -D__vax -D__LANGUAGE_C
#
# ULTRIX:
# In addition, under Ultrix4.2 using GCC version 1.37.1 OSF 1.9.2.13, I
# encountered a bug explained in <include/pprot.h>. Add this to the
# definition of MACHDEF if you get error messages complaining that NULL
# has been redefined.
# -DCONFLICT_BETWEEN_DEFINITION_OF_NULL_IN_SYS_PARAM_H_AND_STDDEF_H
MACHDEF = # empty for most systems
#### COMPILER_PREPENDS_C_SYMBOLS_WITH_UNDERSCORE
# Many BSD-derived C compilers prepend C symbols with an _, and require that
# the _ be present as an argument to the linker's -u flag. Many
# SysV-derived compilers don't do that. Some Prospero Makefiles (notably, the
# compatibility library) use the linker's -u flag.
# BSD:
# On Suns running SunOS and on the VAX use this definition:
COMPILER_PREPENDS_C_SYMBOLS_WITH_UNDERSCORE=_
# SYSV:
# On Suns running SOLARIS and on the MIPS, use this empty definition:
# COMPILER_PREPENDS_C_SYMBOLS_WITH_UNDERSCORE=
#### MAKE
# You should not need to explicity set this, unless your version of MAKE is
# broken. This is even true if you're using an unusual version of MAKE
# that your system doesn't call 'make'.
# MAKE = make
#######################################################################
# II) Configuration-dependent options (these all MUST be set) #
#######################################################################
# lib/psrv/wais_gw should be added if you're using WAIS or even if you
# just want your clients to be able to retrieve WAIS files directly.
# It is enabled by default so that the WAIS retrieval will work properly
# Added to BIN subdirs rather than to LIB subdirs because there are executables
# in it. (XXX not sure what they do. --swa)
# "app" should be added if you're using the compatability library and want
# to build the versions of CAT and LS that are specially linked with Prospero.
# "pcompat" and "app" won't work with SCO UNIX or AIX or SOLARIS, because they
# need syscall.h.
#
# If you add "app", then add "lib/pcompat" to OPTIONAL_LIB_SUBDIRS
#
# XXX pcompat and app not fully supported in this prerelease. Fix later.
# --swa XXX
OPTIONAL_BIN_SUBDIRS = lib/psrv/wais_gw # app
# Add lib/psrv/gopher_gw if you're running a server with GOPHER-GW enabled.
# Add lib/psrv/archie2 if you're running an archie version 2 server.
# Add lib/psrv/archie3 if you're running an archie version 3 server.
# Add lib/pcompat for the compatibility library. (see note above)
OPTIONAL_LIB_SUBDIRS = lib/psrv/wais_gw lib/pcompat lib/psrv/gopher_gw
# These options are used only by 'make install' and 'make installbinaries'
#### TOPDIR
# The top of the Prospero data files. You will only use this if you're
# running the Prospero server.
TOPDIR = /pfs
#### P_BINARIES:
# Location where Prospero binaries should be put by the 'install' target.
P_BINARIES = $(TOPDIR)/bin
#### SOURCEBASE
# The directory in which the top-level Prospero makefile exists. This is the
# root of the Prospero build directory/source directory you're using.
# The Prospero Makefiles use this to compute library and include-file
# pathnames for the linker and compiler.
# This actually does not need to be defined; each include file defines its own.
# SOURCEBASE = /nfs/gost/build/10Mar94+19Apr94.patched
#### KERBEROS (K_INC, KRB_LIBS, KRB_LIBS_DEPENDENCIES)
# Use the following definitions if you want Kerberos Version 5
# authentication.
# The location of the Kerberos version 5 libraries and include files will vary
# from machine to machine.
# We don't enable the Kerberos libraries and include files by default because
# searching the huge Kerberos libraries substantially slows down the linker.
# K_INC = -I/nfs/kerberos/v5/include
# KRB_LIBS = -L/nfs/kerberos/v5/lib -lkrb5 -lcrypto /nfs/kerberos/v5/extlib/libisode.a
# Only need to set the dependencies if your Kerberos libraries might change
# out from under you (this is the case at ISI, where Kerberos development is
# ongoing).
# KRB_LIBS_DEPENDENCIES=/nfs/kerberos/v5/lib/libkrb5.a /nfs/kerberos/v5/lib/libcrypto.a /nfs/kerberos/v5/extlib/libisode.a
# Use the following definitions if you don't want Kerberos.
K_INC =
KRB_LIBS =
KRB_LIBS_DEPENDENCIES =
##
## LIBS
##
## Special libraries needed by some operating systems.
##
##
# SCOUNIX: Need -lsocket, -lcrypt_i
# LIBS = -lsocket -lcrypt_i -lm
# SOLARIS: Need -lsocket -lnsl
# LIBS = -lsocket -lnsl
# Under SunOS no libraries are necessary.
LIBS=
# There are usually not dependencies, unless you think the libraries
# you're using might change under you.
LIBS_DEPENDENCIES=
#### Add the threads library we use to the LIBS list.
## not all versions of MAKE support +=
## If you're running multi-threaded using the FSU pthreads package, make
## sure that lib/fsu_pthreads/lib/libpthreads.a and lib/malloc/gmalloc.o
## are included.
# LIBS += /nfs/pfs/prospero.build/sun4/lib/fsu_pthreads/lib/libpthreads.a /nfs/pfs/prospero.build/sun4/lib/malloc/gmalloc.o -lm
# LIBS_DEPENDENCIES += $(SOURCEBASE)/lib/fsu_pthreads/lib/libpthreads.a $(SOURCEBASE)/lib/malloc/gmalloc.o
## if running multi-threaded under SOLARIS, add -lthread to LIBS:
# LIBS += -lthread
##If you're working with another threads package, make sure
## that that particular package's libraries are included.
#### MORE_USER_PROGS
# A set of additional user programs that are compiled by default.
# By default, this is unset.
# If you have gotten your own site distribution, then you will want to add
# "newvs" and "newpsite" to this list.
MORE_USER_PROGS = newvs
# MORE_USER_PROGS =
#### MORE_SERVER_PROGS
# A set of additional programs in the SERVER directory
# that should be compiled by default.
# By default, this is unset.
# If you are running a Prospero server using the Prospero Password
# authentication mechanism, then add pw_edit to this list.
# MORE_SERVER_PROGS = pw_edit
MORE_SERVER_PROGS =
#### SERVER_DB_LIBS
# These databases are linked with the server. You must also make the
# appropriate changes to <pserver.h>
# For ARCHIE servers, version 2. To use this, you will need to get the ARCHIE
# distribution from Bunyip Information Systems.
#SERVER_DB_LIBS= $(ARCHIE2_LIB)
#SERVER_DB_LIBS_DEPENDENCIES= $(ARCHIE2_LIB)
# For ARCHIE servers, version 3. To use this, you will need to get the ARCHIE
# distribution from Bunyip Information Systems.
#SERVER_DB_LIBS= $(ARCHIE3_LIB1) $(ARCHIE3_LIB2)
#SERVER_DB_LIBS_DEPENDENCIES= $(ARCHIE3_LIB1) $(ARCHIE3_LIB2)
# Unimplemented format to read GOPHER data files; this does not work yet
# and probably never will since it has been supserseded by the GOPHER-GW.
#SERVER_DB_LIBS= $(SOURCEBASE)/lib/psrv/gopher/libpgopher.a
# For just GOPHER-GW
SERVER_DB_LIBS= $(GOPHER_GW_LIB)
SERVER_DB_LIBS_DEPENDENCIES = $(GOPHER_GW_LIB)
# For just WAIS
# note that wais uses -lm
#SERVER_DB_LIBS= $(WAIS_GW_LIB) -lm
#SERVER_DB_LIBS_DEPENDENCIES = $(WAIS_GW_LIB)
# For GOPHER-GW and WAIS
#SERVER_DB_LIBS= $(GOPHER_GW_LIB) $(WAIS_GW_LIB) -lm
#SERVER_DB_LIBS_DEPENDENCIES= $(GOPHER_GW_LIB) $(WAIS_GW_LIB)
# On SOLARIS 2.3: Note - that this is not thread safe, unless it uses libm.so
# not libm.a. See "man ciel" - this hasn't been checked yet
# For no server libraries.
#SERVER_LIBS =
#SERVER_LIBS_DEPENDENCIES =
###########################################################################
# III) DEVELOPMENT OPTIONS #
# You will generally not want to modify these options unless you are #
# a Prospero developer
###########################################################################
##
## GENERATION and GENERATIONSUFFIX
## This is a special program that installs new binaries without corrupting
## existing ones that might be running. It also renames the existing files
## to .o or .oo
# GENERATION=true IGNORE THIS
GENERATION =/nfs/pfs/dev/tools/generation
# leave suffix empty normally.
# leave it to + for the mitra-style GENERATION command.
# GENERATIONSUFFIX=
GENERATIONSUFFIX=+
##
## an 'install' dependency clearly goes here. yank out from all makefiles.
##
##
## COMPILER SETUP and FLAGS
##
## Compiler choice. Prospero must be compiled with an ANSI C compiler.
## We usually use GCC.
## Use 'xlc' on an RS6000.
CC = gcc
# Debugging is turned off in the default distribution in order to keep things
# reasonably small.
# If you encounter segmentation faults or other problems, we may ask you to
# reset this to '-g', 'make clean', and recompile the binaries so that we can
# get a stack trace and other useful debugging information.
## WARNINGS
# Warnings on here have been checked for most, if not all of the code
# This does not work on SunOS 4.1.3., because the include files don't prototype
# all the functions. Has been tested under Solaris.
# GCCWARN = -Wimplicit
GCCWARN=
# Compiling with these will generate lots of warnings
GCCTRY = -Wformat -Wshadow -Wreturn-type
# -O -Wuninitialized # -Wuninitialized is not supported without -O
GCCNO = -Wredundant-decls -Wstrict-prototypes
# -ggdb3 to compile with full GDB debugging information.
# -g for adequate debugging information.
# -pg for performance monitoring
# -O for optimization
# CFLAGS =
CCFLAGS = -ggdb3 $(GCCWARN) $(GCCTRY) -O3 -DSUNOS
## Additional stuff added to CFLAGS in Makefile.boilerplate.
##
## The WAIS gateway code has notions of how to be configured that differ
## from the rest of Prospero.
## If using that code, please set WCFLAGS. It is set by default to an
## appropriate value.
## WCFLAGS will be appended to the regular CFLAGS for just the
## lib/psrv/wais_gw/Makefile.
#-Dmacros for using macros rather than functions in certain inner loops
# RS6000's require adding -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_ALL_SOURCE
# Data Generals require adding -DDG
# WCFLAGS = -UM_XENIX -DSCOUNIX -Dmacros -DIN_RMG
# IN_RMG is used to specify only to compile parts needed for RMG (that is,
# only the parts needed for the Prospero WAIS client gateway.)
# Some of the non-RMG parts are not thread safe yet
WCFLAGS = -DIN_RMG -Dmacros
##
## CACHING definitions.
##
### CLIENT SIDE CACHING
# If you are using the special client side CACHING option (see section 3
# of <psite.h>) then you will need to put the non-empty versions of
# these three macros in place.
# If you are a Prospero novice, leave the defaults present. The caching code
# is still experimental.
## You will not normally alter this, but it can be done if you want to change
## the name. If you do, then also alter P_CACHE_P, P_CACHE_VC, and P_CACHE_TMP
## in section 3 of <psite.h>.
P_CACHE_P = $(TOPDIR)/vcache/p
P_CACHE_VC = $(TOPDIR)/vcache/vc
P_CACHE_TMP = $(TOPDIR)/vcache/tmp
### VCACHE PROGRAM or LIBRARY?
# If you're using the PVACHE LIBRARY, then you need to use the first definition
# Use the second if you are not.
# This is normally not set and you normally will not need to
# make use of it. See section (3) of <psite.h>
# These libraries will be linked with any Prospero client that retrieves data
# using an ACCESS-METHOD.
# In the distribution, they are linked with "menu", "vget", "vcache",
# and programs that use the compatibility library.
# Programs that don't retrieve data (e.g., PSTATUS) can be linked with either
# USE_VCACHE_LIBS or with PFS_LIBS.
# USE_VCACHE_LIBS = $(PFS_VCACHE_LIBS)
USE_VCACHE_LIBS = $(PFS_LIBS)
# Change this in parallel with USE_VCACHE_LIBS.
# USE_VCACHE_LIBS_DEPENDENCIES = $(PFS_VCACHE_LIBS_DEPENDENCIES)
USE_VCACHE_LIBS_DEPENDENCIES = $(PFS_LIBS_DEPENDENCIES)
####
#### If you change the definitions of PSRV_SHADOW, PSRV_STORAGE, or
#### PSRV_SECURITY in <pserver.h>, you must change these to match.
#### These are normally not changed.
#### This is used by the 'installdirs' dependency.
PSRV_SHADOW=$(TOPDIR)/shadow
PSRV_STORAGE=$(TOPDIR)/pfsdat
PSRV_SECURITY=$(TOPDIR)/security
#### INSTALL_EXE_MODE
#### Mode for executables to be set to when installed. It would be quite odd
#### for you to want to change this, but you can if you want to.
INSTALL_EXE_MODE = 755
#### INSTALL_DATA_MODE
#### Mode for non-executables to be set to when installed. It would be quite odd
#### for you to want to change this, but you can if you want to.
INSTALL_DATA_MODE = 644
###
include $(SOURCEBASE)/Makefile.boilerplate

View File

@@ -0,0 +1,440 @@
#
#/*
# * Copyright (c) 1991-1994 by the University of Southern California
# *
# * For copying and distribution information, please see the file
# * <usc-license.h>.
# */
#
# This is the master configuration Makefile for the
# Prospero Directory Service. It replaces the former practice of always
# having to modify a number of independent makefiles.
#######################################################################
# I) Machine and Operating-System dependent options. Check these. #
# The defaults are correct for SunOS. #
#######################################################################
# Also need to configure the LIBS entry in section II according to your
# operating system.
#### INSTALL
# This definition of install is useful if you do not plan to throw away
# debugging information. It will work on systems with a build-in install.
INSTALL = install
# If space is at a premium and you want the binaries stripped of their
# symbol tables and other debugging informaiton when they're installed,
# use the following definition of INSTALL instead. If you are going to throw
# away the debugging information anyway, he definition of CFLAGS below should
# not include the -g option, which means 'include debugging information'.
# INSTALL = install -s
# If you're using HP-UX (or other systems without a BSD-like 'install'
# command, use the version we provide in the misc subdirectory of this
# distribution.
# INSTALL = sh /usr/pfs/source/misc/install.sh
#### OWNER
# The owner of the binaries that will be installed.
# OWNER = pfs
OWNER = archie
#### GROUP
# The group that the binaries to be installed should be set to.
# GROUP = pfs
GROUP = archie
#### RANLIB
# Some systems (notably SCO Unix, Solaris, SGI, and other Sys-V Unices) do not
# need "ranlib" to be run on an archived library after "ar". If your system
# is one of them, define this as "echo" or "true". Otherwise define it
# as "ranlib".
RANLIB = granlib
#### AR
## your archiving program. You should not need to change this.
AR = gar
# Define this if you feel like making AR verbose when it builds the libraries.
# This will give you extra info as it's chugging along.
# AR_VERBOSE_FLAG=v
ARFLAGS = r$(AR_VERBOSE_FLAG)
#### MACHDEF
#
# This is used to set certain #defines that might be needed by any file
# you're compiling with.
# Generally this is used when certain C compilers require magic things to be
# #defined, or when some general Prospero include file needs a special fix for
# a particular architecture.
# AIX:
# If you're using AIX, set MACHDEF to be this:
# MACHDEF = -DAIX
#
# ULTRIX:
# The system include files on Ultrix systems depend on the compiler predefining
# __LANGUAGE_C, __mips or __vax, and, if on a MIPS system,
# __MIPSEL for the little-endian version and __MIPSEB for the big-endian
# version. The version of GCC I was using did not predefine these constants,
# although the system's C compiler did. If you are on an ULTRIX system and
# encounter errors involving 'struct sigcontext' or '.w_Retcode' being
# undefined, set MACHDEF to include these definitions. One of the following
# three choices will work, depending upon your configuration.
# MACHDEF = -D__mips -D__MIPSEL -D__LANGUAGE_C
# MACHDEF = -D__mips -D__MIPSEB -D__LANGUAGE_C
# MACHDEF = -D__vax -D__LANGUAGE_C
#
# ULTRIX:
# In addition, under Ultrix4.2 using GCC version 1.37.1 OSF 1.9.2.13, I
# encountered a bug explained in <include/pprot.h>. Add this to the
# definition of MACHDEF if you get error messages complaining that NULL
# has been redefined.
# -DCONFLICT_BETWEEN_DEFINITION_OF_NULL_IN_SYS_PARAM_H_AND_STDDEF_H
MACHDEF = # empty for most systems
#### COMPILER_PREPENDS_C_SYMBOLS_WITH_UNDERSCORE
# Many BSD-derived C compilers prepend C symbols with an _, and require that
# the _ be present as an argument to the linker's -u flag. Many
# SysV-derived compilers don't do that. Some Prospero Makefiles (notably, the
# compatibility library) use the linker's -u flag.
# BSD:
# On Suns running SunOS and on the VAX use this definition:
# COMPILER_PREPENDS_C_SYMBOLS_WITH_UNDERSCORE=_
# SYSV:
# On Suns running SOLARIS and on the MIPS, use this empty definition:
COMPILER_PREPENDS_C_SYMBOLS_WITH_UNDERSCORE=
#### MAKE
# You should not need to explicity set this, unless your version of MAKE is
# broken. This is even true if you're using an unusual version of MAKE
# that your system doesn't call 'make'.
# MAKE = make
#######################################################################
# II) Configuration-dependent options (these all MUST be set) #
#######################################################################
# lib/psrv/wais_gw should be added if you're using WAIS or even if you
# just want your clients to be able to retrieve WAIS files directly.
# It is enabled by default so that the WAIS retrieval will work properly
# Added to BIN subdirs rather than to LIB subdirs because there are executables
# in it. (XXX not sure what they do. --swa)
# "app" should be added if you're using the compatability library and want
# to build the versions of CAT and LS that are specially linked with Prospero.
# "pcompat" and "app" won't work with SCO UNIX or AIX or SOLARIS, because they
# need syscall.h.
#
# If you add "app", then add "lib/pcompat" to OPTIONAL_LIB_SUBDIRS
#
# XXX pcompat and app not fully supported in this prerelease. Fix later.
# --swa XXX
OPTIONAL_BIN_SUBDIRS = lib/psrv/wais_gw
# Add lib/psrv/gopher_gw if you're running a server with GOPHER-GW enabled.
# Add lib/psrv/archie2 if you're running an archie version 2 server.
# Add lib/psrv/archie3 if you're running an archie version 3 server.
# Add lib/pcompat for the compatibility library. (see note above)
OPTIONAL_LIB_SUBDIRS = lib/psrv/wais_gw lib/psrv/gopher_gw
# These options are used only by 'make install' and 'make installbinaries'
#### TOPDIR
# The top of the Prospero data files. You will only use this if you're
# running the Prospero server.
TOPDIR = /pfs
#### P_BINARIES:
# Location where Prospero binaries should be put by the 'install' target.
P_BINARIES = $(TOPDIR)/bin
#### SOURCEBASE
# The directory in which the top-level Prospero makefile exists. This is the
# root of the Prospero build directory/source directory you're using.
# The Prospero Makefiles use this to compute library and include-file
# pathnames for the linker and compiler.
# This actually does not need to be defined; each include file defines its own.
# SOURCEBASE = /nfs/gost/build/10Mar94+19Apr94.patched
#### KERBEROS (K_INC, KRB_LIBS, KRB_LIBS_DEPENDENCIES)
# Use the following definitions if you want Kerberos Version 5
# authentication.
# The location of the Kerberos version 5 libraries and include files will vary
# from machine to machine.
# We don't enable the Kerberos libraries and include files by default because
# searching the huge Kerberos libraries substantially slows down the linker.
# K_INC = -I/nfs/kerberos/v5/include
# KRB_LIBS = -L/nfs/kerberos/v5/lib -lkrb5 -lcrypto /nfs/kerberos/v5/extlib/libisode.a
# Only need to set the dependencies if your Kerberos libraries might change
# out from under you (this is the case at ISI, where Kerberos development is
# ongoing).
# KRB_LIBS_DEPENDENCIES=/nfs/kerberos/v5/lib/libkrb5.a /nfs/kerberos/v5/lib/libcrypto.a /nfs/kerberos/v5/extlib/libisode.a
# Use the following definitions if you don't want Kerberos.
K_INC =
KRB_LIBS =
KRB_LIBS_DEPENDENCIES =
##
## LIBS
##
## Special libraries needed by some operating systems.
##
##
# SCOUNIX: Need -lsocket, -lcrypt_i
# LIBS = -lsocket -lcrypt_i -lm
# SOLARIS: Need -lsocket -lnsl
LIBS = -lgen -lsocket -lnsl
# Under SunOS no libraries are necessary.
# LIBS=
# There are usually not dependencies, unless you think the libraries
# you're using might change under you.
LIBS_DEPENDENCIES=
#### Add the threads library we use to the LIBS list.
## not all versions of MAKE support +=
## If you're running multi-threaded using the FSU pthreads package, make
## sure that lib/fsu_pthreads/lib/libpthreads.a and lib/malloc/gmalloc.o
## are included.
# LIBS += /nfs/pfs/prospero.build/sun4/lib/fsu_pthreads/lib/libpthreads.a /nfs/pfs/prospero.build/sun4/lib/malloc/gmalloc.o -lm
# LIBS_DEPENDENCIES += $(SOURCEBASE)/lib/fsu_pthreads/lib/libpthreads.a $(SOURCEBASE)/lib/malloc/gmalloc.o
## if running multi-threaded under SOLARIS, add -lthread to LIBS:
# LIBS += -lthread
##If you're working with another threads package, make sure
## that that particular package's libraries are included.
#### MORE_USER_PROGS
# A set of additional user programs that are compiled by default.
# By default, this is unset.
# If you have gotten your own site distribution, then you will want to add
# "newvs" and "newpsite" to this list.
MORE_USER_PROGS = newvs
# MORE_USER_PROGS =
#### MORE_SERVER_PROGS
# A set of additional programs in the SERVER directory
# that should be compiled by default.
# By default, this is unset.
# If you are running a Prospero server using the Prospero Password
# authentication mechanism, then add pw_edit to this list.
# MORE_SERVER_PROGS = pw_edit
MORE_SERVER_PROGS =
#### SERVER_DB_LIBS
# These databases are linked with the server. You must also make the
# appropriate changes to <pserver.h>
# For ARCHIE servers, version 2. To use this, you will need to get the ARCHIE
# distribution from Bunyip Information Systems.
#SERVER_DB_LIBS= $(ARCHIE2_LIB)
#SERVER_DB_LIBS_DEPENDENCIES= $(ARCHIE2_LIB)
# For ARCHIE servers, version 3. To use this, you will need to get the ARCHIE
# distribution from Bunyip Information Systems.
#SERVER_DB_LIBS= $(ARCHIE3_LIB1) $(ARCHIE3_LIB2)
#SERVER_DB_LIBS_DEPENDENCIES= $(ARCHIE3_LIB1) $(ARCHIE3_LIB2)
# Unimplemented format to read GOPHER data files; this does not work yet
# and probably never will since it has been supserseded by the GOPHER-GW.
#SERVER_DB_LIBS= $(SOURCEBASE)/lib/psrv/gopher/libpgopher.a
# For just GOPHER-GW
SERVER_DB_LIBS= $(GOPHER_GW_LIB)
SERVER_DB_LIBS_DEPENDENCIES = $(GOPHER_GW_LIB)
# For just WAIS
# note that wais uses -lm
#SERVER_DB_LIBS= $(WAIS_GW_LIB) -lm
#SERVER_DB_LIBS_DEPENDENCIES = $(WAIS_GW_LIB)
# For GOPHER-GW and WAIS
#SERVER_DB_LIBS= $(GOPHER_GW_LIB) $(WAIS_GW_LIB) -lm
#SERVER_DB_LIBS_DEPENDENCIES= $(GOPHER_GW_LIB) $(WAIS_GW_LIB)
# On SOLARIS 2.3: Note - that this is not thread safe, unless it uses libm.so
# not libm.a. See "man ciel" - this hasn't been checked yet
# For no server libraries.
#SERVER_LIBS =
#SERVER_LIBS_DEPENDENCIES =
###########################################################################
# III) DEVELOPMENT OPTIONS #
# You will generally not want to modify these options unless you are #
# a Prospero developer
###########################################################################
##
## GENERATION and GENERATIONSUFFIX
## This is a special program that installs new binaries without corrupting
## existing ones that might be running. It also renames the existing files
## to .o or .oo
# GENERATION=true IGNORE THIS
GENERATION =/nfs/pfs/dev/tools/generation
# leave suffix empty normally.
# leave it to + for the mitra-style GENERATION command.
# GENERATIONSUFFIX=
GENERATIONSUFFIX=+
##
## an 'install' dependency clearly goes here. yank out from all makefiles.
##
##
## COMPILER SETUP and FLAGS
##
## Compiler choice. Prospero must be compiled with an ANSI C compiler.
## We usually use GCC.
## Use 'xlc' on an RS6000.
CC = gcc
# Debugging is turned off in the default distribution in order to keep things
# reasonably small.
# If you encounter segmentation faults or other problems, we may ask you to
# reset this to '-g', 'make clean', and recompile the binaries so that we can
# get a stack trace and other useful debugging information.
## WARNINGS
# Warnings on here have been checked for most, if not all of the code
# This does not work on SunOS 4.1.3., because the include files don't prototype
# all the functions. Has been tested under Solaris.
# GCCWARN = -Wimplicit
GCCWARN=
# Compiling with these will generate lots of warnings
GCCTRY = -Wformat -Wshadow -Wreturn-type
# -O -Wuninitialized # -Wuninitialized is not supported without -O
GCCNO = -Wredundant-decls -Wstrict-prototypes
# -ggdb3 to compile with full GDB debugging information.
# -g for adequate debugging information.
# -pg for performance monitoring
# -O for optimization
# CFLAGS =
CCFLAGS = -ggdb3 $(GCCWARN) $(GCCTRY) -DSOLARIS -O3
## Additional stuff added to CFLAGS in Makefile.boilerplate.
##
## The WAIS gateway code has notions of how to be configured that differ
## from the rest of Prospero.
## If using that code, please set WCFLAGS. It is set by default to an
## appropriate value.
## WCFLAGS will be appended to the regular CFLAGS for just the
## lib/psrv/wais_gw/Makefile.
#-Dmacros for using macros rather than functions in certain inner loops
# RS6000's require adding -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_ALL_SOURCE
# Data Generals require adding -DDG
# WCFLAGS = -UM_XENIX -DSCOUNIX -Dmacros -DIN_RMG
# IN_RMG is used to specify only to compile parts needed for RMG (that is,
# only the parts needed for the Prospero WAIS client gateway.)
# Some of the non-RMG parts are not thread safe yet
WCFLAGS = -DIN_RMG -Dmacros
##
## CACHING definitions.
##
### CLIENT SIDE CACHING
# If you are using the special client side CACHING option (see section 3
# of <psite.h>) then you will need to put the non-empty versions of
# these three macros in place.
# If you are a Prospero novice, leave the defaults present. The caching code
# is still experimental.
## You will not normally alter this, but it can be done if you want to change
## the name. If you do, then also alter P_CACHE_P, P_CACHE_VC, and P_CACHE_TMP
## in section 3 of <psite.h>.
P_CACHE_P = $(TOPDIR)/vcache/p
P_CACHE_VC = $(TOPDIR)/vcache/vc
P_CACHE_TMP = $(TOPDIR)/vcache/tmp
### VCACHE PROGRAM or LIBRARY?
# If you're using the PVACHE LIBRARY, then you need to use the first definition
# Use the second if you are not.
# This is normally not set and you normally will not need to
# make use of it. See section (3) of <psite.h>
# These libraries will be linked with any Prospero client that retrieves data
# using an ACCESS-METHOD.
# In the distribution, they are linked with "menu", "vget", "vcache",
# and programs that use the compatibility library.
# Programs that don't retrieve data (e.g., PSTATUS) can be linked with either
# USE_VCACHE_LIBS or with PFS_LIBS.
# USE_VCACHE_LIBS = $(PFS_VCACHE_LIBS)
USE_VCACHE_LIBS = $(PFS_LIBS)
# Change this in parallel with USE_VCACHE_LIBS.
# USE_VCACHE_LIBS_DEPENDENCIES = $(PFS_VCACHE_LIBS_DEPENDENCIES)
USE_VCACHE_LIBS_DEPENDENCIES = $(PFS_LIBS_DEPENDENCIES)
####
#### If you change the definitions of PSRV_SHADOW, PSRV_STORAGE, or
#### PSRV_SECURITY in <pserver.h>, you must change these to match.
#### These are normally not changed.
#### This is used by the 'installdirs' dependency.
PSRV_SHADOW=$(TOPDIR)/shadow
PSRV_STORAGE=$(TOPDIR)/pfsdat
PSRV_SECURITY=$(TOPDIR)/security
#### INSTALL_EXE_MODE
#### Mode for executables to be set to when installed. It would be quite odd
#### for you to want to change this, but you can if you want to.
INSTALL_EXE_MODE = 755
#### INSTALL_DATA_MODE
#### Mode for non-executables to be set to when installed. It would be quite odd
#### for you to want to change this, but you can if you want to.
INSTALL_DATA_MODE = 644
###
include $(SOURCEBASE)/Makefile.boilerplate

66
prospero/Makefile.in Executable file
View File

@@ -0,0 +1,66 @@
#
# Copyright (c) 1991-1994 by the University of Southern California
#
# For copying and distribution information, please see the file
# <usc-license.h>.
#
#
# This is the top level Makefile for the Prospero Directory Service.
# Include configuration options.
SOURCEBASE = .
include Makefile.config
# Programs that live in subdirectories, and have makefiles of their own.
# The ordering is important here; libraries are built before the parts of
# Prospero that have to be linked with them are.
# put OPTIONAL_LIB_SUBDIRS at the end here, because lib/psrv/wais_gw contains
# executables that are needed by WAIS.
LIB_SUBDIRS = \
lib/pfs \
lib/ardp \
lib/psrv \
lib/filters \
$(OPTIONAL_LIB_SUBDIRS)
BIN_SUBDIRS = \
$(OPTIONAL_BIN_SUBDIRS) \
server \
user
SUBDIRS = \
$(LIB_SUBDIRS) \
$(BIN_SUBDIRS)
all: all_subdirs
install: installdirs installfiles
installdirs:
-mkdir $(DIR755) $(DIR1777)
-chown $(OWNER) $(DIR755) $(DIR1777)
-chgrp $(GROUP) $(DIR755) $(DIR1777)
-chmod 755 $(DIR755)
-chmod 1777 $(DIR1777)
# alternative version of above if you have a good version of (INSTALL) available:
#-for i in $(DIR755) ; \
# do $(INSTALL) -d -o $(OWNER) -g $(GROUP) -m 755 $$i ;\
# done
#-for i in $(DIR1777) ; \
# do $(INSTALL) -d -o $(OWNER) -g $(GROUP) -m 1777 $$i ;\
# done
installfiles:
-for i in $(BINSUBDIRS); do \
(cd $$i; \
$(MAKE) $(PASTHRU) install); \
done
# Dependencies

77
prospero/README Normal file
View File

@@ -0,0 +1,77 @@
-*-text-*-
This is Prospero release Alpha.5.2a. This release has had a number of
changes made to it since Beta.5.1. If you are running an archie
server, then you almost certainly really want to install your server
under Beta.5.1, not Alpha.5.2a.
Installation instructions can be found in the file INSTALLATION_s for
the client and server, or INSTALLATION_u for the client only.
The most important new features in this version of Prospero are:
(a) A menu-based browser client, similar to the Gopher client
(b) A gateway server which makes all of Gopherspace available through
Prospero queries.
(c) A menu-based browser API interface library to Prospero, which allows
one to easily write new browsers that use Prospero to make their underlying
calls.
(d) A new per-server password authentication mechanism, which provides
far stronger authentication than before for sites that are not running
Kerberos.
(e) ACLs have now been implemented for all Prospero objects, not just
for links and directories. You can now control who can set
{\sc object} attributes on files and directories.
The menu browser client can be invoked as 'menu'. It's mostly
self-documenting, with some additional documentation in the user's
manual. It provides a much needed alternative interface to Prospero.
If you compile the Prospero clients in the easiest way you can, you
can start it up with 'menu' and explore the default menu at the USC
Information Sciences Institute guest site.
The menu-based browser supports all of the basic Gopher types:
searches, text files, data files, and portals (what Gopher calls
telnet sessions). It does not yet support sophisticated display of
binary image files, reading Postscript or MIME documents, playing
sounds, or automatic decoding of uuencoded, compressed, or tarred
files. These enhancements will be added shortly; the protocol
definitions for them have already been made.
The gateway server is part of the Prospero server, and translates
Prospero queries into Gopher protocol queries.
The latest release also features:
-- Improvements to the server code so that old xarchie clients don't
break (see the CHANGES file).
-- Messages to the Prospero server may now be of arbitrary length.
-- An expanded library reference manual
-- The user's manual has been updated to reflect the current version
of Prospero. A few things still need to be documented; those are
noted in the user's manual.
-- Improvements to the Kerberos version 5 support
-- Caching of native directories and reliability improvements to the
directory writing code. OBJECT attributes are cached. The
directory server now treats all links and objects equally, so you
can attach attributes to native links and objects too. The only
exception is that you still can't delete native links from a
directory. (If you want this feature available, write to us; we'd
like to know if there's any demand for it.) The directory server
now always tells the truth about whether a native link is a FILE or
a DIRECTORY.
This release of Prospero includes a standalone client to query archie
servers. It is standalone in the sense that, once compiled, it does
not require Prospero to be installed on the host from which it is to
be used. It is installed by default when you build the Prospero
utilities. As distributed, no default server is configured for the
archie client. To specify a default, edit the line ARCHIE_HOST in
include/archie.h.
Look at the file CHANGES in this directory for a list of recent changes to
Prospero.
Look at the file SUPPORTED in this directory for a list of which
machines and operating systems Prospero has been compiled on and of
which are supported.

32
prospero/SUPPORTED Normal file
View File

@@ -0,0 +1,32 @@
Supported: This release has been tested on:
Sun3s and Sun4s running SunOS version 4.1.1 -- No known problems
HP 9000 series 700 workstations running HPUX version 8.0.5
-- Clients and server have been tested
-- Known Problem: the directory reading parts of the
compatability library do not work yet. You should not
install it on such machines.
MIPS little-endian processor running Ultrix Version 4.2A -- No known problems
We have received patches for the server for the IBM RS6000 under AIX
and merged them in, but do not have access to one of these machines
in order to test them ourselves. The compatability library will not
compile under AIX.
Although SOLARIS is defined in the file include/pmachine.h as a
supported option, , we have not completed merging in the Solaris changes we
were sent. Those will be in a patchlevel coming in a few days.
Known Compilation Warnings:
* Under some versions of ULTRIX, spurious compilation warnings are
generated about NULL being redefined. If you get these messages,
you can add the flag
-DCONFLICT_BETWEEN_DEFINITION_OF_NULL_IN_SYS_PARAM_H_AND_STDDEF_H
to the definition of MACHDEF in the top-level Makefile. This will
eliminate most (although not all) of the warnings. These warnings
can be safely disregarded.

72
prospero/announcement Normal file
View File

@@ -0,0 +1,72 @@
This prerelease (5/17/94) was put together hastily in order to solve
Bunyip's urgent performance problems. I used an alternative quick
procedure for making it, where I was not able to go through the
rigorous checks I normally automatedly run to see if any files have
been left out, etc. If you have problems installing it, please
contact me right away, at home (310) 391-4404 or at work (310)
822-1511x749. Since time is of the essence here, if I don't answer at
either the home or work numbers, then please call me right away at
(310) 991-6592 (cellular phone).
The major changes were:
a) bug fixes included since last release
b) DIRECTORYCACHING can now be disabled (and is by default)
c) the VCACHE library is now the exception; vcache is normally built
as a separate program again.
d) many efficiency speedups. The server now does far fewer stat()s,
getpwuid(), and getgrgid() calls than it used to. It is much choosier
aobut when to call dsrfinfo(). It understands that when you're
verifying whether a directory exists you don't need to do a lot of
useless work. It was going to a lot of work to support forwarding.
Note the definition SERVER_DO_NOT_SUPPORT_FORWARDING in <pserver.h>.
This is turned on by default right now. This isn't a permanent change
(the permanent change is to make forwarding a lot more efficient), but
it will work until we need forwarding again. If you are using
forwarding, then contact me right away so that I can up the priority
of fixing this. For now, leaving this definition enabled produces a
considerable speedup in server performance.
I would like to see how well this improves the efficiency problems
that Bunyip has been experiencing. I believe there will be a factor
of ten speedup as a result of these changes.
I have modified lib/psrv/archie3/Makefile to meet the new specs; I
have not done this yet with archie2. I have not tested the
lib/psrv/archie* makefiles and code. Please give me feedback on this.
If somebody installs all of the release except for the archie stuff, I
will be glad to make modifications to those makefiles and code.
However, I do not myself have a copy of the archie server software on
hand to test it with.
The configuration of this release has considerably changed from the
last time the INSTALLATION instructions were revised. I like to think
it's easier to understand. It's certainly easier to maintain.
To build it:
untar the release
copy include/pmachine.h.dist to include/pmachine.h.
Edit include/pmachine.h
copy include/pserver.h.dist to include/pserver.h.
Edit include/pserver.h
copy include/psite.h.dist to include/psite.h.
Edit include/psite.h
edit Makefile.config to meet your needs.
To make archie work fast, add -O3 to the CFLAGS in this makefile; you no longer should need to modify lib/psrv/archie3/Makefile.
Link the archie sources to lib/psrv/archie3/archie_src, as usual.
type 'make' in the top level directory.
In this prerelease, I have included both the .dist files
(include/pmachine.h.dist, include/psite.h.dist,
include/pserver.h.dist, Makefile.config.dist) and our own versions
that have been set up to work on ZEPHYR.ISI.EDU. You will want to
proceed as above, and just delete the zephyr.isi.edu versions.
Please send minor feedback to bug-prospero@ISI.EDU. Please send
feedback about things keeping you from getting work done directly to
me via telephone (numbers above). Follow it up with an email message
to bug-prospero@ISI.EDU so that other people on my project will know
that there's a problem and will hassle me about it on your behalf.
---swa

1
prospero/app/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
Makefile

4
prospero/app/FILES Normal file
View File

@@ -0,0 +1,4 @@
FILES
Makefile
cat.c
ls.c

View File

@@ -0,0 +1,84 @@
# There used to be separate makefiles, app/Makefile.pcompat and
# app/Makefile.nopcompat. This is no longer the case; there's just one
# app/Makefile. This makefile will not be invoked by the top-level makefile
# unless the user wants the PCOMPAT library.
SOURCEBASE=..
include $(SOURCEBASE)/Makefile.config
PROGS = cat ls
# Alternative programs.
# MORE is not part of this distribution.
OTHERPROGS = more
CFILES = \
cat.c \
cc.c \
cp.c \
dd.c \
ed.c \
grep.c \
ld.c \
ls.c \
more.c \
nice.c \
od.c \
strings.c \
tail.c \
wc.c
OBJECTS = \
cat.o \
cc.o \
cp.o \
dd.o \
ed.o \
grep.o \
ld.o \
ls.o \
more.o \
nice.o \
od.o \
strings.o \
tail.o \
wc.o
# no subdirectories of this one are used.
SUBDIRS =
##
## Now the rules.
all: ${PROGS}
install:
-for i in ${PROGS} ; do \
X ${INSTALL} -c -m 755 -o ${OWNER} -g ${GROUP} $${i} ${P_BINARIES}/$${i}${GENERATIONSUFFIX} ;\
${GENERATION} ${P_BINARIES}/$${i} ;\
done
# dependencies of all and OTHERPROGS
more: ${CMP_LIBS_DEPENDENCIES} more.o
${CC} ${CFLAGS} -o more more.o $(CMP_LIBS) -lcurses -ltermcap
${PROGS}: $(CMP_LIBS_DEPENDENCIES)
${CC} ${CFLAGS} -o $@ $@.o $(CMP_LIBS)
cat: cat.o
cc: cc.o
cp: cp.o
dd: dd.o
ed: ed.o
grep: grep.o
ld: ld.o
ls: ls.o
nice: nice.o
od: od.o
strings: strings.o
tail: tail.o
wc: wc.o
# Dependencies

90
prospero/app/Makefile.in Executable file
View File

@@ -0,0 +1,90 @@
# There used to be separate makefiles, app/Makefile.pcompat and
# app/Makefile.nopcompat. This is no longer the case; there's just one
# app/Makefile. This makefile will not be invoked by the top-level makefile
# unless the user wants the PCOMPAT library.
SOURCEBASE=..
include $(SOURCEBASE)/Makefile.config
PROGS = cat ls
# Alternative programs.
# MORE is not part of this distribution.
OTHERPROGS = more
CFILES = \
cat.c \
cc.c \
cp.c \
dd.c \
ed.c \
grep.c \
ld.c \
ls.c \
more.c \
nice.c \
od.c \
strings.c \
tail.c \
wc.c
OBJECTS = \
cat.o \
cc.o \
cp.o \
dd.o \
ed.o \
grep.o \
ld.o \
ls.o \
more.o \
nice.o \
od.o \
strings.o \
tail.o \
wc.o
# no subdirectories of this one are used.
SUBDIRS =
##
## Now the rules.
all: ${PROGS}
install:
-for i in ${PROGS} ; do \
X ${INSTALL} -c -m 755 -o ${OWNER} -g ${GROUP} $${i} ${P_BINARIES}/$${i}${GENERATIONSUFFIX} ;\
${GENERATION} ${P_BINARIES}/$${i} ;\
done
# dependencies of all and OTHERPROGS
more: ${CMP_LIBS_DEPENDENCIES} more.o
${CC} ${CFLAGS} -o more more.o $(CMP_LIBS) -lcurses -ltermcap
${PROGS}: $(CMP_LIBS_DEPENDENCIES)
${CC} ${CFLAGS} -o $@ $@.o $(CMP_LIBS)
cat: cat.o
cc: cc.o
cp: cp.o
dd: dd.o
ed: ed.o
grep: grep.o
ld: ld.o
ls: ls.o
nice: nice.o
od: od.o
strings: strings.o
tail: tail.o
wc: wc.o
# Dependencies
cat.o : \
../include/perrno.h \
../include/pfs_threads.h ../include/pfs_utils.h
ls.o : \
../include/pcompat.h \
../include/pfs_threads.h ../include/pfs_utils.h ../include/pmachine.h

247
prospero/app/cat.c Normal file
View File

@@ -0,0 +1,247 @@
/*
* Derived from Berkeley source code. Those parts are
* Copyright (c) 1989 The Regents of the University of California.
* All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Kevin Fall.
*
* Redistribution and use in source and binary forms are permitted
* provided that: (1) source distributions retain this entire copyright
* notice and comment, and (2) distributions including binaries display
* the following acknowledgement: ``This product includes software
* developed by the University of California, Berkeley and its contributors''
* in the documentation or other materials provided with the distribution
* and in all advertising materials mentioning features or use of this
* software. 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 ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
#ifndef lint
char copyright[] =
"@(#) Copyright (c) 1989 The Regents of the University of California.\n\
All rights reserved.\n";
#endif /* not lint */
#ifndef lint
static char sccsid[] = "@(#)cat.c 5.11 (Berkeley) 5/31/90";
#endif /* not lint */
#include <sys/param.h>
#include <sys/stat.h>
#include <sys/file.h>
#include <stdio.h>
#include <ctype.h>
#include <errno.h>
#include <perrno.h> /* For unixerrstr */
#include <stdlib.h> /*For malloc*/
int bflag, eflag, nflag, sflag, tflag, vflag;
int rval;
char *filename;
main(argc, argv)
int argc;
char **argv;
{
extern int optind;
int ch;
while ((ch = getopt(argc, argv, "benstuv")) != EOF)
switch (ch) {
case 'b':
bflag = nflag = 1; /* -b implies -n */
break;
case 'e':
eflag = vflag = 1; /* -e implies -v */
break;
case 'n':
nflag = 1;
break;
case 's':
sflag = 1;
break;
case 't':
tflag = vflag = 1; /* -t implies -v */
break;
case 'u':
setbuf(stdout, (char *)NULL);
break;
case 'v':
vflag = 1;
break;
case '?':
(void)fprintf(stderr,
"usage: cat [-benstuv] [-] [file ...]\n");
exit(1);
}
argv += optind;
if (bflag || eflag || nflag || sflag || tflag || vflag)
cook_args(argv);
else
raw_args(argv);
exit(rval);
}
cook_args(argv)
char **argv;
{
register FILE *fp;
fp = stdin;
filename = "-";
do {
if (*argv) {
if (!strcmp(*argv, "-"))
fp = stdin;
else if (!(fp = fopen(*argv, "r"))) {
(void)fprintf(stderr,
"cat: %s: %s\n", *argv, unixerrstr());
rval = 1;
++argv;
continue;
}
filename = *argv++;
}
cook_buf(fp);
if (fp != stdin)
(void)fclose(fp);
} while (*argv);
}
cook_buf(fp)
register FILE *fp;
{
register int ch, gobble, line, prev;
line = gobble = 0;
for (prev = '\n'; (ch = getc(fp)) != EOF; prev = ch) {
if (prev == '\n') {
if (ch == '\n') {
if (sflag) {
if (!gobble && putchar(ch) == EOF)
break;
gobble = 1;
continue;
}
if (nflag && !bflag) {
(void)fprintf(stdout, "%6d\t", ++line);
if (ferror(stdout))
break;
}
} else if (nflag) {
(void)fprintf(stdout, "%6d\t", ++line);
if (ferror(stdout))
break;
}
}
gobble = 0;
if (ch == '\n') {
if (eflag)
if (putchar('$') == EOF)
break;
} else if (ch == '\t') {
if (tflag) {
if (putchar('^') == EOF || putchar('I') == EOF)
break;
continue;
}
} else if (vflag) {
/* isascii() is not provided in POSIX, so we just do it here. */
#ifndef isascii
#define isascii(c) ((unsigned)(c)<=0177)
#endif
if (!isascii(ch)) {
if (putchar('M') == EOF || putchar('-') == EOF)
break;
ch = toascii(ch);
}
if (iscntrl(ch)) {
if (putchar('^') == EOF ||
putchar(ch == '\177' ? '?' :
ch | 0100) == EOF)
break;
continue;
}
}
if (putchar(ch) == EOF)
break;
}
if (ferror(fp)) {
(void)fprintf(stderr, "cat: %s: read error\n", filename);
rval = 1;
}
if (ferror(stdout)) {
clearerr(stdout);
(void)fprintf(stderr, "cat: stdout: write error\n");
rval = 1;
}
}
raw_args(argv)
char **argv;
{
register int fd;
fd = fileno(stdin);
filename = "-";
do {
if (*argv) {
if (!strcmp(*argv, "-"))
fd = fileno(stdin);
else if ((fd = open(*argv, O_RDONLY, 0)) < 0) {
(void)fprintf(stderr, "cat: %s: %s\n",
*argv, unixerrstr());
rval = 1;
++argv;
continue;
}
filename = *argv++;
}
rval |= raw_cat(fd);
if (fd != fileno(stdin))
(void)close(fd);
} while (*argv);
}
raw_cat(fd)
register int fd;
{
register int nr, nw, off;
static int bsize;
static char *buf;
struct stat sbuf;
if (!buf) {
if (fstat(fileno(stdout), &sbuf)) {
(void)fprintf(stderr, "cat: %s: %s\n", filename,
unixerrstr());
return(1);
}
bsize = MAX(sbuf.st_blksize, 1024);
if (!(buf = malloc((u_int)bsize))) {
(void)fprintf(stderr, "cat: %s: no memory.\n",
filename);
return(1);
}
}
while ((nr = read(fd, buf, bsize)) > 0)
for (off = 0; off < nr;) {
if ((nw = write(fileno(stdout), buf + off, nr)) < 0) {
perror("cat: stdout");
return(1);
}
off += nw;
}
if (nr < 0) {
(void)fprintf(stderr, "cat: %s: %s\n", filename,
unixerrstr());
return(1);
}
return(0);
}

898
prospero/app/ls.c Normal file
View File

@@ -0,0 +1,898 @@
/*
* Derived from Berkeley source code. Those parts are
* Copyright (c) 1989 The Regents of the University of California.
* All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Michael Fischbein.
*
* Redistribution and use in source and binary forms are permitted
* provided that: (1) source distributions retain this entire copyright
* notice and comment, and (2) distributions including binaries display
* the following acknowledgement: ``This product includes software
* developed by the University of California, Berkeley and its contributors''
* in the documentation or other materials provided with the distribution
* and in all advertising materials mentioning features or use of this
* software. 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 ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
#ifndef lint
char copyright[] =
"@(#) Copyright (c) 1989 The Regents of the University of California.\n\
All rights reserved.\n";
#endif /* not lint */
#ifndef lint
static char sccsid[] = "@(#)ls.c 5.42 (Berkeley) 5/17/90";
#endif /* not lint */
#define DAYSPERNYEAR (365)
#define SECSPERDAY (24*60*60)
#define UT_NAMESIZE 8
#include <sys/types.h>
#include <sys/stat.h>
#ifndef S_ISLNK /* On the sun, this is defined for us in
/usr/include/sys/stat.h, but it must not be
defined there on all machines, or Berkeley
wouldn't have put this into ls.c, right?
--swa@isi.edu */
#define S_ISLNK(m) ((S_IFLNK & m) == S_IFLNK)
#endif
#include <stdio.h>
#include <ctype.h>
#include <sys/param.h>
#include <sys/ioctl.h>
#include <string.h>
#include <errno.h>
#include <grp.h>
#include <pwd.h>
#include <utmp.h>
#include <stdlib.h>
#include <pcompat.h>
#include <pmachine.h>
#ifdef USE_SYS_DIR_H
#include <sys/dir.h>
#else
#include <dirent.h>
#endif
/* At the moment this program doesn't work under HP-UX, because the
compatability library's version of opendir() fails under HP-UX.
*/
#ifdef HPUX
#error "The program ls.c should not be compiled under HP-UX, since it will \
not work. It relies upon the compatability library's version of opendir(), \
which has not yet been ported to HP-UX. Please proceed with compiling the \
rest of the Prospero clients."
#endif
char *user_from_uid();
char *group_from_gid();
typedef struct _lsstruct {
char *name; /* file name */
int len; /* file name length */
struct stat lstat; /* lstat(2) for file */
} LS;
int (*sortfcn)(), (*printfcn)();
int lstat();
char *emalloc();
int termwidth = 80; /* default terminal width */
/* flags */
int f_accesstime; /* use time of last access */
int f_column; /* columnated format */
int f_group; /* show group ownership of a file */
int f_ignorelink; /* indirect through symbolic link operands */
int f_inode; /* print inode */
int f_kblocks; /* print size in kilobytes */
int f_listalldot; /* list . and .. as well */
int f_listdir; /* list actual directory, not contents */
int f_listdot; /* list files beginning with . */
int f_longform; /* long listing format */
int f_needstat; /* if need to stat files */
int f_newline; /* if precede with newline */
int f_nonprint; /* show unprintables as ? */
int f_nosort; /* don't sort output */
int f_recursive; /* ls subdirectories also */
int f_reversesort; /* reverse whatever sort is used */
int f_singlecol; /* use single column output */
int f_size; /* list size in short listing */
int f_statustime; /* use time of last mode change */
int f_dirname; /* if precede with directory name */
int f_timesort; /* sort by time vice name */
int f_total; /* if precede with "total" line */
int f_type; /* add type character for non-regular files */
char *dummyargv[2] = {"", NULL};
#ifndef TIOCGWINSZ
#include <sys/termio.h>
#endif
main(argc, argv)
int argc;
char **argv;
{
extern int optind, stat();
struct winsize win;
int ch;
char *p, *getenv();
int acccmp(), modcmp(), namecmp(), prcopy(), printcol();
int printlong(), printscol(), revacccmp(), revmodcmp(), revnamecmp();
int revstatcmp(), statcmp();
/* terminal defaults to -Cq, non-terminal defaults to -1 */
if (isatty(1)) {
f_nonprint = 1;
if (ioctl(1, TIOCGWINSZ, &win) == -1 || !win.ws_col) {
if (p = getenv("COLUMNS"))
termwidth = atoi(p);
}
else
termwidth = win.ws_col;
f_column = 1;
} else
f_singlecol = 1;
/* root is -A automatically */
if (!getuid())
f_listdot = 1;
/* Print sizes in kilobytes by default */
f_kblocks = 1;
while ((ch = getopt(argc, argv, "1ACFLRacdfgiklqrstu")) != EOF) {
switch (ch) {
/*
* -1, -C and -l all override each other
* so shell aliasing works right
*/
case '1':
f_singlecol = 1;
f_column = f_longform = 0;
break;
case 'C':
f_column = 1;
f_longform = f_singlecol = 0;
break;
case 'l':
f_longform = 1;
f_column = f_singlecol = 0;
break;
/* -c and -u override each other */
case 'c':
f_statustime = 1;
f_accesstime = 0;
break;
case 'u':
f_accesstime = 1;
f_statustime = 0;
break;
case 'F':
f_type = 1;
break;
case 'L':
f_ignorelink = 1;
break;
case 'R':
f_recursive = 1;
break;
case 'a':
f_listalldot = 1;
/* FALLTHROUGH */
case 'A':
f_listdot = 1;
break;
case 'd':
f_listdir = 1;
break;
case 'f':
f_nosort = 1;
break;
case 'g':
f_group = 1;
break;
case 'i':
f_inode = 1;
break;
case 'k':
f_kblocks = 1;
break;
case 'q':
f_nonprint = 1;
break;
case 'r':
f_reversesort = 1;
break;
case 's':
f_size = 1;
break;
case 't':
f_timesort = 1;
break;
default:
case '?':
usage();
}
}
argc -= optind;
argv += optind;
/* -d turns off -R */
if (f_listdir)
f_recursive = 0;
/* if need to stat files */
f_needstat = f_longform || f_recursive || f_timesort ||
f_size || f_type;
/* select a sort function */
if (f_reversesort) {
if (!f_timesort)
sortfcn = revnamecmp;
else if (f_accesstime)
sortfcn = revacccmp;
else if (f_statustime)
sortfcn = revstatcmp;
else /* use modification time */
sortfcn = revmodcmp;
} else {
if (!f_timesort)
sortfcn = namecmp;
else if (f_accesstime)
sortfcn = acccmp;
else if (f_statustime)
sortfcn = statcmp;
else /* use modification time */
sortfcn = modcmp;
}
/* select a print function */
if (f_singlecol)
printfcn = printscol;
else if (f_longform)
printfcn = printlong;
else
printfcn = printcol;
if (argc) doargs(argc, argv);
else doargs(1,dummyargv);
exit(0);
}
static char path[MAXPATHLEN + 1];
static char *endofpath = path;
doargs(argc, argv)
int argc;
char **argv;
{
register LS *dstatp, *rstatp;
register int cnt, dircnt, maxlen, regcnt;
LS *dstats, *rstats;
struct stat sb;
int (*statfcn)(), stat(), lstat();
char top[MAXPATHLEN + 1];
u_long blocks;
long r_st_btotal;
long r_st_maxlen;
/*
* walk through the operands, building separate arrays of LS
* structures for directory and non-directory files.
*/
dstats = rstats = NULL;
statfcn = (f_longform || f_listdir) && !f_ignorelink ? lstat : stat;
for (dircnt = regcnt = 0; *argv; ++argv) {
if (statfcn(*argv, &sb)) {
if (statfcn != stat || lstat(*argv, &sb)) {
(void)fflush(stdout);
(void)fprintf(stderr, "ls: %s: %s\n", *argv,
unixerrstr());
if (errno == ENOENT)
continue;
exit(1);
}
}
if (S_ISDIR(sb.st_mode) && !f_listdir) {
if (!dstats)
dstatp = dstats = (LS *)emalloc((u_int)argc *
(sizeof(LS)));
dstatp->name = *argv;
dstatp->lstat = sb;
++dstatp;
++dircnt;
}
else {
if (!rstats) {
rstatp = rstats = (LS *)emalloc((u_int)argc *
(sizeof(LS)));
blocks = 0;
maxlen = -1;
}
rstatp->name = *argv;
rstatp->lstat = sb;
/* save name length for -C format */
rstatp->len = strlen(*argv);
if (f_nonprint)
prcopy(*argv, *argv, rstatp->len);
/* calculate number of blocks if -l/-s formats */
if (f_longform || f_size)
blocks += sb.st_blocks;
/* save max length if -C format */
if (f_column && maxlen < rstatp->len)
maxlen = rstatp->len;
++rstatp;
++regcnt;
}
}
/* display regular files */
if (regcnt) {
displaydir("", rstats, regcnt, blocks, maxlen);
f_newline = f_dirname = 1;
}
/* display directories */
if (dircnt) {
register char *p;
f_total = 1;
if (dircnt > 1) {
(void)getwd(top);
qsort((char *)dstats, dircnt, sizeof(LS), sortfcn);
f_dirname = 1;
}
for (cnt = 0; cnt < dircnt; ++dstats) {
for (endofpath = path, p = dstats->name;
*endofpath = *p++; ++endofpath);
subdir("",dstats);
f_newline = 1;
if (++cnt < dircnt && chdir(top)) {
(void)fprintf(stderr, "ls: %s: %s\n",
top, unixerrstr());
exit(1);
}
}
}
}
displaydir(subdirname, stats, num, blocks, maxlen)
char *subdirname;
LS *stats;
register int num;
long blocks;
long maxlen;
{
register char *p, *savedpath;
LS *lp;
if (num > 1 && !f_nosort) {
u_long save1, save2;
qsort((char *)stats, num, sizeof(LS), sortfcn);
}
printfcn(subdirname, stats, num, blocks, maxlen);
if (f_recursive) {
savedpath = endofpath;
for (lp = stats; num--; ++lp) {
if (!S_ISDIR(lp->lstat.st_mode))
continue;
p = lp->name;
if (p[0] == '.' && (!p[1] || p[1] == '.' && !p[2]))
continue;
if (endofpath != path && endofpath[-1] != '/')
*endofpath++ = '/';
for (; *endofpath = *p++; ++endofpath);
f_newline = f_dirname = f_total = 1;
subdir(subdirname,lp);
*(endofpath = savedpath) = '\0';
}
}
}
subdir(wdir,lp)
char *wdir;
LS *lp;
{
char sbdirname[MAXPATHLEN];
LS *stats;
int num;
char *names;
long blocks;
int maxlen;
if(*wdir) sprintf(sbdirname,"%s/%s",wdir,lp->name);
else strcpy(sbdirname,lp->name);
if (f_newline)
(void)putchar('\n');
if (f_dirname)
(void)printf("%s:\n", path);
if (num = tabdir(sbdirname, lp, &stats, &names, &blocks, &maxlen)) {
displaydir(sbdirname, stats, num, blocks, maxlen);
(void)free((char *)stats);
(void)free((char *)names);
}
}
tabdir(dirname, lp, s_stats, s_names, blocksp, maxlenp)
char *dirname;
LS *lp, **s_stats;
char **s_names;
u_long *blocksp;
int *maxlenp;
{
register DIR *dirp;
register int cnt, maxentry, maxlen;
register char *p, *names;
#define NAMES_BLSIZ 2048
int names_len = 4*NAMES_BLSIZ;
int names_off;
struct dirent *dp;
u_long blocks;
LS *stats;
char newfname[MAXPATHLEN];
if (!(dirp = opendir(dirname))) {
(void)fprintf(stderr, "ls: %s: %s\n", lp->name,
unixerrstr());
return(0);
}
blocks = maxentry = maxlen = 0;
stats = NULL;
assert(P_IS_THIS_THREAD_MASTER()); /* readdir is MT-Unsafe */
for (cnt = 0; dp = readdir(dirp);) {
/* this does -A and -a */
p = dp->d_name;
if (p[0] == '.') {
if (!f_listdot)
continue;
if (!f_listalldot && (!p[1] || p[1] == '.' && !p[2]))
continue;
}
if (cnt == maxentry) {
if (!maxentry)
*s_names = names = emalloc(names_len);
if((names_len - (names_off = names - *s_names))
< (2*NAMES_BLSIZ)) {
names_len += 2*NAMES_BLSIZ;
*s_names = (char *) realloc(*s_names,names_len);
names = *s_names + names_off;
}
#define DEFNUM 256
maxentry += DEFNUM;
if (stats==NULL)
*s_stats = stats =
(LS *) emalloc((u_int)maxentry * sizeof (LS));
else if (!(*s_stats = stats =
(LS *) realloc((char *)stats,
(u_int)maxentry * sizeof(LS))))
nomem();
}
if(*dirname) sprintf(newfname,"%s/%s",dirname,dp->d_name);
else strcpy(newfname,dp->d_name);
if (f_needstat && lstat(newfname, &stats[cnt].lstat)) {
/*
* don't exit -- this could be an NFS mount that has
* gone away. Flush stdout so the messages line up.
*/
(void)fflush(stdout);
(void)fprintf(stderr, "ls: %s: %s\n",
dp->d_name, unixerrstr());
continue;
}
stats[cnt].name = names;
if (f_nonprint)
prcopy(dp->d_name, names, (int)dp->d_namlen);
else
bcopy(dp->d_name, names, (int)dp->d_namlen);
names += dp->d_namlen;
*names++ = '\0';
/*
* get the inode from the directory, so the -f flag
* works right.
*/
stats[cnt].lstat.st_ino = dp->d_ino;
/* save name length for -C format */
stats[cnt].len = dp->d_namlen;
/* calculate number of blocks if -l/-s formats */
if (f_longform || f_size)
blocks += stats[cnt].lstat.st_blocks;
/* save max length if -C format */
if (f_column && maxlen < (int)dp->d_namlen)
maxlen = dp->d_namlen;
++cnt;
}
(void)closedir(dirp);
if (cnt) {
*blocksp = blocks;
*maxlenp = maxlen;
} else if (stats) {
(void)free((char *)stats);
(void)free((char *)names);
}
return(cnt);
}
printscol(dirname, stats, num, blocks, maxlen)
char *dirname;
register LS *stats;
register int num;
long blocks;
long maxlen;
{
for (; num--; ++stats) {
(void)printaname(stats);
(void)putchar('\n');
}
}
printlong(dirname, stats, num , blocks, maxlen)
char *dirname;
LS *stats;
register int num;
u_long blocks;
int maxlen ;
{
char modep[15];
if (f_total)
(void)printf("total %lu\n", f_kblocks ?
howmany(blocks, 2) :
blocks);
for (; num--; ++stats) {
if (f_inode)
(void)printf("%6lu ", stats->lstat.st_ino);
if (f_size)
(void)printf("%4ld ", f_kblocks ?
howmany(stats->lstat.st_blocks, 2) :
stats->lstat.st_blocks);
(void)strmode(stats->lstat.st_mode, modep);
(void)printf("%s %3u %-*s ", modep, stats->lstat.st_nlink,
UT_NAMESIZE, user_from_uid((uid_t) stats->lstat.st_uid));
if (f_group)
(void)printf("%-*s ", UT_NAMESIZE,
group_from_gid((gid_t) stats->lstat.st_gid));
if (S_ISCHR(stats->lstat.st_mode) ||
S_ISBLK(stats->lstat.st_mode))
(void)printf("%3d, %3d ", major(stats->lstat.st_rdev),
minor(stats->lstat.st_rdev));
else
(void)printf("%8ld ", stats->lstat.st_size);
if (f_accesstime)
printtime(stats->lstat.st_atime);
else if (f_statustime)
printtime(stats->lstat.st_ctime);
else
printtime(stats->lstat.st_mtime);
(void)printf("%s", stats->name);
if (f_type)
(void)printtype(stats->lstat.st_mode);
if (S_ISLNK(stats->lstat.st_mode))
printlink(dirname,stats->name);
(void)putchar('\n');
}
}
printcol(dirname, stats, num, blocks, maxlen)
char *dirname;
LS *stats;
int num;
u_long blocks;
int maxlen;
{
extern int termwidth;
register int base, chcnt, cnt, col, colwidth;
int endcol, numcols, numrows, row;
colwidth = maxlen + 2;
if (f_inode)
colwidth += 6;
if (f_size)
colwidth += 5;
if (f_type)
colwidth += 1;
if (termwidth < 2 * colwidth) {
printscol(dirname, stats, num, blocks, maxlen);
return;
}
numcols = termwidth / colwidth;
numrows = num / numcols;
if (num % numcols)
++numrows;
if (f_size && f_total)
(void)printf("total %lu\n", f_kblocks ?
howmany(blocks, 2) : blocks);
for (row = 0; row < numrows; ++row) {
endcol = colwidth;
for (base = row, chcnt = col = 0; col < numcols; ++col) {
chcnt += printaname(stats + base);
if ((base += numrows) >= num)
break;
while ((cnt = chcnt + 1) <= endcol) {
(void)putchar(' ');
chcnt = cnt;
}
endcol += colwidth;
}
putchar('\n');
}
}
/*
* print [inode] [size] name
* return # of characters printed, no trailing characters
*/
printaname(lp)
LS *lp;
{
int chcnt;
chcnt = 0;
if (f_inode) {
printf("%5lu ", lp->lstat.st_ino);
chcnt += 6;
}
if (f_size) {
printf("%4ld ", f_kblocks ?
howmany(lp->lstat.st_blocks, 2) : lp->lstat.st_blocks);
chcnt += 5;
}
printf("%s", lp->name);
chcnt += strlen(lp->name);
if (f_type) chcnt += printtype(lp->lstat.st_mode);
return(chcnt);
}
printtime(ftime)
time_t ftime;
{
int i;
char *longstring, *ctime();
time_t time();
if(ftime == 0) fputs("- ",stdout);
else {
DISABLE_PFS(longstring = ctime(&ftime));
for (i = 4; i < 11; ++i)
(void)putchar(longstring[i]);
#define SIXMONTHS ((DAYSPERNYEAR / 2) * SECSPERDAY)
if (ftime + SIXMONTHS > time((time_t *)NULL))
for (i = 11; i < 16; ++i)
(void)putchar(longstring[i]);
else {
(void)putchar(' ');
for (i = 20; i < 24; ++i)
(void)putchar(longstring[i]);
}
(void)putchar(' ');
}
}
printtype(mode)
mode_t mode;
{
switch(mode & S_IFMT) {
case S_IFDIR:
(void)putchar('/');
return(1);
case S_IFLNK:
(void)putchar('@');
return(1);
case S_IFSOCK:
(void)putchar('=');
return(1);
}
if (mode & (S_IXUSR | S_IXGRP | S_IXOTH)) {
(void)putchar('*');
return(1);
}
return(0);
}
printlink(dirname, name)
char *dirname;
char *name;
{
char linkname[MAXPATHLEN];
int lnklen;
char path[MAXPATHLEN + 1];
if(*dirname) sprintf(linkname,"%s/%s",dirname, name);
else strcpy(linkname,name);
if ((lnklen = readlink(linkname, path, MAXPATHLEN)) == -1) {
fflush(stdout);
(void)fprintf(stderr, "\nls: %s: %s", name, unixerrstr());
fflush(stderr);
return;
}
path[lnklen] = '\0';
(void)printf(" -> %s", path);
}
prcopy(src, dest, len)
register char *src, *dest;
register int len;
{
register int ch;
while(len--) {
ch = *src++;
*dest++ = isprint(ch) ? ch : '?';
}
}
char
*emalloc(size)
u_int size;
{
char *retval, *malloc();
if (!(retval = malloc(size)))
nomem();
return(retval);
}
nomem()
{
(void)fprintf(stderr, "ls: out of memory.\n");
exit(1);
}
int
usage()
{
(void)fprintf(stderr, "usage: ls [-1ACFLRacdfgiklqrstu] [file ...]\n");
exit(1);
}
namecmp(a, b)
LS *a, *b;
{
return(strcmp(a->name, b->name));
}
revnamecmp(a, b)
LS *a, *b;
{
return(strcmp(b->name, a->name));
}
modcmp(a, b)
LS *a, *b;
{
return(a->lstat.st_mtime < b->lstat.st_mtime);
}
revmodcmp(a, b)
LS *a, *b;
{
return(b->lstat.st_mtime < a->lstat.st_mtime);
}
acccmp(a, b)
LS *a, *b;
{
return(a->lstat.st_atime < b->lstat.st_atime);
}
revacccmp(a, b)
LS *a, *b;
{
return(b->lstat.st_atime < a->lstat.st_atime);
}
int
statcmp(a, b)
LS *a, *b;
{
return(a->lstat.st_ctime < b->lstat.st_ctime);
}
int
revstatcmp(a, b)
LS *a, *b;
{
return(b->lstat.st_ctime < a->lstat.st_ctime);
}
void
strmode(short mode,char *modestr)
{
strcpy(modestr,"----------");
if(mode & S_IFDIR) modestr[0] = 'd';
if((mode & S_IFLNK) == S_IFLNK) modestr[0] = 'l';
if(mode & S_IREAD) modestr[1] = 'r';
if(mode & S_IWRITE) modestr[2] = 'w';
if(mode & S_IEXEC) modestr[3] = 'x';
if(mode & S_ISUID) modestr[3] = 's';
if(mode & (S_IREAD>>3)) modestr[4] = 'r';
if(mode & (S_IWRITE>>3)) modestr[5] = 'w';
if(mode & (S_IEXEC>>3)) modestr[6] = 'x';
if(mode & S_ISGID) modestr[6] = 's';
if(mode & (S_IREAD>>6)) modestr[7] = 'r';
if(mode & (S_IWRITE>>6)) modestr[8] = 'w';
if(mode & (S_IEXEC>>6)) modestr[9] = 'x';
}
char *
user_from_uid(uid)
uid_t uid;
{
static char uidstring[10];
struct passwd *pwent;
if(uid == (uid_t) -1) return("-");
assert(P_IS_THIS_THREAD_MASTER()); /*getpwuid unsafe */
DISABLE_PFS(pwent = getpwuid(uid));
if (pwent == NULL) {
sprintf(uidstring,"%d",uid);
return(uidstring);
}
else return(pwent->pw_name);
}
char *
group_from_gid(gid)
gid_t gid;
{
static char gidstring[10];
struct group *grent;
if(gid == (gid_t) -1) return("-");
assert(P_IS_THIS_THREAD_MASTER()); /*SOLARIS getgrgid MT-Unsafe */
DISABLE_PFS(grent = getgrgid(gid));
if (grent == NULL) {
sprintf(gidstring,"%d",gid);
return(gidstring);
}
else return(grent->gr_name);
}

1
prospero/doc/.virt-sys Normal file
View File

@@ -0,0 +1 @@
PROSPERO.ISI.EDU /pfs/pfsdat/guest/local_vsystems/guest/VS-DESCRIPTION

View File

@@ -0,0 +1,47 @@
This release of Prospero includes a standalone client to query archie
servers at various sites. It is standalone in the sense that, once
compiled, it does not require Prospero to be installed on the host
from which it is to be used. To build the archie client, first build
Prospero (either with or without the compatibility library), then
connect to the user subdirectory and type make archie. If called with
just a file name, it will query the archie database for exact matches.
If executed with no arguments it will display its options.
A manual page for this client can be found in the doc/man subdirectory,
as archie.man.
Prospero also allows users to access archie as if it were part of a
file system. Here is an example of how Prospero can be used to access
Archie in this manner.
Script started on Mon Jul 1 22:36:42 1991
% source /home/ftp/archie/pfs/bin/vfsetup.source
% vfsetup guest
% venable
% cd /databases/archie/sura/substr
% cd prospero (This command specifies the query)
% ls -l
total 0
-r--r--r-- 0 - 0 - info-prospero.arc
dr-xr-xr-x 0 - 0 - prospero
dr-xr-xr-x 0 - 0 - prospero-papers
-r--r--r-- 0 - 0 - prospero.arc
-r--r--r-- 0 - 0 - prospero.tar.Z
(Note that the "vls" command could have been used)
(to show where the files were actually stored )
% ls prospero (list a result if it is a directory)
prog.tar.Z prospero.tar.Z
% cat info-prospero.arc (The file is automatically retrieved and displayed)
>From bcn@n1dmm Tue Dec 4 02:33:36 1990
Received: from n1dmm.cs.washington.edu by june.cs.washington.edu (5.64/7.0jh)
id AA24763; Tue, 4 Dec 90 02:33:36 -0800
Received: by n1dmm.cs.washington.edu (5.64/7.0h)
id AA08497; Tue, 4 Dec 90 02:33:31 -0800
Date: Tue, 4 Dec 90 02:33:31 -0800
From: bcn@cs.washington.edu (Clifford Neuman)
...
% vdisable
% exit
script done on Mon Jul 1 22:39:33 1991

29
prospero/doc/FILES Normal file
View File

@@ -0,0 +1,29 @@
.virt-sys
ARCHIE.README
FILES
README
README-prospero-documents
customize.insts
dangerous
fullpage.sty
getting-started.txt
include-native.txt
library.PS
library.tex
man
manual.PS
manual.tex
menu-api.PS
menu-api.tex
more-getting-started.PS
more-getting-started.tex
names.txt
nir.status.report
protocol.PS
protocol.tex
rationales
system_calls
v.beta51.announcement
v5.announcement
v52.gopher.ann
working-notes

43
prospero/doc/README Normal file
View File

@@ -0,0 +1,43 @@
First, please note that the documentation files in this directory do not
fully reflect Prospero version 5. Due to the demand for Prospero
version 5, we have decided to ship this Alpha release before we fully
update the documentation.
getting-started.txt: How to get started using prospero.
ARCHIE.README: Description of how to compile the ARCHIE client and how
to use ARCHIE through Prospero.
man/archie.man: Manual page for the Archie client we provide.
.virt-sys: A .virt-sys file you can put in your home directory to use
the guest virtual system at PROSPERO.ISI.EDU
customize.insts: Instructions for customizing your virtual system.
manual.tex, manual.PS: The Prospero user's manual. This hasn't been
updated much since version 4.
library.tex, library.PS: Prospero library manual. This documents some
of the calls to the Prospero PFS and PCOMPAT libraries. It's out of
date and sketchy.
protocol.tex, protocol.PS: Describes version 5 of the Prospero
protocol. This is almost completely up to date.
We provide the LaTeX source for the three manuals, as well as
Postscript output files that you can just dump on your laser printer.
The following files are auxiliary LaTeX files you'll need if you're
running LaTeX. They're included or otherwise used by the .tex files:
rkrcite.sty, fullpage.sty
README-prospero-documents: contains a bibliography of prospero documents.
The subdirectory 'working-notes' contains some working notes on
concepts we firmed up while developing the menu browser. These will
eventually make their way into more formal reference documents;
however, we felt it would be better to release them now in this state
rather than hoard them until they are in final form.

View File

@@ -0,0 +1,280 @@
This file (README-prospero-documents, version of 30 November 1993,
swa@isi.edu) describes the publicly available documents about the
Prospero Directory Service. For comments on this file or questions
about prospero, please send electronic mail to info-prospero@ISI.EDU
These files are all available through Prospero. If you're not running
Prospero yet, they're also available via anonymous FTP from
PROSPERO.ISI.EDU.
Some of the documents mentioned below this point in this file are
marked with the label DISTRIBUTION and are additionally available in
the doc subdirectory of the latest Beta and Alpha Prospero releases
(releases Beta.5.1 and Alpha.5.2a). A good way to obtain the Prospero
distribution, if you're not running Prospero yet, is to anonymously
FTP to PROSPERO.ISI.EDU and get /pub/prospero/prospero.tar.Z. If you
are already running Prospero, the lastest distribution is kept in
/releases/prospero/prospero.tar.Z.
Prospero: /papers/subjects/computers/operating-systems/prospero/prospero-oir.ps.Z
Anonymous FTP: /pub/papers/prospero/prospero-oir.ps.Z
(POSTSCRIPT)
@ARTICLE{oir,
AUTHOR = "Neuman, B. Clifford",
TITLE = "Prospero: A Tool for Organizing {I}nternet Resources",
JOURNAL = "Electronic Networking: Research, Applications and Policy",
MONTH = "Spring",
YEAR = 1992,
VOLUME = 2,
NUMBER = 1}
This is a useful first paper to read. It gives a good overview of
Prospero and what it does. It also describes a bit about the Virtual
System model, of which Prospero is a prototype implementation. It
describes what Prospero does, not how it does it.
Prospero: /papers/subjects/computers/operating-systems/prospero/papers/prospero-ITR-Neuman-interview.au
Anonymous FTP: /pub/papers/prospero/prospero-ITR-Neuman-interview.au
This is an audio transcript of an November 17, 1993 interview on the
Internet Talk Radio "Geek of the Week" program. The description:
Carl Malamud interviews Clifford Neuman, instrumental in the
development of Internet protocols such as Kerberos and Prospero.
Neuman discusses what Prospero is and how this miracle system can
be anything you want it to be. Neuman also discusses his work
in security and how that relates to his recent interests in resource
discovery.
It is 30 minutes long and is a good thing to listen to for the
philosophy behind the Prospero virtual system model.
overview of how Prospero does what it does.
Prospero: /papers/subjects/computers/operating-systems/prospero/prospero-bii.ps.Z
Anonymous FTP: /pub/papers/prospero/prospero-bii.ps.Z
(POSTSCRIPT)
@INPROCEEDINGS{prosperobii,
AUTHOR = "Neuman, B. Clifford and Augart, Steven Seger",
TITLE = "Prospero: A Base for Building Information Infrastructure",
BOOKTITLE = "Proceedings of INET'93",
YEAR = 1993,
MONTH = "August"}
This paper describes how Prospero can be used to integrate internet
information services, including Gopher, WAIS, Archie, and World Wide
Web. It is another good first paper to read about Prospero. The paper will
be presented at INET'93 in August.
Prospero: /papers/subjects/computers/operating-systems/prospero/prospero-gfsvsm.ps.Z
Anonymous FTP: /pub/papers/prospero/prospero-gfsvsm.ps.Z
(POSTSCRIPT)
@ARTICLE{gfsvsm,
AUTHOR = "Neuman, B. Clifford",
TITLE = "The {P}rospero {F}ile {S}ystem: A Global File System
based on the {V}irtual {S}ystem {M}odel",
JOURNAL = "Computing Systems",
VOLUME = 5,
NUMBER = 4,
YEAR = 1992,
MONTH = "Fall"}
This is a good second paper to read about Prospero. This one is
targeted more toward system implementors. It provides more
implementation details than the paper on organizing Internet
resources, but less of the vision of how Prospero can be used together
with other systems. Note: the online copy is the paper presented at
the Workshop on File System. A slightly revised version of the paper
which subsequently appeared in Computing Systems and Computing Systems is
the preferred citation.
Prospero: /papers/subjects/computers/operating-systems/prospero/prospero-smlic.ps.Z
Anonymous FTP: /pub/papers/prospero/prospero-smlic.ps.Z
(POSTSCRIPT)
@INPROCEEDINGS{prosperosmlic,
AUTHOR = "Neuman, B. Clifford and Augart, Steven Seger and
Upasani, Shantaprasad",
TITLE = "Using Prospero to Support Integrated
Location-Independent Computing",
BOOKTITLE = "Proceedings of the Usenix Symposium on Mobile and
Location-Independent Computing",
YEAR = 1993,
MONTH = "August",
PAGES = "29--34"}
This paper describes how the Prospero Directory Service can be used to
solve the server selection problem and the user location problem. The
paper was presented in August, 1993, at the Usenix Symposium on Mobile
and Location-Independent Computing.
Prospero: /papers/subjects/computers/operating-systems/prospero/UW-CS-89-01-07.PS.Z
Anonymous FTP: /pub/papers/prospero/UW-CS-89-01-07.PS.Z
(POSTSCRIPT)
@TECHREPORT{vsmldos,
AUTHOR = "Neuman, B. Clifford",
TITLE = "The {V}irtual {S}ystem {M}odel for Large Distributed
Operating Systems",
INSTITUTION = "Department of Computer Science, University of Washington",
YEAR = 1989,
MONTH = "April",
NUMBER = "89-01-07"}
This describes the initial vision for the Virtual System Model, the
model on which Prospero is based. Much of the material in this paper
appears in greater detail in other papers.
Prospero: /papers/subjects/computers/operating-systems/prospero/UW-CSE-90-05-01.PS.Z
Anonymous FTP: /pub/papers/prospero/UW-CSE-90-05-01.PS.Z
(POSTSCRIPT)
@TECHREPORT{vsmtp,
AUTHOR = "Neuman, B. Clifford",
TITLE = "The {V}irtual {S}ystem {M}odel: A Scalable Approach to
Organizing Large Systems (A Thesis Proposal)",
INSTITUTION = "Department of Computer Science and Engineering,
University of Washington",
YEAR = 1990,
MONTH = "May",
NUMBER = "90-05-01"}
For a long time this was the best description of Prospero, but all the
information in this document appears in more recent papers and the
dissertation itself.
Prospero: /papers/subjects/computers/operating-systems/prospero/prospero-closure.ps.Z
Anonymous FTP: /pub/papers/prospero/prospero-closure.ps.Z
(POSTSCRIPT)
@ARTICLE{nfclosure,
AUTHOR = "Neuman, B. Clifford",
TITLE = "The Need for Closure in Large Distributed Systems",
JOURNAL = "Operating Systems Review",
MONTH = "October",
YEAR = 1989,
VOLUME = 23,
NUMBER = 4,
PAGES = "28--30"}
This paper describes the reasons that operating systems need to
support closure, that is they need to make it clear which name space
is to be used when resolving names. While closure is one of the
important features of Prospero, the concept should be applied in other
operating systems too.
Prospero: /papers/subjects/computers/operating-systems/prospero/prospero-wsvsm.ps.Z
Anonymous FTP: /pub/papers/prospero/prospero-wsvsm.ps.Z
(POSTSCRIPT)
@INPROCEEDINGS{wsvsm,
AUTHOR = "Neuman, B. Clifford",
TITLE = "Workstations and the {V}irtual {S}ystem {M}odel",
BOOKTITLE = "Proceedings of the 2nd IEEE Workshop on
Workstation Operating Systems",
YEAR = 1989,
MONTH = "September",
PAGES = "91--95",
NOTE = "Also appears in the {\it Newsletter of the IEEE Technical
Committee on Operating Systems}, Volume 3, Number 3,
Fall 1989. Available as University of Washington Department
of Computer Science and Engineering Technical Report
89-10-10"}
Describes the role of the workstation in a system based on the Virtual
System Model. Also provides an early description of Prospero.
Prospero:
/papers/subjects/computers/operating-systems/prospero/prospero-neuman-thesis.ps.Z
Anonymous FTP: /pub/papers/prospero/prospero-neuman-thesis.ps.Z
(POSTSCRIPT)
@PHDTHESIS{phdneuman,
AUTHOR = "Neuman, B. Clifford",
TITLE = "The {V}irtual {S}ystem {M}odel: A Scalable Approach to
Organizing Large Systems",
SCHOOL = "University of Washington",
MONTH = "June",
YEAR = 1992,
NOTE = "Department of Computer Science and Engineering
Technical Report 92-06-04"}
This is Clifford Neuman's Ph.D. Dissertation. It is currently the
definitive work on Prospero and the Virtual System Model. The
prospero manuals that form its appendices have been superseded by
those described below.
Prospero:
/papers/subjects/computers/operating-systems/prospero/doc/prospero-protocol-v5.PS.Z
Anonymous FTP: /pub/prospero/doc/prospero-protocol-v5.PS.Z
DISTRIBUTION: protocol.PS, protocol.tex
(POSTSCRIPT or LaTeX)
This is a description of version 5 of the Prospero protocol
and of the Reliable Delivery Protocol that we use. It includes lots
of information that was elided in the version 1 protocol
specification. It also has a lot of information in it about how the
system works. The LaTeX source is available as
prospero-protocol-v5.tex.Z.
Prospero: /papers/subjects/computers/operating-systems/prospero/doc/prospero-protocol-v1.PS.Z
Anonymous FTP: /pub/prospero/doc/prospero-protocol-v1.PS.Z
(POSTSCRIPT)
This is a description of version 1 of the Prospero protocol.
(It's identical to appendices D and E of B. Clifford Neuman's Ph.D.
Dissertation.) It is now obsoleted by version 5 protocol. However,
we are still making it available since a number of older servers are running
version 1 protocol, and since most of the current ARCHIE clients use the
older Version 1 protocol.
Prospero:
/papers/subjects/computers/operating-systems/prospero/doc/prospero-user-manual.PS.Z
Anonymous FTP: /pub/prospero/doc/prospero-user-manual.PS.Z
DISTRIBUTION: manual.PS, manual.tex
(POSTSCRIPT or LaTeX)
This is the Prospero User's manual. It is slightly out of
date, and we'll be revising it shortly. Latex source in the
corresponding .tex file.
Prospero:
/papers/subjects/computers/operating-systems/prospero/doc/prospero-library.PS.Z
Anonymous FTP: /pub/prospero/doc/prospero-library.PS.Z
DISTRIBUTION: library.PS, library.tex
(POSTSCRIPT, LaTeX)
Prospero library manual. Somewhat sketchy and not
comprehensive, but far better than nothing. This is mainly useful for
applications writers. This is slowly being updated. Latex source in
the corresponding .tex file.
Prospero: /papers/subjects/computers/security/issues.ps.Z
Anonymous FTP: /pub/papers/psfos.ps.Z
(POSTSCRIPT)
@INPROCEEDINGS{psfos,
AUTHOR = "Neuman, B. Clifford",
TITLE = "Protection and Security Issues for Future Systems",
BOOKTITLE = "Proceedings of the Workshop on Operating Systems of the
90s and Beyond",
PUBLISHER = "Springer-Verlag",
YEAR = 1991,
MONTH = "July",
PAGES = "184--201",
NOTE = "Lecture Notes in Computer Science #563",}
Not Prospero-specific. Describes some of the security issues which
underlay the development of Prospero's (optional) access control system.
Prospero: /papers/subjects/computers/distributed-systems/scale.ps.Z
Anonymous FTP: /pub/papers/scale.ps.Z
(POSTSCRIPT)
@INCOLLECTION{sds,
AUTHOR = "Neuman, B. Clifford",
TITLE = "Scale in Distributed Systems",
BOOKTITLE = "Readings in Distributed Computing Systems",
PUBLISHER = "IEEE Computer Society Press",
YEAR = 1992}
This is not really Prospero-specific, but it addresses general issues
of scale in distributed systems. It discusses Prospero among other
systems, and mentions a number of the issues that are driving the
development of Prospero.
Prospero: /papers/subjects/computers/operating-systems/prospero/README-prospero-documents
Anonymous FTP: /pub/papers/prospero/README-prospero-documents
(ASCII)
This file.
Virtual-System-Name: #/INET/EDU/ISI/swa

View File

@@ -0,0 +1,34 @@
Customization instructions
Connect to the lowest directory in the path that is already
customized. One way to check whether a directory is customized is to
use the vwp command while connected to the directory. If one of the
components in the physical name for the directory includes the the
name of your virtual system it is probably a customized view. Let
'thisdir' be the name of the current directory and 'subdir' the name
of the subdirectory that is to be customized. Do a vls -u to find out
the name of the union link for the uncustomized version of the current
directory. The subdirectory to be customized should not show up in
this list*. For the purpose of this example, pretend that the union
linked directory is named 'usprot'. Execute the following commands:
vmkdir subdir
vcd -u usprot
vln -u subdir ../thisdir/subdir/usprot
That should do it. Do a vcd ../thisdir/subdir followed by a vls -u
and a vls to make sure things worked. You can now use vln to add
links to your customized copy of the current directory. Use vln's
"-c" (customize) option to make sure that vln does not think that the
uncustomized target of the link is the directory in which the new link
is to be added.
If you are trying to customize a directory deep in the hierarchy, each
directory in the path from the root must be customized though it is
expected that those in the higher levels of the hierarchy might have
already been taken care of (when you customized other directories
sharing a common prefix).
* : The subdirectory to be customized would be in the union
linked directory, if you see the subdirectory in the current directory
when you do the vls -u, then a different procedure must be followed.

70
prospero/doc/dangerous Normal file
View File

@@ -0,0 +1,70 @@
As always .... this code contains all kind of bad practices, or at least
things that I think are bad practices. On the prinicple of ... "If it
aint broke, dont fix it" they shouldnt neccessarily get changed now.
But here are some things to watch for and/or change as you encounter them!
Please feel free to add bad practices from my code to here :-) Mitra
General bad principles:
------------------------
Declaring external functions explicitly, rather than via header files.
This causes problems when definitions change, since the linker wont spot
the errors. - Mitra
Ditto for global variables such as errno (see below) - Mitra
Defining standard functions that dont appear on your implementation
without ifdef's or comments. Few, if any, linkers will spot the
redefinition, and coders will tear their hair out trying to figure out
why the system routine is behaving the way the man page says.
(e.g. syserrstr) - Mitra
Using #define's where enums could be used - this produces identical code,
but some compilers produce warnings when enums are used inappropriately,
and most debuggers (e.g. gdb) can produce symbols rather than numbers.
- Mitra
It would be good to split pmachine.h up, Some of it is
obvious machine dependant stuff, other stuff is fixes for broken (or
at least bent) header files on some systems. These could usefully
be in seperate files, removing the dependancy on pmachine.h for many
files, and removing the requirement to include all the corrected
header files for every file needing any one of them. - Mitra
Notes from changes which probably couldnt have been forseen.
-----------------------------------------------------------
error strings:
errno is a macro on Solaris, however it was declared as an "extern int"
all over the place
Standards
----------
These are some ideas for how we could help integrate Prospero into a standards based environment,.
URL's:
Our access methods are basically URL's and we already handle more than
one per link. It might be good to bring them more fully into line with the URL standard, either by ensuring we keep exactly the same peices of ingformation on each type of URL, or even better to use the URL string exactly.
I'm not sure how we would transition to this gracefully, maybe by adding a new URL attribute?
URN's: These arent really standard enough for us to track yet, but its
worth considering, especially since we have things like Magic No's
which perform some of the same functions.
Gateways: The current way we do gateways leaves a lot to be
desired. In particular, the name of the object is something like
GOPHER-GW//xxx.yyy/11/fred NOT red.path.net/gopher-gw/xxx.yyy/11/fred
which is how we access it. The challenge is to allow the client to
use the most appropriate gateway, while allowing hte clients to remain
simple . One alternative is to register a subdomain for gateways, and
allow either the client, or the client's local DNBS to override the
address with a more appropriate gateway.
Types: OBJECT-ITNERPRETATION is almost but not quite Mime types, or as
they are now called iana-types, we should seriously consider migrating
entirely over to these, as gopher has done, and wais is going
to. There are far to many flakey translations going on through
gateways!

10
prospero/doc/fullpage.sty Normal file
View File

@@ -0,0 +1,10 @@
\marginparwidth 0pt
\oddsidemargin 0pt
\evensidemargin 0pt
\marginparsep 0pt
\topmargin 0pt
\textwidth 6.5in
\textheight 8.5 in

View File

@@ -0,0 +1,58 @@
Instructions for getting started as a Prospero user
Find the directory in which the Prospero binaries are installed.
Source the file vfsetup.source in this directory. You may want to
source this file from your .cshrc.
To configure your virtual system, use the vfsetup alias (it is defined
by vfsetup.source). Specify the name of the virtual system to be
configured as an argument. If you are just playing around, use the
virtual system: guest. The command would be "vfsetup guest".
Use vcd and vwd to move around the virtual system, and vls to see what
is there. These commands will allow you to explore. Since you may
start from an empty subdirectory, be sure to look above (..), or in
the root directory (/). A quick summary of the commands that are
available follows.
vfsetup [-n host path , [-r,v] name , -f file]
Sets up virtual system
Example: vfsetup guest
vcd [-u] path
Change directory
Example: vcd /papers/subjects/naming/prospero
vwd
Print current virtual working directory
vls [-a, -A, -c, -f, -u, -v] [path]
List directory
Example: vls /
vln [-u] [-s] [-e] [-n host] oldname newname
Add a link
Example: vln /papers /guest/articles
vmkdir directory
Make a new virtual directory
vrm link
Remove a link
vget virtual-file [local-file]
Retrieve a file using anonymous FTP
Example: vget getting-started.txt these-instructions
To have your own virtual system created, send a message to
pfs-administrator@isi.edu. With your own virtual system, you will be
able to keep track of the files that you have found. More details on
the use of Prospero may be found in the Prospero users manual.
The information available through Prospero is growing. If you can't
find what you are looking for initially, it might appear at a later
date. You can help by adding information. Once you have organized
information in your own virtual system, send a message to
pfs-administrator to have it added to the prototype virtual system.

View File

@@ -0,0 +1,194 @@
This file documents the handling of native directories under Prospero.
This is not a presentation of an ideal design, but describes the
current status and behavior of the code. Suggestions for improvement
of the code are welcome, though we can't do much about them until
mid-November at the earliest.
This is a first draft, dated 11/3/93.
This will become part of the user's manual.
Directories under Prospero have an attribute associated with them
called INCLUDE-NATIVE. Until the full Alpha.5.3 release is out using
the new unified Prospero database format, this attribute cannot be set
or read via the Prospero protocol. You can look at it by examining
the server's data files in /usr/pfs/shadow (or the equivalent) on your
system, and change it by manually modifying those files -- not a very
nice solution, but a temporary kludge.
The values you'll see for it are:
NONATIVE -- this is always true for directories under
/usr/pfs/pfsdat (see the Data: line in the status report returned by
'pstatus' for the equivalent on your server). This means that all
links in the directory are virtual Prospero links.
INCLREAL -- this is the default for directories you've said
Prospero can access but which aren't under the Data: area. This
includes AFS directories, directories under the area described by the
Root: line on your server's status report, and your anonymous FTP
area. These directories are sometimes called 'include-native'
directories too.
INCLREAL directories contain both (a) 'native links', from the real
UNIX directory with the UNIX pathname that is the same as the Prospero
HSONAME, and (b) virtual links. They start off with all the links in
the real UNIX directory (except for . and ..).
The purpose of the INCLREAL directories is to make it easier to
get started organize your files using Prospero. You can run the
Prospero server out of the box and immediately make files under the
AFS, anonymous FTP, and additional (what we call PSRV_ROOT) areas
accessible through Prospero.
You can add links to such directories with vln, and you can
remove the same virtual links with vrm. So far, this is the expected
behavior.
. Making subdirectories of INCLREAL directories.
Let's say you want to create a subdirectory of an INCLREAL
directory. If you want to create a real native directory that will be
both on the UNIX and Prospero sides, go to the corresponding real unix
parent directory with the normal unix commands and use the usual
'mkdir' command. If you want to create a virtual directory that will
only be seen by Prospero, use the prospero 'vmkdir' command. When
you're creating a virtual subdirectory of a real UNIX directory,
Prospero will create a new HSONAME for the new directory to have. The
new HSONAME will be made in the object_pool subarea of the PFSDAT
area, and is guaranteed to be unique. (Versions of Prospero before
11/3/93 behave in a confusing and inappropriate manner when this
happens.)
. Deleting links from INCLREAL directories.
Let's say you want to delete a native link from an INCLREAL directory.
(a) If you want that native link to be gone from both the Prospero
virtual directory and from the corresponding native UNIX directory,
manually delete it from the native unix directory.
(b) If you want that native link to be gone only on the Prospero side,
but to stay in place on the unix side, you'll be tempted to use the
VRM user command. The Prospero servers, as currently implemented, do
not delete native links, and provide you with an explanatory failure
message when you attempt to do so. (see below for a listing of
alternatives)
.. What can I do instead?
You could decide to delete the file from the real native UNIX directory
after all.
You could copy the links in the Prospero directory to a new virtual
directory (thereby making all the links virtual). Then delete one of
the virtual links. Now, though, the Prospero directory won't follow
changes you make to the real directory.
You could change the directory to be NONATIVE. This is, for most
purposes, the same as the solution above, except that it can be
confusing to have NONATIVE directories outside the PFSDAT (PFS Data) area.
You could set the link to be invisible. This is what I'd suggest.
This is particularly appropriate for files such as the '.cap' files that
are needed by services such as Gopher. To do this, use the command:
set_atr <linkname> LINK-TYPE -linkprec -replace -field I
. So, why can't I delete a native link from a Prospero directory?
You can't do this because what it means is pretty unclear. Let's say
you delete the link '.cap' from the Prospero virtual directory which
corresponds to a subdirectory of your FTP area. The directory server
will have to save in its database a bit of information that says "the
link named .cap in this real UNIX directory should be ignored." Now,
let's say that the link .cap goes away. Should this record be deleted
or not?
If not, then when a new link named .cap is created a few
months later, that new link won't appear on the directory listing,
perhaps to the surprise of the maintainer, who might not remember
having deleted it a long time ago. Also, this means that native
directories will get bigger over time.
If yes, then files that are temporarily non-present but then reappear
(such as files being temporarily updated or rewritten) may have to be
deleted all over again.
You could use the filter mechanism and write an 'occluding' filter
that hides the native link. It would be subject to the same design
considerations mentioned at the start of this subsection about unclear
semantics. We haven't done this yet, but if you have a need for it
contact us and we'll tell you how to go about it.
We've talked about installing an 'occluding' filter on directories in
Prospero.
. Conflicting Links in INCLREAL directories.
If you try to create a link in a Prospero directory that has the same
name as an existing link but isn't a replica of it, the server will
not let you do it. This avoids a lot of confusion.
However, the server can't protect you if you already have a virtual
link in an INCLREAL directory, and then a native link with the same
name is created in the real directory. The server shouldn't throw
away the old link, nor should it ignore that the new link has
appeared. So two links with the same link name (although different
HSONAMEs) will appear. These are known as 'conflicting' links.
The server has been deliberately implemented so that the virtual link
always comes first. 'vrm <linkname>' will delete the purely virtual link.
To delete the native link, see suggestions listed above.
Admittedly, this isn't a great mechanism; vrm should note the conflict
and give you a way to select between the two conflicting links. We've
specified in the protocol methods that make this possible, but they aren't
implemented yet.
. Born-again objects and their ghosts.
Let's say that you do an 'rmdir' or 'rm' on a native unix object that
is shadowed by a Prospero virtual directory. The link in the virtual
directory will go away, and all will be happy.
Now let's say you create a new native UNIX object with the same name.
If you set any attributes on the old native UNIX object, they will
reappear on the new native object! Moreover, the new object will have
the same ACL entry that the old one did.
This is a bug. It is unlikely to be fixed before the end of November.
A problem with fixing it in the obvious way is that files that are
temporarily non-present but then reappear (such as files being
temporarily updated or rewritten) may lose all of their attributes.
The correct behavior is Not Fully Clear to me. Suggestions please.
Before making suggestions involving storing UNIX inode numbers (which
might work for directories), please note that some popular text
editors, such as EMACS, change a file's inode # every time they create
a new backup version of the file, at least in EMACS's default mode of
operation.
. Permissions on native objects.
All native objects start out with the DEFAULT and SYSTEM entries in
their ACLs, but can have their ACLs modified just like any other
object, with the set_acl command.
. Minor details
The INCLUDE-NATIVE attribute can also be set to:
INCLNATIVE: Works like INCLREAL, but also includes . and ..
MUNGED: for objects that do not correspond to any real Prospero object
-- e.g., a directory with union links expanded in it. These must
never be written out on the server.
PSEUDO: for objects from databases. These can be written out for
writeable databases.
UNINITIALIZED: an internal value used on the server, never sent across
the network.
NOTDIR: For objects that are not directories

2212
prospero/doc/library.PS Normal file

File diff suppressed because it is too large Load Diff

737
prospero/doc/library.tex Normal file
View File

@@ -0,0 +1,737 @@
% If you somehow got this file without fullpage.sty, delete
% ``fullpage'' from the list of style options. It just pulls out the
% margins a bit.
\documentstyle[11pt,twoside,fullpage]{article}
% New commands
%-------------
% Intro copied from prospero-protocol-v5.txt
% for meta-symbols
\newcommand{\meta}[1]{{\bf \mbox{\(<\)#1\(>\)}}}
% for literal tokens.
\newcommand{\lit}[1]{{\tt \mbox{#1}}}
%for attributes
\newcommand{\atr}[1]{\mbox{\sc #1}}
% for identifying text
\newcommand{\text}[1]{{\em #1}\/}
% Start and end of One or More
\newcommand{\ooms}{\([\,\)}
\newcommand{\oome}{\(\,]^+\)}
% start and end of zero or more
\newcommand{\zoms}{\([\,\)}
\newcommand{\zome}{\(\,]^*\)}
% Start and end of zero or one
\newcommand{\zoos}{\([\,\)}
\newcommand{\zooe}{\(\,]\)}
% start an OR
\newcommand{\ors}{{\bf (\,}}
\newcommand{\ore}{{\bf \,) }}
\newcommand{\metaor}{{\em \,or\, }}
\newcommand{\hexnum}[1]{\(\mbox{#1}_{16}\)}
\newcommand{\unix}{{\sc unix}}
\newenvironment{command}{\begin{verse}\sloppy}{\end{verse}}
\newcommand{\commandsize}{\large}
%\newtheorem{example}{Example}
% Uncomment this for almost-double spacing
%\renewcommand{\baselinestretch}{1.7}
%\newcommand{\hozline}{\rule{\textwidth}{0.3mm}}
%\newcommand{\hozline}{\makebox[\textwidth]{\hrulefill}}
%\newcommand{\bex}{\begin{example} \begin{rm}}
%\newcommand{\eex}{$\Box$ \end{rm} \end{example}}
%\newcommand{\cbs}{\chgbarbegin}
%\newcommand{\cbe}{\chgbarend}
%\newcommand{\cbs}{}
%\newcommand{\cbe}{}
%\newcommand{\ptag}{\begin{flushright} {\rm ($P$)} \end{flushright} }
\begin{document}
\pagenumbering{arabic}
\pagestyle{plain}
\renewcommand{\thepage}{\arabic{page}}
\begin{titlepage}
\renewcommand{\thefootnote}{}
\footnotetext{\hspace*{-21pt}
A digital copy of the latest revision of this document may be obtained
through Prospero as
\mbox{\verb"/papers/subjects/operating-systems/prospero/doc/library.PS.Z"},
in the \mbox{\tt \#/INET/EDU/ISI/swa} virtual system, or through
Anonymous FTP from \mbox{\tt PROSPERO.ISI.EDU} as
\mbox{\verb"/pub/prospero/doc/prospero-library.PS.Z"}
}
\footnotetext{\hspace*{-21pt}
This work was supported in part by the National Science
Foundation (Grant No. CCR-8619663), the Washington Technology Center,
Digital Equipment Corporation, and the Defense Advance Research
Projects Agency under NASA Cooperative Agreement NCC-2-539.
The views and conclusions contained in
this document are those of the authors and should not be interpreted as
representing the official policies, either expressed or implied, of
any of the funding agencies.
The authors may be reached
at USC/ISI, 4676 Admiralty Way, Marina del Rey, California\ \ 90292-6695, USA.
Telephone +1 (310) 822-1511, email \mbox{\verb"info-prospero@isi.edu"}. }
\renewcommand{\thefootnote}{\arabic{footnote}}
\vspace*{\fill}
\begin{center}
\LARGE Prospero Library Manual\\
\Large Version 5\\
\vskip 1.5em
{\large Draft of 30 March 1994} \\
{\large Document Revision No. 0.5.3} \\
\end{center}
\vspace{.5in}
\Large \hspace*{\fill} B. Clifford Neuman
%\footnotetext{\hspace*{-18pt}
% To Contact the Authors: \\
% Electronic Mail: \mbox{\verb"info-prospero@isi.edu"} \\
% Telephone: +1 (310) 822-1511 \\
% Mail: USC Information Sciences Institute, 4676 Admiralty Way,
% Marina del Rey, California 90292--6695\ \ U.S.A.
%}
\hfill Steven Seger Augart \hspace*{\fill} \\
\vspace{.2in}
\begin{center}
\Large Information Sciences Institute \\
University of Southern California
\end{center}
\vspace*{1.2in}
\vspace*{\fill}
\end{titlepage}
\tableofcontents
\section{WARNINGS}
\begin{enumerate}
\item This manual is preliminary. It does not fully describe all of the
Prospero library calls.
\item This manual reflects Prospero releases Alpha.5.2 and later.
You can use it with Prospero releases between Alpha.5.0 and Beta.5.1;
changes are documented under the appropriate functions.
\end{enumerate}
\section{Introduction}
This manual describes the entry points to the Prospero library.
\section{PFS Library}
\subsection{Introduction}
The PFS library includes procedures for allocating and freeing
Prospero data structures, resolving names using Prospero, reading
directories, retrieving attributes, adding and deleting links, and
creating directories. Only those procedures generally used by application
programmers are described here. The remaining routines are called
internally.
These functions are prototyped in the include file {\tt pfs.h}, found
in the {\tt include} directory in the Prospero source tree. The data
structures manipulated by these functions and the definitions of the
flag options are also defined and documented in that file. When
Prospero is installed normally, the library (ready to be linked with)
can be found in {\tt lib/pfs/libpfs.a} in the Prospero source
hierarchy.
Since this manual is still not complete, a programmer will often find
it helpful to look at the source code files for the functions discussed
here. Most of them are preceded with large comments discussing their
behavior in more detail than is gone into here. They can all be found
in the {\tt lib/pfs} directory in the Prospero source tree.
Examples of using these functions can be found in the {\tt user}
directory of the Prospero source tree.
Programmers looking for examples of listing a directory and retrieving
attributes should look at {\tt vls.c}. Examples of setting attributes
are in {\tt set\_atr.c}. An example of the {\tt pget\_am} interface
to retrieving files is in {\tt vget.c} (after you see it, we expect
you'll appreciate the simplicity of {\bf pfs\_open()}. An example of {\tt
add\_vlink()} is in {\tt vln.c}.
\subsection{Multi-threading}
Work to make the Prospero library safe in a multi-threaded
environment, such as pthreads, is in progress. Since one of the
Prospero developers shot off his mouth and promised to get a
multi-threaded Prospero server to a certain loyal Prospero customer
well before November 15th, you can expect this item soon.
\subsection{Error Reporting}
Most functions in this library return a numeric error code (defined in
{\tt perrno.h}). The functions in this library which return pointers
to structures will return a null pointer in case of an error. They
will indicate which error occurred by setting the global variable {\tt
perrno} (defined in the include file {\tt perrno.h}) to one of the
constants defined in that file. Note: Functions that return an
explicit numeric error code are not guaranteed to set {\tt perrno}.
Most functions that set perrno or return an error code will also set
an explanatory message in the global variable {\tt p\_err\_string}
(also defined in that file). Even if they have no additional
information, they are supposed to set {\tt p\_err\_string} to the
empty string so that the user isn't misled by an old error message.
The Prospero library guarantees that {\tt p\_err\_string} will always
be a pointer to a string of some sort, frequently empty. You don't
have to worry about it being a NULL pointer. {\tt p\_err\_string} and
{\tt p\_warn\_string} may change in value during the program's
execution. If you are operating in multi-threaded mode, their values
will be different in different threads.
The error indicators in {\tt perrno} and {\tt p\_err\_string} are
persistent across library calls. To clear them before making a
library call, use the function {\bf p\_clear\_errors()}:
\begin{verbatim}
extern void p_clear_errors(void);
\end{verbatim}
\subsubsection{WARNING}
All the functions in this library are supposed to obey the above
convention about {\tt p\_err\_string}. We have not gone over all of
them to make certain that the convention is obeyed in every case, due
to the press of other work.
\subsection{Argument modification}
A function that accepts a {\it VLINK} may modify that link if the
object it points to has been forwarded. If it does so, it will modify
the link to refer to the new location of the object.
Not all calls to the Prospero library currently do this. When we take
the time to revise the library, we will attempt to make this behavior
consistent across all functions in the library that accept {\it VLINK}s
and send Prospero protocol messages that inform them the link's target
has been forwarded.
\subsection{Initialization}
Every Prospero client {\bf must} call the function
{\bf p\_initialize()} before making any calls to Prospero library
functions. Your program may well crash weirdly if you don't.
\begin{verbatim}
extern void p_initialize(char *software_id, int flags,
struct p_initialize_st * arg_st);
\end{verbatim}
If you're writing a client, send email to {\tt
pfs-administrator@isi.edu} and request a software ID string. If
you're just experimenting with the libraries, you can pass a NULL
pointer or empty string as the software ID.
At the moment, no flag values are defined, and no members of the
structure for additional arguments are defined, so the most common
calling sequence is:
\begin{verbatim}
p_initialize((char *) NULL, 0, (struct p_initialize_st *) NULL);
\end{verbatim}
\subsection{Data Structures}
Most of the data structures in the PFS library are allocated and freed
with special allocation functions ({\it VLINK}s are allocated with
{\bf vlalloc}, etc. The allocation functions also initialize the
members of the structure to common values and the freeing functions
de-allocate allocated memory referred to by the members of
the structure.
Do not use the C library function {\bf free} to free memory allocated
by one of the special Prospero allocating functions, and do not use
one of the special freeing functions to free memory allocated by {\bf malloc}.
The {\it VDIR} structure does not have special allocation and freeing
structures. This is because in the current uses of the Prospero
library, one generally does not make linked lists of {\it VDIR}
structures; instead, one allocates them on the stack with code that
looks like this:
\begin{verbatim}
VDIR_ST dir_st;
VDIR dir = &dir_st;
\end{verbatim}
and then initializes them with:
\begin{verbatim}
vdir_init(dir);
\end{verbatim}
and frees the allocated memory referred to by the members with:
\begin{verbatim}
vdir_freelinks(dir);
\end{verbatim}
\subsubsection{Linked Lists}
Prospero uses linked lists of items as a basic data structure. In all
cases, these are doubly linked lists. As usual, the empty list is
represented by a list whose head is the NULL pointer. When a doubly
linked has one or more items in it, then the {\tt previous} field of
the first item in the list points at the last item, and the {\tt next}
field on the last is NULL. Therefore, when a list has only one item
in it, then the {\tt next} pointer of the last item is NULL and the
{\tt previous} points back to itself. In other words, if {\it head}
is non-null, {\it head$->$previous} will always be the TAIL of the
list.
Macros for manipulating lists of these structures are in the {\tt
list\_macros.h} include file. This file is included by {\tt pfs.h}, but may be
included again without problems.
{\bf APPEND\_ITEM}({\it new, head}) appends the item {\it new} to a doubly linked
list pointed to by {\it head}. The item {\it new} goes at the TAIL
of the list. It must not already be present in the list. This macro
modifies its second argument, {\it head}, which should be a variable.
{\bf EXTRACT\_ITEM}({\it item, head}) removes {\it item} from a
doubly-linked list headed by {\it head}. If {\it item} is not a
member of the list, the results are not defined. The extracted {\it
item} will NOT be freed.
{\bf APPEND\_LISTS}({\it list1,list2}) performs an O(1) list appending
operation. It sets {\it list1} to point to a doubly-linked list
consisting of {\it list1} appended to {\it list2}. {\it list2} must
not already be a part of {\it list1} or the results are unpredictable.
{\it list2} will be a garbage value at the end of this exercise, since
it will no longer point to a valid doubly-linked list. {\it list1}
and {\it list2} must already be valid doubly-linked lists.
\subsubsection{Application-reserved ({\tt app}) member of Prospero structures}
This feature is available in prospero versions Alpha.5.3 and later.
For all exported structures in Prospero visible at the library
interface (except for TOKENs), there is a special member named {\tt
app}, for applications writers. This member is a union:
\begin{verbatim}
union app {
int flg; /* Flag or number */
void *ptr; /* Generic Pointer */
};
\end{verbatim}
Each allocation/freeing package (eg: vlalloc(), vlfree(), vllfree(),
vlcopy()) has a 'application freeing function specifying function'
(e.g., vlappfree()) associated with it.
So, if we use the app.ptr member of the VLINK structure to point to a
'struct vlink\_aux', to be freed (if non-null) with the 'vlauxlfree
function, then code using the VLINK in that way will have to call:
vlappfree(vlauxlfree); and then all subsequent calls to vlfree() will
call vlauxlfree on the app.ptr member.
\subsection{Entry Points}
\begin{tabbing}
{\Large \bf Entry points:} \= {\bf atalloc, atfree, atlfree, vlalloc,
vlfree, vllfree, add\_vlink,}\\
\> {\bf del\_vlink, p\_get\_dir, mk\_vdir, pget\_am, pget\_at, rd\_vdir,}\\
\>{\bf rd\_vlink, pfs\_open, {\rm and} pfs\_fopen}.
\end{tabbing}
\noindent {\bf PATTRIB atalloc}({\it void}), {\bf FILTER flalloc}({\it void}), {\bf TOKEN
tkalloc}({\it char *s}), {\bf ACL acalloc}({\it void}), and {\bf VLINK
vlalloc}({\it void}) allocate and initialize structures for storing attributes,
filters, tokens, access control list entries, and virtual links.
They call out\_of\_memory() on failure, which is a macro in {\tt
pfs.h} which currently raises an error condition and aborts program
execution. Its behavior may be changed by resetting the value of the
global variable {\bf internal\_error\_handler} (defined in {\tt pfs.h}
to a function with some alternative behavior (such as popping up a
window with a failure message and offering to restart the application
or exit).\footnote{
The Prospero directory server takes advantage of this and
rebinds {\bf internal\_error\_handler()} to a function that logs a
message to the server's log file and attempts to restart the server.}
Since the only failure condition for these functions is running out of
available memory, they do not set {\bf perrno}.
{\bf atfree}({\it
PATTRIB at}), {\bf flfree}({\it FILTER fl}), {\bf acfree({\it ACL
ac})}, and {\bf vlfree}({\it VLINK vl}) free the storage allocated to
{\it at}, {\it fl}, {\it ac}, and {\it vl}. They also free any
standard Prospero memory structures referenced by the members of these
structures; for example, freeing a {\it VLINK} will also free any
Prospero string referenced by the {\it VLINK'\/}s {\tt host} member.
They also free any memory referred to by the structure's {\tt app.ptr}
member, using whatever function the user set via {\bf atappfree(),
flappfree(), acappfree(),} or {\bf vlappfree(),} as appropriate. The
user can disable this feature, if it has already been enabled, by
calling the appropriate {\it xx}{\bf appfree()} function with a null
pointer as its argument.
{\bf atlfree}({\it at}) and {\bf vllfree}({\it vl}) free {\it at} and
{\it vl} and all successors in a linked list of such structures. They
do not return error codes nor do they set {\tt perrno}, since they
cannot fail. {\bf tkalloc({\it s})} initializes the {\tt token}
member of the {\it TOKEN} structure it allocates to be a copy of {\it
s}.
{\bf {\it FILTER} flcopy({\it FILTER fl, int recurse})} will return a
copy of the filter {\it fl}. If the {\it recurse} flag is non-zero,
then it will also recursively copy the linked list of filters that
{\it fl} points to the head of.
{\bf {\it char *} stcopy({\it char *s})} allocates an area of memory
large enough to hold the string {\it s} and copies {\it s} into it.
It is usually used to store a string. The number of bytes allocated
to a string
can be checked with the macro {\bf stsize({\it char * string})}. An
alternative interface to {\bf stcopy} is {\bf {\it char *}
stalloc({\it size\_t nbytes})}. {\bf stalloc} allocates an area of
uninitialized memory large enough to hold {\it nbytes} bytes of data
and returns a pointer to it. Another interface is {\bf {\it char
*}stcopyr({\it char *source, char *dest})}. The sequence:
\begin{verbatim}
a = stcopyr("string", a);
\end{verbatim}
will yield results functionally equivalent to the sequence:
\begin{verbatim}
stfree(a);
a = stcopy("string");
\end{verbatim}
The only
difference is that {\bf stcopyr()} attempts to reuse the already
allocated space, if available. This avoids the overhead of extra
calls to {\bf malloc()} and {\bf free()}, and is therefore frequently more
efficient than the equivalent longer sequence of calls. The existing
Prospero libraries and utilities make frequent use of {\bf stcopyr()}
for this purpose.
Also note that \verb|a = stcopyr("foo", (char *) NULL)| is equivalent to
\verb|a = stcopy("foo");|
Memory allocated by all of these interfaces should be freed with {\bf
stfree({\it st})}. {\bf stfree({\tt (char *) NULL})} is a guaranteed
no-op. The various interfaces to {\bf stcopy()} all call {\tt
out\_of\_memory() when appropriate.}
A frequent cause of problems when using memory allocation functions is
freeing the same chunk of memory twice. One may optionally enable
consistency checking code in the allocators and freeing functions by
defining {\tt ALLOCATOR\_CONSISTENCY\_CHECK} in {\tt pfs.h}. This code
has not yet been finished for the {\bf stalloc()} family, but works
for all other allocators. If any double freeing is detected, {\bf
internal\_error\_handler()} will be called.
A programmer may also easily check for memory leaks by looking at the
global variables {\bf {\it int\/} acl\_count, pattrib\_count,
filter\_count, pauth\_count, pfile\_count, token\_count, vlink\_count,
and rreq\_count} to see how many of each of the corresponding
structures have been allocated.\footnote{
We use this facility to debug the Prospero server; it returns
this information in response to the {\tt pstatus} command.}%
\footnote{
Some of the structures mentioned in this list of global variables
are not yet documented in this manual.}
{\bf add\_vlink}({\it direct,lname,l,flags}) adds a new link {\it l}
to the directory named {\it direct} with the new link name {\it
lname}. {\it direct} is a string naming the directory that is to
receive the link. If {\it flags} is {\sc avl\_union}, then the link
is added as a union link. {\bf add\_vlink} returns {\sc psuccess} (0)
on success and an error code on failure.
This interface to this function will change in a later version of the
library to be {\bf p\_add\_nlink()}, with a corresponding {\bf p\_add\_link}
that takes a {\it VLINK} instead of a string for the {\it direct} argument.
{\bf del\_vlink}({\it path,flags}) deletes the link named by {\it
path}. At present, {\it flags} is unused. {\bf del\_vlink} returns
{\sc psuccess} (0) on success and an error code on failure.
This interface to this function will change in a later version of the
library to be {\bf p\_del\_nlink()}, with a corresponding {\bf p\_del\_link()}
that takes a {\it VLINK} instead of a string for the {\it path} argument.
{\bf p\_get\_dir}({\it VLINK dlink,char *components,VDIR dir,int
flags,TOKEN acomp})
contacts the Prospero server on host {\it dlink-$>$host} to read the directory
{\it dlink-$>$hsoname}, resolving union links that are returned and applying
{\it dlink-$>$filters}, if set.
If {\it components} is a null pointer, all links in the directory are
returned. If {\it components} is a non-null string, only those
links with names matching the string. The string may be a wildcarded name
containing the {\tt *} and {\tt ?} characters; these have their
conventional meanings. The string may also be a regular expression,
enclosed between parentheses; in that case, all links matching the
regular expression are returned.
{\bf p\_get\_dir()} will always, in addition to any other links it might
return, return any link whose literal name is the {\it components}
string. This feature means that you do not have to worry about
retrieving links whose names contain special characters, even if more
special characters are defined at some future time. An example: The
{\it components} string {\tt (ba\(na\)*na)}, in addition to matching
{\tt banana} and {\tt banananana}, also (as an important special case)
matches the component whose literal name is {\tt (ba\(na\)*na)}.
{\it dir} is a Prospero directory structure that is filled in. {\it
flags} can suppress the expansion of union links ({\sc gvd\_union}),
force their expansion ({\sc gvd\_expand}), request the return of link
attributes on the {\it VLINK} structure's {\tt lattrib} member ({\sc
gvd\_attrib}), and suppress sorting of the directory links ({\sc
gvd\_nosort}). {\it acomp} should normally be {\sc null}. For many
applications, one does not need to call this procedure, and should use
{\bf rd\_vdir} and {\bf rd\_vlink} instead. {\bf p\_get\_dir} returns
{\sc psuccess} (0) on success and an error code on failure.
The standard way to retrieve the attributes of a link in a directory
is to call {\bf p\_get\_dir} with the {\it dlink} argument pointing
to the directory in which the link is located and the {\it components}
argument being the name of the link whose attributes are to be
retrieved.
Compatability note: {\bf p\_get\_dir} was named {\bf get\_vdir} or
{\bf p\_get\_vdir()} in releases of Prospero before Alpha.5.2. Those
older interfaces are still available but should be converted.
release is backwards-compatible with those older uses.
Please note that the Alpha.5.3 release of {\bf p\_get\_dir()} will not
moify the {\it dlink}, but that previous releases did corrupt the {\it
dlink} while expanding a union lnk.
{\bf mk\_vdir}({\it char path[], int flags}) creates a new virtual
directory with
the new name {\it path} in the currently active virtual system. {\it
flags} should usually be 0; the only flag currently defined is {\sc
MKVD\_LPRIV}, which causes the directory to be created with very
limited permissions available to the creator. See the documentation
of the {\tt CREATE-OBJECT} command in the protocol specification if
you want a better explanation of this option.
{\bf mk\_vdir} returns {\sc psuccess} (0) on success and an error code
on failure.
This interface to this function will change in a later version of the
library to be {\bf p\_mk\_ndir()}, with a corresponding {\bf p\_mk\_dir}
that takes a {\it VLINK} referring to the directory and a string which
is the new link name.
{\bf pget\_am}({\it VLINK link,TOKEN *ainfop, int methods}) returns
the access method that should be used to access the object referenced
by {\it link}. {\it *ainfop} is a pointer to a variable of type
TOKEN. When {\bf pget\_am} returns, this variable will be a NULL
pointer if no appropriate access methods were available or will point
to the value of the best {\sc access-method} attribute associated with
the object referenced by {\it link} if appropriate methods were
available. When more than one appropriate access method is available,
{\bf pget\_am} attempts to choose the least expensive one.
{\it methods} is a bit-vector identifying the methods that are acceptable
to the application. The methods presently supported are: the local
filesystem ({\sc p\_am\_local}), anonymous FTP ({\sc p\_am\_aftp}),
regular FTP ({\sc p\_am\_ftp}), Sun's Network File System ({\sc
p\_am\_nfs}), the Andrew File System ({\sc p\_am\_afs}), the Gopher
distributed directory service binary and text file retrieval protocols
({\sc p\_am\_gopher}), and telnettable services ({\sc p\_am\_telnet}).
Note that to effectively use the ({\sc p\_am\_ftp}) access method, the
server on the remote end will have to know that the user has an
account valid for FTP on the server. {\bf pget\_am} returns {\sc
p\_am\_error} (0) on failure and leaves an error code in {\tt perrno}.
Upon success, {\bf pget\_am} returns the value of the access method
that was chosen.
This interface returns information that allows you to retrieve a file,
but does not do any of the work of retrieving it. We expect most
programmers to use the {\bf pfs\_open} or {\bf pfs\_fopen} interfaces
instead. The only exception is the TELNET access methods
{\bf PATTRIB pget\_at}({\it VLINK link,char atname[]}) returns a list of values of
the {\it atname} attribute for the object referenced by {\it link}.
If {\it atname} is {\sc null}, all attributes for the referenced
object are returned. If {\it atname} is a string, it is a string
which is just a plus-separated list of attribute specification options
to the {\tt EDIT-OBJECT-INFO} protocol message. {\bf pget\_at}
returns {\sc null} on failure, or when no attributes are found. On
failure, an error code is left in {\tt perrno}. On success, {\tt
perrno} is explicitly set to {\tt PSUCCESS}.
If the object has been forwarded, pget\_at() will follow the
forwarding pointers, just as other PFS library functions do. If the
object has been forwarded, pget\_at() will modify {\it link} so that
the link's {\tt host} and {\tt hsoname} members refer to the link's
new location.
This function will be renamed in a later version of this library. The
new function will be named {\bf p\_get\_at}.
{\bf rd\_vdir}({\it dirarg,comparg,dir,flags}) lists the directory
named by {\it dirarg} (relative to the current working directory or
the root of the active virtual system) returning the links whose names
match {\it comparg}. {\it dir} is a Prospero directory structure that
is filled in. {\it flags} can suppress the expansion of union
links ({\sc rvd\_union}), force their expansion ({\sc rvd\_expand}),
request the return of link attributes ({\sc rvd\_attrib}), suppress
sorting of the directory links ({\sc rvd\_nosort}), suppress use of
cached data when resolving names ({\sc rvd\_nocache}), or request the
return of a reference to the named directory, suppressing the return
of its contents ({\sc rvd\_dfile\_only}). {\bf rd\_vdir} returns {\sc
psuccess} (0) on success and an error code on failure.
As a special case, if the {\it comparg} is a null pointer or the empty
string and the {\it dirarg} refers to a link that is not a DIRECTORY,
then a directory entry containing a single link to the {\it vlink}
named by comparg is returned; in that special case, this interface
behaves similarly to {\bf rd\_slink}.
This function's interface will change; it will probably be
renamed {\bf p\_get\_ndir()}.
{\bf VLINK rd\_vlink}({\it path}) is an alternative interface for
resolving names. {\bf rd\_vlink} returns the single link named by
{\it path}. Its function is equivalent to calling {\bf rd\_vdir} with
{\it comparg} set to the last component of the path and {\it dirarg}
set to the prefix. {\bf rd\_vlink} returns {\sc null} on failure
leaving an error code in {\tt perrno}. {\bf rd\_vlink()} will also
expand symbolic links it encounters, whereas {\bf rd\_vdir()} returns
the symbolic links in a directory unexpanded.
{\bf {\it VLINK} rd\_slink}({\it path}) works just like {\bf
rd\_vlink}, except it will not expand symbolic links.
{\bf pfs\_open}({\it VLINK vl,int flags}) and
{\bf FILE *pfs\_fopen}({\it VLINK vl, char *type}) are identical to {\bf open} and {\bf fopen} in
the C library except that instead of a filename, they take a pointer
to a Prospero
virtual link structure and open the file referenced by the link.
Note that they currently do not work to create files; indeed, they
inherently can't, since they accept a pointer to an already existing
link. {\bf pfs\_open} does not take the third optional {\it mode}
argument that {\bf open} takes, since Prospero's access control list
mechanism does map well onto the {\sc unix} protection modes.
For files which are not already mapped into the local {\sc unix}
filesystem, these functions work by retrieving the file as a temporary
file; a reference to this temporary file is then returned. In the
current implementation, we do not cache files; a new copy is retrieved
every time you call pfs\_open() or pfs\_fopen(). If you want to use
the same data more than once (e.g., display it via a paging program
and then offer to save it), it will speed up your program
substantially if you know that {\bf pfs\_open()} and {\bf
pfs\_fopen()} return file references which you can run {\bf lseek()}
or {\bf fseek()} on, respectively.
Until Prospero release Alpha.5.2, the {\bf pfs\_open} and {\bf
pfs\_fopen} calls were in libpcompat, not in libpfs.
\section{Pcompat Library}
The compatibility library includes replacements for existing system
calls and library routines that interact with the directory service.
The replacements optionally resolve names using the Prospero file
system. The behavior depends on the value of the {\tt pfs\_enable}
global variable. Possible values are defined in {\it pcompat.h} and
are described below. Note that {\tt pfs\_enable} exists in only a
single instance, even in a multithreaded context; setting it for one
thread sets it for all.
\begin{sloppypar}
The default Prospero installation procedure leaves the compatibility
library in {\tt lib/pcompat/libpcompat.a}. Programs linked with the
compatibility library should also be linked with the pfs library,
since the compatibility library uses some functions in libpfs.
\end{sloppypar}
The routines in the compatibility library are self-initializing; they
will call p\_initialize() and initialize all data structures
internally. This makes it possible to relink existing programs with
the compatibility library with less effort.
Like the POSIX readdir(), the Prospero readdir() is not
multithread-safe because it uses internal data structures. We would
gladly accept a contributed readdir\_r(), but will not write it
ourselves until a strong need appears.
As of this writing, the compatibility library does not run on as many
machines as the pfs library does. Specifically, the compatibility
library is known not to work on {\sc HP-UX} and on {\sc AIX}.
Therefore, use of the pfs library is suggested for maximal
portability. The compatibility library is not compiled by default.
(See the Prospero installation instructions for instructions on how to
compile it.).
If you are interested in the pcompat library, you should also look at
the Prospero User's Manual, in the section titled ``The Compatibility
Library''.
Setting the environment variable {\tt PFS\_DEBUG} to a numeric value will
cause the PCOMPAT library to set the PFS library's value of {\tt
pfs\_debug} to that value. This is useful for debugging applications
that use the compatibility library.
By default, the pfs compatability library will report prospero errors
encountered by compatibility functions such as open() to {\tt stderr}.
You can silence these error messages by setting the variable {\tt int
pfs\_quiet} in your program to a non-zero value or by defining your
own global variable {\tt pfs\_quiet} with a non-zero initialized
value. The global variable {\tt pfs\_quiet} is not multi-threaded; a
single instance of it is shared among multi-threaded programs.
\begin{table}
\begin{center}
\caption{Settings for the {\tt pfs\_enable} global variable\label{pfsenable}}
\vspace{0.1in}
\begin{tabular}{|l|p{3.9in}|} \hline
Value & Meaning \\ \hline \hline
PMAP\_DISABLE & Never resolve names within the virtual system \\ \hline
PMAP\_ENABLE & Always resolve names within the virtual system \\ \hline
PMAP\_COLON & Resolve names within the virtual system if they contain a : \\ \hline
PMAP\_ATSIGN\_NF & Resolve names within the virtual system by default, but
treat names beginning with an @ or full path names that
don't exist in the virtual system as native file names \\ \hline
PMAP\_ATSIGN & Resolve names within the virtual system by default, but
treat names beginning with an @ as native file names \\ \hline
\end{tabular}
\vspace{-0.1in}
\end{center}
\end{table}
\subsection{Entry Points}
\begin{tabbing}
{\Large \bf Entry points:} \= {\bf closedir creat, execve,
open, opendir, readdir, scandir,}\\
\>{\bf seekdir, stat, telldir, and pfs\_access}.
\end{tabbing}
\noindent {\bf closedir, creat, execve, open, opendir, readdir, scandir,
seekdir, stat}, and {\bf telldir} are identical to the entry points
with the same names in the standard C library except that, depending
on the value of the {\tt pfs\_enable} variable, file names may be resolved
using Prospero.
{\bf pfs\_access}({\it char *path,char *npath,int npathlen, int
flags}) accepts a name, {\it path}, that is to be resolved using
Prospero. {\bf pfs\_access} resolves the name, selects an access
method, mounts the appropriate file system or retrieves the file if
necessary, and returns a new name in {\it npath} that may be passed to
open. {\it npath} must be a buffer large enough to hold the new name,
and its size must be passed in {\it npathlen}. By setting {\it
flags}, it is possible to specify that the file is to be created if it
does not exist ({\sc pfa\_create}), or to indicate that the file will
be opened read only ({\sc pfa\_ro}). {\bf pfs\_access} returns {\sc
psuccess} (0) or {\sc pmc\_delete\_on\_close} on success. A return
value of {\sc pmc\_delete\_on\_close} indicates that the file has been
cached on the local system and that the calling application should
delete the cached copy when done with it. Any other return code
indicates failure.
{\bf Warning:} As of this writing, the {\sc pfa\_create} flag has not
been fully implemented.
\end{document}

2
prospero/doc/man/FILES Normal file
View File

@@ -0,0 +1,2 @@
FILES
archie.man

194
prospero/doc/man/archie.man Normal file
View File

@@ -0,0 +1,194 @@
.TH ARCHIE 1 "20 August 1991" "Archie (Prospero)"
.SH NAME
archie \- query archie anonymous ftp databases using Prospero
.SH SYNOPSIS
.in +\w'\fBarchie \fR'u
.ti -\w'\fBarchie \fR'u
.B archie\
\ [\ \fB\-cers\fR\ ]\
\ [\ \fB\-l\fR\ ]\ [\ \fB\-t\fR\ ]\
\ [\ \fB\-m\fR\ \fI#\fR\ ]\ [\ \fB\-N\fR\ \fI#\fR\ ]\
\ [\ \fB\-H\fR\ \fIhost\fR\ ]\ \fIstring\fR
.SH DESCRIPTION
.B archie
queries an archie anonymous ftp database looking for the specified
.I string
using the
.B Prospero
protocol. This client is based on
.B Prospero
version
.BR Alpha.5.2 .
The general method of use is
.RS
%
.B archie string
.RE
.PP
For example,
.RS
%
.B archie emacs
.RE
.PP
will find all anonymous FTP sites in the archie database that have a file
named
.B emacs
in their system's FTP area (emacs must be the entire last component
of the name of the file or directory). Regular expressions, such as
.RS
%
.B archie -r '[xX][lL]isp'
.RE
.PP
may also be used for searches. (See the manual of a reasonably good
editor, like GNU Emacs or vi, for more information on using regular
expressions.)
.SH OPTIONS
The options currently available to this
.B archie
client are:
.PD 0
.TP 12
.BR \-c
Search substrings paying attention to upper & lower case.
.TP
.BR \-e
Exact string match. (This is the default.)
.TP
.BR \-r
Search using a regular expression.
.TP
.BR \-s
Search substrings ignoring the case of the letters.
.TP
.BR \-l
Output results in a form suitable for parsing by programs.
.TP
.BR \-t
Sort the results inverted by date.
.TP
.BI \-m\ number
Specifies the maximum \fInumber\fP of hits (matches) to return. By
default, this value is 95.
.TP
.BI -N #
Sets the "niceness" of a query; by default, it's set to 0.
Without an argument, \fB\-N\fR defaults to 35765. If you use
\fB\-N\fR with an argument between 0 and 35765, it'll adjust itself
accordingly.
.TP
.BI \-H\ host
Tells the client to query the Archie server named \fIhost\fP.
.SH WARNING
Unfortunately, this manual page was last updated for the archie client
based upon Prospero Beta.4.2. This file does not contain lies, but it
also does not cover the new Archie 3 features of the current client;
there's a big comment close to the start of the source file
\fBuser/archie/archie.c\fR that should be merged in at this point.
Type just .BR \*(lqarchie\*(rq to get a list of the current supported
options.
.SH QUERY PRIORITY
Please use the \fB\-N\fR option whenever you don't demand immediacy, or
when you're requesting things that could generate large responses.
Even when using the nice option, you should still try to avoid big
jobs during busy periods. Here is a list of what we consider to be
nice values that accurately reflect the priority of a job to the server.
.RS
.TP 20
.B Normal
0
.TP
.B Nice
500
.TP
.B Nicer
1000
.TP
.B Very Nice
5000
.TP
.B Extremely Nice
10000
.TP
.B Nicest
32765
.RE
The last priority, \fBNicest\fR, would be used when a job should wait until
the queue is essentially empty before running. You should pick one of
these values to use, possibly modifying it slightly depending on where
you think your priority should land. For example, 32760 would mean
wait until the queue is empty, but jump ahead of other jobs that have
selected \fBNicest\fR.
There are certain types of things that we suggest using \fBNicest\fR
for, irregardless. In particular, any searches for which you would
have a hard time justifying the use of anything but extra resources.
(We all know what those searches would be for.)
.SH NOTES
The three search-modifying arguments (\fB\-c\fR, \fB\-r\fB, and \fB\-s\fR)
are all mutually exclusive; only the last one counts. If you specify
\fB\-e\fR with any of \fB\-c\fR, \fB\-r\fB, or \fB\-s\fR,
the server will first check for an exact match, then fall back to the
case-sensitive, case-insensitive, or regular expression search. This is
so if there are matches that are particularly obvious, it will take a
minimal amount of time to satisfy your request.
If you list a single `\-' by itself, any further arguments will be
taken as part of the search string. This is intended to enable
searching for strings that begin with a `\-'; for example:
.RS
%
.B archie \-s \- \-old
.RE
will search for all filenames that contain the string `\-old' in them.
.SH RESPONSE
Archie servers are set up to respond to a number of requests in a
queued fashion. That is, smaller requests get served much more
quickly than do large requests. As a result, the more often you query
the Archie server, or the larger your requests, the longer the queue
will become, resulting in a longer waiting period for everyone's
requests. Please be frugal when possible, for your benefit as well as
for the other users.
.SH SEE ALSO
For more information on regular expressions, see the man[ual] pages on:
.BR regex (3) ,
.BR ed (1)
.SH AUTHORS
The
.B archie
service was conceived and implemented by Alan Emtage
(bajan@bunyip.com) and Peter Deutsch (peterd@bunyip.com). The
entire Internet is in their debt.
This
.BR archie
client was written by Clifford Neuman (bcn@isi.edu)
with changes by Brendan Kehoe (brendan@cs.widener.edu) and
George Ferguson (ferguson@cs.rochester.edu).
The man page was originally written by Jeff Kellem
.BR (composer@chem.bu.edu),
and later modified by Brendan Kehoe.

3346
prospero/doc/manual.PS Normal file

File diff suppressed because it is too large Load Diff

1607
prospero/doc/manual.tex Normal file

File diff suppressed because it is too large Load Diff

1482
prospero/doc/menu-api.PS Normal file

File diff suppressed because it is too large Load Diff

334
prospero/doc/menu-api.tex Normal file
View File

@@ -0,0 +1,334 @@
% If you somehow got this file without fullpage.sty, delete
% ``fullpage'' from the list of style options. It just pulls out the
% margins a bit.
\documentstyle[11pt,twoside,fullpage]{article}
% New commands
%-------------
% Intro copied from prospero-protocol-v5.txt
% for meta-symbols
\newcommand{\meta}[1]{{\bf \mbox{\(<\)#1\(>\)}}}
% for literal tokens.
\newcommand{\lit}[1]{{\tt \mbox{#1}}}
%for attributes
\newcommand{\atr}[1]{\mbox{\sc #1}}
% for identifying text
\newcommand{\text}[1]{{\em #1}\/}
% Start and end of One or More
\newcommand{\ooms}{\([\,\)}
\newcommand{\oome}{\(\,]^+\)}
% start and end of zero or more
\newcommand{\zoms}{\([\,\)}
\newcommand{\zome}{\(\,]^*\)}
% Start and end of zero or one
\newcommand{\zoos}{\([\,\)}
\newcommand{\zooe}{\(\,]\)}
% start an OR
\newcommand{\ors}{{\bf (\,}}
\newcommand{\ore}{{\bf \,) }}
\newcommand{\metaor}{{\em \,or\, }}
\newcommand{\hexnum}[1]{\(\mbox{#1}_{16}\)}
\newcommand{\unix}{{\sc unix}}
\newenvironment{command}{\begin{verse}\sloppy}{\end{verse}}
\newcommand{\commandsize}{\large}
%\newtheorem{example}{Example}
% Uncomment this for almost-double spacing
%\renewcommand{\baselinestretch}{1.7}
%\newcommand{\hozline}{\rule{\textwidth}{0.3mm}}
%\newcommand{\hozline}{\makebox[\textwidth]{\hrulefill}}
%\newcommand{\bex}{\begin{example} \begin{rm}}
%\newcommand{\eex}{$\Box$ \end{rm} \end{example}}
%\newcommand{\cbs}{\chgbarbegin}
%\newcommand{\cbe}{\chgbarend}
%\newcommand{\cbs}{}
%\newcommand{\cbe}{}
%\newcommand{\ptag}{\begin{flushright} {\rm ($P$)} \end{flushright} }
\begin{document}
\pagenumbering{arabic}
\pagestyle{plain}
\renewcommand{\thepage}{\arabic{page}}
\begin{titlepage}
\renewcommand{\thefootnote}{}
%\footnotetext{\hspace*{-21pt}
%Digital copies of the latest revision of this document may be obtained
%through Prospero as
%\mbox{\verb"/papers/subjects/operating-systems/prospero/doc/menu-api.PS.Z"},
%in the \mbox{\tt \#/INET/EDU/ISI/swa} virtual system, or through
%Anonymous FTP from \mbox{\tt PROSPERO.ISI.EDU} as
%\mbox{\verb"/pub/prospero/doc/prospero-menu-api.PS.Z"}
%}
\footnotetext{\hspace*{-21pt}
This work was supported in part by the National Science
Foundation (Grant No. CCR-8619663), the Washington Technology Center,
Digital Equipment Corporation, and the Defense Advance Research
Projects Agency under NASA Cooperative Agreement NCC-2-539.
The views and conclusions contained in
this document are those of the authors and should not be interpreted as
representing the official policies, either expressed or implied, of
any of the funding agencies.
The authors may be reached
at USC/ISI, 4676 Admiralty Way, Marina del Rey, California\ \ 90292-6695, USA.
Telephone +1 (310) 822-1511, email \mbox{\verb"info-prospero@isi.edu"}. }
\renewcommand{\thefootnote}{\arabic{footnote}}
\vspace*{\fill}
\begin{center}
\Large Menu-Based Browser API to Prospero\\
\vskip 1.5em
{\large Draft of 5 July 1993} \\
{\large Document Revision No. 0.3} \\
\end{center}
\vspace{.5in}
%\Large \hspace*{\fill} Steven Augart
%\footnotetext{\hspace*{-18pt}
% To Contact the Authors: \\
% Electronic Mail: \mbox{\verb"info-prospero@isi.edu"} \\
% Telephone: +1 (310) 822-1511 \\
% Mail: USC Information Sciences Institute, 4676 Admiralty Way,
% Marina del Rey, California 90292--6695\ \ U.S.A.
%}
%\hfill Kwynn Buess
%\hspace*{\fill} \\
\begin{center}
\Large Steven Seger Augart
\vspace{.1in}
\Large B. Clifford Neuman
\vspace{.1in}
\Large Kwynn Buess
\vspace{.2in}
\Large Information Sciences Institute \\
University of Southern California
\end{center}
\vspace*{1.2in}
\vspace*{\fill}
\end{titlepage}
\tableofcontents
\section{INTRODUCTION}
The menu-based browser API is a description of interfaces to the
PROSPERO library. The functions and variables described here will
eventually be prototyped in the standard Prospero include file {\tt
p\_menu.h}; since the menu browser client and this API are still under
development, that include file is currently located in {\tt user/menu}
in the Prospero sources, along with the Prospero menu browser client.
\section{Data Structures}
The data structure {\it VLINK} is described in the include file {\tt
pfs.h}. The user of this API needs to know only the following facts
about it:
\begin{itemize}
\item A {\it VLINK} structure has members {\tt next}
and {\tt previous}. These members are only meaningful when working with a
linked list of {\it VLINK structures}; they point to the next and
previous member of the linked list. The {\tt previous} of the head of the
list points to the tail of the list. The {\tt next} of the tail of
the list is a null pointer.
\item The {\tt APPEND\_ITEM({\it VLINK new}, {\it VLINK head})} macro,
defined in {\tt list\_macros.h}, appends {\it new} to a doubly-linked
list headed by the vlink {\it head}. {\it head} is an initialized
variable which points to an already existing list of {\it VLINK}s. It
can be initialized to the empty list by setting its value to the null pointer.
\item The {\tt EXTRACT\_ITEM}({\it VLINK item, VLINK head}) macros,
also defined in {\tt list\_macros.h}, removes the item {\it item} from
the doubly-linked list headed by {\it head}. If ITEM is not a member
of the list, the results are not defined. The extracted item will NOT
be freed. {\tt EXTRACT\_ITEM} will reset {\it head} if necessary.
This is useful for extracting a single item for future use from a
linked list of {\it VLINK}s and then running {\tt vllfree()} on the
list.
\end{itemize}
The data structure {\it TOKEN} is also used by this API interface.
It obeys the same doubly linked list convention that {\it VLINK}
does.
\section {Error Reporting}
\begin{verbatim}
extern char *m_error;
\end{verbatim}
All of the functions described in this file set the global variable
{\tt m\_error} to signal success or failure. Upon failure, they
will return with {\tt m\_error} set to a pointer to a string which
is an error message. Upon success, they will return with {\tt
m\_error} set to a {\it NULL} pointer.
\section{Library Calls}
\subsection{\tt {\it VLINK }m\_top\_menu({\it void})}
{\tt m\_top\_menu()} takes no arguments. It returns a single {\it
VLINK}, which is a link to the first menu to be displayed to the user.
You then call m\_get\_menu() to get the contents of that menu.
\subsubsection{Implementation}
Return a vlink whose host and hsoname are set from the VSWORK\_HOST and
VSWORK\_FILE environment variables. The NAME of this vlink (the menu
title that will be displayed) should for now be the last component of
the VSNAME environment variable. Later we will talk about how to
start up the browser when somebody is not yet VFSETUP to any virtual
system.
\subsubsection{Additional ways to get top menu --- EXCEPTION TO API}
Some menu browsers allow the top menu to be specified on the command
line, using either native information or a directory name in the
currently active virtual system. At the moment, no API functions are
specified to handle this situation, and the PFS library must be called
directly. If the top menu is specified as a directory name in the
currently active virtual system, just use rd\_vlink() for now. If it
was specified with native information, vlalloc() a new link, set its
HSONAME to the native hsoname, its HOST to the native host, and use
rd\_vlink(). Eventually, we will design an API function or two to
handle getting the top menu by Prospero file name or by host and
hsoname.
\subsection{\tt {\it VLINK }m\_get\_menu({\it VLINK} menu)}
{\tt m\_get\_menu()} is given a {\it VLINK} to a menu as its argument.
It will return an ordered list of {\it VLINK}s, each corresponding to
an item in the menu.
\subsubsection{Implementation}
This orders the VLINKs according to the {\sc COLLATION-ORDER} attribute.
When asking for attributes to be returned in the underlying Prospero
call, please specify that you want
MENU-ITEM-DESCRIPTION+COLLATION-ORDER+ACCESS-METHOD to be returned.
(Of course, do this only if you are using a PFS library interface that
allows you to specify which attributes you are requested; at the
moment, none of the interfaces allow this.)
This will help us be compatible with possible future changes to the
way the server works.
The 1st two attributes are ones we need to display the menu. Asking
for the ACCESS-METHOD right away is also a good idea, since if you
don't support an access-method for a file, you can choose show on the
menu either that it is unreachable or not display it at all.
\subsection{\tt {\it char *} m\_item\_description({\it VLINK vl})}
This returns a string to be displayed as a description for the menu item
associated with VLINK. This is a pointer to data that may be
overwritten on the next call to {\tt m\_item\_description()}, but not before.
If {\it vl} is a link to a sub-menu, then, when that sub-menu is
displayed, most clients will also use the string returned by {\tt
m\_item\_description()} as a title for that sub-menu.
\subsubsection{Implementation}
Look at the {\sc MENU-ITEM-DESCRIPTION} attribute associated with {\it
vl}. If that fails,look at {\it vl}'s {\tt name} member.
\subsection{\tt {\it int} m\_class({\it VLINK vl})}
Return a CLASS for the object pointed to by the link. The class says
what you can do with an object (view it, read it, run a search through
it, open it up as a submenu, use it to connect to another service, etc.) These classes are constants defined
in the API.H file. They are: {\sc m\_class\_unknown} (must have a
value of 0), {\sc m\_class\_menu, m\_class\_document, m\_class\_search,
m\_class\_portal, m\_class\_sound, m\_class\_image, m\_class\_data,
and m\_class\_void}.
\subsubsection{Implementation}
This is derived from the value of the {\sc object-interpretation}
attribute. We are working on a new portable interface to this
function which lets the browser specify whether it knows how to
display/retrieve/access particular types and particular subtypes. The
current implementation of the api returns {\sc m\_class\_data} for
any types that it recognized but cannot perform an appropriate complex
operation on (e.g., if the OBJECT-INTERPRETATION is a SOUND but you
have no sound player), then return {\sc m\_class\_data}, and any
unknown types are returned as {\sc m\_class\_unknown}.
\subsection{\tt {\it TOKEN} m\_interpretation({\it vLINK vl})}
This will return the sequence that is the value of the
OBJECT-INTERPRETATION attribute. You will call m\_interpretation() for
information that will let you actually display the file. This is used
internally by m\_class(), too.
\subsubsection{Implementation}
Warning: The current api implementation does not fully meet this specification
for m\_interpretation().
If no {\sc object-interpretation} attribute is present, we look at the
{\it vl}'s {\tt target} member and see if it is {\tt DIRECTORY}, {\tt
EXTERNAL}, or {\tt FILE}, and we also perform some simple tests on the
suffix of a file to check whether it is likely to be a binary or text
file. If it ends in {\tt .gif,} it's IMAGE GIF. If it ends in {\tt
.ps} or {\tt .PS,} it's DOCUMENT POSTSCRIPT. If it ends in {\tt .Z,}
it's EMBEDDED COMPRESS, then strip off the {\tt .Z} and try again for
the rest of the object interpretation. If it ends in {\tt .z} or {\tt
.gz,} it's EMBEDDED GZIP. Otherwise, assume it's DOCUMENT TEXT ASCII.
The {\sc object-interpretation} attribute is further defined in the
{\tt working-notes} subdirectory of the menu sources.
\subsection{\tt {\it FILE *} m\_fopen\_file({\it VLINK vl})}
This opens the file referenced by {\it vl} in read-only mode and
returns a standard IO library {\it FILE} pointer to it, which is then
read from and manipulated in accordance with the stdio library
routines.
\subsubsection{Implementation}
This is just an interface to {\tt pfs\_fopen()}.
\subsection{\tt {\it int} m\_open\_file({\it VLINK vl})}
This opens the file referenced by {\it vl} in read-only mode and
returns a standard UNIX integer file descriptor referring to it. This
descriptor can then be manipulated in accordance with the standard
conventions.
\subsubsection{Implementation}
This is just an interface to {\tt pfs\_open()}.
\subsection{\tt {\it void} vlfree({\it vl}), {\it void} vllfree({\it vl}),
{\it VLINK} vlcopy({\it VLINK vl, int r})}
{\tt vlfree()} frees the vlink {\it vl}. It should be called on the
link returned by {\tt m\_top\_menu()} when the application no
longer has a use for it. {\tt vllfree} frees a linked list of {\it
vlink}s headed by {\it vl}. It should be called on the list returned
by {\tt m\_get\_menu()} when the application no longer has a need for
it.
{\tt vlcopy()} returns a copy of {\it vl}, with the {\tt next} and {\tt
previous} members set to the null pointer. {\it r} should always be zero.
\subsubsection{Implementation}
These three functions are already in libpfs; you don't need to implement them.
\end{document}

View File

@@ -0,0 +1,765 @@
%!PS-Adobe-2.0
%%Creator: dvips 5.47 Copyright 1986-91 Radical Eye Software
%%Title: more-getting-started.dvi
%%Pages: 2 1
%%BoundingBox: 0 0 612 792
%%EndComments
%%BeginProcSet: tex.pro
/TeXDict 200 dict def TeXDict begin /N /def load def /B{bind def}N /S /exch
load def /X{S N}B /TR /translate load N /isls false N /vsize 10 N /@rigin{
isls{[0 1 -1 0 0 0]concat}if 72 Resolution div 72 VResolution div neg scale
Resolution VResolution vsize neg mul TR matrix currentmatrix dup dup 4 get
round 4 exch put dup dup 5 get round 5 exch put setmatrix}N /@letter{/vsize 10
N}B /@landscape{/isls true N /vsize -1 N}B /@a4{/vsize 10.6929133858 N}B /@a3{
/vsize 15.5531 N}B /@ledger{/vsize 16 N}B /@legal{/vsize 13 N}B /@manualfeed{
statusdict /manualfeed true put}B /@copies{/#copies X}B /FMat[1 0 0 -1 0 0]N
/FBB[0 0 0 0]N /nn 0 N /IE 0 N /ctr 0 N /df-tail{/nn 8 dict N nn begin
/FontType 3 N /FontMatrix fntrx N /FontBBox FBB N string /base X array
/BitMaps X /BuildChar{CharBuilder}N /Encoding IE N end dup{/foo setfont}2
array copy cvx N load 0 nn put /ctr 0 N[}B /df{/sf 1 N /fntrx FMat N df-tail}
B /dfs{div /sf X /fntrx[sf 0 0 sf neg 0 0]N df-tail}B /E{pop nn dup definefont
setfont}B /ch-width{ch-data dup length 5 sub get}B /ch-height{ch-data dup
length 4 sub get}B /ch-xoff{128 ch-data dup length 3 sub get sub}B /ch-yoff{
ch-data dup length 2 sub get 127 sub}B /ch-dx{ch-data dup length 1 sub get}B
/ch-image{ch-data dup type /stringtype ne{ctr get /ctr ctr 1 add N}if}B /id 0
N /rw 0 N /rc 0 N /gp 0 N /cp 0 N /G 0 N /sf 0 N /CharBuilder{save 3 1 roll S
dup /base get 2 index get S /BitMaps get S get /ch-data X pop /ctr 0 N ch-dx 0
ch-xoff ch-yoff ch-height sub ch-xoff ch-width add ch-yoff setcachedevice
ch-width ch-height true[1 0 0 -1 -.1 ch-xoff sub ch-yoff .1 add]{ch-image}
imagemask restore}B /D{/cc X dup type /stringtype ne{]}if nn /base get cc ctr
put nn /BitMaps get S ctr S sf 1 ne{dup dup length 1 sub dup 2 index S get sf
div put}if put /ctr ctr 1 add N}B /I{cc 1 add D}B /bop{userdict /bop-hook
known{bop-hook}if /SI save N @rigin 0 0 moveto}N /eop{clear SI restore
showpage userdict /eop-hook known{eop-hook}if}N /@start{userdict /start-hook
known{start-hook}if /VResolution X /Resolution X 1000 div /DVImag X /IE 256
array N 0 1 255{IE S 1 string dup 0 3 index put cvn put}for}N /p /show load N
/RMat[1 0 0 -1 0 0]N /BDot 260 string N /rulex 0 N /ruley 0 N /v{/ruley X
/rulex X V}B /V statusdict begin /product where{pop product dup length 7 ge{0
7 getinterval(Display)eq}{pop false}ifelse}{false}ifelse end{{gsave TR -.1 -.1
TR 1 1 scale rulex ruley false RMat{BDot}imagemask grestore}}{{gsave TR -.1
-.1 TR rulex ruley scale 1 1 false RMat{BDot}imagemask grestore}}ifelse B /a{
moveto}B /delta 0 N /tail{dup /delta X 0 rmoveto}B /M{S p delta add tail}B /b{
S p tail}B /c{-4 M}B /d{-3 M}B /e{-2 M}B /f{-1 M}B /g{0 M}B /h{1 M}B /i{2 M}B
/j{3 M}B /k{4 M}B /w{0 rmoveto}B /l{p -4 w}B /m{p -3 w}B /n{p -2 w}B /o{p -1 w
}B /q{p 1 w}B /r{p 2 w}B /s{p 3 w}B /t{p 4 w}B /x{0 S rmoveto}B /y{3 2 roll p
a}B /bos{/SS save N}B /eos{clear SS restore}B end
%%EndProcSet
TeXDict begin 1000 300 300 @start /Fa 31 121 df<FFFF80FFFF80FFFF8011037E8D16>
45 D<70F8F8F8700505788416>I<000180000380000380000700000700000E00000E00001C0000
1C0000380000380000700000700000E00000E00001C00001C0000380000380000700000700000E
00000E00001C00001C0000380000380000700000700000E00000E00000C0000011207E9C16>I<
00E00001F00001F00001B00001B00003B80003B80003B800031800071C00071C00071C00071C00
071C000E0E000E0E000FFE000FFE001FFF001C07001C07001C07007F1FC0FF1FE07F1FC013197F
9816>65 D<7FF800FFFE007FFF001C0F001C07801C03C01C01C01C01C01C01E01C00E01C00E01C
00E01C00E01C00E01C00E01C00E01C00E01C01C01C01C01C03C01C07801C0F807FFF00FFFE007F
F8001319809816>68 D<7FFFC0FFFFC07FFFC01C01C01C01C01C01C01C01C01C00001C00001C1C
001C1C001FFC001FFC001FFC001C1C001C1C001C00001C00E01C00E01C00E01C00E01C00E07FFF
E0FFFFE07FFFE013197F9816>I<FFFFE0FFFFE0FFFFE01C00E01C00E01C00E01C00E01C00001C
00001C1C001C1C001FFC001FFC001FFC001C1C001C1C001C00001C00001C00001C00001C00001C
0000FF8000FFC000FF800013197F9816>I<FFFEFFFEFFFE038003800380038003800380038003
8003800380038003800380038003800380038003800380FFFEFFFEFFFE0F197D9816>73
D<FFC000FFC000FFC0001C00001C00001C00001C00001C00001C00001C00001C00001C00001C00
001C00001C00001C00001C00001C00401C00E01C00E01C00E01C00E0FFFFE0FFFFE0FFFFE01319
7F9816>76 D<7E1FC0FF3FE07F1FC01D07001D87001D87001D87001DC7001DC7001CC7001CC700
1CE7001CE7001CE7001C67001C67001C77001C77001C37001C37001C37001C17007F1F00FF9F00
7F0F0013197F9816>78 D<1FFC003FFE007FFF00780F00F00780E00380E00380E00380E00380E0
0380E00380E00380E00380E00380E00380E00380E00380E00380E00380F00780F00780780F007F
FF003FFE001FFC0011197E9816>I<7FF800FFFE007FFF001C0F801C03801C03C01C01C01C01C0
1C01C01C03C01C03801C0F801FFF001FFE001FF8001C00001C00001C00001C00001C00001C0000
1C00007F0000FF80007F000012197F9816>I<7FE000FFF8007FFC001C1E001C0F001C07001C07
001C07001C07001C0F001C1E001FFC001FF8001FFC001C1C001C0E001C0E001C0E001C0E001C0E
201C0E701C0E707F07E0FF87E07F03C014197F9816>82 D<07E3001FFF003FFF00781F00F00700
E00700E00700E00000F000007800003F80001FF00007FC0000FE00000F00000700000380000380
600380E00380E00700F80F00FFFE00FFFC00C7F00011197E9816>I<7FFFE0FFFFE0FFFFE0E0E0
E0E0E0E0E0E0E0E0E0E000E00000E00000E00000E00000E00000E00000E00000E00000E00000E0
0000E00000E00000E00000E00000E00007FC000FFE0007FC0013197F9816>I<7F07F0FF8FF87F
07F01C01C01C01C01C01C01C01C01C01C01C01C01C01C01C01C01C01C01C01C01C01C01C01C01C
01C01C01C01C01C01C01C00E03800E038007070007FF0003FE0000F8001519809816>I<7FFF80
FFFF80FFFF80E00700E00F00E01E00E01C00003C0000780000700000F00001E00001C00003C000
0780000700000F00001E03801C03803C0380780380700380FFFF80FFFF80FFFF8011197E9816>
90 D<1FE0003FF0007FF800783C00300E00000E00000E0003FE001FFE003E0E00700E00E00E00
E00E00E00E00783E007FFFE03FE7E00F83E013127E9116>97 D<7E0000FE00007E00000E00000E
00000E00000E00000E3E000EFF000FFF800F83C00F00E00E00E00E00700E00700E00700E00700E
00700E00700E00E00F01E00F83C00FFF800EFF00063C001419809816>I<003F00007F00003F00
00070000070000070000070003C7000FF7001FFF003C1F00780F00700700E00700E00700E00700
E00700E00700E00700700F00700F003C1F001FFFE00FE7F007C7E014197F9816>100
D<03E00FF81FFC3C1E780E7007E007FFFFFFFFFFFFE000E000700778073C0F1FFE0FFC03F01012
7D9116>I<03E3C007F7E00FFFE01C1CC0380E00380E00380E00380E00380E001C1C000FF8001F
F0001BE0003800001800001FFC001FFF003FFF807803C0E000E0E000E0E000E0E000E07001C07C
07C03FFF800FFE0003F800131C7F9116>103 D<018003C003C0018000000000000000007FC07F
C07FC001C001C001C001C001C001C001C001C001C001C001C001C07FFFFFFF7FFF101A7D9916>
105 D<7E3C00FEFE007FFF000F87800F03800E03800E03800E03800E03800E03800E03800E0380
0E03800E03800E03807FC7F0FFE7F87FC7F01512809116>110 D<03E0000FF8001FFC003C1E00
780F00700700E00380E00380E00380E00380E00380F00780700700780F003C1E001FFC000FF800
03E00011127E9116>I<7E3E00FEFF007FFF800F83C00F00E00E00E00E00700E00700E00700E00
700E00700E00700E00E00F01E00F83C00FFF800EFF000E3C000E00000E00000E00000E00000E00
000E00007FC000FFE0007FC000141B809116>I<FF0FC0FF3FE0FF7FE007F04007C00007800007
8000070000070000070000070000070000070000070000070000FFFC00FFFC00FFFC0013127F91
16>114 D<0FEC3FFC7FFCF03CE01CE01C70007F801FF007F8003C600EE00EF00EF81EFFFCFFF8
C7E00F127D9116>I<0300000700000700000700000700007FFF00FFFF00FFFF00070000070000
07000007000007000007000007000007010007038007038007038007870003FE0001FC0000F800
11177F9616>I<7E1F80FE3F807E1F800E03800E03800E03800E03800E03800E03800E03800E03
800E03800E03800E03800E0F800FFFF007FBF803E3F01512809116>I<7F1FC07F3FC07F1FC00F
1C00073C0003B80003F00001F00000E00001E00001F00003B800073C00071C000E0E007F1FC0FF
3FE07F1FC013127F9116>120 D E /Fb 28 122 df<60F0F8680808081010204080050C7C9C0C>
39 D<60F0F0701010101020204080040C7C830C>44 D<60F0F06004047C830C>46
D<000600000006000000060000000F0000000F0000000F00000017800000178000001780000023
C0000023C0000023C0000041E0000041E0000041E0000080F0000080F0000180F8000100780001
FFF80003007C0002003C0002003C0006003E0004001E0004001E000C001F001E001F00FF80FFF0
1C1D7F9C1F>65 D<FFFFC00F00F00F00380F003C0F001C0F001E0F001E0F001E0F001E0F001C0F
003C0F00780F01F00FFFE00F00780F003C0F001E0F000E0F000F0F000F0F000F0F000F0F000F0F
001E0F001E0F003C0F0078FFFFE0181C7E9B1D>I<FFFF800F00E00F00780F003C0F001C0F001E
0F001E0F001E0F001E0F001E0F001C0F003C0F00780F00E00FFF800F00000F00000F00000F0000
0F00000F00000F00000F00000F00000F00000F00000F0000FFF000171C7E9B1C>80
D<7FFFFFC0700F01C0600F00C0400F0040400F0040C00F0020800F0020800F0020800F0020000F
0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F000000
0F0000000F0000000F0000000F0000000F0000000F0000000F0000001F800003FFFC001B1C7F9B
1E>84 D<1FC000307000783800781C00301C00001C00001C0001FC000F1C00381C00701C00601C
00E01C40E01C40E01C40603C40304E801F870012127E9115>97 D<FC00001C00001C00001C0000
1C00001C00001C00001C00001C00001C00001C00001C7C001D86001E03001C01801C01C01C00C0
1C00E01C00E01C00E01C00E01C00E01C00E01C00C01C01C01C01801E030019060010F800131D7F
9C17>I<07E00C301878307870306000E000E000E000E000E000E00060007004300418080C3007
C00E127E9112>I<003F0000070000070000070000070000070000070000070000070000070000
070003E7000C1700180F00300700700700600700E00700E00700E00700E00700E00700E0070060
0700700700300700180F000C370007C7E0131D7E9C17>I<03E00C301818300C700E6006E006FF
FEE000E000E000E00060007002300218040C1803E00F127F9112>I<00F8018C071E061E0E0C0E
000E000E000E000E000E00FFE00E000E000E000E000E000E000E000E000E000E000E000E000E00
0E000E000E007FE00F1D809C0D>I<00038003C4C00C38C01C3880181800381C00381C00381C00
381C001818001C38000C300013C0001000003000001800001FF8001FFF001FFF803003806001C0
C000C0C000C0C000C06001803003001C0E0007F800121C7F9215>I<FC00001C00001C00001C00
001C00001C00001C00001C00001C00001C00001C00001C7C001C87001D03001E03801C03801C03
801C03801C03801C03801C03801C03801C03801C03801C03801C03801C03801C0380FF9FF0141D
7F9C17>I<18003C003C0018000000000000000000000000000000FC001C001C001C001C001C00
1C001C001C001C001C001C001C001C001C001C001C00FF80091D7F9C0C>I<FC001C001C001C00
1C001C001C001C001C001C001C001C001C001C001C001C001C001C001C001C001C001C001C001C
001C001C001C001C00FF80091D7F9C0C>108 D<FC7E07E0001C838838001D019018001E01E01C
001C01C01C001C01C01C001C01C01C001C01C01C001C01C01C001C01C01C001C01C01C001C01C0
1C001C01C01C001C01C01C001C01C01C001C01C01C001C01C01C00FF8FF8FF8021127F9124>I<
FC7C001C87001D03001E03801C03801C03801C03801C03801C03801C03801C03801C03801C0380
1C03801C03801C03801C0380FF9FF014127F9117>I<03F0000E1C001806003003007003806001
80E001C0E001C0E001C0E001C0E001C0E001C06001807003803003001806000E1C0003F0001212
7F9115>I<FC7C001D86001E03001C01801C01C01C00C01C00E01C00E01C00E01C00E01C00E01C
00E01C01C01C01C01C01801E03001D06001CF8001C00001C00001C00001C00001C00001C00001C
0000FF8000131A7F9117>I<FCE01D301E781E781C301C001C001C001C001C001C001C001C001C
001C001C001C00FFC00D127F9110>114 D<1F9030704030C010C010E010F8007F803FE00FF000
F880388018C018C018E010D0608FC00D127F9110>I<04000400040004000C000C001C003C00FF
E01C001C001C001C001C001C001C001C001C001C101C101C101C101C100C100E2003C00C1A7F99
10>I<FC1F801C03801C03801C03801C03801C03801C03801C03801C03801C03801C03801C0380
1C03801C03801C07800C07800E1B8003E3F014127F9117>I<FF07E03C03801C01001C01000E02
000E020007040007040007040003880003880003D80001D00001D00000E00000E00000E0000040
0013127F9116>I<FF3FCFE03C0F03801C0701801C0701001C0B01000E0B82000E0B82000E1182
000711C4000711C4000720C40003A0E80003A0E80003C0680001C0700001C07000018030000080
20001B127F911E>I<FF07E03C03801C01001C01000E02000E0200070400070400070400038800
03880003D80001D00001D00000E00000E00000E000004000004000008000008000F08000F10000
F300006600003C0000131A7F9116>121 D E /Fc 1 50 df<0C001C00EC000C000C000C000C00
0C000C000C000C000C000C000C000C000C000C000C00FFC00A137D9211>49
D E /Fd 33 119 df<7FFFC0FFFFE0FFFFE07FFFC013047D901A>45 D<3078FCFC783006067685
1A>I<0000C00001E00001E00003E00003C00007C0000780000F80000F00000F00001F00001E00
003E00003C00007C0000780000780000F80000F00001F00001E00003E00003C00003C00007C000
0780000F80000F00001F00001E00001E00003E00003C00007C0000780000F80000F00000F00000
60000013277DA21A>I<3FFFC07FFFC07FFFC07000007000007000007000007000007000007000
0070000071F8007FFE007FFF007E07807803C03001C00001C00000E00000E00000E06000E0F000
E0F001C0E001C07003807C0F803FFF000FFC0003F000131E7D9D1A>53 D<7FFE00FFFF007FFF80
1C07C01C01E01C00F01C00701C00781C00381C00381C003C1C001C1C001C1C001C1C001C1C001C
1C001C1C001C1C001C1C003C1C00381C00381C00781C00701C00F01C01E01C07C07FFFC0FFFF00
7FFE00161E7F9D1A>68 D<FFFFF8FFFFF8FFFFF81C00381C00381C00381C00381C00001C00001C
00001C0E001C0E001C0E001FFE001FFE001FFE001C0E001C0E001C0E001C00001C00001C00001C
001C1C001C1C001C1C001C1C001CFFFFFCFFFFFCFFFFFC161E7E9D1A>I<7FFFFCFFFFFC7FFFFC
0E001C0E001C0E001C0E001C0E00000E00000E00000E03800E03800E03800FFF800FFF800FFF80
0E03800E03800E03800E00000E00000E00000E00000E00000E00000E00000E00007FE000FFE000
7FE000161E7F9D1A>I<FFFF80FFFF80FFFF8001C00001C00001C00001C00001C00001C00001C0
0001C00001C00001C00001C00001C00001C00001C00001C00001C00001C00001C00001C00001C0
0001C00001C00001C00001C000FFFF80FFFF80FFFF80111E7C9D1A>73 D<0FFE003FFF807FFFC0
7C07C07001C0F001E0E000E0E000E0E000E0E000E0E000E0E000E0E000E0E000E0E000E0E000E0
E000E0E000E0E000E0E000E0E000E0E000E0E000E0F001E0F001E07001C07C07C07FFFC03FFF80
0FFE00131E7D9D1A>79 D<FFFE00FFFF80FFFFC01C03E01C00F01C00701C00781C00381C00381C
00381C00381C00781C00701C00F01C03E01FFFC01FFF801FFE001C00001C00001C00001C00001C
00001C00001C00001C00001C0000FF8000FF8000FF8000151E7E9D1A>I<FFFC00FFFF00FFFF80
1C07C01C01E01C00F01C00701C00701C00701C00701C00F01C01E01C07C01FFF801FFF001FFF80
1C07C01C01C01C00E01C00E01C00E01C00E01C00E01C00E21C00E71C00E71C00E7FF807EFF807E
FF8038181E7F9D1A>82 D<03F1C00FFDC03FFFC07C0FC07003C0E003C0E001C0E001C0E001C0E0
00007000007800003F00001FF00007FE0000FF00000F800003C00001C00000E00000E06000E0E0
00E0E000E0E001C0F001C0FC0780FFFF80EFFE00E3F800131E7D9D1A>I<7FFFFEFFFFFEFFFFFE
E0380EE0380EE0380EE0380E003800003800003800003800003800003800003800003800003800
00380000380000380000380000380000380000380000380000380000380000380003FF8003FF80
03FF80171E7F9D1A>I<FF83FEFF83FEFF83FE1C00701C00701C00701C00701C00701C00701C00
701C00701C00701C00701C00701C00701C00701C00701C00701C00701C00701C00701C00701C00
700E00E00E00E00701C00783C003FF8001FF00007C00171E7F9D1A>I<3FFFF87FFFF87FFFF870
00707000E07001E07001C0000380000780000700000E00001E00001C0000380000780000F00000
E00001C00003C0000380000700000F00000E00381C00383C0038380038700038FFFFF8FFFFF8FF
FFF8151E7E9D1A>90 D<1FF0003FFC007FFE00780F00300700000380000380007F8007FF801FFF
803F8380780380700380E00380E00380E00380700780780F803FFFFC1FFDFC07F0FC16157D941A
>97 D<FE0000FE0000FE00000E00000E00000E00000E00000E00000E00000E3E000EFF800FFFE0
0FC1F00F80700F00380E00380E001C0E001C0E001C0E001C0E001C0E001C0E001C0F00380F0078
0F80F00FC1E00FFFC00EFF80063E00161E7F9D1A>I<00FF8003FFC00FFFE01F01E03C00C07800
00700000700000E00000E00000E00000E00000E000007000007000007800703C00701F01F00FFF
E003FFC000FE0014157D941A>I<001FC0001FC0001FC00001C00001C00001C00001C00001C000
01C001F1C007FDC00FFFC01E0FC03C07C07803C07001C0E001C0E001C0E001C0E001C0E001C0E0
01C0E001C07003C07003C03807C03E0FC01FFFFC07FDFC01F1FC161E7E9D1A>I<01F80007FF00
0FFF801E07C03C01C07800E07000E0E00070E00070FFFFF0FFFFF0FFFFF0E00000700000700000
7800703C00701F01F00FFFE003FFC000FE0014157D941A>I<0007E0001FF0003FF800787800F0
3000E00000E00000E00000E0007FFFF0FFFFF0FFFFF000E00000E00000E00000E00000E00000E0
0000E00000E00000E00000E00000E00000E00000E00000E00000E0003FFF807FFFC03FFF80151E
7F9D1A>I<FE0000FE0000FE00000E00000E00000E00000E00000E00000E00000E3E000EFF800F
FFC00FC1C00F80E00F00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E00E
00E00E00E00E00E0FFE3FEFFE7FEFFE3FE171E7F9D1A>104 D<00C00001E00001E00000C00000
00000000000000000000000000000000007FE0007FE0007FE00000E00000E00000E00000E00000
E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E0007FFF80FFFFC07F
FF80121F7C9E1A>I<FFE000FFE000FFE00000E00000E00000E00000E00000E00000E00000E000
00E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E000
00E00000E00000E00000E000FFFFE0FFFFE0FFFFE0131E7D9D1A>108 D<7CE0E000FFFBF8007F
FFF8001F1F1C001E1E1C001E1E1C001C1C1C001C1C1C001C1C1C001C1C1C001C1C1C001C1C1C00
1C1C1C001C1C1C001C1C1C001C1C1C001C1C1C001C1C1C007F1F1F00FF9F9F807F1F1F00191580
941A>I<FE3E00FEFF80FFFFC00FC1C00F80E00F00E00E00E00E00E00E00E00E00E00E00E00E00
E00E00E00E00E00E00E00E00E00E00E00E00E0FFE3FEFFE7FEFFE3FE17157F941A>I<01F00007
FC001FFF003E0F803C07807803C07001C0E000E0E000E0E000E0E000E0E000E0E000E0F001E070
01C07803C03C07803E0F801FFF0007FC0001F00013157D941A>I<FE3E00FEFF80FFFFE00FC1F0
0F80700F00380E00380E001C0E001C0E001C0E001C0E001C0E001C0E001C0F00380F00780F80F0
0FC1E00FFFC00EFF800E3E000E00000E00000E00000E00000E00000E00000E00000E0000FFE000
FFE000FFE00016207F941A>I<7F83F0FF8FF87FBFFC03FC3C03F01803E00003C00003C0000380
000380000380000380000380000380000380000380000380000380007FFF00FFFF007FFF001615
7E941A>114 D<07FB801FFF807FFF80780780E00380E00380E003807800007FC0003FFC0007FE
00003F800007806001C0E001C0E001C0F003C0FC0780FFFF00EFFE00E3F80012157C941A>I<00
C00001C00001C00001C00001C00001C00001C0007FFFE0FFFFE0FFFFE001C00001C00001C00001
C00001C00001C00001C00001C00001C00001C00001C07001C07001C07001C07000E0E000FFE000
7FC0001F00141C7F9B1A>I<FE0FE0FE0FE0FE0FE00E00E00E00E00E00E00E00E00E00E00E00E0
0E00E00E00E00E00E00E00E00E00E00E00E00E00E00E01E00F03E007FFFE03FFFE00FCFE17157F
941A>I<7F83FCFFC7FE7F83FC0E00E00E00E00E00E00701C00701C00701C00383800383800383
8001C70001C70001C70000EE0000EE0000EE00007C00007C0000380017157F941A>I
E /Fe 1 50 df<03000700FF000700070007000700070007000700070007000700070007000700
07000700070007007FF00C157E9412>49 D E /Ff 66 123 df<001F83E000706E3000C07C7801
80F8780380F0780700700007007000070070000700700007007000070070000700700007007000
07007000FFFFFFC007007000070070000700700007007000070070000700700007007000070070
000700700007007000070070000700700007007000070070000700700007007000070070000700
7000070078007FE3FF801D2380A21C>11 D<001FC0000070200000C01000018038000380780007
0078000700300007000000070000000700000007000000070000000700000007000000FFFFF800
070078000700380007003800070038000700380007003800070038000700380007003800070038
000700380007003800070038000700380007003800070038000700380007003800070038007FE1
FF80192380A21B>I<003C000000006200000000C2000000018100000001810000000381000000
038100000003810000000381000000038200000003820000000384000000038800000001C80000
0001D000000001E003FF8001C0007C0000E000380001E000300001F00020000270004000047000
40000838008000183C008000301C010000701E020000700E020000F007040000F007880000F003
880000F001D00100F000E0010078007003003800B802003C031C04000E0C0E0C0003F003F00021
257EA326>38 D<70F8FCFC7404040404080810102040060F7CA20E>I<00200040008001000300
060004000C000C00180018003000300030007000600060006000E000E000E000E000E000E000E0
00E000E000E000E000E000E000E0006000600060007000300030003000180018000C000C000400
0600030001000080004000200B327CA413>I<800040002000100018000C000400060006000300
030001800180018001C000C000C000C000E000E000E000E000E000E000E000E000E000E000E000
E000E000E000C000C000C001C0018001800180030003000600060004000C001800100020004000
80000B327DA413>I<70F8FCFC7404040404080810102040060F7C840E>44
D<FFE0FFE00B027F8B10>I<70F8F8F87005057C840E>I<01F000071C000C060018030038038038
03807001C07001C07001C07001C0F001E0F001E0F001E0F001E0F001E0F001E0F001E0F001E0F0
01E0F001E0F001E0F001E0F001E0F001E07001C07001C07001C07803C03803803803801C07000C
0600071C0001F00013227EA018>48 D<008003800F80F380038003800380038003800380038003
800380038003800380038003800380038003800380038003800380038003800380038003800380
07C0FFFE0F217CA018>I<03F0000C1C001007002007804003C04003C08003E0F003E0F801E0F8
01E0F801E02003E00003E00003C00003C0000780000700000E00001C0000180000300000600000
C0000180000100000200200400200800201800603000403FFFC07FFFC0FFFFC013217EA018>I<
03F8000C1E001007002007804007C07807C07803C07807C03807C0000780000780000700000F00
000E0000380003F000001C00000F000007800007800003C00003C00003E02003E07003E0F803E0
F803E0F003C04003C0400780200780100F000C1C0003F00013227EA018>I<000200000600000E
00000E00001E00001E00002E00004E00004E00008E00008E00010E00020E00020E00040E00040E
00080E00100E00100E00200E00200E00400E00800E00FFFFF8000E00000E00000E00000E00000E
00000E00000E00001F0001FFF015217FA018>I<1000801E07001FFF001FFE001FF80013E00010
000010000010000010000010000010000010F800130E001407001803801003800001C00001C000
01E00001E00001E00001E07001E0F001E0F001E0E001C08001C04003C04003802007001006000C
1C0003F00013227EA018>I<007E0001C1000300800601C00E03C01C03C0180180380000380000
780000700000700000F0F800F30C00F40600F40300F80380F801C0F001C0F001E0F001E0F001E0
F001E0F001E07001E07001E07001E03801C03801C01803801C03000C0600070C0001F00013227E
A018>I<01F000060C000C0600180700380380700380700380F001C0F001C0F001C0F001E0F001
E0F001E0F001E0F001E07001E07003E03803E01805E00C05E00619E003E1E00001C00001C00001
C0000380000380300300780700780600700C002018001030000FC00013227EA018>57
D<70F8F8F870000000000000000000000070F8F8F87005157C940E>I<00018000000180000001
80000003C0000003C0000003C0000005E0000005E000000DF0000008F0000008F0000010F80000
1078000010780000203C0000203C0000203C0000401E0000401E0000401E0000800F0000800F00
00FFFF000100078001000780030007C0020003C0020003C0040003E0040001E0040001E00C0000
F00C0000F03E0001F8FF800FFF20237EA225>65 D<FFFFF8000F800E0007800780078003C00780
03E0078001E0078001F0078001F0078001F0078001F0078001F0078001E0078003E0078007C007
800F8007803E0007FFFE0007800780078003C0078001E0078001F0078000F0078000F8078000F8
078000F8078000F8078000F8078000F8078001F0078001F0078003E0078007C00F800F00FFFFFC
001D227EA123>I<0007E0100038183000E0063001C00170038000F0070000F00E0000701E0000
701C0000303C0000303C0000307C0000107800001078000010F8000000F8000000F8000000F800
0000F8000000F8000000F8000000F800000078000000780000107C0000103C0000103C0000101C
0000201E0000200E000040070000400380008001C0010000E0020000381C000007E0001C247DA2
23>I<FFFFF0000F801E0007800700078003C0078001C0078000E0078000F00780007807800078
0780007C0780003C0780003C0780003C0780003E0780003E0780003E0780003E0780003E078000
3E0780003E0780003E0780003E0780003C0780003C0780007C0780007807800078078000F00780
00E0078001E0078003C0078007000F801E00FFFFF8001F227EA125>I<FFFFFFC00F8007C00780
01C0078000C0078000400780004007800060078000200780002007800020078020200780200007
80200007802000078060000780E00007FFE0000780E00007806000078020000780200007802000
078020080780000807800008078000100780001007800010078000300780003007800070078000
E00F8003E0FFFFFFE01D227EA121>I<FFFFFFC00F8007C0078001C0078000C007800040078000
400780006007800020078000200780002007802020078020000780200007802000078060000780
E00007FFE0000780E0000780600007802000078020000780200007802000078000000780000007
8000000780000007800000078000000780000007800000078000000FC00000FFFE00001B227EA1
20>I<FFFC3FFF0FC003F0078001E0078001E0078001E0078001E0078001E0078001E0078001E0
078001E0078001E0078001E0078001E0078001E0078001E0078001E007FFFFE0078001E0078001
E0078001E0078001E0078001E0078001E0078001E0078001E0078001E0078001E0078001E00780
01E0078001E0078001E0078001E00FC003F0FFFC3FFF20227EA125>72 D<FFFC0FC00780078007
800780078007800780078007800780078007800780078007800780078007800780078007800780
078007800780078007800780078007800FC0FFFC0E227EA112>I<03FFF0001F00000F00000F00
000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00000F00
000F00000F00000F00000F00000F00000F00000F00000F00000F00700F00F80F00F80F00F80E00
F01E00401C0020380018700007C00014237EA119>I<FFFE00000FC00000078000000780000007
800000078000000780000007800000078000000780000007800000078000000780000007800000
078000000780000007800000078000000780000007800000078000000780000007800080078000
800780008007800080078001800780018007800100078003000780030007800F000F803F00FFFF
FF0019227EA11E>76 D<FFC00003FF0FC00003F007C00003E005E00005E005E00005E004F00009
E004F00009E004F00009E004780011E004780011E004780011E0043C0021E0043C0021E0043C00
21E0041E0041E0041E0041E0040F0081E0040F0081E0040F0081E004078101E004078101E00407
8101E00403C201E00403C201E00401E401E00401E401E00401E401E00400F801E00400F801E004
00F801E004007001E00E007001E01F007003F0FFE0203FFF28227EA12D>I<FF8007FF07C000F8
07C0007005E0002004F0002004F0002004780020047C0020043C0020041E0020041F0020040F00
2004078020040780200403C0200401E0200401E0200400F0200400F8200400782004003C200400
3E2004001E2004000F2004000F20040007A0040003E0040003E0040001E0040001E0040000E00E
0000601F000060FFE0002020227EA125>I<000FE00000783C0000E00E0003C00780078003C00F
0001E00E0000E01E0000F03C0000783C0000787C00007C7C00007C7800003C7800003CF800003E
F800003EF800003EF800003EF800003EF800003EF800003EF800003EF800003E7800003C7C0000
7C7C00007C3C0000783E0000F81E0000F00F0001E00F0001E0078003C003C0078000E00E000078
3C00000FE0001F247DA226>I<FFFFF0000F803C0007800F0007800780078007C0078003C00780
03E0078003E0078003E0078003E0078003E0078003E0078003C0078007C00780078007800F0007
803C0007FFF0000780000007800000078000000780000007800000078000000780000007800000
0780000007800000078000000780000007800000078000000FC00000FFFC00001B227EA121>I<
FFFFE000000F803C000007800E00000780078000078007C000078003C000078003E000078003E0
00078003E000078003E000078003E000078003C000078007C000078007800007800E000007803C
000007FFE000000780700000078038000007801C000007801E000007800E000007800F00000780
0F000007800F000007800F000007800F800007800F800007800F800007800F808007800FC08007
8007C0800FC003C100FFFC01E2000000007C0021237EA124>82 D<03F0200C0C601802603001E0
7000E0600060E00060E00060E00020E00020E00020F00000F000007800007F00003FF0001FFE00
0FFF0003FF80003FC00007E00001E00000F00000F0000070800070800070800070800070C00060
C00060E000C0F000C0C80180C6070081FC0014247DA21B>I<7FFFFFF878078078600780184007
80084007800840078008C007800C80078004800780048007800480078004000780000007800000
078000000780000007800000078000000780000007800000078000000780000007800000078000
000780000007800000078000000780000007800000078000000780000007800000078000000FC0
0003FFFF001E227EA123>I<FFFC07FF0FC000F807800070078000200780002007800020078000
200780002007800020078000200780002007800020078000200780002007800020078000200780
002007800020078000200780002007800020078000200780002007800020078000200780002003
80004003C0004003C0004001C0008000E000800060010000300600001C08000003F00020237EA1
25>I<FFF0007FC01F80001F000F00000C000780000C000780000800078000080003C000100003
C000100003E000300001E000200001E000200000F000400000F000400000F00040000078008000
0078008000007C018000003C010000003C010000001E020000001E020000001F020000000F0400
00000F040000000F8C0000000788000000078800000003D000000003D000000003F000000001E0
00000001E000000000C000000000C000000000C0000022237FA125>I<FFF03FFC03FE1F8007E0
00F80F0003C000700F0003C000200F0003C00020078001E00040078001E00040078001E0004003
C002F0008003C002F0008003C002F0008001E00478010001E00478010001E00478010000F0083C
020000F0083C020000F0083C020000F8183E06000078101E04000078101E0400007C101E040000
3C200F0800003C200F0800003C200F0800001E40079000001E40079000001E40079000000F8003
E000000F8003E000000F8003E00000070001C00000070001C00000070001C00000030001800000
02000080002F237FA132>I<FEFEC0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0
C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0FEFE07317BA40E>91 D<FEFE06060606060606
0606060606060606060606060606060606060606060606060606060606060606060606060606FE
FE07317FA40E>93 D<0FE0001838003C0C003C0E0018070000070000070000070000FF0007C700
1E07003C0700780700700700F00708F00708F00708F00F087817083C23900FC1E015157E9418>
97 D<0E0000FE00001E00000E00000E00000E00000E00000E00000E00000E00000E00000E0000
0E00000E00000E1F000E61C00E80600F00300E00380E003C0E001C0E001E0E001E0E001E0E001E
0E001E0E001E0E001E0E001C0E003C0E00380F00700C80600C41C0083F0017237FA21B>I<01FE
000703000C07801C0780380300780000700000F00000F00000F00000F00000F00000F00000F000
007000007800403800401C00800C010007060001F80012157E9416>I<0000E0000FE00001E000
00E00000E00000E00000E00000E00000E00000E00000E00000E00000E00000E001F8E00704E00C
02E01C01E03800E07800E07000E0F000E0F000E0F000E0F000E0F000E0F000E0F000E07000E078
00E03800E01801E00C02E0070CF001F0FE17237EA21B>I<01FC000707000C03801C01C03801C0
7801E07000E0F000E0FFFFE0F00000F00000F00000F00000F000007000007800203800201C0040
0E008007030000FC0013157F9416>I<003C00C6018F038F030F07000700070007000700070007
0007000700FFF80700070007000700070007000700070007000700070007000700070007000700
0700070007807FF8102380A20F>I<00007001F198071E180E0E181C07001C07003C07803C0780
3C07803C07801C07001C07000E0E000F1C0019F0001000001000001800001800001FFE000FFFC0
0FFFE03800F0600030400018C00018C00018C000186000306000303800E00E038003FE0015217F
9518>I<0E0000FE00001E00000E00000E00000E00000E00000E00000E00000E00000E00000E00
000E00000E00000E1F800E60C00E80E00F00700F00700E00700E00700E00700E00700E00700E00
700E00700E00700E00700E00700E00700E00700E00700E00700E0070FFE7FF18237FA21B>I<1C
003E003E003E001C00000000000000000000000000000000000E00FE001E000E000E000E000E00
0E000E000E000E000E000E000E000E000E000E000E000E000E00FFC00A227FA10E>I<01C003E0
03E003E001C00000000000000000000000000000000001E00FE001E000E000E000E000E000E000
E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E060E0F0C0
F18061803E000B2C82A10F>I<0E0000FE00001E00000E00000E00000E00000E00000E00000E00
000E00000E00000E00000E00000E00000E03FC0E01F00E01C00E01800E02000E04000E08000E10
000E38000EF8000F1C000E1E000E0E000E07000E07800E03C00E01C00E01E00E00F00E00F8FFE3
FE17237FA21A>I<0E00FE001E000E000E000E000E000E000E000E000E000E000E000E000E000E
000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E00FFE0
0B237FA20E>I<0E1FC07F00FE60E183801E807201C00F003C00E00F003C00E00E003800E00E00
3800E00E003800E00E003800E00E003800E00E003800E00E003800E00E003800E00E003800E00E
003800E00E003800E00E003800E00E003800E00E003800E00E003800E0FFE3FF8FFE27157F942A
>I<0E1F80FE60C01E80E00F00700F00700E00700E00700E00700E00700E00700E00700E00700E
00700E00700E00700E00700E00700E00700E00700E0070FFE7FF18157F941B>I<01FC00070700
0C01801800C03800E0700070700070F00078F00078F00078F00078F00078F00078F00078700070
7800F03800E01C01C00E038007070001FC0015157F9418>I<0E1F00FE61C00E80600F00700E00
380E003C0E001C0E001E0E001E0E001E0E001E0E001E0E001E0E001E0E003C0E003C0E00380F00
700E80E00E41C00E3F000E00000E00000E00000E00000E00000E00000E00000E00000E0000FFE0
00171F7F941B>I<01F8200704600E02601C01603801E07800E07800E0F000E0F000E0F000E0F0
00E0F000E0F000E0F000E07000E07800E03801E01C01E00C02E0070CE001F0E00000E00000E000
00E00000E00000E00000E00000E00000E00000E0000FFE171F7E941A>I<0E3CFE461E8F0F0F0F
060F000E000E000E000E000E000E000E000E000E000E000E000E000E000F00FFF010157F9413>
I<0F8830786018C018C008C008E008F0007F803FE00FF001F8003C801C800C800CC00CC008E018
D0308FC00E157E9413>I<02000200020002000600060006000E001E003E00FFF80E000E000E00
0E000E000E000E000E000E000E000E000E040E040E040E040E040E040708030801F00E1F7F9E13
>I<0E0070FE07F01E00F00E00700E00700E00700E00700E00700E00700E00700E00700E00700E
00700E00700E00700E00700E00F00E00F006017003827800FC7F18157F941B>I<FFC1FE1E0078
0E00300E00200E002007004007004003808003808003808001C10001C10000E20000E20000E200
00740000740000380000380000380000100017157F941A>I<FF8FF8FF1E01E03C1C01C0180E01
C0180E01E0100E01E01007026020070270200702702003843040038438400384384001C8188001
C81C8001C81C8000F00D0000F00F0000F00F0000600600006006000060060020157F9423>I<FF
83FE1F01F00E00C007008003810003830001C20000E400007800007800003800003C00004E0000
8E000187000103800201C00401E00C00E03E01F0FF03FE17157F941A>I<FFC1FE1E00780E0030
0E00200E002007004007004003808003808003808001C10001C10000E20000E20000E200007400
007400003800003800003800001000001000002000002000002000004000F04000F08000F18000
4300003C0000171F7F941A>I<3FFFC0380380300780200700600E00401C00403C004038000070
0000E00001E00001C0000380400700400F00400E00C01C0080380080780180700780FFFF801215
7F9416>I E /Fg 30 123 df<003FE000E0E001C1E00381E00700E00700E00700E00700E00700
E00700E00700E00700E0FFFFE00700E00700E00700E00700E00700E00700E00700E00700E00700
E00700E00700E00700E00700E00700E00700E00700E00700E00700E07FE7FE1720809F19>13
D<70F8FCFC74040404080810102040060E7C840D>44 D<FFC0FFC00A027F8A0F>I<70F8F8F870
05057C840D>I<FFFC0FC007800780078007800780078007800780078007800780078007800780
07800780078007800780078007800780078007800780078007800FC0FFFC0E1F7F9E10>73
D<FFFFE0000F80780007801C0007801E0007800F0007800F8007800F8007800F8007800F800780
0F8007800F8007800F0007801E0007801C000780780007FFE00007800000078000000780000007
800000078000000780000007800000078000000780000007800000078000000780000007800000
0FC00000FFFC0000191F7E9E1F>80 D<7FFFFFE0780F01E0600F0060400F0020400F0020C00F00
30800F0010800F0010800F0010800F0010000F0000000F0000000F0000000F0000000F0000000F
0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F0000000F000000
0F0000000F0000000F0000000F0000001F800007FFFE001C1F7E9E21>84
D<1FE000303000781800781C00300E00000E00000E00000E0000FE00078E001E0E00380E00780E
00F00E10F00E10F00E10F01E10781E103867200F83C014147E9317>97 D<0E0000FE00000E0000
0E00000E00000E00000E00000E00000E00000E00000E00000E00000E3E000EC3800F01C00F00E0
0E00E00E00700E00700E00780E00780E00780E00780E00780E00780E00700E00700E00E00F00E0
0D01C00CC300083E0015207F9F19>I<03F80E0C1C1E381E380C70007000F000F000F000F000F0
00F00070007000380138011C020E0C03F010147E9314>I<000380003F80000380000380000380
00038000038000038000038000038000038000038003E380061B801C0780380380380380700380
700380F00380F00380F00380F00380F00380F003807003807003803803803807801C07800E1B80
03E3F815207E9F19>I<03F0000E1C001C0E00380700380700700700700380F00380F00380FFFF
80F00000F00000F000007000007000003800801800800C010007060001F80011147F9314>I<00
7C00C6018F038F07060700070007000700070007000700FFF00700070007000700070007000700
070007000700070007000700070007000700070007007FF01020809F0E>I<0000E003E3300E3C
301C1C30380E00780F00780F00780F00780F00780F00380E001C1C001E380033E0002000002000
003000003000003FFE001FFF800FFFC03001E0600070C00030C00030C00030C000306000603000
C01C038003FC00141F7F9417>I<0E0000FE00000E00000E00000E00000E00000E00000E00000E
00000E00000E00000E00000E3E000E43000E81800F01C00F01C00E01C00E01C00E01C00E01C00E
01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C0FFE7FC16207F9F19>I<
1C001E003E001E001C000000000000000000000000000E007E000E000E000E000E000E000E000E
000E000E000E000E000E000E000E000E000E000E00FFC00A1F809E0C>I<0E0000FE00000E0000
0E00000E00000E00000E00000E00000E00000E00000E00000E00000E0FF00E03C00E03000E0200
0E04000E08000E10000E30000E70000EF8000F38000E1C000E1E000E0E000E07000E07800E0380
0E03C00E03E0FFCFF815207F9F18>107 D<0E00FE000E000E000E000E000E000E000E000E000E
000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E000E00
0E00FFE00B20809F0C>I<0E1F01F000FE618618000E81C81C000F00F00E000F00F00E000E00E0
0E000E00E00E000E00E00E000E00E00E000E00E00E000E00E00E000E00E00E000E00E00E000E00
E00E000E00E00E000E00E00E000E00E00E000E00E00E000E00E00E00FFE7FE7FE023147F9326>
I<0E3E00FE43000E81800F01C00F01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01
C00E01C00E01C00E01C00E01C00E01C00E01C0FFE7FC16147F9319>I<01F800070E001C038038
01C03801C07000E07000E0F000F0F000F0F000F0F000F0F000F0F000F07000E07000E03801C038
01C01C0380070E0001F80014147F9317>I<0E3E00FEC3800F01C00F00E00E00E00E00F00E0070
0E00780E00780E00780E00780E00780E00780E00700E00F00E00E00F01E00F01C00EC3000E3E00
0E00000E00000E00000E00000E00000E00000E00000E0000FFE000151D7F9319>I<0E78FE8C0F
1E0F1E0F0C0E000E000E000E000E000E000E000E000E000E000E000E000E000E00FFE00F147F93
12>114 D<1F9030704030C010C010C010E00078007F803FE00FF00070803880188018C018C018
E030D0608F800D147E9312>I<020002000200060006000E000E003E00FFF80E000E000E000E00
0E000E000E000E000E000E000E000E080E080E080E080E080610031001E00D1C7F9B12>I<0E01
C0FE1FC00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01C00E01
C00E01C00E01C00E03C00603C0030DC001F1FC16147F9319>I<FF83F81E01E01C00C00E00800E
00800E008007010007010003820003820003820001C40001C40001EC0000E80000E80000700000
700000700000200015147F9318>I<FF9FE1FC3C0780701C0300601C0380200E0380400E038040
0E03C0400707C0800704C0800704E080038861000388710003C8730001D0320001D03A0000F03C
0000E01C0000E01C0000601800004008001E147F9321>I<FF83F81E01E01C00C00E00800E0080
0E008007010007010003820003820003820001C40001C40001EC0000E80000E800007000007000
007000002000002000004000004000004000F08000F08000F100006200003C0000151D7F9318>
121 D<3FFF380E200E201C40384078407000E001E001C00380078007010E011E011C0338027006
700EFFFE10147F9314>I E /Fh 7 117 df<0000E000000000E000000001F000000001F0000000
01F000000003F800000003F800000006FC00000006FC0000000EFE0000000C7E0000000C7E0000
00183F000000183F000000303F800000301F800000701FC00000600FC00000600FC00000C007E0
0000FFFFE00001FFFFF000018003F000018003F000030001F800030001F800060001FC00060000
FC000E0000FE00FFE00FFFE0FFE00FFFE0231F7E9E28>65 D<07FC001FFF003F0F803F07C03F03
E03F03E00C03E00003E0007FE007FBE01F03E03C03E07C03E0F803E0F803E0F803E0FC05E07E0D
E03FF8FE0FE07E17147F9319>97 D<FF0000FF00001F00001F00001F00001F00001F00001F0000
1F00001F00001F00001F00001F1FC01F7FF01FE0F81F807C1F007E1F003E1F003E1F003F1F003F
1F003F1F003F1F003F1F003F1F003E1F003E1F007C1F807C1EC1F81C7FE0181F8018207E9F1D>
I<01FE0007FF801F0FC03E0FC03E0FC07C0FC07C0300FC0000FC0000FC0000FC0000FC0000FC00
007C00007E00003E00603F00C01F81C007FF0001FC0013147E9317>I<FE3E00FE7F801ECFC01E
8FC01E8FC01F8FC01F03001F00001F00001F00001F00001F00001F00001F00001F00001F00001F
00001F0000FFF000FFF00012147E9316>114 D<0FE63FFE701E600EE006E006F800FFC07FF83F
FC1FFE03FE001FC007C007E007F006F81EFFFCC7F010147E9315>I<0180018001800380038003
8007800F803F80FFFCFFFC0F800F800F800F800F800F800F800F800F800F800F860F860F860F86
0F8607CC03F801F00F1D7F9C14>I E /Fi 12 122 df<70F8F8F0E005057A840F>46
D<0007FFC000003C0000003C0000003C00000078000000780000007800000078000000F0000000
F0000000F0000000F0000001E0000001E0000001E0000001E0000003C0000003C0000003C00000
03C00000078000000780000007800000078000000F0000000F0000380F0000780F0000F81E0000
F81E0000F03C0000403800004070000021E000001F8000001A237CA11A>74
D<0001F020000E0C40001802C0003001C0006001C000E0018000C0018001C0018001C0018003C0
010003C0010003C0000003C0000003E0000001F8000001FF000000FFE000007FF000001FF80000
03FC0000007C0000003C0000001E0000001E0000001E0020001C0020001C0020001C0020001800
6000380060003000700060007000C000C8018000C607000081FC00001B247DA21B>83
D<00F8C00185C00705C00E03800E03801C03803C0380380700780700780700780700F00E00F00E
00F00E00F00E10F01C20701C20703C20305C40308C400F078014157B9419>97
D<00F803840E021C023C0238027804F018FFE0F000F000E000E000E000E000E002E00260047018
30600F800F157A9416>101 D<00F0000FE00000E00000E00000E00001C00001C00001C00001C0
00038000038000038000038000070000071F0007218007C0C00F00E00F00E00E00E00E00E01C01
C01C01C01C01C01C01C0380380380380380380380704700708700E08700E10700610E006206003
C016237DA219>104 D<00C001E001C001C0000000000000000000000000000000001C00230043
0043008700870087000E000E001C001C001C00380038003840708070807080710032001C000B21
7BA00F>I<0000E00001E00001E00000C000000000000000000000000000000000000000000000
0000001E00002300004380008380008380010380010380000700000700000700000700000E0000
0E00000E00000E00001C00001C00001C00001C0000380000380000380000380000700000700000
700070E000F0C000F180006300003C0000132B82A00F>I<1C0F002631C04740C08780E08780E0
8700E08700E00E01C00E01C00E01C00E01C01C03801C03801C03801C0704380708380E08380E10
3806107006203003C016157B941B>110 D<007E0001C3000381800701C00E01C01C01E03C01E0
3801E07801E07801E07801E0F003C0F003C0F00380F00780700700700E00700C00301800187000
07C00013157B9419>I<00FC000183000200800401800C03800C03000C00000F00000FF00007FC
0003FE00003E00000F00000700700700F00600F00600E004004008002030001FC00011157D9414
>115 D<1E00302300704380704380E08380E08700E08700E00701C00E01C00E01C00E01C01C03
801C03801C03801C03801C07001C07001C07001C0F000C3E0003CE00000E00000E00001C00601C
00F03800F03000E0600080C0004380003E0000141F7B9418>121 D E /Fj
25 120 df<FFFFFFFFF00000FFFFFFFFFF0000FFFFFFFFFFC00000FFC000FFF00000FFC0000FFC
0000FFC00007FE0000FFC00001FF0000FFC00000FF8000FFC000007FC000FFC000003FE000FFC0
00003FE000FFC000001FF000FFC000001FF000FFC000001FF800FFC000000FF800FFC000000FFC
00FFC000000FFC00FFC000000FFC00FFC000000FFC00FFC000000FFE00FFC000000FFE00FFC000
000FFE00FFC000000FFE00FFC000000FFE00FFC000000FFE00FFC000000FFE00FFC000000FFE00
FFC000000FFE00FFC000000FFE00FFC000000FFE00FFC000000FFC00FFC000000FFC00FFC00000
0FFC00FFC000000FFC00FFC000000FF800FFC000001FF800FFC000001FF800FFC000001FF000FF
C000003FE000FFC000003FE000FFC000007FC000FFC00000FF8000FFC00001FF0000FFC00003FE
0000FFC0000FFC0000FFC0007FF000FFFFFFFFFFE000FFFFFFFFFF0000FFFFFFFFF0000037317E
B03F>68 D<000003FF80018000003FFFF003800001FFFFFC0F800007FF007F1F80001FF8000FBF
80003FE00003FF8000FF800000FF8001FF0000007F8003FE0000003F8007FC0000003F8007FC00
00001F800FF80000001F801FF80000000F801FF00000000F803FF000000007803FF00000000780
7FF000000007807FE000000007807FE000000000007FE00000000000FFE00000000000FFE00000
000000FFE00000000000FFE00000000000FFE00000000000FFE00000000000FFE00000000000FF
E00000000000FFE00007FFFFFE7FE00007FFFFFE7FE00007FFFFFE7FE0000001FF807FF0000001
FF803FF0000001FF803FF0000001FF801FF0000001FF801FF8000001FF800FF8000001FF8007FC
000001FF8007FC000001FF8003FE000001FF8001FF000001FF8000FF800001FF80003FE00003FF
80001FF80007FF800007FF803F3F800001FFFFFE1F8000003FFFF80780000003FFC0018037317B
B041>71 D<FFFFFFC0FFFFFFC0FFFFFFC000FFC00000FFC00000FFC00000FFC00000FFC00000FF
C00000FFC00000FFC00000FFC00000FFC00000FFC00000FFC00000FFC00000FFC00000FFC00000
FFC00000FFC00000FFC00000FFC00000FFC00000FFC00000FFC00000FFC00000FFC00000FFC000
00FFC00000FFC00000FFC00000FFC00000FFC00000FFC00000FFC00000FFC00000FFC00000FFC0
0000FFC00000FFC00000FFC00000FFC00000FFC00000FFC00000FFC00000FFC000FFFFFFC0FFFF
FFC0FFFFFFC01A317EB01F>73 D<FFFF8000000001FFFF80FFFFC000000003FFFF80FFFFE00000
0007FFFF8000FFE000000007FF800000EFF00000000EFF800000EFF00000000EFF800000EFF000
00000EFF800000E7F80000001CFF800000E7F80000001CFF800000E3FC00000038FF800000E3FC
00000038FF800000E1FE00000070FF800000E1FE00000070FF800000E0FF000000E0FF800000E0
FF000000E0FF800000E07F800001C0FF800000E07F800001C0FF800000E03FC0000380FF800000
E03FC0000380FF800000E03FC0000380FF800000E01FE0000700FF800000E01FE0000700FF8000
00E00FF0000E00FF800000E00FF0000E00FF800000E007F8001C00FF800000E007F8001C00FF80
0000E003FC003800FF800000E003FC003800FF800000E001FE007000FF800000E001FE007000FF
800000E000FF00E000FF800000E000FF00E000FF800000E000FF00E000FF800000E0007F81C000
FF800000E0007F81C000FF800000E0003FC38000FF800000E0003FC38000FF800000E0001FE700
00FF800000E0001FE70000FF800000E0000FFE0000FF800000E0000FFE0000FF800000E00007FC
0000FF800000E00007FC0000FF800000E00007FC0000FF800000E00003F80000FF800001F00003
F80000FF8000FFFFE001F000FFFFFF80FFFFE001F000FFFFFF80FFFFE000E000FFFFFF8049317E
B04E>77 D<FFFFFFFFE000FFFFFFFFFE00FFFFFFFFFF8000FFC001FFE000FFC0003FF000FFC000
1FF800FFC0000FFC00FFC0000FFC00FFC00007FE00FFC00007FE00FFC00007FF00FFC00007FF00
FFC00007FF00FFC00007FF00FFC00007FF00FFC00007FF00FFC00007FF00FFC00007FE00FFC000
07FE00FFC0000FFC00FFC0000FFC00FFC0001FF800FFC0003FF000FFC001FFE000FFFFFFFF8000
FFFFFFFE0000FFFFFFE00000FFC000000000FFC000000000FFC000000000FFC000000000FFC000
000000FFC000000000FFC000000000FFC000000000FFC000000000FFC000000000FFC000000000
FFC000000000FFC000000000FFC000000000FFC000000000FFC000000000FFC000000000FFC000
000000FFC0000000FFFFFFC00000FFFFFFC00000FFFFFFC0000030317EB038>80
D<FFFFFFFFC0000000FFFFFFFFFC000000FFFFFFFFFF80000000FFC001FFE0000000FFC0003FF0
000000FFC0000FFC000000FFC00007FC000000FFC00007FE000000FFC00003FF000000FFC00003
FF000000FFC00003FF800000FFC00003FF800000FFC00003FF800000FFC00003FF800000FFC000
03FF800000FFC00003FF800000FFC00003FF000000FFC00003FF000000FFC00007FE000000FFC0
0007FC000000FFC0000FFC000000FFC0003FF0000000FFC001FFE0000000FFFFFFFF80000000FF
FFFFFC00000000FFFFFFFE00000000FFC003FF00000000FFC000FFC0000000FFC0007FE0000000
FFC0003FE0000000FFC0003FF0000000FFC0001FF0000000FFC0001FF8000000FFC0001FF80000
00FFC0001FF8000000FFC0001FF8000000FFC0001FF8000000FFC0001FFC000000FFC0001FFC00
0000FFC0001FFC000000FFC0001FFC004000FFC0001FFC00E000FFC0001FFE00E000FFC0000FFE
00E000FFC0000FFF01C000FFC00007FF83C0FFFFFFC003FFFF80FFFFFFC000FFFF00FFFFFFC000
0FFC003B317EB03E>82 D<001FF0018000FFFF038003FFFFC78007F00FFF800F8001FF801F0000
7F803F00001F803E00000F807E00000F807E00000780FE00000780FE00000780FE00000380FF00
000380FF00000380FF80000000FFE00000007FFC0000007FFFE000007FFFFE00003FFFFFC0001F
FFFFF0001FFFFFF8000FFFFFFC0003FFFFFE0001FFFFFF00007FFFFF80001FFFFF800000FFFFC0
000007FFC0000000FFE00000003FE00000003FE00000001FE06000001FE0E000000FE0E000000F
E0E000000FE0E000000FC0F000000FC0F000000FC0F800001F80FC00001F80FF00003F00FFC000
7E00FFFC01FC00F1FFFFF800E03FFFE000C007FF000023317BB02E>I<007FF8000003FFFF0000
07FFFFC0000FE01FE0001FF007F0001FF003F8001FF003FC001FF001FE000FE001FE0007C001FE
00010001FE00000001FE00000001FE000001FFFE00003FFFFE0001FFF1FE0007FE01FE000FF001
FE001FC001FE003F8001FE007F8001FE00FF0001FE00FF0001FE00FF0001FE00FF0001FE00FF00
03FE007F8003FE007FC00EFE003FF03CFF000FFFF87FF807FFF03FF800FF800FF825207E9F28>
97 D<0007FF00007FFFE000FFFFF003FC03F807F007FC0FE007FC1FE007FC3FC007FC3FC003F8
7FC001F07F8000407F800000FF800000FF800000FF800000FF800000FF800000FF800000FF8000
00FF8000007F8000007FC000007FC000003FC0000E3FE0000E1FE0001C0FF0001C07F8007803FF
01F000FFFFE0007FFF800007FC001F207D9F25>99 D<00000007E0000003FFE0000003FFE00000
03FFE00000003FE00000001FE00000001FE00000001FE00000001FE00000001FE00000001FE000
00001FE00000001FE00000001FE00000001FE00000001FE00000001FE00000001FE0000FF81FE0
007FFF1FE001FFFFDFE003FE03FFE007F800FFE00FE0003FE01FE0001FE03FC0001FE03FC0001F
E07F80001FE07F80001FE07F80001FE0FF80001FE0FF80001FE0FF80001FE0FF80001FE0FF8000
1FE0FF80001FE0FF80001FE0FF80001FE07F80001FE07F80001FE07F80001FE03FC0001FE03FC0
001FE01FC0003FE00FE0007FE007F001FFE003FC07DFF001FFFF9FFF007FFE1FFF000FF01FFF28
327DB12E>I<0007FC0000003FFF800000FFFFE00003FC07F00007F801F8000FE000FC001FE000
7E003FC0007E003FC0003F007FC0003F007F80003F007F80003F80FF80003F80FF80003F80FFFF
FFFF80FFFFFFFF80FFFFFFFF80FF80000000FF80000000FF800000007F800000007F800000003F
C00000003FC00003801FC00003801FE00007800FF0000F0007F8001E0003FE00FC0000FFFFF800
003FFFE0000003FF000021207E9F26>I<0000FF000007FFC0001FFFE0003FC7F0007F0FF800FE
0FF801FE0FF801FC0FF803FC07F003FC03E003FC01C003FC000003FC000003FC000003FC000003
FC000003FC000003FC0000FFFFF800FFFFF800FFFFF80003FC000003FC000003FC000003FC0000
03FC000003FC000003FC000003FC000003FC000003FC000003FC000003FC000003FC000003FC00
0003FC000003FC000003FC000003FC000003FC000003FC000003FC000003FC000003FC000003FC
000003FC000003FC00007FFFF0007FFFF0007FFFF0001D327EB119>I<001FF007E000FFFE3FF0
01FFFF7FF807F83FF1F80FE00FE1F80FE00FE0F01FC007F0601FC007F0003FC007F8003FC007F8
003FC007F8003FC007F8003FC007F8001FC007F0001FC007F0000FE00FE0000FE00FE00007F83F
C00007FFFF000006FFFE00000E1FF000000E000000001E000000001E000000001F000000001F80
0000001FFFFFC0000FFFFFF8000FFFFFFE0007FFFFFF0003FFFFFF8007FFFFFFC01FFFFFFFE03F
00007FE07E00000FF0FC000007F0FC000003F0FC000003F0FC000003F0FC000003F07E000007E0
3F00000FC01FC0003F800FF801FF0007FFFFFE0000FFFFF000001FFF8000252F7E9F29>I<01F8
00000000FFF800000000FFF800000000FFF8000000000FF80000000007F80000000007F8000000
0007F80000000007F80000000007F80000000007F80000000007F80000000007F80000000007F8
0000000007F80000000007F80000000007F80000000007F80000000007F807F8000007F83FFF00
0007F87FFF800007F8F03FC00007F9C01FE00007FB000FE00007FE000FF00007FE000FF00007FC
000FF00007FC000FF00007F8000FF00007F8000FF00007F8000FF00007F8000FF00007F8000FF0
0007F8000FF00007F8000FF00007F8000FF00007F8000FF00007F8000FF00007F8000FF00007F8
000FF00007F8000FF00007F8000FF00007F8000FF00007F8000FF00007F8000FF00007F8000FF0
0007F8000FF000FFFFC1FFFF80FFFFC1FFFF80FFFFC1FFFF8029327DB12E>I<03C0000FF0000F
F0001FF8001FF8001FFC001FF8001FF8000FF0000FF00003C00000000000000000000000000000
000000000000000000000001F800FFF800FFF800FFF8000FF80007F80007F80007F80007F80007
F80007F80007F80007F80007F80007F80007F80007F80007F80007F80007F80007F80007F80007
F80007F80007F80007F80007F80007F80007F800FFFF80FFFF80FFFF8011337DB217>I<01F800
FFF800FFF800FFF8000FF80007F80007F80007F80007F80007F80007F80007F80007F80007F800
07F80007F80007F80007F80007F80007F80007F80007F80007F80007F80007F80007F80007F800
07F80007F80007F80007F80007F80007F80007F80007F80007F80007F80007F80007F80007F800
07F80007F80007F80007F80007F80007F80007F800FFFFC0FFFFC0FFFFC012327DB117>108
D<03F007F8000FF000FFF03FFF007FFE00FFF07FFF80FFFF00FFF0F03FC1E07F800FF1C01FE380
3FC007F3000FE6001FC007F6000FFC001FE007FE000FFC001FE007FC000FF8001FE007FC000FF8
001FE007F8000FF0001FE007F8000FF0001FE007F8000FF0001FE007F8000FF0001FE007F8000F
F0001FE007F8000FF0001FE007F8000FF0001FE007F8000FF0001FE007F8000FF0001FE007F800
0FF0001FE007F8000FF0001FE007F8000FF0001FE007F8000FF0001FE007F8000FF0001FE007F8
000FF0001FE007F8000FF0001FE007F8000FF0001FE007F8000FF0001FE007F8000FF0001FE0FF
FFC1FFFF83FFFFFFFFC1FFFF83FFFFFFFFC1FFFF83FFFF40207D9F47>I<03F007F80000FFF03F
FF0000FFF07FFF8000FFF0F03FC0000FF1C01FE00007F3000FE00007F6000FF00007FE000FF000
07FC000FF00007FC000FF00007F8000FF00007F8000FF00007F8000FF00007F8000FF00007F800
0FF00007F8000FF00007F8000FF00007F8000FF00007F8000FF00007F8000FF00007F8000FF000
07F8000FF00007F8000FF00007F8000FF00007F8000FF00007F8000FF00007F8000FF00007F800
0FF00007F8000FF000FFFFC1FFFF80FFFFC1FFFF80FFFFC1FFFF8029207D9F2E>I<0007FE0000
003FFFC00000FFFFF00003FC03FC0007F000FE000FE0007F001FC0003F803FC0003FC03FC0003F
C07F80001FE07F80001FE07F80001FE0FF80001FF0FF80001FF0FF80001FF0FF80001FF0FF8000
1FF0FF80001FF0FF80001FF0FF80001FF07F80001FE07F80001FE07F80001FE03FC0003FC03FC0
003FC01FE0007F800FE0007F0007F801FE0003FE07FC0001FFFFF800003FFFC0000007FE000024
207E9F29>I<01F80FF000FFF87FFE00FFF9FFFF80FFFFE07FC00FFF001FE007FE000FF007F800
07F807F80007FC07F80003FC07F80003FE07F80003FE07F80001FE07F80001FF07F80001FF07F8
0001FF07F80001FF07F80001FF07F80001FF07F80001FF07F80001FF07F80001FE07F80003FE07
F80003FE07F80003FC07F80007FC07FC0007F807FE000FF007FF001FE007FBE07FC007F9FFFF00
07F87FFE0007F81FE00007F800000007F800000007F800000007F800000007F800000007F80000
0007F800000007F800000007F800000007F800000007F8000000FFFFC00000FFFFC00000FFFFC0
0000282E7E9F2E>I<03F03F00FFF07FC0FFF1FFE0FFF3C7F00FF38FF807F70FF807F60FF807FE
0FF807FC07F007FC03E007FC008007F8000007F8000007F8000007F8000007F8000007F8000007
F8000007F8000007F8000007F8000007F8000007F8000007F8000007F8000007F8000007F80000
07F8000007F80000FFFFE000FFFFE000FFFFE0001D207E9F22>114 D<00FF870007FFEF001FFF
FF003F007F003C001F0078000F00F8000700F8000700F8000700FC000700FF000000FFF800007F
FFC0003FFFF0003FFFFC000FFFFE0007FFFF0001FFFF80001FFF800000FFC000001FC060000FC0
E00007C0E00007C0F00007C0F8000780F8000F80FE000F00FF803E00FFFFFC00F3FFF800C07FC0
001A207D9F21>I<00380000380000380000380000380000780000780000780000F80000F80001
F80003F80007F8001FF800FFFFFEFFFFFEFFFFFE07F80007F80007F80007F80007F80007F80007
F80007F80007F80007F80007F80007F80007F80007F80007F80007F80007F80707F80707F80707
F80707F80707F80707F80703F80E03FC0E01FE1C00FFF8007FF0000FE0182E7EAD20>I<01F800
03F000FFF801FFF000FFF801FFF000FFF801FFF0000FF8001FF00007F8000FF00007F8000FF000
07F8000FF00007F8000FF00007F8000FF00007F8000FF00007F8000FF00007F8000FF00007F800
0FF00007F8000FF00007F8000FF00007F8000FF00007F8000FF00007F8000FF00007F8000FF000
07F8000FF00007F8000FF00007F8000FF00007F8000FF00007F8001FF00007F8001FF00003F800
3FF00003F8006FF00001FE03CFF80000FFFF8FFF80007FFF0FFF80000FFC0FFF8029207D9F2E>
I<FFFF0FFFF01FFEFFFF0FFFF01FFEFFFF0FFFF01FFE0FF0007E0001F00FF8007F0001E007F800
7F0001C007F8003F8003C003FC003F80038003FC007FC0038003FE007FC0078001FE00FFC00700
01FF00EFE00F0000FF00EFE00E0000FF01C7F00E00007F81C7F01C00007F83C7F01C00007FC383
F83C00003FC383F83800003FC701FC3800001FE701FC7000001FEF01FC7000001FFE00FEF00000
0FFE00FEE000000FFC007FE0000007FC007FC0000007FC007FC0000007F8003FC0000003F8003F
80000003F0001F80000001F0001F00000001E0000F00000000E0000E000037207E9F3C>119
D E end
%%EndProlog
%%BeginSetup
%%Feature: *Resolution 300
TeXDict begin
%%EndSetup
%%Page: 1 1
bop 308 315 a Fj(More)28 b(Getting)f(Started)g(with)g(Prosp)r(ero)838
376 y Fi(Sanjay)18 b(Joshi)873 486 y Fh(Abstract)354 570 y
Fg(This)d(do)q(cumen)o(t)f(is)h(in)o(tended)h(as)d(a)h(guide)h(to)f(the)g
(Prosp)q(ero)g(do)q(cumen)o(ta-)286 627 y(tion)d(,)h(for)f(those)g(in)o
(terested)h(in)g(kno)o(wing)f(more)g(ab)q(out)g(Prosp)q(ero.)19
b(It)11 b(presen)o(ts)286 683 y(a)16 b(brief)i(surv)o(ey)f(of)f(the)h
(literature)h(on)f(Prosp)q(ero)f(and)h(brie\015y)h(describ)q(es)h(the)286
740 y(organization)c(of)g(Prosp)q(ero.)164 906 y Fj(In)n(tro)r(duction)164
1016 y Ff(Prosp)q(ero)h(is)f(a)h(useful)f(to)q(ol)h(for)f(organizing)h(in)o
(ternet)d(resources.)21 b(It)15 b(is)g(a)h(distributed)164
1076 y(\014le)j(system,)g(whic)o(h)g(allo)o(ws)h(the)g(users)g(to)h(organize)
f(ob)s(jects)f(lo)q(cated)h(on)h(di\013eren)o(t)164 1136 y(no)q(des)d(in)e
(the)h(In)o(ternet,)e Fi(i.e.)24 b Ff(sev)o(eral)16 b(users)h(ma)o(y)e
(construct)i(m)o(ultiple,)d(customized)164 1196 y(views)k(of)g(the)g(system.)
25 b(One)18 b(of)h(the)f(b)q(est)g(pap)q(ers)h(whic)o(h)f(explains)f(this)h
(concept)g(is)164 1256 y([1].)28 b(This)19 b(should)h(b)q(e)e(the)h(\014rst)g
(pap)q(er)g(to)h(read)f(if)f(y)o(ou)h(are)f(in)o(terested)g(in)g(learning)164
1317 y(ab)q(out)g(Prosp)q(ero.)528 1299 y Fe(1)164 1483 y Fj(Implem)n(en)n
(tation)24 b(Details)164 1593 y Ff(The)14 b(initial)g(pap)q(er)h([1])f(giv)o
(es)f(the)h(principles)f(b)q(ehind)i(Prosp)q(ero.)22 b(Ho)o(w)o(ev)o(er,)12
b(the)j(b)q(est)164 1653 y(do)q(cumen)o(t)20 b(to)i(learn)g(ab)q(out)h(the)e
(implem)o(en)o(tation)e(details)i(is)h(Cli\013ord)g(Neuman's)164
1713 y(Ph.D.)12 b(dissertation)g([3].)20 b(This)12 b(do)q(cumen)o(t)f([3])h
(is)g(a)o(v)m(ailable)g(b)o(y)g(anon)o(ymous)g Fd(FTP)f Ff(from)164
1773 y Fd(PROSPERO.I)o(SI.)o(ED)o(U)d Ff(as)j Fd(/pub/prospe)o(ro/)o(pap)o
(er)o(s/p)o(ros)o(pe)o(ro-)o(neu)o(man)o(-t)o(hes)o(is.)o(ps)p
Ff(.)164 1833 y(The)j(app)q(endices)h(A)e(and)i(D)g(&)f(E,)g(resp)q(ectiv)o
(ely)e(of)j([3])f(ha)o(v)o(e)f(since)h(b)q(een)g(revised)f(and)164
1893 y(are)18 b(a)o(v)m(ailable)f(as)h(a)g(User's)f(Man)o(ual)h([2])f(and)h
(a)h(Proto)q(col)f(Man)o(ual)g([4].)25 b(The)18 b(User's)164
1954 y(Man)o(ual)c([2])g(should)h(b)q(e)f(read)h(after)f(reading)g([1].)20
b(It)14 b(describ)q(es)g(ho)o(w)h(to)g(use)f(the)g(basic)164
2014 y(features)i(of)h(Prosp)q(ero.)p 164 2108 648 2 v 220
2139 a Fc(1)239 2154 y Fb(All)22 b(the)i(references)h(men)o(tioned)d(in)h
(this)g(do)q(cumen)o(t)g(are)g(a)o(v)n(ailable)e(via)h(anon)o(ymous)g
Fa(FTP)164 2204 y Fb(from)c Fa(/pub/papers)f Fb(directory)j(at)f
Fa(PROSPERO.ISI.EDU)p Fb(.)d(They)k(are)f(also)g(a)o(v)n(ailable)e(as)j(part)
f(of)164 2253 y(the)h(Prosp)q(ero)i(distribution.)35 b(A)20
b(go)q(o)q(d)g(w)o(a)o(y)f(to)h(obtain)f(the)h(Prosp)q(ero)i(distribution,)e
(if)f(y)o(ou're)164 2303 y(not)13 b(running)g(Prosp)q(ero)i(y)o(et,)e(is)h
(to)f(anon)o(ymously)e Fa(FTP)21 b(/pub/prospero/pros)o(pero)o(.tar.)o(Z)11
b Fb(from)164 2353 y Fa(PROSPERO.ISI.EDU)c Fb(.)i(Before)i(setting)f(up)g
(Prosp)q(ero,)i(the)e(do)q(cumen)o(ts)g(in)f Fa(getting-started.txt)o
Fb(,)164 2403 y Fa(INSTALLATION)p Fb(,)i Fa(INSTALLATION)p
718 2403 14 2 v 13 w(u)p Fb(,)i(and)h Fa(INSTALLATION)p 1123
2403 V 13 w(s)g Fb(should)f(b)q(e)i(read.)961 2599 y Ff(1)p
eop
%%Page: 2 2
bop 237 307 a Ff(After)18 b(getting)h(familiar)e(with)i(Prosp)q(ero)i
(through)f([2],)e(the)h(next)g(do)q(cumen)o(t)f(to)164 367
y(read)j(is)h([3].)36 b(Sp)q(ecially)l(,)21 b(c)o(hapter)g(6)g(and)h(app)q
(endices)g(B)f(and)h(C)f(are)h(v)o(ery)e(useful.)164 428 y(Chapter)15
b(6)f(la)o(ys)g(out)h(the)f(design)g(of)h(Prosp)q(ero.)21 b(The)15
b(design)f(is)g(based)h(on)f(the)g(clien)o(t-)164 488 y(serv)o(er)j(mo)q
(del.)25 b(The)18 b(clien)o(ts)e(handle)i(the)g(name)e(resolution)i(and)h
(directory)e(serv)o(ers)164 548 y(on)i(the)g(hosts)h(storing)f(the)g
(directories)e(lo)q(ok)i(up)h(the)e(requested)g(names)g(in)g(the)h(di-)164
608 y(rectories)c(and)i(return)f(the)g(result)g(to)h(the)f(clien)o(t.)237
729 y(After)e(the)i(distribution)e(has)i(b)q(een)g(un)o(tarred,)e(the)h
(directory)g(serv)o(er)f(source)h(\014les)164 789 y(are)c(lo)q(cated)h(in)f
(a)h(directory)e(called)h Fd(server)p Ff(.)17 b(The)12 b(serv)o(er)e(uses)i
(the)f(functions)g(de\014ned)164 849 y(in)17 b(the)g(library)g
Fd(lib/psrv)p Ff(.)22 b(The)c(clien)o(t)e(source)h(\014les)g(are)h(lo)q
(cated)f(in)h(the)f(directory)164 909 y Fd(user)12 b Ff(and)h(use)g(the)g
(functions)g(from)f(t)o(w)o(o)h(libraries,)g Fd(lib/pfsli)o(b)d
Ff(and)k Fd(lib/pcompa)o(t)164 969 y Ff(libraries.)19 b(These)14
b(t)o(w)o(o)f(libraries,)g Fd(pfslib)f Ff(and)i Fd(pcompat)p
Ff(,)d(are)j(describ)q(ed)f(in)g(detail)g(in)164 1029 y(app)q(endix)i(B)g(of)
h([3].)k(The)15 b(app)q(endix)h(C)f(describ)q(es)g(the)g(structures)g
(\(directory)g(infor-)164 1090 y(mation\))h(main)o(tained)f(b)o(y)i(the)g
(Prosp)q(ero)h(\014le)e(system.)23 b(In)16 b(addition)h(to)h(reading)f(ap-)
164 1150 y(p)q(endix)d(C,)f(a)i(few)e(of)i(the)e(related)h(\014les)f(in)h
Fd(include)d Ff(directory)i(should)h(b)q(e)h(consulted,)164
1210 y(sp)q(eci\014cally)h Fd(include/pfs)o(.h)p Ff(.)23 b(The)18
b(Prosp)q(ero)h(clien)o(ts)d(and)j(directory)e(serv)o(ers)g(use)164
1270 y(the)22 b(Reliable)g(Datagram)h(Proto)q(col)g(\(RDP\))g(to)g(comm)o
(unicate)c(with)k(eac)o(h)f(other.)164 1330 y(The)15 b(detailed)f
(description)g(of)h(this)g(Proto)q(col)g(is)g(giv)o(en)f(in)g([4],)h(whic)o
(h)f(is)g(a)o(v)m(ailable)g(b)o(y)164 1391 y(anon)o(ymous)i(FTP)g(as)h
Fd(/pub/prospe)o(ro/)o(do)o(c/p)o(ros)o(per)o(o-)o(pro)o(toc)o(ol)o(-v5)o
(.ps)o(.Z)p Ff(.)164 1617 y Fj(References)224 1727 y Ff(1.)24
b(Neuman,)17 b(B.)h(C.,)g(Prosp)q(ero:)27 b(A)18 b(T)l(o)q(ol)i(for)f
(Organizing)f(In)o(ternet)f(Resources,)286 1787 y(Electronic)9
b(Net)o(w)o(orking:)18 b(Researc)o(h,)11 b(Applications,)f(and)i(P)o(olicy)l
(,)e(2\(1\),)i(Spring)286 1847 y(1992.)224 1949 y(2.)24 b(Neuman,)16
b(B.)i(C.,)f(The)h(Prosp)q(ero)i(User's)d(Man)o(ual,)h(Univ)o(ersit)o(y)d(of)
k(W)l(ashing-)286 2009 y(ton,)d(June,)g(1991.)224 2111 y(3.)24
b(Neuman,)18 b(B.)g(C.,)h(The)g(Virtual)f(System)f(Mo)q(del:)27
b(A)18 b(Scalable)h(Approac)o(h)g(to)286 2171 y(Organizing)e(Large)i
(Systems,)d(Departmen)o(t)f(of)j(Computer)e(Science)g(and)i(En-)286
2231 y(gineering,)d(T)l(ec)o(h.)20 b(Rep.)h(92-06-04,)d(Univ)o(ersit)o(y)13
b(of)j(W)l(ashington,)h(June,)e(1992.)224 2333 y(4.)24 b(Neuman,)14
b(B.)h(C.)g(and)h(Augart,)g(S.,)f(The)h(Prosp)q(ero)h(Proto)q(col,)f(V)l
(ersion)f(5,)h(ISI,)286 2393 y(USC,)g(Aug.,)f(1992.)961 2599
y(2)p eop
%%Trailer
end
userdict /end-hook known{end-hook}if
%%EOF

View File

@@ -0,0 +1,49 @@
\documentstyle[12pt]{article}
\begin{document}
\begin{center}
{\Large {\bf More Getting Started with Prospero\\}}
{\it Sanjay Joshi}
\end{center}
\begin {abstract}
This document is intended as a guide to the Prospero documentation , for those interested in knowing more about Prospero. It presents a brief survey of the literature on Prospero and briefly describes the organization of Prospero.
\end{abstract}
\section* {Introduction}
Prospero is a useful tool for organizing internet resources. It is a distributed file system, which allows the users to organize objects located on different nodes in the Internet, {\em i.e.} several users may construct multiple, customized views of the system. One of the best papers which explains this concept is [1]. This should be the first paper to read if you are interested in learning about Prospero.
\footnote {All the references mentioned in this document are available via anonymous {\tt FTP} from {\tt /pub/papers} directory at {\tt PROSPERO.ISI.EDU}. They are also available as part of the Prospero distribution. A good way to obtain the Prospero distribution, if you're not running Prospero yet, is to anonymously {\tt FTP /pub/prospero/prospero.tar.Z} from {\tt PROSPERO.ISI.EDU} . Before setting up Prospero, the documents in {\tt getting-started.txt}, {\tt INSTALLATION}, {\tt INSTALLATION\_u}, and {\tt INSTALLATION\_s} should be read.}
\section* {Implementation Details}
The initial paper [1] gives the principles behind Prospero. However, the best document to learn about the implementation details is Clifford Neuman's Ph.D. dissertation [3]. This document [3] is available by anonymous {\tt FTP} from {\tt PROSPERO.ISI.EDU} as {\tt /pub/prospero/papers/prospero-neuman-thesis.ps}. The appendices A and D \& E, respectively of [3] have since been revised and are available as a
User's Manual [2] and a Protocol Manual [4]. The User's Manual [2] should be read after reading [1]. It describes how to use the basic features of Prospero. \\
After getting familiar with Prospero through [2], the next document to read is [3]. Specially, chapter 6 and appendices B and C are very useful. Chapter 6 lays out the design of Prospero. The design is based on the client-server model. The clients handle the name resolution and directory servers on the hosts storing the directories look up the requested names in the directories and return the result to the client. \\
After the distribution has been untarred, the directory server source files are located in a directory called {\tt server}. The server uses the functions defined in the library {\tt lib/psrv}. The client source files are located in the directory {\tt user} and use the functions from two libraries, {\tt lib/pfslib} and {\tt lib/pcompat} libraries. These two libraries, {\tt pfslib} and {\tt pcompat}, are described in detail in appendix B of [3]. The appendix C describes the structures (directory information) maintained by the Prospero file system. In addition to reading appendix C, a few of the related files in {\tt include} directory should be consulted, specifically {\tt include/pfs.h}. The Prospero clients and directory servers use the Reliable Datagram Protocol (RDP) to communicate with each other. The detailed description of this Protocol is given in [4], which is available by
anonymous FTP as {\tt /pub/prospero/doc/prospero-protocol-v5.ps.Z}. \\
\section* {References}
\begin{enumerate}
\item Neuman, B. C., Prospero: A Tool for Organizing Internet Resources,
Electronic Networking: Research, Applications, and Policy, 2(1), Spring 1992.
\item
Neuman, B. C., The Prospero User's Manual, University of Washington, June, 1991.
\item
Neuman, B. C., The Virtual System Model: A Scalable Approach to Organizing
Large Systems, Department of Computer Science and Engineering, Tech.
Rep. 92-06-04, University of Washington, June, 1992.
\item
Neuman, B. C. and Augart, S., The Prospero Protocol, Version 5, ISI, USC,
Aug., 1992.
\end{enumerate}
\end{document}

277
prospero/doc/names.txt Normal file
View File

@@ -0,0 +1,277 @@
This is Mitra's understanding of Prospero's different naming schemes and
their interrelationship, based upon phone conversations with Steve.
I found
and still find these incredibly confusing, and this is a first cut at
a summary. I've neccessarily skipped over much of the details to avoid
confusing the reader. I'm using examples based upon our system which -
I believe - accepts all the sensible defaults. The system is flexible
enough that none of this could be correct, but in that case you'd probably
know enough not to be reading this.
There are three different naming schemes for files around Prospero.
A) The regular unix filename, this is rarely used in Prospero
B) User-level-names, which are relative to virtual file systems. Similarly to
unix filenames, if you specify these without leading /, then they are
relative to the current working directory. (see environment below)
user-level names are always relative to the virtual file system you
are set up in. This is the state set up by the "vfsetup" command.
C) Hsonames - Host Specific Object Names, always accompanied by a host(port)
to specify which host(port) it's meaningfull at. This concept is often
simplified to "hsoname". Except in the case of gateways, hsonames are
usually the real (unix) name of the file on the remote system.
Who uses what names
-------------------
Most of the data structures - vlink, vdirs etc use host(port) and hsoname (C).
Various functions map between them - especially rd_vlink will take a User-level
name (B), and return a vlink (host(port) and hsoname) (C)
Most commands - e.g. set_atr take User-level names (B)
vln -n is used to create a user-level name (B) for a hsoname (C)
Variations on User Level names
------------------------------
The way that a user-level name appears is significantly more complicated
than a standard unix filename. For what follows, lets assume you
are set up in the Virtual File System "aol", and that your system is setup
the way most are.
/ is the root of your virtual system
xxx/yyy is relative to the current workign directory (see vwd)
swa:/zzz means /zzz relative to the virtual file system "swa"
#/INET/EDU/ISI/swa means the swa virtual file system on isi.edu, this is
sometimes called a global-name, with # being the global root.
swa:zzz Has a currently undefined meeting DONT USE IT
In reality, these are all based upon certain links being
present in the user-level directory /VIRTUAL-SYSTEMS.
Expressed differently, your virtual system looks like this
/ Root of virtual system
/aol Typically your home directory.
/VIRTUAL-SYSTEMS/ Links to other virtual systems
/VIRTUAL-SYSTEMS/swa/ Link to swa's virtual system description (also
often stated as "link to swa's virtual system"). This
can also be expressed as swa:/VS-DESCRIPTION
/VIRUTAL-SYSTEMS/swa/ROOT Link to the root of swa's virtual system system. This
can also be expressed as swa:/
/VIRTUAL-SYSTEMS/#/ Link to global root aka "#/"
/VS-DESCRIPTION/ Definition of your virtual system
/VS-DESCRIPTION/ROOT/ Root of your virtual system same as "/"
/VS-DESCRIPTION/HOME/ Home directory, "cwd" at startup, same as /aol
To link a virtual system into this - use the command
vln #/INET/EDU/ISI/swa:/VS-DESCRIPTION /VIRTUAL-SYSTEMS/swa
Unix filesystem to virtual file system
--------------------------------------
hsoname's map to Unix names real easy - they are the same except for hsonames
that don't start with a slash. e.g.: GOPHER-GW/PATH.NET(8001)/1/
user-level names are more complicated, the root of the "aol" virtual file
system will (according to swa) typically be /usr/pfs/pfsdat/local-vsystems/aol
On our system, I find the following structure:
/usr/pfs Root of our prospero data area
/usr/pfs/pfsdat Real hierarchy of prospero data
/usr/pfs/pfsdat/vs Dont know what this is - there is NOTHING in it
/usr/pfs/shadow Start of shadow hierarcy, links and attributes
/usr/pfs/shadow/xyz Shadow hierarchy for Unix directory /xyz
/usr/pfs/shadow/usr/pfs/pfsdat Shadow of data area
/usr/pfs/shadow/usr/pfs/pfsdat/local_vsystems/aol root of aol virtual system
/usr/pfs/shadow/usr/pfs/pfsdat/local_vsystems/master virtual-systems directory
is master copy of all vs's at this site
/usr/pfs/shadow/usr/pfs/pfsdata/local_vsystems/master/storage specifies
hosts where virtual-systems on this site can be stored
/usr/pfs/shadow/usr/pfs/pfsdat/local_vsystems/protoype copied by newvs
/usr/pfs/shadow/usr/pfs/pfsdat/vs/ junk created by newpsite?
/usr/pfs/shadow/usr/pfs/pfsdat/vs:1 ditto
Each directory in the shadow typically contains a file
".directory#contents" with attribute information and links in it.
(This is soon to be supreseded by .directory#object)
Environment variables
---------------------
Certain environment variables give the base which maps user-level names to
hsonames and Unix names. vfsetup sets these up. The hsoname is always the
Unix name for the directory, but beware, this directory may only exist under
the shadow hierarchy.
VSWORK User-level name for cwd
VSWORK_HOST Host of cwd
VSWORK_FILE hsname of cwd
VSDESC_HOST and VSDESC_FILE host and hsoname of VSDESCRIPTION directory
this always has the user-level name of /VS-DESCRIPTION
VSHOME,VSHOME_HOST and VSHOME_FILE user-level, host and hsoname of
home directory.
VSROOT_HOST and VSROOT_FILE host and hsoname of Root directory
this always has the user-level name of /
(Note at some time the _FILE variables will probably be replaced with _HSONAME)
Other information:
------------------
See the manual 5.1 for more details (but absolutely ZERO examples)
vwp - will tell you the host and hsoname of the current working directory
vwd - will give the user-level name of the cwd.
Whats wrong with this!
----------------------
Having described it, here are some ideas on what is wrong with it.
*) Hsonames are long, and expose internal directory structure
to external view. Clients shoudlnt need to have to know where
my prospero directories are kept. Contrast gopher, where paths
are short and typically something like / or /Agriculture
*) Confusion of two names (hsoname and virtual name). And two
physical directory trees (real and shadow)
*) object-pool, picking another arbitrary location for directories
that appear only in the shadow hierarchy but not in the real hierarchy is
a bad move. Especially since many of these are going to aquire real
files at some point (e.g. About files).
*) Multiple steps for simple operations - e.g. needing vmkdir and mkdir
to create something, causes potential for mistakes.
*) vmv is not available, and really hard to do by hand, since
the things you are trying to move are in multiple locations.
This is Mitra's understanding of Prospero's different naming schemes and
their interrelationship, based upon phone conversations with Steve.
I found
and still find these incredibly confusing, and this is a first cut at
a summary. I've neccessarily skipped over much of the details to avoid
confusing the reader. I'm using examples based upon our system which -
I believe - accepts all the sensible defaults. The system is flexible
enough that none of this could be correct, but in that case you'd probably
know enough not to be reading this.
There are three different naming schemes for files around Prospero.
A) The regular unix filename, this is rarely used in Prospero
B) User-level-names, which are relative to virtual file systems. Similarly to
unix filenames, if you specify these without leading /, then they are
relative to the current working directory. (see environment below)
user-level names are always relative to the virtual file system you
are set up in. This is the state set up by the "vfsetup" command.
C) Hsonames - Host Specific Object Names, always accompanied by a host(port)
to specify which host(port) it's meaningfull at. This concept is often
simplified to "hsoname". Except in the case of gateways, hsonames are
usually the real (unix) name of the file on the remote system.
Who uses what names
-------------------
Most of the data structures - vlink, vdirs etc use host(port) and hsoname (C).
Various functions map between them - especially rd_vlink will take a User-level
name (B), and return a vlink (host(port) and hsoname) (C)
Most commands - e.g. set_atr take User-level names (B)
vln -n is used to create a user-level name (B) for a hsoname (C)
Variations on User Level names
------------------------------
The way that a user-level name appears is significantly more complicated
than a standard unix filename. For what follows, lets assume you
are set up in the Virtual File System "aol", and that your system is setup
the way most are.
/ is the root of your virtual system
xxx/yyy is relative to the current workign directory (see vwd)
swa:/zzz means /zzz relative to the virtual file system "swa"
#/INET/EDU/ISI/swa means the swa virtual file system on isi.edu, this is
sometimes called a global-name, with # being the global root.
swa:zzz Has a currently undefined meeting DONT USE IT
In reality, these are all based upon certain links being
present in the user-level directory /VIRTUAL-SYSTEMS.
Expressed differently, your virtual system looks like this
/ Root of virtual system
/aol Typically your home directory.
/VIRTUAL-SYSTEMS/ Links to other virtual systems
/VIRTUAL-SYSTEMS/swa/ Link to swa's virtual system description (also
often stated as "link to swa's virtual system"). This
can also be expressed as swa:/VS-DESCRIPTION
/VIRUTAL-SYSTEMS/swa/ROOT Link to the root of swa's virtual system system. This
can also be expressed as swa:/
/VIRTUAL-SYSTEMS/#/ Link to global root aka "#/"
/VS-DESCRIPTION/ Definition of your virtual system
/VS-DESCRIPTION/ROOT/ Root of your virtual system same as "/"
/VS-DESCRIPTION/HOME/ Home directory, "cwd" at startup, same as /aol
To link a virtual system into this - use the command
vln #/INET/EDU/ISI/swa:/VS-DESCRIPTION /VIRTUAL-SYSTEMS/swa
Unix filesystem to virtual file system
--------------------------------------
hsoname's map to Unix names real easy - they are the same except for hsonames
that don't start with a slash. e.g.: GOPHER-GW/PATH.NET(8001)/1/
user-level names are more complicated, the root of the "aol" virtual file
system will (according to swa) typically be /usr/pfs/pfsdat/local-vsystems/aol
On our system, I find the following structure:
/usr/pfs Root of our prospero data area
/usr/pfs/pfsdat Real hierarchy of prospero data
/usr/pfs/pfsdat/vs Dont know what this is - there is NOTHING in it
/usr/pfs/shadow Start of shadow hierarcy, links and attributes
/usr/pfs/shadow/xyz Shadow hierarchy for Unix directory /xyz
/usr/pfs/shadow/usr/pfs/pfsdat Shadow of data area
/usr/pfs/shadow/usr/pfs/pfsdat/local_vsystems/aol root of aol virtual system
/usr/pfs/shadow/usr/pfs/pfsdat/local_vsystems/master virtual-systems directory
is master copy of all vs's at this site
/usr/pfs/shadow/usr/pfs/pfsdata/local_vsystems/master/storage specifies
hosts where virtual-systems on this site can be stored
/usr/pfs/shadow/usr/pfs/pfsdat/local_vsystems/protoype copied by newvs
/usr/pfs/shadow/usr/pfs/pfsdat/vs/ junk created by newpsite?
/usr/pfs/shadow/usr/pfs/pfsdat/vs:1 ditto
Each directory in the shadow typically contains a file
".directory#contents" with attribute information and links in it.
(This is soon to be supreseded by .directory#object)
Environment variables
---------------------
Certain environment variables give the base which maps user-level names to
hsonames and Unix names. vfsetup sets these up. The hsoname is always the
Unix name for the directory, but beware, this directory may only exist under
the shadow hierarchy.
VSWORK User-level name for cwd
VSWORK_HOST Host of cwd
VSWORK_FILE hsname of cwd
VSDESC_HOST and VSDESC_FILE host and hsoname of VSDESCRIPTION directory
this always has the user-level name of /VS-DESCRIPTION
VSHOME,VSHOME_HOST and VSHOME_FILE user-level, host and hsoname of
home directory.
VSROOT_HOST and VSROOT_FILE host and hsoname of Root directory
this always has the user-level name of /
(Note at some time the _FILE variables will probably be replaced with _HSONAME)
Other information:
------------------
See the manual 5.1 for more details (but absolutely ZERO examples)
vwp - will tell you the host and hsoname of the current working directory
vwd - will give the user-level name of the cwd.

File diff suppressed because it is too large Load Diff

5043
prospero/doc/protocol.PS Normal file

File diff suppressed because it is too large Load Diff

2447
prospero/doc/protocol.tex Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,2 @@
FILES
pthreads

View File

@@ -0,0 +1,11 @@
This file describes some of the design decisions that were made during
the multi-threading of the Prospero server, and the rationales for the
decisions.
We decided to use the Posix threads library {pthreads) because:
a) it was already becoming a standard; nothing else was.
b) it had the needed functionality for our simple task
c) a free implementation existed for our development environment, SunOS 4.1.3
on the SPARC processor.

142
prospero/doc/system_calls Normal file
View File

@@ -0,0 +1,142 @@
This is a list of all the system library functions used by the
Prospero server when running in multi-threaded mode. Each function
has a description of its thread-safe status after it. This is really
an internal document, but we are providing it in this prerelease for
the sake of anyone wanting to work with the multithreaded distribution.
.div
.rem
___errno
_exit
abort Safe
alarm 2
atexit Safe
atoi Safe
atol Safe
bind Safe
calloc Safe
ceil Must be compiled with libm.so NOT libm.a
chdir 2
chmod 2
clearerr Safe
close 2
closedir Safe
connect Safe
crypt Safe
dup2 UNSAFE
called in a number of places, added assertions - probably fail!
execv 2
exit 2
fclose Safe
fcntl 2
fdopen Safe
ferror Safe
fflush Safe
fgets Safe
fileno Safe
fopen Safe
fork 2
fprintf Safe (as long as setlocale not used)
fputs Safe
fread Safe
free Safe
fseek Safe
fstat 2
ftell Safe
fwrite Safe
getc Note its a macro - evaluates arg more than once
getchar Safe
getcwd Safe
getdomainname WEIRD - not in man page
getenv Safe
geteuid 2
getgrgid UNSAFE - Use getgrgid_r
Write p_th_getgrgid that calls getgrgid_r or mutexes and copies
Used in app/ls.c(asserts single thread) & dsrfinfo(unsafely)
SWA removed
gethostbyname UNSAFE - Use gethostbyname_r
Used in various places either asserts single thread
or mutexes GETHOSTBYNAME
getpid 2
getpwuid UNSAFE use getpwuid_r
Used in various client things - asserts single thread
dsrfinfo UNSAFELY
SWA removed
getservbyname UNSAFE - Use getservbyname_r
Used in various client things - asserts single thread
getsockopt Safe
getuid 2
gmtime UNSAFE
Mutexed by PFS_TIMETOASN
inet_addr Safe
inet_ntoa Safe
isascii Safe (*setlocale)
localtime UNSAFE
Mutexed by PFS_TIMETOASN
malloc Safe
memcmp Safe
memcpy Safe
memmove Safe
memset Safe
mkdir 2
mutex_init Safe
mutex_lock Safe
mutex_trylock Safe
mutex_unlock Safe
open 2
opendir Safe
perror Safe
printf Safe (as long as setlocale not used)
putc Safe (note macro evaluates Streammultiple times)
rand UNSAFE use rand_r
SWA to look at this if assertion fails
assertions may break wais
read 2
readdir UNSAFE - Use readdir_r
Many places - asserts single threaded
dsdir UNSAFELY USED
scandir UNSAFELY USED, this is called by WAIS
realloc Safe
recvfrom Safe
rename 2
select Safe
sendto Safe
setsid 2
setsockopt Safe
sigemptyset Safe
signal 2
sigprocmask 2
sleep Safe
socket Safe
sprintf Safe
srand UNSAFE
see notes on rand
sscanf Safe
stat 2
strcasecmp Safe
strcat Safe
strchr Safe
strcmp Safe
strcpy Safe
strerror Safe
strlen Safe
strncat Safe
strncmp Safe
strncpy Safe
strrchr Safe
strstr Safe
sysinfo 2
thr_create Safe
thr_getspecific Safe
thr_keycreate Safe
thr_self Safe
thr_setspecific Safe
time 2
toupper Safe (as long as not using setlocale)
umask Safe
ungetc Safe
unlink 2
vprintf Asynch-Safe, whatever that means? ASK SUN
vsprintf Safe
write 2

View File

@@ -0,0 +1,34 @@
A Beta release of version 5.1 of the Prospero file system is now
available by anonymous FTP from PROSPERO.ISI.EDU in the file
pub/prospero/prospero.tar.Z. It can also be obtained through Prospero
itself from /releases/prospero/prospero.tar.Z
A special stripped-down version of the Prospero server is now
available, for sites that want to publish their anonymous FTP archive
areas through Prospero and don't want to worry about the full gamut of
configuration options. This can be retrieved by anonymous FTP from
PROSPERO.ISI.EDU in the file pub/prospero/prospero.ftp-only.tar.Z or
through Prospero itself from /releases/prospero/prospero.ftp-only.tar.Z
This release must be compiled with an ANSI C compiler.
Since Alpha 5.0, there have been the following substantial changes of
general interest. See the release notes (in the top-level README file
in the distribution) for a full list of changes:
The user-level name format has been enhanced. Special characters in
user-level names ('#', ':', '/', '(', ')', and now '\') can be quoted
by preceding them with a backslash ('\'). This change will be useful
as more new databases with unusual names are integrated into the
propero naming network. Library routines have been added to help in
manipulating the new name format.
The code sending names across the network has been improved; Spaces in
file names sent across the network still occasionally caused problems
in the Alpha 5.0 release; they no longer do in Beta 5.1.
A new LOCAL access method has been added. Along with it is a new
definition in pserver.h called SHARED_PREFIXES. This definition,
among other things, makes it very easy to retrieve files through NFS
on systems that run an automount demon.

View File

@@ -0,0 +1,94 @@
An Alpha release of version 5 of the Prospero file system is now
available by anonymous FTP from PROSPERO.ISI.EDU in the file
pub/prospero/prospero.tar.Z (840 blocks). It can also be obtained
through Prospero itself from /releases/prospero/prospero.tar.Z
The most important change since the last major release is that the
protocol has been significantly revised. Quoting, a feature that the
previous version of the protocol mentioned but which was never
implemented, is now fully supported. This means that filenames and
object names with spaces and other strange characters in their names
now work. This is important, since Prospero is being increasingly used to
index and organize other types of data than UNIX files. The server
will still speak the older version of the protocol to older clients.
Other significant changes since the last major release include the
following
. The code is now in ANSI C.
. Remote modification and retrieval of attributes on links and files
is now fully supported. Attributes have changed significantly.
You can modify attributes through the new set_atr client program or
through the pset_at() and pset_linkat() library routines.
Attributes that happen to be stored on the VLINK structure (such as
the link name) are now treated the same as all other attributes and
can be modified with the same commands used to modify other
attributes.
. The MAGIC-NUMBER mechanism has been generalized into an ID
mechanism. This allows Prospero to be used to experiment with
unique document identifiers (currently the subject of an IETF
working group).
. The ACCESS-METHOD attribute has been generalized. It no longer
assumes that the host providing directory information about an
object is the same host from which the object should be retrieved.
. Support for the GOPHER access method (at the moment, only on
EXTERNAL links) is now included. This means that objects of
interest you discover through Gopher can be added to the Prospeo
namespace.
. Filters have been generalized considerably. This release includes
support for PREDEFINED filters that run on the server side. Such
filters solve the security and portability problems that have
plagued filters in the past. A later release will come with a
number of predefined standard server and client filters.
. Various bug fixes and fixes for some machine dependencies
. Additional features in the Asynchronous Reliable Delivery Protocol
(ARDP; formerly the Reliable Datagram Protocol) that support new
features in the archie server and client, such as the ability for a
client to ask for how long it must wait until its query will be
serviced, and the ability to cancel pending requests. The ARDP
library is now a separate component from the rest of prospero, and
we encourage developers to use it in their applications.
. Kerberos Version 5 is now available as an authentication mechanism.
. It is now possible for the same binaries to support users running C
shell variants and Bourne shell variants.
. The server now can provide a message of the day, and the client
libraries provide support for retrieving it.
. The protocol manual has been considerably expanded and improved.
. Introduced in the last beta release and still present: a
standalone client to query archie servers, and an alternative ls
program (ALS).
The release has been tested on Suns running SunOS, DEC MIPS machines
running ULTRIX, and HP 9000 series 700 workstations running HP-UX.
Please report bugs to bug-prospero@ISI.EDU
We would like to thank the following people for bug fixes, for porting
Prospero to other machine types (and feeding back the changes), or for
adding new features.
Eric Anderson SURAnet
Joseph Boykin Encore Computer Corporation
Steve Cliffe University of Wollongong
John Curran NSF Network Service Center (NNSC)
Alan Emtage Bunyip Information Systems
George Ferguson Univeristy of Rochester
Jonathan Kamens MIT Project Athena
Brendan Kehoe Cygnus
Case Larsen Lawrence Berkeley Laboratory
Gaute Nessan University of Tromsoe, Norway
Rainer Orth University of Cologne, Germany
-- Clifford Neuman and Steven Augart

105
prospero/doc/v52.gopher.ann Normal file
View File

@@ -0,0 +1,105 @@
An Alpha release of version 5.2 of the Prospero file system is now
available by anonymous FTP from PROSPERO.ISI.EDU in the file
pub/prospero/prospero-alpha.5.2.tar.Z. It can also be obtained
through Prospero itself from /releases/prospero/prospero-alpha.5.2.tar.Z.
The name prospero.tar.Z in those directories still points to the stable
Beta 5.1 release; this has been done for the sake of the archie server
maintainers and other information providers who depend upon Prospero.
Some important changes since the last Prospero release should be of
interest to the readers of comp.infosystems.gopher:
(a) A menu-based browser client, similar to the Gopher client
(b) A gateway server which makes all of Gopherspace available through
Prospero queries.
(c) A menu-based browser API interface library to Prospero, which allows
one to easily write new browsers that use Prospero to make their underlying
calls.
The menu-based browser supports all of the basic Gopher types:
searches, text files, data files, and portals (what Gopher calls
telnet sessions). It does not yet support sophisticated display of
binary image files, reading Postscript or MIME documents, playing
sounds, or automatic decoding of uuencoded, compressed, or tarred
files. These enhancements will be added shortly; the protocol
definitions for them have already been made.
We support authenticated remote modifications to menus, though not
presently from within the browser itself. For now you will have to
learn how to use a few Prospero commands to add new menus or items and
set descriptions. We plan to eventually support remote update within
the browser itself.
Prospero, and thus menus available to the menu browser (as a Prospero
client), supports fine grained access control based on client
identity. Authentication is provided using 4 alternative
authentication mechanisms, depending on your specific needs: (a)
Kerberos (version 5); (b) per user passwords; (c) trusted port and
trusted host assertion (like the Berkeley R commands); and (d) a check
of the host from which a request originated and the asserted user
identity of the client.
Prospero provides full access control list mechanisms for those who
wish to put fine-grained permissions on particular objects or
directories. For instance, one can easily set some directories so
that anybody at your company or university can read data in them, only
a particular group of people can insert data into them, and only the
system administrator or the author of a particular piece of
information is allowed to modify and delete it. Of course, anyone who
does not need these security mechanisms can export data using the
default permissions defined on a per server basis.
An elegant new Prospero feature we're rather proud of is the search
interface. We support a variety of search methods, including direct
queries to Prospero-speaking database servers, such as Archie servers
and all Gopher servers via a Prospero-Gopher gateway. The search
servers are self defining, exporting attributes that tell the client
what to prompt for, help messages to display if requested by the user,
and how to package the search when it is sent to the server.
Client implementors need not worry about the generality of this
mechanism since they can make perfectly functional clients that use
only a small subset of the available data. The menu browser has a
subset of this search interface built into it.
The philosophy behind this work, or why we are doing this:
One of Gopher's greatest strengths is its clear, straightforward user
interface. However, the gopher protocol itself has a number of
limitations which keep it from being suitable as a universal Internet
information infrastructure, such as the fact that all updates to data
must be made through means outside the protocol (i.e., editing files
on the server) and its lack of security mechanism.
Most current Internet information services, such as Gopher, World Wide
Web, and WAIS, have their own specialized clients, servers, and
network protocols. This makes it difficult for these services to
interoperate smoothly. People attempt to address these issues with
inefficient ad-hoc gateways, such as the Gopher servers that make
Archie queries on behalf of Gopher clients, or even our own
Prospero-Gopher gateway. These are not very good solutions.
Prospero provides a framework for integrating information from diverse
sources. Client writers can work on interesting clients, and service
providers can publish their data, without needing to work on issues of
little interest to them. We explore these ideas in greater depth in
the paper 'Prospero: A Base for Building Information Infrastructure',
to be presented at the INET '93 conference in August, and available
via anonymous FTP from PROSPERO.ISI.EDU as
/pub/papers/prospero/prospero-bii.ps.Z.
We encourage others to build clients that make their queries through
Prospero and to publish their data through Prospero. We provide an
application library (much better documented in this release than in
previous ones) and a simple application interface designed
specifically for the authors of read-only menu browsers. It is also
not difficult to publish your data through Prospero, and we are eager
to work with those who wish to do so.
-- Steven Seger Augart
Research Staff, USC Information Sciences Institute
-- B. Clifford Neuman
Scientist, USC Information Sciences Institute
email: info-prospero@isi.edu

View File

@@ -0,0 +1,9 @@
FILES
README
collation-order.txt
gopher-hsonames.txt
new-acl-rights
object-interpretation.txt
pdap.txt
pfs-udp-ports.txt
wais-link-format.txt

View File

@@ -0,0 +1,4 @@
This directory is for Prospero documentation that is not yet formally
written up in the manuals but which should be distributed anyway rather
than held back for the great day when we have all the manuals in final
shape :)

View File

@@ -0,0 +1,141 @@
Revised again: 6/18/93, 11:20 am
COLLATION-ORDER is a new LINK attribute of type SEQUENCE in the
ATTRIBUTE namespace.
In this document, where I specify sequences, spaces separate tokens
within a sequence, just as they do in the Prospero protocol.
. NUMERIC
For the GOPHER implementation, the value will always be either
NUMERIC ...
or
LAST NUMERIC ...
.. NUMERIC <1st-number> <2nd-number> <3rd-number> ... <nth-number>
Multiple instances of these are ordered with lower numbers coming
before higher ones. One sorts on the <1st-number> field. If the
<1st-number> fields of two vlinks are equal, then the <2nd-number>
field is exampined, and so on. All items with a COLLATION-ORDER
attribute with NUMERIC as the 1st field will come before other menu
items. The <number> fields are arbitrary integers; clients are not
required to properly handle integers that cannot be represented in the
customary 32 bit 2s-complement representation.
If a number not present in a field, this is considered to come before
all other numbers. Therefore,
NUMERIC 1
comes before
NUMERIC 1 3
Another way of saying this is that if one value of the COLLATION-ORDER
is a proper prefix of another, the shorter item comes first.
If inappropriate values are present in a numeric
field (for example, the ASCII string 'foo'), then the ordering is
undefined. Thus,
NUMERIC 1
NUMERIC foo
is just as valid an ordering as
NUMERIC foo
NUMERIC 1
.. LAST NUMERIC <1st-number> <2nd-number> <3rd-number> ... <nth-number>
All items with a COLLATION-ORDER attribute of this form come after all
other items in the menu/directory. These are ordered just as with the
NUMERIC collation-order attribute; just as with the NUMERIC
collation-order attribute, smaller numbers go closer toward the front
of the menu and larger towards the end.
. ASCII
ASCII <major-key-string> <minor-key-string>
<even-more-minor-key-string> ...
LAST ASCII <major-key-string> <minor-key-string>
<even-more-minor-key-string> ...
This works like NUMERIC, but 'preceeding in ASCII collating sequence
comes earlier' replaces 'lower numbers coming before higher ones' in
the above discussion.
. Conflicting Values for COLLATION-ORDER ATTRIBUTE:
If two items have the same value for the COLLATION-ORDER attribute,
then they will be sorted normally, in accordance with the usual
directory sorting procedure. For now, this means sorting them in
increasing order by the ASCII values of their NAME-COMPONENT fields.
Eventually, when the DIRECTORY-ORDERING attribute is implemented, this will
change. (The DIRECTORY-ORDERING attribute and its interactions with
COLLATION-ORDER are documented separately, and we do not need to
concern ourselves with it for now.) If two items have equal sort
keys, order should be preserved.
. ASCII/NUMERIC precedence
If a directory contains some links with NUMERIC COLLATION-ORDER and
others with ASCII collation-order defined, then the NUMERIC comes
before the ASCII. This is an arbitrary choice. If a directory
contains some links with LAST NUMERIC and others with LAST ASCII, then
LAST NUMERIC precedes LAST ASCII.
<A nice move being made in gopherspace is to support -ve numbers, ordered
last, after elements with no ordering specified - Mitra>
. Marginal cases
A COLLATION-ORDER attribute with a zero-length sequence as its value
is treated as if the COLLATION-ORDER were not defined at all and is
sorted appropriately. It follows from this that simply "LAST" is an
acceptable order as well. Any items with 'LAST' defined as the
collation order go after items with LAST NUMERIC or LAST ASCII.
Note that simply "LAST" fits the model since it goes at the end, but
is then sorted compared to others as if no collation-order was
specified.
LAST without arguments comes after all other LAST's. If there are
multiple LAST's without arguments, they are considered unordered, and
order between them is based on other criteria (eventually directorey
ordering if available, and if not, the order should be preserved (i.e.
the order they were in before sorting.
. Implementation notes for Kwynn
The COLLATION-ORDER attribute will be examined within the m_get_menu()
function. m_get_menu will call get_vdir() with the GVD_NOSORT flag.
It will then call a special function (which Kwynn will write) to sort
the VLINKs returned by get_vdir(). Kwynn should look at the source to
the vl_insert(), and probably wants to insert links by calling
vl_insert() with the VLI_NOSORT option.
Don't bother implementing ASCII collation order for now. Don't bother
implementing LAST by itself.
Kwynn should write this sorting function with an eye to it possibly
becoming a part of the PFS library. When Kwynn he has time, he should
run the interface to his function by me and then write some library
documentation for it to go into the PFS library manual. Depending on
when this happens and on future discussions, we may also make this
function the default sorting routine used by vl_insert(); this must be
discussed.
Kwynn should also look at the sorting function in aq_query.c, with an
eye to his sorting function being something that we could drop into
aq_query.c as an alternative function.
The sort function Kwynn implements should be order preserving. This
will lets us run multiple sort functions on the data; first for the
minor key and then for the major key. How about taking an argument to
the sort function that is the directory ordering field for the
directory. Ignore the field for now. -bcn.
Yout sort ordering function should be in two parts, the sort code, and
a comparison function. The comparison function should be the only
place all these rules are encoded, and should be fairly
straightforward. Doing comparisons one token at a time, maintaining
perhaps one bit of state indicating whether the previous token seen
was "LAST".

View File

@@ -0,0 +1,192 @@
There are three separate servers involved in the following document:
1) GOPHER-GW Servers: servers responding to Prospero protocol queries
and making Gopher protocol queries. This server feature is
implemented and is available in Prospero release Alpha.5.2.
2) Prospero Servers that support the GOPHER database (that can read
native gopher directory format) and reply to Prospero queries. They
do not make any queries themselves. These servers have not been implemented
yet. They are not our top priority, since the GOPHER-GW server appears
to fill much of the niche that this was intended to fill. We call
them 'local Gopher database' servers.
3) Gopher servers that make Prospero protocol queries.
----
The GOPHER-GW Prospero servers (the ones that can make Gopher protocol
queries and export the results as Prospero directories (the server
that supports the GOPHER-GW Prospero database) and the Prospero
servers that can export the local Gopher hierarchy (the servers that
support the GOPHER Prospero database) will return links to Gopher
objects using the following format:
The Prospero servers export links to Gopher objects on the local
host (known to run both Gopher and Prospero) as normal Prospero links
which have normal Prospero access methods, INCLUDING the GOPHER access
method. They export links to all objects on other hosts (except for
directories/menus and searches) as Prospero EXTERNAL links with the
GOPHER access method, TELNET access method, TN3270 access method, or
AFTP access method.
They export links to Gopher menus and searches on other hosts (Recall
that all Gopher links have the form <gopher-host> <gopher-port>
<gopher-selector-string>) as links with a HOST-NAME field of some
known GOPHER-GW host and an HSONAME of the form:
GOPHER-GW/<gopher-host>(<gopher-port>)/<gopher-type-char>/<gopher-selector-string>
This canonical form means that a Gopher server which is capable of
making Prospero queries can always convert links of that form back to
normal gopher links, and return the reconstructed normal Gopher link
rather than leading the user through a series of gateways. The
gopher-type-character will always be 1 (menu) or 7 (search) when a
GOPHER-GW link is exported by a Prospero server supporting the GOPHER
database. The GOPHER-GW server will export all links to Gopher
non-menu objects as Prospero EXTERNAL links with the GOPHER access
method.
. How gopher searches are exported.
They are exported as Prospero directories with an
OBJECT-INTERPRETATION of SEARCH.
In addition, a QUERY-METHOD attribute is exported for them. This is
an instance of the more general QUERY-METHOD format (documentation not
in final form yet). The first token of the query method looks like a
procedure call. The GOPHER-GW server uses the format
gopher-query(search-words); since there is only one search string in a
gopher search, there is only one argument to the procedure call.
For the gopher query method, the 2nd token is always going to be
${search-words}.
The third and last component will always be '' for gopher searches;
this indicates that the contents of a directory are being asked for
and will be returned, not a link to a directory. So:
{ I presume this is syntactically equivalent to '*' ? - Mitra }
gopher-query(search-words) ${search-words} ''
There will also be an instance of the QUERY-ARGUMENT field. Note that 'char*' is a single word with no spaces.
search-words 'Index word(s) to search for:' 'mandatory char*' '%s' ''
And two instances of the QUERY-DOCUMENT attribute, one for
gopher-query() and one for search-words. But you don't even have to
pay attention to them for now.
To execute the search, the next request to the server will be:
DIRECTORY <search-directory-hsoname>
LIST '' COMPONENTS <search-string>
This can be implemented by a simple call to
p_get_dir(<vlink-to-directory>, <search-string>, usual dir,
usual flags, leave ACOMP set to null)
. Special cases
Gopher links to files with selector strings that start with ftp: and
contain an @ are exported with two access methods: the regular GOPHER
access methods and the AFTP access method directly to the host. The
AFTP access method is given preference. The client will then attempt
to make a direct anonymous FTP connection, if it supports the Prospero
AFTP access method. (all current Prospero clients do.) This is
considerably more efficient and more robust than putting lots of
additional load on the Gopher/AFTP gateways.
Gopher links to directories with selector strings that start with ftp:
and contain an @ are instead exported as native Prospero links to the
Prospero server running on an archie host (the default is
ARCHIE.SURA.NET, but this can be changed easily by editing the
definition in the file lib/psrv/gopher_gw/goph_gw_dsdb.c).
This bypasses the Gopher server, which would just be gatewaying
Prospero queries to that archie server.
<This is wrong, many ftp hosts arent indexed by archie, but may still
be pointed at by gopher, in the long term it should go directly to ftp
in the short term it should go through the gopher->ftp gateway. - Mitra>
. Gopher CSO type
We currently do not have a gateway that speaks CSO phonebook protocol.
(Gopher type 2). We will have to write a CSO gateway in order to
handle these. (Send email to info-prospero@isi.edu if the lack of
this gateway strongly affects you, and we'll probably move it up on
our priority list.)
< Cant this go through the gopher->cso gateway, or is this something
gopher clients handle - Mitra >
. Form for links on the local GOPHER database
HSONAMEs for Gopher menu objects on the local host (and on remote
hosts known to be running both Prospero and Gopher), when the menu is
being exported as part of the local GOPHER database, are always of
the form:
GOPHER/<gopher-port>/<gopher-type-character>/<gopher-selector-string>
. GOPHER-MENU-ITEM attribute and how to implement a Gopher server that
makes Prospero queries (this is being worked on right now):
The GOPHER-GW server will provide a GOPHER-MENU-ITEM attribute
associated with some links or directories. This is an attribute of
type SEQUENCE in the APPLICATION namespace. It is an OBJECT attribute
(which means it might be CACHED, ADDITIONAL, or REPLACEMENT -- you
know the story :)). It contains a single element -- the raw Gopher
(or Gopher+) protocol line that led to this link being generated. The
trailing CR and LF are stripped from the protocol line. You
should explicitly request this attribute, as part of the ATTRIBUTES
argument to the Prospero protocol LIST command. (In your
implementation, make sure to specify the GVD_ATTRIB flag to
p_get_dir()).
This means that a gatewaying service which translates Gopher queries
into prospero queries and exports the results as Gopher menus and objects
will never be caught in the incestuous situation of telling a gopher client
to make a gopher query to a gateway server that will be translated
into a prospero query and then translated back into a gopher query by
the responding Prospero server.
. Sidebar: How to check if a Prospero link can be exported as a raw
Gopher link (i.e, a link that doesn't involve going through your gateway).
1) Check for the presence of the GOPHER-MENU-ITEM attribute. If it's
there, you're all set.
2) Look at the ACCESS-METHOD attribute. If an object supports the
GOPHER access method, you're set.
3) Otherwise, you'll have to gateway the link yourself.
. End of sidebar
When you export a generic Prospero link as a Gopher menu entry, for
now the Gopher type character will be 0 (file) or 1 (directory).
Other types are also possible, as outlined in the
OBJECT-INTERPRETATION document (currently in doc/working-notes).
(Specifically, enough informatin is available to let you support the
Gopher SEARCH type, the TELNET, TN3270, and various image and sound
types.) The Gopher host and port for the link will be the same host
and port your Gopher server is running on. The gopher selector string
for the link will be:
ProsperoPoC/<prospero-host-name>/<prospero-hsoname>
(ProsperoPoC means 'Prospero Point of Contact'.) My gateway (the
Prospero server that exports Gopher directories) will detect such an
HSONAME and take that as a hint to test whether there is really a
Prospero hostname and hsoname that matches that. My gateway will
eventually cache the results of such tests. Your following this
convention means that my server will never return a Prospero link that
requires the client to go through my server and your server in order
to make a Prospero query that it could have made directly.
Implementation tip: Your server should fork when servicing requests
(the existing Gopher servers do this).
I have a more elaborate later implementation in mind for the Gopher
server exporting Prospero searches as if they were Gopher searches,
but this is not important right now.

View File

@@ -0,0 +1,41 @@
The more common entry appears first if multiple rights allow an
operation. The operation identifier appears second.
Object File Directory* Link* Meaning
A A A Aa Administer ACL
VYA VYA VYA VvAa View ACL
L Ll List link
Rg RG RQ RrQ Read link, get attribute or file
Wu Ww WM WmM Modify attribute, data, links
DzWu DKWM DdKWMm Delete link or attribute
EiWu EeWw EIWM Insert attributes or links, append (extend)
>) >) >) >] Add rights (that follow the symbol)
<( <( <( <[ Remove rights (that follow the symbol)
Note that there used to be a B right, which you should consider as
equivalent to A, but you should avoid using it.
The following only appear on the server maintenance ACL
S Restart server
T Terminate server
U Update system information
P Administer passwords
p P Add new password entry
A "-" sign in an ACL entry means that the specified rights are
explicitly denied.
* A small letter on a directory ACL means that this right applies by
default for links in the directory that do not specify their own
ACL or that include the directory ACL. A capital letter on a link
ACL is ignored.
** When restrictions are supported, they can be used to restrict the
specific attributes to which a right applies, or to restrict the
interpretation of an ACL entry to only the Object, File, or Directory,
or link.
Note that OBJECT, FILE, and DIRECTORY ACLs are stored in the same
place, and share the same access control list (well, directory is
different for now, but will eventually be merged).

View File

@@ -0,0 +1,256 @@
This document describes the OBJECT-INTERPRETATION attribute.
This attribute resides in the APPLICATION namespace. It is of type
SEQUENCE. It normally has OBJECT precedence.
There may be multiple instances of the OBJECT-INTERPRETATION attribute.
The first token specifies the class of the object. The class tells
the user of a simple-minded browser what you can DO with the object.
It tells the browser what icon to put up.
In general, the second token is interpreted on a per-class basis as
the particular format in use. The third and subsequent tokens depend
upon the file format in use.
(For the Prospero menu browsers, the icons we put up currently are :
for searches, . for files, ] for portals, and > for directories).
The classes are:
.. UNKNOWN This will never be sent over the network. It is used
internally by clients.
.. VOID
This class is used when the TARGET of a link is NULL. The only cases
in which this arises are (A) when a link is listable but not readable
(then the server's LIST command returns this link) and (b) when a
gopher type of 'i' is sent. (This is a little-used type supported by
Panda, the University of Iowa Gopher variant.)
A menu browser should just display this with no type character -- it's
a pure text string. All attempts to retrieve it will fail. Just look
at the MENU-ITEM-DESCRIPTION and NAME.
A server should never return such a link with any attributes except
(possibly) an OBJECT-INTERPRETATION of VOID.
.. PORTAL -- Portals are always attached to raw OBJECTs (not yet
implemented) or to EXTERNAL links. They will NEVER be attached to
FILEs or DIRECTORYs, although the implementor should not bother
checking this fact. One looks at the ACCESS-METHOD to determine how
to use it.
An OBJECT-INTERPRETATION of portal means that the process of accessing
the object leaves the user in some sort of interactive session.
. Details
PORTALS: For now, the only implementation of the PORTAL class is to
have the TELNET access method on an object. This instance of the
ACCESS METHOD token has type TELNET, and that is the 1st token. Of
the conventional next 4 arguments, only HOST is relevant. The hsoname
is ignored. The fifth argument is a set of instructions to display to
the user before opening the connection. If the fifth argument is not
present, that is the same as if it is explicitly specified as the null
string. We will later extend that to a full template, so anything
that parses this access method should ignore any additional arguments
beyond the fifth for now; they may be used later.
The conventional 4 arguments to an ACCESS METHOD are that the 2nd
token is the host type (always INTERNET-D for now), the 3rd is a
hostname, optionally followed by a port # in parentheses (in the case
of the TELNET access method, the port # is mandatory), the 4th is the
HSONAME type (always ASCII) and the fifth is the HSONAME (ignored in
this case)
If the port # is not specified in the HOST name, then the default port
for the TELNET service is used.
.. Gopher mapping
This can be served up by a Gopher server as a gopher menu/directory
containing two entries: (a) the directions, as a Gopher file. (b) the
TELNET link.
A Prospero server that makes Gopher protocol queries should serve up
the Gopher type '8' (Telnet session) as an objet with PORTAL class and
TELNET access method. If a GOPHER selector string (username) is
present, the instructions should be the literal string:
'Use the account name "<selector-string>" to log in'
This convention will guarantee that information transformed from
Gopher Protocol to Prospero format will be able to automatically be
transformed back into Gopher protocol.
The TN3270 access method is identical to the TELNET access method,
except that the word TELNET is replaced by TN3270 in the above
description. Gopher type 'T' should be served up as the TN3270 access
method. If the HOST does not specify a port, then the default port
should be used.
.. EXECUTABLE -- At the moment, the only format (2nd token) firmly
defined is PRM. The third token is always PRM_V1. We propose
EXECUTABLE SUN4 and EXECUTABLE SUN3, but this is subject to change
depending on implementation experience. The third and subsequent
tokens are not clear (SUNOS4, perhaps?).
Treat it as DATA if you don't recognize the format.
.. DOCUMENT
At this moment, the only format is TEXT. The third token is ASCII;
other character sets will be defined later.
DOCUMENT MIME is defined but won't be implemented immediately. The
GOPHER 'M' type will be exported under Prospero as DOCUMENT MIME.
If you don't have a MIME reader, treat it as DOCUMENT TEXT ASCII.
.. SEARCH --
Only form for this: SEARCH QUERY-METHOD V1.
A long form of the query-method attribute is currently defined in
/pfs/notes/query-method. This will be SEARCH QUERY-METHOD V2, and
will be a superset of V1. For V1, we are just implementing the simple
Gopher search type. Look at how to do this in the file
'/pfs/notes/gopher-searches', under the section 'How to handle this
under Prospero'.
If no QUERY-METHOD attribute is found, this can be handled at your
discretion. One reasonable way to handle it would be to quietly (not
obnoxiously) warn the user that the link has an erroneous format.
Don't go to the expense of more protocol requests to retrieve the
QUERY-METHOD until the link is actually selected.
This corresponds to gopher type '7' and will correspond to type '2'
when I implement the CSO gateway.
.. VIRTUAL-SYSTEM
The only format for this CLASS is VS-DESCRIPTION. The VIRTUAL-SYSTEM
VS-DESCRIPTION format is only associated with directories.
Menu browser should treat it as a DIRECTORY for now.
.. SOUND
No format defined at the moment.
Corresponds to gopher type 'S' and Gopher+ type '<'.
Treat it as DATA if you don't have a sound player or don't recognize
the format.
.. IMAGE
Only format currently in use: IMAGE GIF. IMAGE POSTSCRIPT is defined;
an object may be DOCUMENT POSTSCRIPT or IMAGE POSTSCRIPT, depending on
whether it is primarily considered an image or a document.
MPEG, JPEG, X bitmaps, and other image encodings will be added later
as needed.
IMAGE GIF corresponds to the gopher 'g' type.
Treat it as DATA if you don't have an image viewer.
.. VIDEO
The VIDEO class may contain prerecorded (perhaps live too? We'll have
to see as a result of use) sound and image data. Treat it as DATA for now.
.. SOURCE-CODE
The MENU API may treat this as identical to DOCUMENT TEXT ASCII. The
file-format (2nd field) is the computer language it's source code for.
The current defined computer language is 'C'.
.. DATA
This is for raw files that just contain raw binary data. No
file-format is defined for them. They cannot be displayed or printed.
Just offer to save them.
.. PROGRAM
Interpreted code will be of class "PROGRAM", which means you can
execute it using the interpreter named in the format field, and you
can display it as an ASCII document. No official interpreter names
are currently defined for PROGRAM, although we will come up with some
on an as-needed basis. I suggest the first interpreter names be 'PERL',
'SED', 'SH', and 'CSH'. This class is for things which are really
both SOURCE-CODE and EXECUTABLE.
.. EMBEDDED
This class is used for objects that have to be uncompressed, unzipped,
untarred, or have some other transformation applied to them to be
useful.
The 2nd token (format) should identify the transformation. Currently
defined ones: GZIP, COMPRESS, TAR, BINHEX (macintosh BinHex format),
UUENCODE.
The third field for any transformation of class EMBEDDED may be a
number. If it is, it indicates the number of additional arguments to
be specified for the transformation. If a number is specified, that
many arguments follow. Any tokens after the arguments are parsed as
if they were a new freestanding OBJECT-INTERPRETATION attribute. If
this third field is not a number, then it is assumed to be zero, and
the third and subsequent tokens should be parsed as if they were a
freestanding OBJECT-INTERPRETATION attribute.
GZIP, COMPRESS, TAR, BINHEX, and UUENCODE are not currently defined to
take additional arguments. If a specific file is to be extracted from
the tar file, see the SEGMENT field (as defined in
/pfs/notes/aggregate).
Default for saving should be to save it in the raw (unextracted) form.
A more sophisticated client can offer to unembed it before saving it.
If you don't recognize a particular EMBEDDED type, just treat it as
DATA. You can still offer to save it in a file.
.. AGGREGATE
This type is documented in another file but does not need to be
discused here (yet).
.. DIRECTORY
This is a raw DIRECTORY with no special OBJECT-INTERPRETATION.
. Kwynn:
For now, just implement the following types:
PORTAL (with the ACCESS-METHOD TELNET)
DOCUMENT TEXT ASCII
SEARCH
DIRECTORY
DATA
Your next pass will be to implement:
VOID
IMAGE GIF
EMBEDDED GZIP
EMBEDDED COMPRESS
Until you implement all of the OBJECT-INTERPRETATIONs, please do this hack:
EXECUTABLE, AGGREGATE, IMAGE, SOUND, EMBEDDED, and DATA should all be
treated as raw DATA.
Treat DOCUMENT MIME, SOURCE-CODE, and PROGRAM as if they were DOCUMENT
TEXT ASCII.
Treat VIRTUAL-SYSTEM as if it were just DIRECTORY.
. If No OBJECT-INTERPRETATION present
If no OBJECT-INTERPRETATION is present, treat random FILEs as if
they were either DOCUMENT TEXT ASCII or DATA. Just display them as
TEXT, but when you're asked to retrieve them, sample the first 1k or
so and make sure it's printable. If it isn't, say that the file isn't
really text, and offer to save it.
Treat unadorned directories as if they were DIRECTORY.

View File

@@ -0,0 +1,89 @@
Prospero Data Access Protocol (doc/working-notes/pdap.txt in the
Prospero Release)
Note that this document is not necessarily going to be fully in sync
with the PDAP draft paper (Augart, Neuman, Rao, unpublished). Until
that paper is published, the protocol is subject to change.
Goal: To provide a single file system protocol supporting several
modes of file access (whole file caching, remote read/write, etc),
that supports gateway functionality to other file services,
as well as support for a range of authentication and authorization
mechanisms.
Note: authentication and encryption/integrity eventually
provided by ARDP library. For now, authentication
and authorization provided directly by this protocol.
Message format - this is layered on ARDP protocol.
sequence { 1 octet version
sequence of sequence { 1 octet operation
asn1length data-length
data-length octets operation-data}
}
Operations =
1 open
2 open response
3 close
4 close response
5 stat
6 stat response
7 read
8 read response
9 write
10 write response
11 lease request
12 lease response
13 authenticate/authorization/accounting (for methods not provided in ARDP)
14 authentication/authorization/accounting response (if not done in ARDP)
Commands:
1 open 1 octet flags: read, write, append, create, cache, oob-xfer
1 octet name-type
name-type APPLICATION, FILESYSTEM, DEVICE, URL, PROSPERO-AM
application takes application name and application specific name
filesystem takes local system pathname
device takes device identifier and an integer for i-node
URL takes a URL for string (for gatewaying)
PROSPERO-AM takes an access method sequence (for gatewaying)
if oob-xfer flags set, path or identifier where to store
2 open response 1 octet (success/failure/warning)
1 octet handle type (capability,crypto_cap,asn1int,none)
asn1length length
length octets file handle
optional file name if left out in request, gensymed
if oob-xfer, name of file to open
error/warning code and text
3 close file handle type and handle. If none, then file opened in
same request.
4 close response
success/failure/warning
error/warning code and text
7 read file handle type and handle (if none, as opened in same message)
offset
asn1length length
8 read response
success/failure/warning
asnlength length
length octets data to be returned
error/warning code and text
9 write file handle type and handle (if none, as opened in same message)
offset
asn1length lenght
length octets data to be written
10 write response
success/failure/warning
error/warning code and text

View File

@@ -0,0 +1,35 @@
From bcn Tue Jun 1 07:51:35 1993
Received: from tgo.isi.edu by venera.isi.edu (5.65c/5.61+local-12)
id <AA09948>; Tue, 1 Jun 1993 14:51:40 -0700
Date: Tue, 1 Jun 93 14:51:35 PDT
Posted-Date: Tue, 1 Jun 93 14:51:35 PDT
Message-Id: <9306012151.AA00562@tgo.isi.edu>
Received: by tgo.isi.edu (4.1/4.0.3-4)
id <AA00562>; Tue, 1 Jun 93 14:51:35 PDT
From: Clifford Neuman <bcn>
To: PETER@psychnet.psychol.utas.edu.au
Cc: C.Warren@deakin.edu.au, bajan@bunyip.com, info-prospero
In-Reply-To: Alan Emtage's message of Tue, 1 Jun 1993 17:19:13 -0400 <9306012119.AA17783@mocha.bunyip.com>
Subject: About UDP ports that archie uses
Status: R
There are two ports officially assigned to Prospero (and hence archie
as well). The official port is 191, and the official non-privileged
port is 1525. If a Prospero or archie server is able to bind the
privileged port, the server will listen on both ports. If not, it
will only listen on the non-privileged port.
If the server can bind the privileged port, the response will be sent
on the privileged port. The default port used to contact a server is
presently 1525, which is the most general port since all servers
listen on it. It is not uncommon to have a message sent on 1525, but
to receive the response from 191. If you are writing your own client,
it should not reject a response simply because the server port
changed. You may use the connection id in the response to pair the
response with the request.
~ Cliff

View File

@@ -0,0 +1,71 @@
gWAIS LINK FORMAT
This document describes Prospero links to files accessible through
WAIS; we have not yet determined a format for WAIS directory & index
lookups. This format works for both external WAIS links and native
WAIS links (that is, links to WAIS files stored on a server running
Prospero).
The WAIS record locator string has a port # and hostname encoded into
it. We treat the record locator as an impenetrable object that we
just give to the WAIS server at a particular wais server (WAIS servers
are uniquely identified by a hostname port # pair); Prospero itself
doesn't worry about extracting this information from the WAIS record
locator string. The person or computer program creating a link to a
WAIS object is responsible for obtaining the WAIS port # and hostname.
The HOSTNAME on the VLINK is the hostname of the prospero server which
stores information about that file. If the server is running on a
non-standard port, this hostname will be followed by a port number in
parentheses.
The HSONAME on the VLINK for a file which is usually accessed through
WAIS begins with the sequence WAIS/OBJECT/ and then finishes with the
WAIS record locator string.
Not all files which can be retrieved via the WAIS access method will
have an HSONAME on the VLINK in this format. This is because the
server may send a WAIS access method even for a file that is primarily
accessed through NFS, Anonymous FTP, or some other access method. In
this case, the ACCESS-METHOD attribute for the file will usually have
the six-token format (described below).
The ACCESS-METHOD attribute for WAIS files consists of 5 [sometimes 6] tokens:
WAIS INTERNET-D <hostname> ASCII <hsoname>
[optional record locator string]
WAIS, INTERNET-D, and ASCII are literals.
The <hostname> token in the ACCESS-METHOD attribute is the name of the
host whose WAIS server must be contacted to retrieve the object (same
as the hostname encoded into the record locator). If the WAIS server
is running on the default WAIS port (210), this <hostname> token may be the
normal Internet hostname or it may be followed by the port # in
parentheses. The <hostname> token must always include the port # in
parentheses if the WAIS server is running on a non-default port.
If a sixth token is present in the WAIS access-method attribute, then
this is the WAIS record locator string which will be sent to the WAIS
server to retrieve the object. If the sixth token is not present,
then the <hsoname> token of the ACCESS-METHOD attribute must begin with
the sequence WAIS/OBJECT/ and then finish off with the WAIS record
locator string. The WAIS/OBJECT/ prefix will be stripped off and the
resulting string will be sent to the WAIS server.
The most common case for the WAIS access method is on a link whose
target is FILE (not EXTERNAL) to an object which can be retrieved from
a wais server running on the default WAIS port on the same host as the
PROSPERO server which indexes it, and with the PROSPERO server running
on the default PROSPERO port. In this case, the HOST and HOSNAME
tokens in the ACCESS-METHOD attribute are the same and those for the
link. Therefore, using the defaults that apply to all access methods,
the ACCESS-METHOD attribute can be sent across the network as:
WAIS '' '' '' ''
In the case of an EXTERNAL link to a WAIS object, the HOST and HSONAME
tokens in the vlink are customarially (although this is not strictly
enforced) the same as those for the access method, and the access
method is sent across the network using the defaulting mechanism.

28
prospero/include/FILES Normal file
View File

@@ -0,0 +1,28 @@
FILES
archie.h
ardp.h
implicit_fixes.h
list_macros.h
mitra_macros.h
pcompat.h
perrno.h
pfs.h
pfs_threads.h
pfs_utils.h
plog.h
pmachine.h.dist
posix_signal.h
pparse.h
ppasswd.h
pprot.h
pserver.h.dist
psite.h.dist
psrv.h
sockettime.h
solaris_stdlib.h
string_with_strcasecmp.h
usc-copyr.h
usc-license.h
uw-copyright.h
vcache.h
wais-source.h

174
prospero/include/archie.h Normal file
View File

@@ -0,0 +1,174 @@
/*
* Copyright (c) 1993 by the University of Southern California
*
* For copying and distribution information, please see the file
* <usc-copyr.h>.
*
* Written by bcn 2/15/93 definitions for archie API
*/
#include <usc-copyr.h>
/*
* You MUST select a default archie server to be used as the default server
* for the archie client program. If you do not specify a server, users
* will have to specify the server on the command line. If you do
* select a server, users can override that selection from the command
* line, but your selection will be used by default.
*
* To specif the default server define ARCHIE_HOST to be the name of
* the server, and optionally the following port in parenthesis if not
* the standard port. The name of the server and the port must be
* inside parentheses. For example:
*
* #define ARCHIE_HOST "archie.somedomain.org" or
* #define ARCHIE_HOST "archie.somedomain.org(1528)"
*
* The followin are known archie servers, with comments about the
* version of prospero they were running when this file was last modified.
* In order to work with this version of the archie client, the sites
* must be running at least version 5 of Prospero or higher.
*
* Known archie servers (inc port) Prospero Version and comments
*
* archie.sura.net v5
* archie.sura.net(1526) secondary server not sure of version
* archie.rutgers.edu v5
* archie.au v5
* archie.sogang.ac.kr v5
* archie.kyoto-u.ac.jp v5
* archie.ans.net v1 obsolete server
* archie.unl.edu v1 obsolete server
* archie.funet.fi v1 obsolete server
* archie.doc.ic.ac.uk v1 obsolete server
* archie.ncu.edu.tw v1 obsolete server
*
* Fill in the server for following definition, then uncomment it
*
* #define ARCHIE_HOST "***FILL-IN-SERVER-HERE***"
*/
/*
* Default value for max hits. Note that this is normally different
* for different client implementations. Doing so makes it easier to
* collect statistics on the use of the various clients.
*/
#define AQ_MAX_HITS 100
#define AQ_MAX_MATCH 100
#define AQ_MAX_HITSPM 100
/*
* CLIENT_VERSION may be used to identify the version of the client if
* distributed separately from the Prospero distribution. The version
* command should then identify both the client version and the Prospero
* version identifiers. Note that this identifier is not sent across
* the network. You MUST also obtain a software identifier from
* info-prospero@isi.edu, and set PFS_SW_ID in pfs.h.
*
* #define CLIENT_VERSION "xyz"
*/
struct aquery { /* ** means opaque */
char *host; /* Archie server w/ opt port */
char *string; /* String to be matched */
struct filter *filters; /* Path or domain restrictions */
VLINK expand; /* Links to be expanded */
int maxhits; /* Max entries to return */
int maxmatch; /* Max strings to match */
int maxhitpm; /* Max hits per match */
int offset; /**Where to start search (opaque) */
char query_type; /* Search type - see above */
int (*cmp_proc)(); /* Comp procedure for sorting */
int flags; /* Options - see above */
VLINK results; /* The results of the query */
char *motd; /* Motd from server */
int qpos; /* Service queue pos if available */
int sys_time; /* Expected time til svc complete */
struct timeval retry_at; /* Time for retry */
int wait_fd; /* FD on which waiting */
struct vdir dirst; /**For directory query */
VLINK dirquery; /**Args to directory query */
int status; /* Status of query */
};
#define AQFASTCOMP /* Make assumptions about server to quicken DEFCMP */
/* Query types - search = return hits, match = return strings */
#define AQ_EXACT '=' /* Exact string search */
#define AQ_CI_SUBSTR 'S' /* Case insensitive substring search */
#define AQ_CS_SUBSTR 'C' /* Case sensitive substring search */
#define AQ_REGEX 'R' /* Regular expression search */
#define AQ_ECI_SUBSTR 's' /* Exact or case insensitive sub srch */
#define AQ_ECS_SUBSTR 'c' /* Exact or case sensitive sub search */
#define AQ_EREGEX 'r' /* Exact or regular expression search */
#define AQ_M_CI_SUBSTR 'Z' /* Case insensitive substring match */
#define AQ_M_CS_SUBSTR 'K' /* Case sensitive substring match */
#define AQ_M_REGEX 'X' /* Regular expression match */
#define AQ_M_ECI_SUBSTR 'z' /* Exact or case insensitive sub match */
#define AQ_M_ECS_SUBSTR 'k' /* Exact or case sensitive sub match */
#define AQ_M_EREGEX 'x' /* Exact or regular expression match */
#define AQ_EXP_LINK '\001' /* Expand single directory link */
#define AQ_HOSTINFO '\002' /* Obtain info on matching hosts */
#define AQ_MOTD_ONLY '\003' /* Only check for motd */
/* Flags */
#define AQ_NOSORT 0x01 /* Don't sort */
#define AQ_ASYNC 0x02 /* Run asynchronously */
#define AQ_MOTD 0x80 /* Request server's motd */
/* Status - one of the following or Prospero error code */
#define AQ_INACTIVE 0 /* Request is inactive */
#define AQ_COMPLETE -1 /* Request is complete */
#define AQ_ACTIVE -2 /* Request is executing */
/* Definitions for the comparison procedures */
#define AQ_DEFCMP aq_defcmplink /* Default for query type */
#define AQ_INVDATECMP aq_invdatecmplink /* Inverted by date */
#ifndef ARCHIE_HOST
#define ARCHIE_HOST NULL
#endif
#define aq_init(AQ) (AQ)->host = ARCHIE_HOST; \
(AQ)->string = NULL; \
(AQ)->filters = NULL; \
(AQ)->expand = (VLINK) 0; \
(AQ)->maxhits = AQ_MAX_HITS; \
(AQ)->maxmatch = AQ_MAX_MATCH; \
(AQ)->maxhitpm = AQ_MAX_HITSPM;\
(AQ)->offset = 0; \
(AQ)->query_type = AQ_EXACT; \
(AQ)->cmp_proc = AQ_DEFCMP; \
(AQ)->flags = 0; \
(AQ)->results = (VLINK) 0; \
(AQ)->motd = NULL; \
(AQ)->qpos = 0; \
(AQ)->sys_time = 0; \
(AQ)->wait_fd = -1; \
(AQ)->retry_at.tv_sec = 0; \
(AQ)->retry_at.tv_usec = 0; \
(AQ)->dirquery = (VLINK) 0; \
(AQ)->status = AQ_INACTIVE;
/* Free fields that may have been filled in in call to archie_query */
/* This must be called before a used aquery structure is freed, for */
/* example by returning from a procedure in which it was allocated */
/* on the stack. It must also be called before an aquery structure */
/* is reused. If you hang onto the results, expand, or motd fields */
/* the field should be zeroed as soon as another reference is made */
/* to it, and it then becomes your resonsibility to explicitly free */
/* the fields. */
#define aq_reset(AQ) if((AQ)->filters) fllfree((AQ)->filters); \
if((AQ)->expand) vllfree((AQ)->expand); \
if((AQ)->results) vllfree((AQ)->results); \
if((AQ)->motd) stfree((AQ)->motd); \
if((AQ)->motd) stfree((AQ)->motd); \
aq_init(AQ);
/* Function prototypes */
int aq_query(struct aquery*,int); /* Execute an archie query */
char *aq_lhost(VLINK,char*,int); /* Extract host name from link */
char *aq_lhsoname(VLINK); /* Extract filename from link */
int aq_defcmplink(VLINK,VLINK); /* Compare by host and filename */
int aq_invdatecmplink(VLINK,VLINK); /* Compare links inverted by date */
int aq_restrict(struct aquery*,char*,char*,char); /* Add filters */

537
prospero/include/ardp.h Normal file
View File

@@ -0,0 +1,537 @@
/*
* Copyright (c) 1991-1994 by the University of Southern California
*
* For copying and distribution information, please see the file
* <usc-license.h>.
*/
#include <usc-license.h>
#include <stdio.h> /* for FILE */
#ifdef ARCHIE_TIMING
#include <time.h>
#include <sys/param.h>
#include <sys/time.h>
#include <sys/resource.h>
#endif
/*
* Written by bcn 1989-92 as pfs.h in the Prospero distribution
* Modified by bcn 1/93 separate include file and extended preq structure
* Modified by swa 11/93 error reporting; less dependent on Prospero
*/
#ifndef ARDP_H_INCLUDED
#define ARDP_H_INCLUDED
#include <pfs_threads.h> /* PFS threads package. */
#include <sys/time.h>
#include <sys/types.h>
/* Unfortunately, some buggy compilers (in this case, gcc 2.1 under
VAX BSD 4.3) get upset if <netinet/in.h> is included twice. */
/* Note that the IEEE C standard specifies that multiple inclusions of an
include file should not matter. */
#if !defined(IP_OPTIONS)
#include <netinet/in.h>
#endif
#include <list_macros.h>
/* Note: In doubly linked lists of the structures used for prospero, the */
/* ->previous element of the head of the list is the tail of the list and */
/* the ->next element of the tail of the list is NULL. This allows fast */
/* addition at the tail of the list. */
/* #defining this turns on extra consistency checking code in the various
memory allocators that checks for double freeing. Turn on this compilation
option if you are experimenting with the PFS library and want to make sure
you are not making this common mistake. We have left it turned on for this
ALPHA release. */
/* This consistency checking mechanism is used by the ARDP library and general
Prospero data structures. The only exception is the RREQ structure, which
does consistency checking differently. */
#define P_ALLOCATOR_CONSISTENCY_CHECK
#define ALLOCATOR_CONSISTENCY_CHECK /* deprecated but still necessary */
#ifdef P_ALLOCATOR_CONSISTENCY_CHECK /* patterns to set the 'consistency' member
to. */
#define FREE_PATTERN P__FREE_PATTERN /* old interface deprecated */
#define INUSE_PATTERN P__INUSE_PATTERN /* old interface deprecated */
#define P__FREE_PATTERN 0Xca01babe /* pattern to use if memory is now free. */
#define P__INUSE_PATTERN 0X53ad00d /* Pattern to set consistency member to
if memory is in use. */
#endif
#define PROSPERO
#ifdef PROSPERO
#define ARDP_DEFAULT_PEER "dirsrv"/* Default destination port name */
#define ARDP_DEFAULT_PORT 1525 /* Default destination port number */
#endif /* PROSPERO */
#define ARDP_BACKOFF(x) (2 * x) /* Backoff algorithm */
#define ARDP_DEFAULT_TIMEOUT 4 /* Default time before retry (sec) */
#define ARDP_DEFAULT_RETRY 3 /* Default number of times to try */
#define ARDP_DEFAULT_WINDOW_SZ 16 /* Default maximum packets to send at
once, unless special request
received from client. */
#define ARDP_MAX_WINDOW_SZ 256 /* Maximum # of packets we'll send
out, no matter what a client
requests. Might be redefined
locally if you're at the far end of
a slow link. */
#define ARDP_FIRST_PRIVP 901 /* First prived local port to try */
#define ARDP_NUM_PRIVP 20 /* Number of prived ports to try */
#define ARDP_PTXT_HDR 64 /* Max offset for start */
#define ARDP_PTXT_LEN 1250 /* Max length for data to send */
#define ARDP_PTXT_LEN_R 1405 /* Max length for received data */
/* Rationale for MAX_PTXT_LEN_R: According to IEEE std. 802.5, 1492 is the */
/* max data length for an ethernet packet. IP implementers tend to use */
/* this information in deciding how large a packet could be sent without IP */
/* fragmentation occurring. Subtract 16 octets for the IP header. */
/* Subtract 8 octets for UDP header. The maximum ARDP header size is 6 bits */
/* or 64, so subtract 64 more for the ARDP header. This leaves 1404 bytes. */
/* Note we only generate 1250 bytes because there are preV5 implementations */
/* out there with smaller limits. We also add one to MAX_PTXT_LEN_R to make */
/* sure there is always room to insert a null if needed. */
/* Must leave room to insert header when sending and to strip it on receipt */
#define ARDP_PTXT_DSZ ARDP_PTXT_LEN_R+2*ARDP_PTXT_HDR
/* Definition of text structure used to pass around each packet */
struct ptext {
#ifdef ALLOCATOR_CONSISTENCY_CHECK
int consistency;
#endif
unsigned int seq; /* Packet sequence number */
int length; /* Length of text (from start) */
char *start; /* Start of packet */
char *text; /* Start of text */
char *ioptr; /* Current position for i/o */
char dat[ARDP_PTXT_DSZ];/* The data itself incl headers */
unsigned long mbz; /* ZERO to catch runaway strings */
struct ptext *previous; /* Previous element in list */
struct ptext *next; /* Next element in linked list */
};
typedef struct ptext *PTEXT;
typedef struct ptext PTEXT_ST;
#define NOPKT ((PTEXT) 0) /* NULL pointer to ptext */
/* Request structure: maintains information about pending requests */
struct rreq {
int status; /* Status of request *rr1 */
int flags; /* Options for ARDP library *rr2 */
unsigned short cid; /* Connection ID - net byte order */
short priority; /* Priority - host byte order */
int pf_priority; /* Priority assigned by pri_func */
short peer_ardp_version;/* Peer ARD protocol version *rr3 */
struct ptext *inpkt; /* Packet in process by applic */
unsigned short rcvd_tot; /* Total # of packets to receive */
struct ptext *rcvd; /* Received packets */
unsigned short rcvd_thru; /* Received all packets through # */
struct ptext *comp_thru; /* Pointer to RCVD_THRUth packet */
struct ptext *outpkt; /* Packets not yet sent */
unsigned short trns_tot; /* Total # of packets for trns */
struct ptext *trns; /* Transmitted packets */
unsigned short prcvd_thru; /* Peer's rcvd_thru (host byte ord)*/
unsigned short window_sz; /* My window size (default: 0 (sender
does whatever they choose)
(hostorder) */
unsigned short pwindow_sz; /* Peer window (dflt ARDP_WINDOW_SZ).
0 means no limit on # to send.
(hostorder)*/
struct sockaddr_in peer; /* Sender/Destination */
#define peer_addr peer.sin_addr /* Address in network byte order */
#define peer_port peer.sin_port /* Port in network byte order */
struct timeval rcvd_time; /* Time request was received */
struct timeval svc_start_time; /* Time service began on request */
struct timeval svc_comp_time; /* Time service was completed */
struct timeval timeout; /* Initial time to wait for resp */
struct timeval timeout_adj; /* Adjusted time to wait for resp */
struct timeval wait_till; /* Time at which timeout expires */
unsigned short retries; /* Number of times to retry */
unsigned short retries_rem; /* Number of retries remaining */
unsigned short svc_rwait; /* Svc suggested tm2wait b4 retry */
unsigned short svc_rwait_seq; /* Seq # when scv_rwait changed */
unsigned short inf_queue_pos; /* Service queue pos if available */
int inf_sys_time; /* Expected time til svc complete */
#ifdef PROSPERO
struct pfs_auth_info *auth_info; /* Client authentication info */
#endif /* PROSPERO */
char *client_name; /* Client name string for logging */
char *peer_sw_id; /* Peer's software specific ident */
int (*cfunction)(); /* Function to call when done */
char *cfunction_args; /* Additional args to cfunction */
struct rreq *previous; /* Previous element in list */
struct rreq *next; /* Next element in linked list */
#ifdef ARCHIE_TIMING
int no_matches; /* Number of matches returned */
char query_state; /* State of query S,F */
char match_type; /* Type of match E,S,R */
char cached;
char case_type; /* Case S,X */
char domain_match; /* Domain match D,X */
char path_match; /* Path match P,X */
char search_str[MAXPATHLEN]; /* search string */
char launch[30]; /* Time started the processing */
char start[30]; /* Time got request */
char end[30]; /* Time returned request */
struct rusage qtime_start; /* To figure out the timings */
struct rusage qtime_end;
struct rusage stime_start;
struct rusage stime_end;
struct rusage htime_start;
struct rusage htime_end;
int hosts; /* Hosts that contain */
int hosts_searched; /* Hosts searched */
#endif
};
/* *rr1: this is also used for consistency checking. */
/* Values for this field: */
#define ARDP_STATUS_NOSTART 0 /* not started or inactive */
#define ARDP_STATUS_INACTIVE 0
#define ARDP_STATUS_COMPLETE -1 /* done */
#define ARDP_STATUS_ACTIVE -2 /* running */
#define ARDP_STATUS_ACKPEND -3
#define ARDP_STATUS_GAPS -4
#define ARDP_STATUS_ABORTED -5
#define ARDP_STATUS_FREE -6 /* used for consistency checking; free */
#define ARDP_STATUS_FAILED 255
/* *rr2: There is only one flag currently defined. */
/* Send the client's preferred window size along with the next packet you
transmit. At the moment, this flag is never cleared once it is set, so all
packets are tagged with the preferred window size. There are other
strategies that will be tried later. */
/* At the moment, this flag is only set in ardp_rqalloc(). */
#define ARDP_FLAG_SEND_MY_WINDOW_SIZE 0x1
#ifdef PROSPERO
/* This is used only on the clients. It means they're when speaking to a
Version 0 Prospero server, but one which used the Prospero 5.0, 5.1, or 5.2
releases. */
#define ARDP_FLAG_PEER_HAS_EXCESSIVE_ACK_BUG 0x2
#endif
/* *rr3: There are several odd numbers you might find. */
/* 0 is the current version of the ARDP library. */
/* -1 is an older version. This is used only on the servers when speaking to
V1 archie clients. */
/* -2 is a newer version than -1, but still old enough that bugs appeared.
This is used only on the servers when speaking to V1 archie clients. */
/* Version 1 of the ARDP library has been designed. Not yet implemented. */
#define S_AD_SZ sizeof(struct sockaddr_in)
#define PEER_PORT(req) (ntohs((req)->peer_port)) /* host byte order */
typedef struct rreq *RREQ;
typedef struct rreq RREQ_ST;
#define NOREQ ((RREQ) 0) /* NULL pointer to rreq */
/* ARDP library error status codes. */
/* These must remain in the range 0-20 for compatibility with the Prospero
File System. */
/* Note that ARDP_SUCCESS must remain 0, due to code implementation. */
#define ARDP_SUCCESS 0 /* Successful completion of call */
#define ARDP_PORT_UNKN 1 /* DIRSRV UDP port unknown */
#define ARDP_UDP_CANT 2 /* Can't open local UDP port */
#define ARDP_BAD_HOSTNAME 3 /* Can't resolve hostname */
#define ARDP_NOT_SENT 4 /* Attempt to send message failed */
#define ARDP_SELECT_FAILED 5 /* Select failed */
#define ARDP_BAD_RECV 6 /* Recvfrom failed */
#define ARDP_BAD_VERSION 7 /* bad version # in rdgram protocol */
#define ARDP_BAD_REQ 8 /* Inconsistent request structure */
#define ARDP_TIMEOUT 9 /* Timed out - retry count exceeded */
#define ARDP_REFUSED 10 /* Connection refused by server */
#define ARDP_FAILURE 11 /* Unspecified ARDP failure */
#define ARDP_TOOLONG 12 /* Buffer too long for packet */
/* These are the interface used to the ARDP library's error reporting.
These are the same as definitions used in the Prospero PFS library. */
/* extern int perrno; \* Place where error codes are set. */
extern void p_clear_errors(void); /* Clear perrno in ARDP library; clear pwarn
and p_err_string and p_warn_string as well
in PFS library. */
#define ARDP_PENDING -1 /* The request is still pending */
#define ARDP_WAIT_TILL_TO -1 /* Wait until timeout occurs */
#define ARDP_A2R_SPLIT 0x00 /* OK to split across packets */
#define ARDP_A2R_NOSPLITB 0x01 /* Don't split across packets */
#define ARDP_A2R_NOSPLITL 0x02 /* Don't split lines across packets */
#define ARDP_A2R_NOSPLITBL 0x03 /* NOSPLITB|NOSPLITL */
#define ARDP_A2R_TAGLENGTH 0x04 /* Include length tag for buffer */
#define ARDP_A2R_COMPLETE 0x08 /* This is the final packet to add */
#define ARDP_R_INCOMPLETE 0x00 /* More messages will follow */
#define ARDP_R_NOSEND 0x02 /* Add to req->trns but don't send */
#define ARDP_R_COMPLETE 0x08 /* This is the final packet to send */
/* Queuing priorities for requests */
#define ARDP_MAX_PRI 32765 /* Maximum user proiority */
#define ARDP_MAX_SPRI 32767 /* Maximum priority for system use */
#define ARDP_MIN_PRI -32765 /* Maximum user proiority */
#define ARDP_MIN_SPRI -32768 /* Maximum priority for system use */
/* LONG_TO_SHORT_NAME is needed for linkers that can't handle long names */
#ifdef LONG_TO_SHORT_NAME
#define ardp_abort RDABOR
#define ardp_abort_on_int RDABOI
#define ardp_accept RDACPT
#define ardp_activeQ RDACTV
#define ardp_add2req RDA2RQ
#define ardp_acknowledge RDACKN
#define ardp_bind_port RDBPRT
#define ardp_breply RDBREP
#define ardp_completeQ RDCMPQ
#define ardp_def_port_no RDDPNO
#define ardp_default_retry RDDFRT
#define ardp_default_timeout RDDFTO
#define ardp_doneQ RDDONQ
#define ardp_get_nxt RDGNXT
#define ardp_get_nxt_nonblocking RDGNNB
#define ardp_headers RDHDRS
#define ardp_init RDINIT
#define ardp_next_cid RDNCID
#define ardp_partialQ RDPRTQ
#define ardp_pendingQ RDPNDQ
#define ardp_port RDPORT
#define ardp_pri_func RDPRIF
#define ardp_pri_override RDOVRD
#define ardp_priority RDPRIO
#define ardp_process_active RDPACT
#define ardp_prvport RDPPRT
#define ardp_ptalloc RDPTAL
#define ardp_ptfree RDPTFR
#define ardp_ptlfree RDPTLF
#define ardp_redirect RDREDR
#define ardp_refuse RDRFSE
#define ardp_reply RDREPL
#define ardp_respond RDRESP
#define ardp_retrieve RDRETR
#define ardp_rqalloc RDRQAL
#define ardp_rqfree RDRQFR
#define ardp_rq_partialfree RDRQPF
#define ardp_rqlfree RDRQLF
#define ardp_runQ RDRUNQ
#define ardp_rwait RDRWAI
#define ardp_send RDSEND
#define ardp_set_prvport RDSPPT
#define ardp_set_queuing_policy RDSQPL
#define ardp_set_retry RDSETR
#define ardp_showbuf RDSHBF
#define ardp_snd_pkt RDSPKT
#define ardp_srvport RDSPRT
#define ardp_trap_int RDTINT
#define ardp_update_cfields RDUPCF
#define ardp_xmit RDXMIT
#define ptext_count PTXCNT
#define ptext_max PTXMAX
#define rreq_count RRQCNT
#define rreq_max RRQMAX
#endif /* LONG_TO_SHORT_NAME */
/* Please keep this list alpphabetically sorted. */
int ardp_abort(RREQ);
int ardp_abort_on_int(void);
int ardp_accept(void);
int ardp_add2req(RREQ,int,char*,int);
int ardp_acknowledge(RREQ req);
int ardp_bind_port(char*);
int ardp_breply(RREQ,int,char*,int);
RREQ ardp_get_nxt(void);
RREQ ardp_get_nxt_nonblocking(void);
int ardp_headers(RREQ);
/* Variable name "hostname" Commented out to shut up GCC -Wshadow */
int ardp_hostname2addr(const char * /* hostname */, struct sockaddr_in *hostaddr);
void ardp_hostname2addr_initcache(void);
extern int ardp_priority;
int ardp_process_active(void);
PTEXT ardp_ptalloc(void);
void ardp_ptfree(PTEXT);
void ardp_ptlfree(PTEXT);
int ardp_reply(RREQ,int,char*);
int ardp_respond(RREQ,int);
int ardp_retrieve(RREQ,int);
RREQ ardp_rqalloc(void);
void ardp_rqfree(RREQ);
#ifndef NDEBUG
void ardp_rq_partialfree(RREQ);
#endif
void ardp_rqlfree(RREQ);
int ardp_rwait(RREQ,int,short,int);
int ardp_send(RREQ,char*,struct sockaddr_in*,int);
int ardp_set_prvport(int);
int ardp_set_queuing_policy(int(*pf)(),int);
int ardp_set_retry(int,int);
void ardp_showbuf(const char *st, int length, FILE *out);
int ardp_snd_pkt(PTEXT,RREQ);
int ardp_xmit(RREQ,int);
/* these are used to look for memory leaks. Currently used by dirsrv.c to
return STATUS information. Internal to ARDP library. */
extern int dnscache_count;
extern int dnscache_max;
/* Used to see how many cached items are in */
extern int alldnscache_count;
/* Checked for memory leaks. */
extern int filelock_count;
extern int filelock_max;
extern int pfs_debug; /* used in ARDP library for error messages. */
/* Should be renamed. */
/* these are used to look for memory leaks. Currently used by dirsrv.c to
return STATUS information. */
extern int ptext_count;
extern int ptext_max;
extern int rreq_count;
extern int rreq_max;
/* Check for case-blind string equality, where s1 or s2 may be null
pointer. */
int stcaseequal(const char *s1, const char*s2);
extern const char*unixerrstr(void);
/* File locking prototypes. */
/* Could these be made ARDP internal? hope so. */
#include <../lib/ardp/flocks.h>
FILELOCK filelock_alloc(void);
void filelock_free(FILELOCK fl);
void filelock_lfree(FILELOCK fl);
void filelock_freespares(void);
void filelock_release(const char *filename, int readonly);
void filelock_obtain(const char *filename, int readonly);
/* File locking functions. Also in pfs_threads.h */
extern int locked_fclose_A(FILE *afle, const char *filename, int readonly);
extern FILE *locked_fopen(const char *filename, const char *mode);
int locked_fclose_and_rename(FILE *afile, const char *tmpfilename, const char *filename, int retval);
extern void locked_clear(FILE *a); /* also in pfs_threads.h */
/* Mutex stuff for pfs_threads on server side only still.. */
extern void ardp_init_mutexes(void); /* need not be called. */
#ifndef NDEBUG
extern void ardp_diagnose_mutexes(void); /* need not be called. */
#endif /*NDEBUG*/
EXTERN_MUTEXED_DECL(RREQ, ardp_runQ);
EXTERN_MUTEXED_DECL(RREQ, ardp_doneQ);
EXTERN_MUTEXED_DECL(RREQ, ardp_pendingQ);
#ifdef PFS_THREADS
extern p_th_mutex p_th_mutexARDP_ACCEPT; /* declared in ardp_mutexes.c */
extern p_th_mutex p_th_mutexPTEXT; /* declared in ardp_mutexes.c */
extern p_th_mutex p_th_mutexARDP_RQALLOC; /* declared in ardp_mutexes.c */
extern p_th_mutex p_th_mutexGETHOSTBYNAME; /* declared in ardp_mutexes.c */
extern p_th_mutex p_th_mutexARDP_SELFNUM; /* declared in ardp_mutexes.c */
#endif
#include <implicit_fixes.h> /* Fixes for implicit definitions */
/* Internal error handling code (formerly in pfs.h). */
/* Internal error handling routines used by the pfs code; formerly in *
* internal_error.h. These include a replacement for the assert() *
* macro, and an interface for internal error handling, better *
* documented in internal_error.c */
/* XXX These are duplicated in include/pfs_utils.h; need to do code
cleanup here. */
#ifndef NDEBUG
#ifndef assert
#define assert(expr) \
do { \
if (!(expr)) \
internal_error("assertion violated: " #expr); \
} while(0)
#endif /* assert */
#else /* NDEBUG */
#ifndef assert
#define assert(expr) do {;} while(0)
#endif /* assert() */
#endif /* NDEBUG */
#if 0 /* OLD version -- keep until new one works */
#define internal_error(msg) \
do { \
write(2, "Internal error in file " __FILE__ ": ", \
sizeof "Internal error in file " __FILE__ ": " -1); \
write(2, msg, strlen(msg)); \
write(2, "\n", 1); \
if (internal_error_handler) \
(*internal_error_handler)(__FILE__, __LINE__, msg); \
else { \
fprintf(stderr, "line of error: %d\n", __LINE__); \
abort(); \
} \
} while(0)
#else
#ifndef internal_error
#define internal_error(msg) \
internal_error_helper(msg, __LINE__)
#define internal_error_helper(msg,line) \
do { \
write(2, "Internal error in file " __FILE__ " (line " #line "): ",\
sizeof "Internal error in file " __FILE__ " (line " #line "): " -1);\
write(2, msg, strlen(msg)); \
write(2, "\n", 1); \
if (internal_error_handler) \
(*internal_error_handler)(__FILE__, line, msg); \
/* If the internal_error_handler() ever returns, we should not continue.
*/ \
abort(); \
} while(0)
#endif /* internal_error() */
#endif
/* This function may be set to handle internal errors. Dirsrv handles them in
this way, by logging to plog. We make it int instead of void, because
older versions of the PCC (Portable C Compiler) cannot handle pointers to
void functions. */
/* variable name "line" commented out to shut up GCC -Wshadow. */
extern int (*internal_error_handler)(const char file[], int /* line */, const char mesg[]);
/* Some short macros that really hike the efficiency of this code. */
/* Like bcopy(a, b, 1), but much faster. */
#define bcopy1(a, b) do { \
((char *) (b))[0] = ((char *) (a))[0]; \
} while(0)
#define bcopy2(a, b) do { \
bcopy1(a, b); \
/* Next line depends on unary cast having higher precedence than \
addition. (Guaranteed to be true.) */ \
bcopy1((char *) (a) + 1, (char *) (b) + 1); \
} while(0)
#define bcopy4(a, b) do { \
bcopy2((a), (b)); \
bcopy2((char *) (a) + 2, (char *) (b) + 2);\
} while(0)
#define bzero1(a) do { \
((char *) (a))[0] = '\0'; \
} while(0)
#define bzero2(a) do { \
bzero1(a); \
bzero1((char *) (a) + 1); \
} while (0)
#define bzero3(a) do { \
bzero2(a); \
bzero1((char *) (a) + 2); \
} while(0)
#define bzero4(a) do { \
bzero2(a); \
bzero2((char *) (a) + 2); \
} while(0)
#endif /* not ARDP_H_INCLUDED */

View File

@@ -0,0 +1,61 @@
/* The includes you need should really be specified in each file, but
there are so many places they are not included, that this is
the lazy way to do it */
/* This file works pretty well under Solaris, but these include files don't
prototype all the stuff under SunOS 4.x that they do under Solaris. So
we can't run GCC with -Wimplicit under SunOS 4.x */
#ifndef PFS_IMPLICIT_FIXES_H
#define PFS_IMPLICIT_FIXES_H
#include <string.h> /*strncmp etc */
#include <sys/types.h> /*read etc */
#include <sys/uio.h> /* read etc */
#include <unistd.h> /* read etc */
#include <stdlib.h> /* malloc etc */
#include <sys/stat.h> /* For open */
#include <fcntl.h> /* open */
#include <ctype.h> /* isascii */
#include <sys/socket.h> /* for inet_ntoa*/
#include <netinet/in.h> /* for inet_ntoa */
#include <arpa/inet.h> /* for inet_ntoa */
#ifdef SOLARIS
/* might be needed by other SYSV derived systems? */
/* not used on HPUX or SCOUNIX. */
/* Not a part of the Posix 1003.1 standard. */
#include <crypt.h> /* for crypt */
#endif
#if defined(PFS_THREADS) && defined(PARANOID)
#define VLDEBUGBEGIN \
{ \
extern int vlink_count, subthread_count; \
int vlcount = ((subthread_count > 1) ? -1 : vlink_count);
#define VLDEBUGIN(vvvv) \
{ if (vlcount != -1) vlcount += vl_nlinks(vvvv); }
#define VLDEBUGAT(at) \
{ if (vlcount != -1) vlcount += at_nlinks(at); }
#define VLDEBUGEND \
assert (subthread_count >1 || vlcount == -1 || vlcount == vlink_count); \
}
#else
#define VLDEBUGBEGIN
#define VLDEBUGIN(vl)
#define VLDEBUGAT(at)
#define VLDEBUGEND
#endif
#define VLDEBUGOB(ob) { VLDEBUGIN(ob->links); VLDEBUGIN(ob->ulinks); \
VLDEBUGAT(ob->attributes); }
#define VLDEBUGDIR(dir) { VLDEBUGIN(dir->links); VLDEBUGIN(dir->ulinks); \
VLDEBUGAT(dir->attributes); }
#define VLDEBUGFI(fi) { \
VLDEBUGIN(fi->backlinks); \
VLDEBUGIN(fi->forward); VLDEBUGAT(fi->attributes); }
extern int subthread_count;
extern void it_failed(void);
#endif /*PFS_IMPLICIT_FIXES_H*/

View File

@@ -0,0 +1,247 @@
/*
* Copyright (c) 1992, 1993 by the University of Southern California
*
* For copying and distribution information, please see the file
* <usc-copyr.h>.
*
* Written by swa 1992 To manipulate lists in prospero and ardp
* Modified by bcn 1/93 Added EXTRACT ITEM and fixed several bugs
* Modified by swa 9/93 Added APPEND_LISTS.
* Modified by swa 10/93 Quick hack to make assert() in APPEND_LISTS ok.
* Modified by swa 2/94 Added PREPEND_ITEM, renamed APPEND_LISTS to
* CONCATENATE_LISTS
* Modified by swa 4/94 Got rid of mitra changes to check_offlist.
*/
#include <usc-copyr.h>
#ifndef LIST_MACROS_H
#define LIST_MACROS_H
#include <pfs_threads.h> /* for mutex stuff */
/* All the macros in this file are documented in the Prospero library reference
manual. */
#ifndef NDEBUG
#ifndef PARANOID /* could be defined on a per-file basis */
#define PARANOID
#endif
/* See comment below about why this is normally not enabled. Turn on at your
own risk. --swa, April 15, 1994 */
/* #define MITRA_PARANOID */
#endif
#ifdef PARANOID
#define CHECK_HEAD(head) do { \
if (head) { \
assert(!(head)->previous->next) ; \
/*assert((head)->consistency == INUSE_PATTERN);*/ \
} \
} while(0)
#ifdef MITRA_PARANOID
/* This is actually not a very cool macro to use because
much of prospero does not explicitly reset items off the lists to have NULL
NEXT and PREVIOUS pointers. */
/* Mitra notes that he likes resetting items of the list to have NULL next
and previous pointers.
However, this is causing efficiency problems for some ISI applications.
Therefore, this option is normally disabled. If you enable it, you are
warned that there is likely to be code in the base Prospero release which
does not follow the Mitra convention of setting items off the lists to have
null NEXT and PREVIOUS pointers. */
#define CHECK_OFFLIST(n) do { \
/*assert(n->consistency == INUSE_PATTERN);*/ \
assert(n); \
assert(!(n)->next && !(n)->previous); \
} while(0)
/* Ditto for previous comment. */
#define CHECK_NEXT(m) assert(!(m)->next || ((m)->next->previous == (m)))
#else /*MITRA_PARANOID*/
/* not MITRA_PARANOID */
#define CHECK_OFFLIST(nonmemb) do { } while(0)
#define CHECK_NEXT(memb) do { } while(0)
#endif
#define CHECK_PTRinBUFF(b,p) assert(((b) <= (p)) && ((p) <= (b)+strlen(b)))
void check_mem(void); /* declare it */
#define CHECK_MEM() check_mem()
#else /*!PARANOID*/
#define CHECK_HEAD(head) do { } while(0)
#define CHECK_OFFLIST(nonmemb) do { } while(0)
#define CHECK_NEXT(memb) do { } while(0)
#define CHECK_PTRinBUFF(b,p) do { } while(0)
#define CHECK_MEM() do { } while(0)
#endif /*!PARANOID*/
/*
* This macro appends an item to a doubly linked list. The item goes
* at the TAIL of the list. This macro modifies its second argument.
* if head is non-null, head->previous will always be the TAIL of
* the list.
*/
#define APPEND_ITEM(new, head) do { \
CHECK_HEAD(head); \
CHECK_OFFLIST(new); \
if((head)) { \
(new)->previous = (head)->previous; \
(head)->previous = (new); \
(new)->next = NULL; \
(new)->previous->next = (new); \
} else /* !(head) */ { \
(head) = (new); \
(new)->previous = (new); \
(new)->next = NULL; \
} \
} while(0)
/* Add new to a currently empty list */
#define NEW_LIST(new,head) do { \
assert(!head); \
CHECK_OFFLIST(new); \
new->previous = head = new; \
new->next = NULL; \
} while(0)
/* Put item on head of the queue */
/* This is mitra's implemtation. It fails when the queue is empty (i.e., when
"head' is NULL.). I have commented it out in favor of the one I've been
using. */
#if 0 /* leaving it in for a while. */
#define PREPEND_ITEM(new, head) do { \
CHECK_HEAD(head); \
CHECK_OFFLIST(new); \
new->previous = head->previous; \
new->next = head; \
head = head->previous = new; \
} while(0)
#endif /* 0 */
#ifndef PREPEND_ITEM
/* Alternative implementation. Either should work. */
/*
* This macro prepends the item NEW to the doubly-linked list headed by HEAD.
* NEW should not be a member of HEAD or the results are unpredictable.
*/
#define PREPEND_ITEM(new, head) do { \
/* Make the item a one-element list. */ \
(new)->next = NULL; \
(new)->previous = (new); \
/* Concatenate the full list to the one-element list. */ \
CONCATENATE_LISTS((new), (head)); \
(head) = (new); /* reset the list head. */ \
} while(0)
#endif
#define TH_APPEND_ITEM(new, head, PREFIX) do { \
p_th_mutex_lock(p_th_mutex##PREFIX); \
APPEND_ITEM(new, head); \
p_th_mutex_unlock(p_th_mutex##PREFIX); \
} while(0)
/*
* This macro removes an item from a doubly-linked list headed by HEAD.
* If ITEM is not a member of the list, the results are not defined.
* The extracted item will NOT be freed.
* Minor efficiency (code size) improvement by Mitra
*/
/* Use this if only know head, and we know its the last item */
/* from mitra. */
#define EXTRACT_HEAD_LAST_ITEM(head) do { \
(head)->previous = (head)->previous->previous; \
(head)->previous->next->previous = NULL; \
(head)->previous->next = NULL; \
} while(0)
/* Use this if both item and head are known, and we know it's the last item */
/* from mitra. */
#define EXTRACT_LAST_ITEM(item,head) do { \
(head)->previous = (item)->previous; \
(item)->previous = NULL; \
(head)->previous->next = NULL; \
} while(0)
/* swa tends to use just this one. */
/* someone else uses the above code, they just don't have it in a macro!*/
/* I do not understand the above comment --swa, 4/13/94 */
#define EXTRACT_ITEM(item, head) do { \
if ((head) == (item)) { \
(head) = (item)->next; \
if (head) (head)->previous = (item)->previous; \
} else { \
(item)->previous->next = (item)->next; \
if ((item)->next) (item)->next->previous = (item)->previous; \
else (head)->previous = (item)->previous; \
} \
(item)->previous = NULL; (item)->next = NULL; \
} while(0)
#define TH_EXTRACT_ITEM(item,head,PREFIX) do { \
p_th_mutex_lock(p_th_mutex##PREFIX); \
EXTRACT_ITEM(item, head); \
p_th_mutex_unlock(p_th_mutex##PREFIX); \
} while(0)
/*When you dont know the head of a list, but do know that item is at the head*/
#define EXTRACT_HEAD_ITEM(item) do { \
if ((item)->next) \
(item)->next->previous = (item)->previous; \
(item)->next = (item)->previous = NULL; \
} while(0)
#define TH_EXTRACT_HEAD_ITEM(item,PREFIX) do { \
p_th_mutex_lock(p_th_mutex##PREFIX); \
EXTRACT_HEAD_ITEM(item); \
p_th_mutex_unlock(p_th_mutex##PREFIX); \
} while(0)
/* Set list1 to point to a doubly-linked list consisting of list1 appended to
LIST2.
LIST2 must not already be a part of list1 or the results are unpredictable.
LIST2 will be a garbage value at the end of this exercise, since it will no
longer point to a valid doubly-linked list.
LIST1 and LIST2 must already be valid doubly-linked lists. */
/* This performs an O(1) list appending operation. */
#define APPEND_LISTS(list1,list2) do {\
CHECK_HEAD(list1); \
CHECK_HEAD(list2); \
if (!(list1)) \
(list1) = (list2); \
else if (!(list2)) \
/* If 2nd list is empty, concatenation is a no-op. */ \
; \
else { \
/* Assertion removed for compilation problems. */ \
/* assert(!(list1)->previous->next && !(list2)->previous->next); */ \
/* OLDL1TAIL is (list2)->previous->next (scratchpad value) */ \
/* Read next line as: OLDL1TAIL = (list1)->previous */ \
(list2)->previous->next = (list1)->previous; /* scratchpad value */\
(list1)->previous->next = (list2); /* was NULL, or should've been */\
(list1)->previous = (list2)->previous; \
/* OLDL1TAIL is now list1->previous->next too */ \
(list2)->previous = (list1)->previous->next; \
(list1)->previous->next = NULL; /* reset scratch value */ \
} \
/* oops - didnt set to null if first list empty - barfed in replace_cached*/ \
(list2) = NULL; /* for safety, to prevent abuse. */ \
} while (0)
/* XXX This is odd. Potential bug. Maybe Mitra meant to make this a call to
CONCATENATE_LISTS(), not to APPEND_ITEM()? */
#define TH_APPEND_LISTS(list1,list2,PREFIX) do { \
p_th_mutex_lock(p_th_mutex##PREFIX); \
APPEND_LISTS(list1, list2); \
p_th_mutex_unlock(p_th_mutex##PREFIX); \
} while(0)
/* New name for APPEND_LISTS() */
#define CONCATENATE_LISTS(l1, l2) APPEND_LISTS((l1), (l2))
#endif /* LIST_MACROS_H */

View File

@@ -0,0 +1,153 @@
#ifndef _rmg_macros_h
#define _rmg_macros_h
#include <stdlib.h> /* For malloc free */
#include <pfs.h> /* For ALLOCATOR_CONSISTENCY_CHECK*/
#include <pfs_threads.h> /* for mutex stuff */
#define TH_STRUC_ALLOC1(prefix,PREFIX,instance) { \
p_th_mutex_lock(p_th_mutex##PREFIX); \
if(lfree) { \
instance = lfree; \
lfree = instance->next; \
} else { \
instance = (PREFIX) malloc(sizeof(PREFIX##_ST)); \
if (!instance) out_of_memory(); \
prefix##_max++; \
} \
prefix##_count++; \
/* Initialize and fill in default values */ \
instance->previous = NULL; \
instance->next = NULL; \
p_th_mutex_unlock(p_th_mutex##PREFIX); \
}
#ifdef ALLOCATOR_CONSISTENCY_CHECK
#define TH_STRUC_ALLOC(prefix,PREFIX,instance) { \
TH_STRUC_ALLOC1(prefix,PREFIX,instance); \
instance->consistency = INUSE_PATTERN; \
}
#else /*!ALLOCATOR_CONSISTENCY_CHECK*/
#define TH_STRUC_ALLOC(prefix,PREFIX,instance) \
TH_STRUC_ALLOC1(prefix,PREFIX,instance);
#endif /*ALLOCATOR_CONSISTENCY_CHECK*/
#define TH_STRUC_FREE2(prefix,PREFIX,instance) { \
p_th_mutex_lock(p_th_mutex##PREFIX); \
instance->next = lfree; \
instance->previous = NULL; \
lfree = instance; \
prefix##_count--; \
p_th_mutex_unlock(p_th_mutex##PREFIX); \
}
/* Note - no ";" on last item */
#ifdef ALLOCATOR_CONSISTENCY_CHECK
#define TH_STRUC_FREE(prefix,PREFIX,instance) \
if (!instance) return; \
assert(instance->consistency == INUSE_PATTERN); \
instance->consistency = FREE_PATTERN; \
TH_STRUC_FREE2(prefix,PREFIX,instance)
#else
#define TH_STRUC_FREE(prefix,PREFIX,instance) \
if (!instance) return; \
TH_STRUC_FREE2(prefix,PREFIX,instance)
#endif
/*
* instance_lfree - free a linked list of ATYPEDEF structures.
*
* instance_lfree takes a pointer to a channel structure frees it and
* any linked
* ATYPEDEF structures. It is used to free an entire list of ATYPEDEF
* structures.
*/
#define TH_STRUC_LFREE(PREFIX,instance,instance_free) \
{ \
PREFIX this; \
PREFIX nxt; \
/* Set instance to 0 so others can access it while we trash the list */\
nxt = instance; instance = NULL; \
while((this=nxt) != NULL) { \
nxt = this->next; \
instance_free(this); \
} \
}
/* temp should be set to point to a list, cnt should be 0
temp will be NULL afterwards and cnt the count*/
#define COUNT_LISTS(temp,cnt) \
while (temp) { \
cnt++; \
temp = temp->next; \
}
/* Find val in field, instance set to match or NULL */
/* Need to mutex this, cos if struc changes while walking it could fail */
#define FIND_LIST(instance,field,val) \
while (instance != NULL) { \
if (instance->field == val) \
break; \
instance = instance->next; \
}
#define TH_FIND_LIST(instance,field,val,PREFIX) { \
p_th_mutex_lock(p_th_mutex##PREFIX); \
FIND_LIST(instance,field,val); \
p_th_mutex_unlock(p_th_mutex##PREFIX) ; }
#define FIND_FNCTN_LIST(instance, field, val, fnctn) \
while(instance != NULL) { \
if (fnctn(instance->field, val)) \
break; \
instance = instance->next; \
}
#define FIND_OBJFNCTN_LIST(instance, ob2, fnctn) \
while(instance != NULL) { \
if (fnctn(instance, ob2)) \
break; \
instance = instance->next; \
}
#define TH_FIND_FNCTN_LIST(instance, field, val, fctn, PREFIX) { \
p_th_mutex_lock(p_th_mutex##PREFIX); \
FIND_FNCTN_LIST(instance, field, val, fctn) \
p_th_mutex_unlock(p_th_mutex##PREFIX);}
#define TH_FIND_OBJFNCTN_LIST(instance, ob2, fctn, PREFIX) { \
p_th_mutex_lock(p_th_mutex##PREFIX); \
FIND_OBJFNCTN_LIST(instance, ob2, fctn) \
p_th_mutex_unlock(p_th_mutex##PREFIX);}
#define TH_FIND_STRING_LIST_CASE(instance, field, val, PREFIX) \
TH_FIND_FNCTN_LIST(instance, field, val, stcaseequal,PREFIX)
#define TH_FIND_STRING_LIST(instance, field, val, PREFIX) \
TH_FIND_FNCTN_LIST(instance, field, val, stequal,PREFIX)
#define TH_FREESPARES(prefix,PREFIX) { \
PREFIX this, next; \
p_th_mutex_lock(p_th_mutex##PREFIX); \
next = lfree ; lfree = NULL; \
p_th_mutex_unlock(p_th_mutex##PREFIX); \
while((this = next) != NULL) { \
next = this->next; \
free(this); /* Matches malloc in STRUC_ALLOC1*/ \
prefix##_max--; \
} \
}
/* Cant take an offset from a null value, shortcuts to return NULL */
#define L2(a,b) (a ? a->b : NULL)
#define L3(a,b,c) (a ? (a->b ? a->b->c : NULL ) : NULL)
#define L4(a,b,c,d) (a ? (a->b ? (a->b->c ? a->b->c->d \
: NULL) : NULL ) : NULL)
/* String functions on some systems dont like operating on NULLS */
#define Strlen(a) (a ? strlen(a) : 0)
#endif /*_rmg_macros_h*/

158
prospero/include/pcompat.h Normal file
View File

@@ -0,0 +1,158 @@
/*
* Copyright (c) 1991, 1992, 1994 by the University of Southern California
*
* For copying and distribution information, please see the file
* <usc-license.h>.
*/
#include <usc-license.h>
#include <pfs_threads.h>
/*
* pcompat.h - Definitions for compatability library
*
* This file contains the defintions used by the compatability
* library. Among the definitions are the possible values for
* the pfs_enable variable. This file also contains the external
* declaration of that variable. The module pfs_enable.o is included in
* libpfs.a because some of the routines in that library set it.
* It can also be explicitly declared in a program that uses the compatability
* library, if you wish.
*
* The only place it is checked, however, is in pfs_access,
* found in libpcompat.a
*/
#if 0 /* this code is commented out because
pfs_default is no longer an external
interface. --swa, April 13, 1994*/
extern int pfs_default; /* initialized to PMAP_UNINITIALIZED in
libpcompat. Set to some other value in
p__get_pfs_default(), which might include
PMAP_UNSET. Keeping this as a global
variable isn't really necessary. It does
let the users know what the starting value
of PFS_DEFAULT was, but I'm not sure that's
strictly necessary.
This variable is currently used entirely
internally to the PCOMPAT library, and could
be renamed easily, since no users are using
it as an interface. */
#endif
extern int pfs_enable; /* pfs_enable is declared in the PFS library,
since routines in that library modify it.
In that library, it defaults to PMAP_UNSET.
This can be declared explicitly in a file
linked with the program using this library
if the programmer wants to override the
value. */
extern int pfs_quiet; /* see lib/pcompat/pfs_quiet.c. This can be
declared explicitly in a file linked with
the program using this library if the
programmer wants to override the
value. Non-zero value means system calls
don't print any information. */
/* Definitions for values of pfs_enable */
#if 0 /* this will probably never be needed, and can
be deleted after Beta.5.3 goes out.
--swa, April 13, 1994*/
#define PMAP_UNINITIALIZED (-1) /* Used only for pfs_default. Indicates that
its starting value hasn't been read from the
environment yet. If the environment has
already been searched for PFS_DEFAULT, then
this will be reset to PMAP_UNSET. */
#endif
#define PMAP_DISABLE 0 /* always resolve names in UNIX */
#define PMAP_ENABLE 1 /* always reslve names in VS */
#define PMAP_COLON 2 /* Resolve names in UNIX by default. Names
preceded with a colon are resolved in the
VS. */
#define PMAP_ATSIGN_NF 3 /* Resolve names in VS by default. Names
preceded with an @ sign and names not found
in the VS are resolved in the UNIX
filesystem. */
#define PMAP_ATSIGN 4 /* Resolve names in the VS by default. Names
preceded with an @ sign are resolved in the
UNIX filesystem. */
#define PMAP_UNSET 5 /* pfs_enable is initialized to this value by
the pcompat library, unless the user program
declares its own version of pfs_enable and
initializes it to something else. If
pfs_enable is set to PMAP_UNSET, then
p__initialize_pfs_enable() will be called by
the PCOMPAT library routines in order to
initialize pfs_enable to the current pfs
default.
This allows a user program to initialize
pfs_enable and not have it overridden by
pfs_default. */
/* Definitions for PFS_ACCESS */
#define PFA_MAP 0 /* Map the file name only */
#define PFA_CREATE 1 /* Create file if not found */
#define PFA_CRMAP 2 /* Map file name. Map to new name if not found */
#define PFA_RO 4 /* Access to file is read only */
#define DISABLE_PFS(stmt) do {int DpfStmp; DpfStmp = pfs_enable;\
pfs_enable = PMAP_DISABLE; \
stmt; \
pfs_enable = DpfStmp;} while (0)
#define DISABLE_PFS_START() DpfStmp = pfs_enable; pfs_enable = PMAP_DISABLE;
#define DISABLE_PFS_END() pfs_enable = DpfStmp;
#if 0 /* This interface is dead as of 4/13/94 --swa
*/
void p__get_pfs_default(); /* only used here :) */
#define check_pfs_default() \
do { if(pfs_default == -1) p__get_pfs_default(); } while (0)
#endif
/* New interface as of 4/13/94 --swa */
/* This is called by the p__compat_initialize() routine, iff pfs_enable is set
to PMAP_UNSET. It looks for the PFS_DEFAULT environment variable and
attempts to set pfs_enable accordingly.
*/
void p__set_pfs_enable_from_default(void);
extern int pfs_access(const char path[], char npath[], int npathlen, int
flags);
/* Subfunctions used internally by the PCOMPAT library. */
extern int p__getvdirentries(int fd, char *buf, int nbytes, int *basep);
extern int p__readvdirentries(char *dirname);
extern int p__delvdirentries(int desc);
extern int p__seekvdir(int desc, int pos);
extern int p__getvdbsize(int desc, int pos);
#ifndef DIR
#include <pmachine.h> /* for USE_SYS_DIR_H test. */
/* Needed if not already included. */
#ifdef USE_SYS_DIR_H
#include <sys/dir.h>
#else /* USE_SYS_DIR_H */
#include <dirent.h>
#endif /* USE_SYS_DIR_H */
#endif /* DIR */
/* Called by seekdir(). */
extern void p__seekdir(register DIR *dirp, long loc);
/* This is called internally by all pcompat library functions that call
PFS library functions. It makes sure that the PFS library and any libraries
that PFS uses are properly initialized before usage. */
extern void p__compat_initialize(void);

157
prospero/include/perrno.h Normal file
View File

@@ -0,0 +1,157 @@
/*
* Copyright (c) 1991-1994 by the University of Southern California
*
* For copying and distribution information, please see the file
* <usc-license.h>.
*/
#include <usc-license.h>
#ifndef PFS_PERRNO_H
#define PFS_PERRNO_H
#include <pfs_threads.h>
/* this file and lib/pfs/perrmesg.c should be updated simultaneously */
/*
* perrno.h - definitions for perrno
*
* This file contains the declarations and defintions of of the external
* error values in which errors are returned by the pfs and psrv
* libraries.
*/
extern char *p_err_text[];
extern char *p_warn_text[];
EXTERN_INT_DECL(perrno);
#define perrno p_th_arperrno[p__th_self_num()]
EXTERN_INT_DECL(pwarn);
#define pwarn p_th_arpwarn[p__th_self_num()]
EXTERN_CHARP_DECL(p_warn_string);
#define p_warn_string p_th_arp_warn_string[p__th_self_num()]
EXTERN_CHARP_DECL(p_err_string);
#define p_err_string p_th_arp_err_string[p__th_self_num()]
/* Error codes returned or found in perrno */
#ifndef PSUCCESS
#define PSUCCESS 0
#endif
/* Error codes 1 through 20 are reserved for the ardp library */
/* Defined in include/ardp.h */
/* vl_insert */
#define VL_INSERT_ALREADY_THERE 21 /* Link already exists */
#define VL_INSERT_CONFLICT 22 /* Link exists with same name */
/* ul_insert */
#define UL_INSERT_ALREADY_THERE 25 /* Link already exists */
#define UL_INSERT_SUPERSEDING 26 /* Replacing existing link */
#define UL_INSERT_POS_NOTFOUND 27 /* Prv entry not in dir->ulinks */
/* rd_vdir */
#define RVD_DIR_NOT_THERE 41 /* Temporary NOT_FOUND */
#define RVD_NO_CLOSED_NS 42 /* Namespace not closed w/ object:: */
#define RVD_NO_NS_ALIAS 43 /* No alias for namespace NS#: */
#define RVD_NS_NOT_FOUND 44 /* Specified namespace not found */
/* pfs_access */
#define PFSA_AM_NOT_SUPPORTED 51 /* Access method not supported */
/* p__map_cache */
#define PMC_DELETE_ON_CLOSE 55 /* Delete cached copy on close */
#define PMC_RETRIEVE_FAILED 56 /* Unable to retrieve file */
/* mk_vdir */
/* #define MKVD_ALREADY_EXISTS 61 * Directory already exists */
/* #define MKVD_NAME_CONFLICT 62 * Link with name already exists */
/* vfsetenv */
#define VFSN_NOT_A_VS 65 /* Not a virtual system */
#define VFSN_CANT_FIND_DIR 66 /* Not a virtual system */
/* add_vlink */
/* #define ADDVL_ALREADY_EXISTS 71 * Directory already exists */
/* #define ADDVL_NAME_CONFLICT 72 * Link with name already exists */
/* pset_at */
#define PSET_AT_TARGET_NOT_AN_OBJECT 81 /* The link passed to PSET_AT() has a
TARGET such that it does not
refer to an object, so we can't set
any object attributes on it. */
/* Error codes for parsing problems. */
#define PARSE_ERROR 101 /* General parsing syntax error . */
/* Local error codes on server */
/* dsrdir */
#define DSRDIR_NOT_A_DIRECTORY 111 /* Not a directory name */
/* dsrfinfo */
#define DSRFINFO_NOT_A_FILE 121 /* Object not found */
#define DSRFINFO_FORWARDED 122 /* Object has moved */
/* Error codes that may be returned by various procedures */
#define PFS_FILE_NOT_FOUND 230 /* File not found */
#define PFS_DIR_NOT_FOUND 231 /* Directory in path not found */
#define PFS_SYMLINK_DEPTH 232 /* Max sym-link depth exceeded */
#define PFS_ENV_NOT_INITIALIZED 233 /* Can't read environment */
#define PFS_EXT_USED_AS_DIR 234 /* Can't use externals as dirs */
#define PFS_MAX_FWD_DEPTH 235 /* Exceeded max forward depth */
/* Error codes returned by directory server */
/* some of these duplicate errors from individual routines */
/* some of those error codes should be eliminated */
#define DIRSRV_WAIS 240 /* WAIS gateway failure */
#define DIRSRV_GOPHER 241 /* Gopher gateway failure */
#define DIRSRV_AUTHENT_REQ 242 /* Authentication required */
#define DIRSRV_NOT_AUTHORIZED 243 /* Not authorized */
#define DIRSRV_NOT_FOUND 244 /* Not found */
#define DIRSRV_BAD_VERS 245
#define DIRSRV_NOT_DIRECTORY 246
#define DIRSRV_ALREADY_EXISTS 247 /* Identical link already exists */
#define DIRSRV_NAME_CONFLICT 248 /* Link with name already exists */
#define DIRSRV_TOO_MANY 249 /* Too many matches to return */
#define DIRSRV_UNIMPLEMENTED 251 /* Unimplemented command */
#define DIRSRV_BAD_FORMAT 252
#define DIRSRV_ERROR 253
#define DIRSRV_SERVER_FAILED 254 /* Unspecified server failure */
#ifndef PFAILURE
#define PFAILURE 255 /* Random other complaint. */
#endif
/* If DEBUG_PFAILURE is defined, then the no-op function it_failed() will be
called right before any function originates a PFAILURE return. This can be
handy in tracking down an error in library usage when a library call is
returning PFAILURE to you. This is normally not enabled so that we can
avoid the overhead of the unnecessary call to it_failed().
it_failed() is in lib/pfs/perrmesg.c. */
#ifdef DEBUG_PFAILURE
#define RETURNPFAILURE do { it_failed(); return(PFAILURE); } while(0)
#else
#define RETURNPFAILURE return(PFAILURE)
#endif
/* Warning codes */
#define PNOWARN 0 /* No warning indicated */
#define PWARN_OUT_OF_DATE 1 /* Software is out of date */
#define PWARN_MSG_FROM_SERVER 2 /* Warning in p_warn_string */
#define PWARN_UNRECOGNIZED_RESP 3 /* Unrecognized line in response */
#define PWARNING 255 /* Warning in p_warn_string */
/* Function to reset error and warning codes */
extern void p_clear_errors(void);
#if 0
/* This macro is deprecated and will go away soon. Use p_clear_errors()
instead. */
#define clear_prospero_errors() p_clear_errors()
#endif
#endif /*PFS_PERRNO_H*/

1126
prospero/include/pfs.h Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,453 @@
/*
* Copyright (c) 1993-1994 by the University of Southern California
*
* For copying and distribution information, please see the file
* <usc-license.h>.
*/
#include <usc-license.h>
/* This is the Prospero interface to threads. This threads package
is currently used exclusively by the Prospero server when it is operating in
multi-threaded mode.
At the moment, this stuff is experimental. It will only be tested on the
server side, not on the client.
*/
/*
* The interface to the Prospero server's use of threads is fully defined in
* this file. That means that as long as you provide the external interface
* herein defined, you're OK. */
/* This interface does not currently attempt to handle issues of cancelling
* threads, although that will be a later extension.
*/
/* Every thread (on the server) has an active RREQ associated with it. Every
* active RREQ has a live thread associated with it. RREQs get moved off of
* the queue of items to be processed to the list of items in progress when an
* available thread is there for them. When a thread is available,
* ardp_accept() is called.
*/
#ifndef PFS_THREADS_H
#define PFS_THREADS_H
#include <stdio.h> /* needed for FILE */
/* #define P_MAX_NUM_THREADS here if you want any threads, and PFS_THREADS. */
/*#define PFS_THREADS */ /* Part of the external interface. */
#ifdef PFS_THREADS
#define P_MAX_NUM_THREADS 61 /* This will define threads 0 through 60,
quite a lot. */
/* You can easily set a lower value for the number of threads the server
* will actually use, by modifying DIRSRV_SUB_THREAD_COUNT in dirsrv.c.
*/
#define PFS_THREADS_HAVE_SAFE_MALLOC /* Version */
/* Define which PFS_THREADS package you have, options supported currently
include PFS_THREADS_SOLARIS or PFS_THREADS_FLORIDA - note NONE
of these must be defined if PFS_THREADS is undefined */
/* #define PFS_THREADS_SOLARIS */
#endif /* PFS_THREADS */
#include <pfs_utils.h> /* assert */
/* To port to a new threads package
- pick an identifer (e.g. PFS_THREADS_DCE).
-- Note PFS_THREADS_POSIX is reservered for post-balloting implementation
-- Tell prospero-developers@isi.edu which you are using.
- Grep through all of the source for instances of PFS_THREADS_
-- Editing these is documented where they apply
-- This will include lib/ardp/p_th_self_num server/dirsrv
*/
#ifdef PFS_THREADS_FLORIDA
/* pthread.h is the include file from the Florida State University
PART project PTHREADS distribution.
It prototypes all of the functions and interfaces whose names start with
pthread_.
*/
#include <pthread.h>
#endif /* PFS_THREADS_FLORIDA */
#ifdef PFS_THREADS_SOLARIS
/* Make sure we get our signal.h with _POSIX_C_SOURCE before thread.h
includes sys/signal.h */
#include <posix_signal.h>
/* Thread.h prototypes most functions starting thr_ */
#include <thread.h>
#endif /* PFS_THREADS_SOLARIS */
#ifdef PFS_THREADS
/* Yield a unique integer between 0 and P_MAX_NUM_THREADS - 1 for the current
thread. Hopefully this function will go away eventually as the server's
internal structure changes in a way that a reference to the current thread
is passed around to all subfunctions. But maybe not, too.
This is implemented using the per-thread key mechanisms. */
extern void p_th_allocate_self_num(void); /* external; must be called by thread
after startup. */
extern void p_th_deallocate_self_num(void); /* external; must be called by
thread before exit. */
#endif /*PFS_THREADS*/
#ifdef PFS_THREADS
extern int p__th_self_num(void); /* not external interface. */
#else
#define p__th_self_num() 0
#endif /* PFS_THREADS */
/* We don't include a trailing ; at the end of our declarations and definitions
because a ; by itself in a declarations list is treated by C as a statement,
not as an empty declaration. This means that the AUTOSTAT declaration has to
be the last one. */
/* This declares an automatic variable name VARNAME of type char **. *VARNAME
will be a reference to a persistent per-thread static variable of type char
*, with function scope. Note that *varname will be initially NULL, but may
expand with time. Part of the external interface.*/
#ifdef PFS_THREADS
#define AUTOSTAT_CHARPP(VARNAME) \
static char *(VARNAME##_target[P_MAX_NUM_THREADS]); /* NULL by default. */\
char **VARNAME = (VARNAME##_target + p__th_self_num())
#else
#define AUTOSTAT_CHARPP(VARNAME) \
static char *VARNAME##_target = NULL; \
char **VARNAME = &VARNAME##_target
#endif /* PFS_THREADS */
/* ditto, for int* . Part of the external interface. */
#ifdef PFS_THREADS
#define AUTOSTAT_INTP(VARNAME) \
static int (VARNAME##_target[P_MAX_NUM_THREADS]); /* automatically 0 */\
int *VARNAME = (VARNAME##_target + p__th_self_num())
#else
#define AUTOSTAT_INTP(VARNAME) \
static int VARNAME##_target = 0; \
int *VARNAME = &VARNAME##_target
#endif /* PFS_THREADS */
/* ditto, for an arbitrary type* . Part of the external interface. */
#ifdef PFS_THREADS
#define AUTOSTAT_TYPEP(TYPE,VARNAME) \
static (TYPE) (VARNAME##_target[P_MAX_NUM_THREADS]); /* automatically 0 */\
(TYPE) *VARNAME = (VARNAME##_target + p__th_self_num())
#else
#define AUTOSTAT_TYPEP(TYPE,VARNAME) \
static (TYPE) VARNAME##_target = 0; \
(TYPE) *VARNAME = &VARNAME##_target
#endif /* PFS_THREADS */
#ifdef PFS_THREADS
#define AUTOSTATIC_VAR_INITIALIZED(TYPE,VARNAME,INITIALIZER) \
static TYPE (VARNAME##_target[P_MAX_NUM_THREADS]); /* automatically 0 */\
TYPE *VARNAME = (VARNAME##_target + p__th_self_num())
#else
#define AUTOSTATIC_VAR_INITIALIZED(VARNAME) \
static TYPE VARNAME##_target = 0; \
TYPE *VARNAME = &VARNAME##_target
#endif /* PFS_THREADS */
/* Possible alternative interface for a common case. I'm experimenting with
it. Experimental part of external interface. */
#if 1
#define SCRATCHBUF_CHARPP_DEF(VARNAME) AUTOSTAT_CHARPP(VARNAME)
/* Set using *VARNAME = or passing VARNAME as a pointer to the target. */
#define SCRATCHBUF_CHARPP_CLEANUP(VARNAME)
#else
/* This version of the interface will always allocate a new buffer upon
entry. It has the sole advantage that it does not leave static buffers
around. It has disadvantages too: presumably the many calls to malloc()
will not be an efficient way of using the processor. */
/* A good optimizing compiler should clean up the following (I hope). */
#define SCRATCHBUF_CHARPP_DEF(VARNAME) \
char * VARNAME##_target = NULL; \
char **VARNAME = &VARNAME##_target
/* Set using *VARNAME = or passing VARNAME as a pointer to the target. */
#define SCRATCHBUF_CHARPP_CLEANUP(VARNAME) do { \
stfree(*VARNAME); \
*VARNAME = NULL; \
} while(0)
#endif
/* The following abstraction is used for statics (per-file externs) and
real externs. */
/* Externs need separate declarations and data definitions. */
/* Each extern will need one of these after the declaration, to keep the old
stuff working. */
#ifdef PFS_THREADS
#define EXTERN_LONG_DECL(VARNAME) \
extern long p_th_ar##VARNAME[P_MAX_NUM_THREADS]
#define EXTERN_LONG_DEF(VARNAME) \
long p_th_ar##VARNAME[P_MAX_NUM_THREADS]
#define PERFILE_STATIC_LONG_DEF(VARNAME) \
static long p_th_ar##VARNAME[P_MAX_NUM_THREADS]
#define EXTERN_INT_DECL(VARNAME) \
extern int p_th_ar##VARNAME[P_MAX_NUM_THREADS]
#define EXTERN_INT_DEF(VARNAME) \
int p_th_ar##VARNAME[P_MAX_NUM_THREADS]
#define PERFILE_STATIC_INT_DEF(VARNAME) \
static int p_th_ar##VARNAME[P_MAX_NUM_THREADS]
#define EXTERN_CHARP_DECL(VARNAME) \
extern char * p_th_ar##VARNAME[P_MAX_NUM_THREADS]
#define EXTERN_CHARP_DEF(VARNAME) \
char * p_th_ar##VARNAME[P_MAX_NUM_THREADS]
#define PERFILE_STATIC_CHARP_DEF(VARNAME) \
static char * p_th_ar##VARNAME[P_MAX_NUM_THREADS]
#define EXTERN_TYPEP_DECL(TYPE,VARNAME) \
extern TYPE p_th_ar##VARNAME[P_MAX_NUM_THREADS]
#define EXTERN_TYPEP_DEF(TYPE,VARNAME) \
TYPE p_th_ar##VARNAME[P_MAX_NUM_THREADS]
#else
#define EXTERN_LONG_DECL(VARNAME) \
extern long p_th_ar##VARNAME[1]
#define EXTERN_LONG_DEF(VARNAME) \
long p_th_ar##VARNAME[1]
#define PERFILE_STATIC_LONG_DEF(VARNAME) \
static long p_th_ar##VARNAME[1]
#define EXTERN_INT_DECL(VARNAME) \
extern int p_th_ar##VARNAME[1]
#define EXTERN_INT_DEF(VARNAME) \
int p_th_ar##VARNAME[1]
#define PERFILE_STATIC_INT_DEF(VARNAME) \
static int p_th_ar##VARNAME[1]
#define EXTERN_CHARP_DECL(VARNAME) \
extern char * p_th_ar##VARNAME[1]
#define EXTERN_CHARP_DEF(VARNAME) \
char * p_th_ar##VARNAME[1]
#define PERFILE_STATIC_CHARP_DEF(VARNAME) \
static char * p_th_ar##VARNAME[1]
#define EXTERN_TYPEP_DECL(VARNAME) \
extern TYPE p_th_ar##VARNAME[1]
#define EXTERN_TYPEP_DEF(VARNAME) \
TYPE p_th_ar##VARNAME[1]
#endif /* PFS_THREADS */
/* In any case, follow definitions with a:
#define VARNAME p_th_arVARNAME[p__th_self_num()] */
#if 0 /* first attempt */
/* Externs need separate declarations and data definitions. */
#define EXTERN_INTP_DECL(VARNAMEP) extern int *VARNAMEP
/* Each extern will need one of these after the declaration, to keep the old
stuff working. */
/* #define VARNAME (*VARNAMEP) */
/* Definition. */
#define EXTERN_INTP_DEF(VARNAMEP) int *VARNAMEP
#endif /* #if 0 */
/* Mutexes,implemented on top of the pthreads package. */
/* p_th_mutex is an exported data type, used when we mutex functions or
collections of functions. See lib/ardp/ptalloc.c for an example of this.
*/
/*
Do so in init code, to keep
from depending on ONCE implementation. Again, this interface is only
called directly by Prospero and ARDP code when a set of functions need to be
mutexed; otherwise, the *_MUTEXED_* variable declaration and definition
interfaces below are used. */
#ifndef NDEBUG
#define zz(a) assert((a) == 0)
#else
#define zz(a) a
#endif
#if defined(PFS_THREADS) && !defined(NDEBUG)
#define DIAGMUTEX(MX1,MX2) if (p_th_mutex_islocked(&p_th_mutex##MX1 )) { printf(mutex_locked_msg,MX2); }
extern char mutex_locked_msg[];
#else
#define DIAGMUTEX(MX1,MX2) do { } while(0)
#endif
#ifdef PFS_THREADS_FLORIDA
typedef pthread_mutex_t p_th_mutex;
#define p_th_mutex_init(MUTEX) \
pthread_mutex_init(&(MUTEX), (pthread_mutexattr_t *) NULL)
#define p_th_mutex_lock(MUTEX) { pthread_mutex_lock(&(MUTEX)) }
#define p_th_mutex_unlock(MUTEX) pthread_mutex_unlock(&(MUTEX))
#define p_th_mutex_islocked(MUTEX) (pthread_mutex_trylock(&(MUTEX)) == -1)
#define p_th_mutex_trylock(MUTEX) \
( (p_th_mutex_trylock(&(MUTEX)) != -1) \
? p_th_mutex_lock(MUTEX) \
: TRUE )
#endif /*PFS_THREADS_FLORIDA*/
#ifdef PFS_THREADS_SOLARIS
typedef mutex_t p_th_mutex;
#define p_th_mutex_init(MUTEX) zz(mutex_init(&(MUTEX), USYNC_THREAD, NULL))
#define p_th_mutex_lock(MUTEX) zz(mutex_lock(&(MUTEX)))
#define p_th_mutex_unlock(MUTEX) zz(mutex_unlock(&(MUTEX)))
extern int p_th_mutex_islocked(mutex_t *mp);
#define p_th_mutex_trylock(MUTEX) (mutex_trylock(&(MUTEX)))
#endif /*PFS_THREADS_SOLARIS*/
#ifndef PFS_THREADS
#define p_th_mutex_init(MUTEX) do { } while(0)
#define p_th_mutex_lock(MUTEX) do { } while(0)
#define p_th_mutex_unlock(MUTEX) do { } while(0)
/* Used only in ardp_accept() */
#define p_th_mutex_islocked(MUTEX) 0
#define p_th_mutex_trylock(MUTEX) 0
#endif /*!PFS_THREADS*/
/* Handling of global shared variables (e.g., ardp_runQ) */
/* Mutex initialized in ardp_mutexes.c (ardp_init_mutexes()). */
/* Variable defined and declared as mutexed. */
#ifdef PFS_THREADS
#define EXTERN_MUTEX_DECL(VARNAME) \
extern p_th_mutex p_th_mutex##VARNAME
#define EXTERN_MUTEX_DEF(VARNAME) \
p_th_mutex p_th_mutex##VARNAME
/* Initialize the mutex (in ardp_init_mutexes(), pfs_init_mutexes(),
dirsrv_init_mutexes()) */
#define EXTERN_MUTEXED_INIT_MUTEX(VARNAME) \
p_th_mutex_init(p_th_mutex##VARNAME)
#else
/* No-ops if not threaded. */
#define EXTERN_MUTEX_DECL(VARNAME)
#define EXTERN_MUTEX_DEF(VARNAME)
#define EXTERN_MUTEXED_INIT_MUTEX(VARNAME) do {} while(0) /* no-op */
#endif /* PFS_THREADS */
#define EXTERN_ALLOC_DECL(VARNAME) \
EXTERN_MUTEX_DECL(VARNAME)
#define EXTERN_MUTEXED_DECL(TYPE,VARNAME) \
EXTERN_MUTEX_DECL(VARNAME); \
extern TYPE VARNAME
#define EXTERN_MUTEXED_DEF(TYPE,VARNAME) \
EXTERN_MUTEX_DEF(VARNAME); \
TYPE VARNAME
#define EXTERN_MUTEXED_DEF_INITIALIZER(TYPE,VARNAME,INITIALIZER) \
EXTERN_MUTEX_DEF(VARNAME); \
TYPE VARNAME = (INITIALIZER)
/* Lock and unlock a mutexed external variable. */
/* In order to avoid potential deadlock situations, all variables must be
locked in alphabetical order. */
#ifdef PFS_THREADS
#define EXTERN_MUTEXED_LOCK(VARNAME) p_th_mutex_lock(p_th_mutex##VARNAME)
#define EXTERN_MUTEXED_UNLOCK(VARNAME) p_th_mutex_unlock(p_th_mutex##VARNAME)
#else
#define EXTERN_MUTEXED_LOCK(VARNAME) do {} while (0)
#define EXTERN_MUTEXED_UNLOCK(VARNAME) do {} while (0)
#endif /* PFS_THREADS */
/* This is found in assertions inside functions that expect to be called only
when they are running as the 'master' thread in Prospero. */
/* The master thread is the one that is started off. When we're
single-threaded, that's the master. */
/* This is used entirely in assertions. */
#define P_IS_THIS_THREAD_MASTER() (p__th_self_num() == 0)
#ifdef PFS_THREADS_FLORIDA
/* Note that under the Draft 7 standard, pthread_detach
takes a pthread_t, whereas under Draft 6, it takes a pointer to
a pthread_t. This implementation uses Draft 6. */
#define p_th_t pthread_t
#define p_th_create_detached(NEWTHREAD,FUNC,ARG) ( \
pthread_create(&NEWTHREAD, (pthread_attr_t *) NULL, \
(pthread_funct_t) FUNC, (any_t) ARG) \
: pthread_detach(&NEWTHREAD) \
)
#define p_th_self pthread_self
#define p_th_equal(a,b) pthread_equal(a,b)
#endif
#ifdef PFS_THREADS_SOLARIS
#define p_th_t thread_t
/* caller needs to check this for errors */
#define p_th_create_detached(NEWTHREAD,FUNC,ARG) \
thr_create(NULL,0,(void *)FUNC,ARG,THR_DETACHED, &NEWTHREAD)
#define p_th_self thr_self
/* thread_t is an int so ...*/
#define p_th_equal(a,b) (a == b)
#endif
/* Mutexed versions of everything that might possibly call malloc() and free().
We can yank this out once we have thread-safe libraries, but that might be a
few years off. */
/* Note that we have converted over all of the server code that might be
called when multi-threaded to not call any of the printf() family of
functions. With a thread_safe malloc() now available from FSU, that
means we need none of these special definitions. Hooray! */
#if defined(PFS_THREADS) && !defined(PFS_THREADS_SOLARIS) && !defined(PFS_THREADS_FLORIDA)
/* commented out for the implemented thread implementations.*/
#define free(P) p_th_free((P))
extern void p_th_free(void *P);
#define malloc(P) p_th_malloc((P))
extern void *p_th_malloc(unsigned size);
#define calloc(A,B) p_th_calloc((A),(B))
extern void *p_th_calloc(unsigned nelem, unsigned size);
#define _filbuf(p) p_th__filbuf((p))
#define _flsbuf(p,q) p_th__flsbuf((p),(q))
#define fgets(a,b,c) p_th_fgets((a),(b), (c))
extern char *p_th_fgets(char *s, int n, FILE *stream);
#define gets(a) p_th_gets((a))
extern char *p_th_gets(char *s);
#define fputs(a,b) p_th_fputs((a),(b))
extern int p_th_fputs(const char *s, FILE *stream);
#define puts(a) p_th_puts((a))
extern int p_th_puts(const char *s);
#define sprintf p_th_sprintf
extern char *p_th_sprintf();
#define fprintf p_th_fprintf
#define printf p_th_printf
#define fflush(a) p_th_fflush((a))
extern int p_th_fflush(FILE *);
#define fgetc(a) p_th_fgetc((a))
extern int p_th_fgetc(FILE *);
#define fputc(a,b) p_th_fputc((a),(b))
extern int p_th_fputc();
#define fread(a,b,c,d) p_th_fread((a),(b),(c), (d))
extern int p_th_fread(char *ptr, int size, int nitems, FILE*stream);
#define fwrite(a,b,c,d) p_th_fwrite((a),(b),(c), (d))
extern int p_th_fwrite(const char *ptr, int size, int nitems, FILE *stream);
#define fopen(a,b) p_th_fopen((a),(b))
extern FILE *p_th_fopen(const char *a, const char *b);
#define fclose(a) p_th_fclose((a))
extern int p_th_fclose(FILE *a);
#endif /* !defined(PFS_THREADS_FLORIDA) && !defined(PFS_THREADS_SOLARIS */
/* also in ardp.h */
extern FILE *locked_fopen(const char *a, const char *b);
extern int locked_fclose_A(FILE *a, const char*filename, int readonly);
extern void locked_clear(FILE *a);
int locked_fclose_and_rename(FILE *afile, const char *tmpfilename, const char *filename, int retval);
#if 0
#define locked_fopen(a,b) fopen((a),(b))
#define locked_fclose_A(a,b,c) fclose((a))
#define locked_clear(a)
#endif /* 0 */
extern void p__th_set_self_master();
#endif /* PFS_THREADS_H */

View File

@@ -0,0 +1,48 @@
/* This file is intended for inclusion by ardp or pfs */
/* NOTE: It is *not* dependent on pmachine.h */
/* Internal error handling routines used by the pfs code; formerly in */
/* internal_error.h. These include a replacement for the assert() */
/* macro, and an interface for internal error handling, better */
/* documented in internal_error.c */
#ifndef NDEBUG
/* This is duplicated over in ardp.h. A final cleanup will need to be made.
*/
#ifndef assert
#define assert(expr) do { \
if (!(expr)) \
p__finternal_error(__FILE__, __LINE__, "assertion violated: " #expr); \
} while(0)
#endif /* assert() */
#else /* NDEBUG */
#ifndef assert
#define assert(expr) do {;} while(0)
#endif /* assert() */
#endif /* NDEBUG */
#ifndef internal_error
#define internal_error(msg) do { \
write(2, "Internal error in file " __FILE__ ": ", \
sizeof "Internal error in file " __FILE__ ": " -1); \
write(2, msg, strlen(msg)); \
write(2, "\n", 1); \
if (internal_error_handler) \
(*internal_error_handler)(__FILE__, __LINE__, msg); \
else { \
fprintf(stderr, "line of error: %d\n", __LINE__); \
abort(); \
} \
} while(0)
#endif /* internal_error */
/* This function may be set to handle internal errors. Dirsrv handles them in
this way, by logging to plog. We make it int instead of void, because
older versions of the PCC (Portable C Compiler) cannot handle pointers to
void functions. */
extern int (*internal_error_handler)(const char file[], int linenumber, const char mesg[]);
/* function form of internal_error. */
void p__finternal_error(const char file[], int linenumber, const char mesg[]);

215
prospero/include/plog.h Normal file
View File

@@ -0,0 +1,215 @@
/*
* Copyright (c) 1991-1994 by the University of Southern California
*
* For copying and distribution information, please see the file
* <usc-license.h>.
*/
#include <usc-license.h>
#ifndef PLOG_H_INCLUDED
#define PLOG_H_INCLUDED
/*
* IMPORTANT: This file defines the configuration for the
* information to be logged for each type of Prospero query. As
* distributed, Prospero is configured to log lots of information,
* including the names of clients and the specific commands issued. This
* information should be considered sensitive and you must protect the
* logfile. Additionally, you should configure the server to log only
* the information you actually need. This can be accomplished by
* copying the definition of INITIAL_LOG_VECTOR to <pserver.h> and editing it.
*/
/* This file will be preceded by <pserver.h>, which can contain definitions
overriding some of the ones in the following file. You should edit that
file in preference to this one, so that when you upgrade to a later release
of Prospero you will be able to use the stock version of plog.h and just
change <pserver.h>.
*/
#include <stddef.h>
#include <stdarg.h>
#define PLOG_TOFILE_ENABLED 0x80000000
#define PLOG_TOFILE_DISABLED 0x00000000
/*
* If log messages are to be written to the prospero log file,
* PLOG_TOFILE must be set to PLOG_TOFILE_ENABLED. To disable logging
* to the log file, it's value should be PLOG_TOFILE_DISABLED. Note that
* it is acceptable to log to both syslog and the log file.
*
* This can most conveniently be set by #defining PSRV_LOGFILE in the
* "include/pserver.h" configuration file.
*/
#ifndef PSRV_LOGFILE
#define PLOG_TOFILE PLOG_TOFILE_DISABLED
#define PSRV_LOGFILE "pfs.nolog"
#else
#define PLOG_TOFILE PLOG_TOFILE_ENABLED
#endif
/*
* This following definitions define the types of log messages logged by
* plog. The action to be taken for each event can be selectively
* defined by setting the corresponding entry in INITIAL_LOG_VECTOR.
*/
#define MXPLOGENTRY 1000 /* Maximum length of single entry */
#define NLOGTYPE 25 /* Maximum number of log msg types */
#define L_FIELDS 0 /* Fields to include in messages */
#define L_STATUS 1 /* Startup, termination, etc */
#define L_FAILURE 2 /* Failure condition */
#define L_STATS 3 /* Statistics on server usage */
#define L_NET_ERR 4 /* Unexpected error in network code */
#define L_NET_RDPERR 5 /* Reliable datagram protocol error */
#define L_NET_INFO 6 /* Info on network activity */
#define L_QUEUE_INFO 7 /* Info on queue managment */
#define L_QUEUE_COMP 8 /* Requested service completed */
#define L_DIR_PERR 9 /* PFS Directory protocol errors */
#define L_DIR_PWARN 10 /* PFS Directory protocol warning */
#define L_DIR_PINFO 11 /* PFS Directory protocol info */
#define L_DIR_ERR 12 /* PFS Request error */
#define L_DIR_WARN 13 /* PFS Request warning */
#define L_DIR_REQUEST 14 /* PFS information request */
#define L_DIR_UPDATE 15 /* PFS information update */
#define L_AUTH_ERR 16 /* Unauthorized operation attempted */
#define L_DATA_FRM_ERR 17 /* PFS directory format error */
#define L_DB_ERROR 18 /* Error in database operation */
#define L_DB_INFO 19 /* Error in database operation */
#define L_ACCOUNT 20 /* Accounting info. record */
#define L_ERR_UNK NLOGTYPE /* Unknown error type */
/* Fields to include in log messages (L_FIELDS_HNAME not yet implemented) */
#define L_FIELDS_USER_R 0x01 /* Include user ID in request log message */
#define L_FIELDS_USER_U 0x02 /* Include user ID in update log messages */
#define L_FIELDS_USER_I 0x04 /* Include user ID in informational msgs */
#define L_FIELDS_HADDR 0x08 /* Include host address in log messages */
#define L_FIELDS_HNAME 0x10 /* Include host name in log messages */
#define L_FIELDS_SW_ID 0x20 /* Include host name in log messages */
#define L_FIELDS_CID 0x40 /* Include connection ID in log messages */
#define L_FIELDS_PORT 0x80 /* Include UDP port number in log msgs */
#define L_FIELDS_STIME 0x100 /* Include cuurent system time of rreq */
#define L_FIELDS_USER (L_FIELDS_USER_R|L_FIELDS_USER_U|L_FIELDS_USER_I)
/*
* P_LOGTO_SYSLOG should be defined if log messages are to be sent to syslog.
* If you are logging to syslog, you will probably be better off if you
* assign one of the local facility names (e.g., LOG_LOCAL1) to Prospero and
* define LOG_PROSPERO (below) accordingly. By default, Prospero does a lot
* of logging. If you choose to use LOG_DAEMON (which is the default value
* of LOG_PROSPERO), you might want to turn off logging of certain events
* to reduce clutter in your system wide log files.
*
* This can also be conveniently set by #defining P_LOGTO_SYSLOG in the
* "include/pserver.h" configuration file, and possibly also LOG_PROSPERO
*/
/*
* #define P_LOGTO_SYSLOG
*/
#ifdef P_LOGTO_SYSLOG
#include <syslog.h>
#define LOG_PROSPERO LOG_DAEMON
#else
#define LOG_PROSPERO 0
#endif
#ifndef LOG_INFO
#define LOG_CRIT 2
#define LOG_ERR 3
#define LOG_WARNING 4
#define LOG_NOTICE 5
#define LOG_INFO 6
#endif LOG_INFO
/* If L_FILEDS_STIME selected, then... */
/* This can also be conveniently set by #defining L_WTTIME_THRESHOLD in the
* "include/pserver.h" configuration file.
*/
#ifndef L_WTTIME_THRESHOLD
#define L_WTTIME_THRESHOLD 1 /* log waiting time if >= seconds */
#endif
/* This can also be conveniently set by #defining L_SYSTIME_THRESHOLD in the
* "include/pserver.h" configuration file.
*/
#ifndef L_SYSTIME_THRESHOLD
#define L_SYSTIME_THRESHOLD 1 /* log systime if >= seconds */
#endif
/* This can also be conveniently redefined by #defining L_SVCTIME_THRESHOLD in
* the"include/pserver.h" configuration file.
*/
#ifndef L_SVCTIME_THRESHOLD
#define L_SVCTIME_THRESHOLD 1 /* log svctime if >= seconds */
#endif
/* If L_QUEUE_COMP selected, then the following conditions are ANDed */
/* This can also be conveniently redefined by #defining L_COMP_SVC_THRESHOLD
* in the"include/pserver.h" configuration file.
*/
#ifndef L_COMP_SVC_THRESHOLD
#define L_COMP_SVC_THRESHOLD 30 /* Log L_QUEUE_COMP only if svctime exceeds */
#endif
/* This can also be conveniently redefined by #defining L_COMP_SYS_THRESHOLD
* in the"include/pserver.h" configuration file.
*/
#ifndef L_COMP_SYS_THRESHOLD
#define L_COMP_SYS_THRESHOLD 0 /* Log L_QUEUE_COMP only if systime exceeds */
#endif
/*
* INITIAL_LOG_VECTOR defines the actions to be taken for log messages
* of particular types. If INITIAL_LOG_VECTOR is defined in psite.h,
* that definition will override the definition that appears here.
*
* Event 0 in the vector is a bit vector identifying the information
* to be included in each log message (see L_FIELDS above). All other
* events in the vector specify the (OR'd together) syslog facility and
* priority to be used for the log message if P_LOGTO_SYSLOG is defined.
* The facility and priority are also OR'd with PLOG_TOFILE to indicate
* that the message should be written to the Prospero logfile
* (conditional on PLOG_TOFILE being enabled). If the entry for an
* event is 0, then no logging will occur.
*
* NOTE: The syslog event and priority of 0 is being overloaded.
* You cannot specify the combination of the LOG_EMERG priority
* and the LOG_KERN facility.
*/
/* This can also be conveniently redefined by #defining INITIAL_LOG_VECTOR
* in the"include/pserver.h" configuration file.
*/
#ifndef INITIAL_LOG_VECTOR
#define INITIAL_LOG_VECTOR { \
L_FIELDS_USER|L_FIELDS_HADDR|L_FIELDS_SW_ID, /* L_FIELDS */ \
LOG_PROSPERO|LOG_NOTICE|PLOG_TOFILE, /* L_STATUS */ \
LOG_PROSPERO|LOG_CRIT|PLOG_TOFILE, /* L_FAILURE */ \
PLOG_TOFILE, /* L_STATS */ \
LOG_PROSPERO|LOG_ERR|PLOG_TOFILE, /* L_NET_ERR */ \
LOG_PROSPERO|LOG_ERR|PLOG_TOFILE, /* L_NET_RDPERR */ \
0, /* L_NET_INFO */ \
LOG_PROSPERO|LOG_INFO|PLOG_TOFILE, /* L_QUEUE_INFO */ \
0, /* L_QUEUE_COMP */ \
LOG_PROSPERO|LOG_ERR|PLOG_TOFILE, /* L_DIR_PERR */ \
LOG_PROSPERO|LOG_WARNING|PLOG_TOFILE, /* L_DIR_PWARN */ \
LOG_PROSPERO|LOG_INFO|PLOG_TOFILE, /* L_DIR_PINFO */ \
LOG_PROSPERO|LOG_ERR|PLOG_TOFILE, /* L_DIR_ERR */ \
LOG_PROSPERO|LOG_WARNING|PLOG_TOFILE, /* L_DIR_WARN */ \
LOG_PROSPERO|LOG_INFO|PLOG_TOFILE, /* L_DIR_REQUEST */ \
LOG_PROSPERO|LOG_INFO|PLOG_TOFILE, /* L_DIR_UPDATE */ \
LOG_PROSPERO|LOG_WARNING|PLOG_TOFILE, /* L_AUTH_ERR */ \
LOG_PROSPERO|LOG_ERR|PLOG_TOFILE, /* L_DATA_FRM_ERR */ \
LOG_PROSPERO|LOG_ERR|PLOG_TOFILE, /* L_DB_ERROR */ \
LOG_PROSPERO|LOG_INFO|PLOG_TOFILE, /* L_DB_INFO */ \
LOG_PROSPERO|LOG_INFO|PLOG_TOFILE /* L_ACCOUNT */ \
}
#endif /* INITIAL_LOG_VECTOR */
extern char *vplog(int, RREQ, char *, va_list);
extern char *plog(int, RREQ, char *, ...);
extern void plog_manual(FILE *outf); /* call if plogging manually. */
#endif /* PLOG_H_INCLUDED */

View File

@@ -0,0 +1,52 @@
/*
* Machine types - Supported values
*
* VAX, SUN, HP9000_S300, HP9000_S700, IBM_RTPC, ENCORE_NS32K,
* ENCORE_S93, ENCORE_S91, APOLLO, IBM_RS6000, IBM_PC
*
* MIPS_BE - MIPS Chip (Big Endian Byte Order)
* MIPS_LE - MIPS Chip (Little Endian Byte Order)
*
* Add others as needed.
*
* Files that check these defintions:
* include/pmachine.h
*/
#ifdef AIX
#define P_MACHINE_TYPE "IBM_RS6000"
#define IBM_RS6000
#endif
#ifdef SUNOS
#define P_MACHINE_TYPE "SUN"
#define SUN
#endif
#ifdef SOLARIS
#define P_MACHINE_TYPE "SUN"
#define SUN
#endif
/*
* Operating system - Supported values
*
* ULTRIX, BSD43, SUNOS (version 4), SUNOS_V3 (SunOS version 3), HPUX, SYSV,
* MACH, DOMAINOS, AIX, SOLARIS (a.k.a. SunOS version 5), SCOUNIX
*
* Add others as needed.
*
* Files that check these defintions:
* include/pmachine.h, lib/pcompat/opendir.c, lib/pcompat/readdir.c
*/
#ifdef AIX
#define P_OS_TYPE "AIX"
#endif
#ifdef SUNOS
#define P_OS_TYPE "SUNOS"
#endif
#ifdef SOLARIS
#define P_OS_TYPE "SOLARIS"
#endif

573
prospero/include/pmachine.h Normal file
View File

@@ -0,0 +1,573 @@
/*
* Copyright (c) 1991-1994 by the University of Southern California
*
* For copying and distribution information, please see the file
* <usc-license.h>.
*/
#include <usc-license.h>
#include <stdio.h>
/*
* pmachine.h - Processor/OS specific definitions
*/
/*
* Machine types - Supported values
*
* VAX, SUN, HP9000_S300, HP9000_S700, IBM_RTPC, ENCORE_NS32K,
* ENCORE_S93, ENCORE_S91, APOLLO, IBM_RS6000, IBM_PC
*
* MIPS_BE - MIPS Chip (Big Endian Byte Order)
* MIPS_LE - MIPS Chip (Little Endian Byte Order)
*
* Add others as needed.
*
* Files that check these defintions:
* include/pmachine.h
*/
#include "pmachine-conf.h" /* lucb */
#ifdef 0 /* lucb */
#define P_MACHINE_TYPE "SUN"
#define SUN
#endif
/*
* Operating system - Supported values
*
* ULTRIX, BSD43, SUNOS (version 4), SUNOS_V3 (SunOS version 3), HPUX, SYSV,
* MACH, DOMAINOS, AIX, SOLARIS (a.k.a. SunOS version 5), SCOUNIX
*
* Add others as needed.
*
* Files that check these defintions:
* include/pmachine.h, lib/pcompat/opendir.c, lib/pcompat/readdir.c
*/
#ifdef 0 /* lucb */
#define P_OS_TYPE "SUNOS"
#define SUNOS
#endif
/*
* Miscellaneous definitions
*
* Even within a particular hardware and OS type, not all systems
* are configured identically. Some systems may need additinal
* definitions, some of which are included below. Note that for
* some system types, these are automatically defined.
*
* define ARDP_MY_WINDOW_SZ if your system has some sort of internal limit
* on the number of UDP packets that can be queued. SOLARIS has a limit of
* 9 or less (6 seems to work for Pandora Systems), which inspired
* this change. If defined, the client will explicity request that
* the server honor this window size. This reduces retries and wasted
* messages.
* define NEED_MODE_T if mode_t is not typedefed on your system
* define DD_SEEKLEN if your system doesn't support dd_bbase and dd_bsize
* define DIRECT if direct is the name of your dirent structure
* This generally goes along with using sys/dir.h.
* define USE_SYS_DIR_H if your system doesn't include sys/dirent.h, and
* sys/dir.h should be used instead.
* define CLOSEDIR_RET_TYPE_VOID if your closedir returns void
* Define GETDENTS if your system supports getdents instead of getdirentries
* Define OPEN_MODE_ARG_IS_INT if your system has the optional third argument
* to open() as an int. Don't #define it if the optional third argument to
* open() is a mode_t. You will need to #undef this if you're using the
* sysV interface to SunOS.
* Define SIGCONTEXT_LACKS_SC_PC if your system's sigcontext structure lacks
* an sc_pc member. This appears to be the case on HPUX version 8.07 on the
* HP 9000 series 700 workstations. I don't know if it's the case anywhere
* else, and I suspect it's a bug in the release that will be fixed later.
* Define PROTOTYPE_FOR_OPEN_HAS_EMPTY_ARGLIST if your system prototypes the
* open() function with an empty argument list. This is necessary because
* gcc requires the prototype to match the function invocation.
* Define PROTOTYPE_FOR_SELECT_USES_INT_POINTER if your system prototypes the
* select() function with 'int *' for the second, third, and fourth arguments
* instead of 'fd_set *'.
* Define BSD_UNION_WAIT if your system doesn't support the new POSIX wait()
* interface and does support the old BSD wait() interface and 'union wait'
* member.
* Define INCLUDE_FILES_LACK_FDOPEN_PROTOTYPE if your system's <stdio.h> lacks
* an fdopen() prototype.
* Define INCLUDE_FILES_LACK_POPEN_PROTOTYPE if your system's <stdio.h> lacks
* an popen() prototype.
* Define INCLUDE_FILES_LACK_TEMPNAM_PROTOTYPE if your system's <stdio.h> lacks
* a prototype for tempnam().
*/
#ifdef SOLARIS
#define ARDP_MY_WINDOW_SZ 6
#endif
/* Not sure if we need this as well, we certainly need the definition
of direct as dirent below */
#ifdef SCOUNIX
#define DIRECT
#endif
/*****************************************************************/
/* If your machine and OS type are listed above, and if your */
/* configuration is relatively standard for your machine and */
/* OS, there should be no need for any changes below this point. */
/*****************************************************************/
/*
* Machine or OS dependent parameters
*
* The comment at the head of each section names the paramter
* and the files that use the definition
*/
/*
* BYTE_ORDER: lib/psrv/plog.c, lib/psrv/check_acl.c
* #ifdefs by lucb
*/
#ifdef BIG_ENDIAN
# undef BIG_ENDIAN
#endif
#ifdef LITTLE_ENDIAN
# undef LITTLE_ENDIAN
#endif
#ifdef BYTE_ORDER
# undef BYTE_ORDER
#endif
#define BIG_ENDIAN 1
#define LITTLE_ENDIAN 2
#if defined(SUN) || defined(HP9000_S300) || defined(HP9000_S700) || \
defined(IBM_RTPC) || defined(IBM_RS6000) || \
defined(ENCORE_S91) || defined(ENCORE_S93) || defined(APOLLO) || \
defined(MIPS_BE)
#define BYTE_ORDER BIG_ENDIAN
#else
#define BYTE_ORDER LITTLE_ENDIAN
#endif
/*
* PUTENV: lib/pfs/vfsetenv.c
*
* PUTENV must be defined if your C library supports the putenv
* call instead of setenv (e.g. Ultrix and SunOS).
*/
#if defined(ULTRIX) || defined(SUNOS) || defined(SUNOS_V3) || defined(HPUX) \
|| defined(SOLARIS) || defined(SCOUNIX) || defined(AIX)
#define PUTENV
#endif
/*
* BADSETENV: lib/pfs/penviron.c
*
* Older BSD 4.3 systems have a bug in the C library routine setenv.
* Define BADSETENV if you wish to compile a working version of this
* this routine.
*
* #define BADSETENV
*/
/*
* NOREGEX: lib/pfs/wcmatch.c
*
* NOREGEX must be defined if your C library does not support the
* re_comp and re_exec regular expression routines.
*/
#if defined(HPUX) || defined(SOLARIS) || defined(SCOUNIX)
#define NOREGEX
#endif
/*
* String and byte manipulating
* procedures: lib/pfs/sindex.c, lib/pcompat/pfs_access.c
*/
#if defined(HPUX) || defined(SYSV) || defined(SOLARIS)
#define index strchr
#define rindex strrchr
#define bcopy(a,b,n) memmove(b,a,n)
#define bzero(a,n) memset(a,0,n)
#define bcmp memcmp
#endif
/*
* getwd: server/pstart.c
*/
#if defined(HPUX) || defined(SYSV) || defined(SOLARIS)
#define getwd(d) getcwd(d, MAXPATHLEN)
#endif
/*
* SETSID: server/dirsrv.c
*
* SETSID is to be defined if the system supports the POSIX
* setsid() routine to create a new session and set the process
* group ID.
*/
#if defined(HPUX) || defined(SOLARIS) || defined(SCOUNIX)
#define SETSID
#endif
/*
* NFILES: user/vget/pclose.c
*
* NFILES is the size of the descriptor table.
*/
#if defined(HPUX)
#define NFILES _NFILE
#elif defined (SOLARIS)
#define NFILES sysconf(_SC_OPEN_MAX)
#else
#define NFILES getdtablesize()
#endif
/*
* SIGNAL_RET_TYPE: user/vget/ftp.c, user/vget/pclose.c
*
* This is the type returned by the procedure returned by
* signal(2) (or signal(3C)). In some systems it is void, in others int.
*
*/
#if defined (BSD43) || defined(SUNOS_V3)
#define SIGNAL_RET_TYPE int
#else
#define SIGNAL_RET_TYPE void
#endif
/*
* CLOSEDIR_RET_TYPE_VOID: lib/pcompat/closedir.c
*
* If set, closedir() returns void.
*/
#if defined (NOTDEFINED)
#define CLOSEDIR_RET_TYPE_VOID
#endif
/*
* DIRECT: lib/pcompat/ *dir.c app/ls.c
*
* Use direct as the name of the dirent struct
*/
#if defined(DIRECT)
#define dirent direct
#endif
/*
* USE_SYS_DIR_H: lib/pcompat/ *dir.c app/ls.c
*
* Include the file <sys/dir.h> instead of <dirent.h>
*/
#if defined (NOTDEFINED)
#define USE_SYS_DIR_H /* slowly fading out of necessity */
/* Hopefully it's finally dead. */
#endif
/*
* DIR structure definitions: lib/pcompat/telldir.c,opendir.c
*/
#if defined (SUNOS) || defined(SUNOS_V3)
#define dd_bbase dd_off
#endif
#if defined (DD_SEEKLEN)
#define dd_bbase dd_seek
#define dd_bsize dd_len
#endif
/*
* GETDENTS: lib/pcompar/readdir.c
*
* Define GETDENTS if your system supports getdents instead of
* getdirentries.
*/
#if defined (SOLARIS)
#define GETDENTS
#endif
#if defined (GETDENTS)
#define getdirentries(F,B,N,P) getdents(F,B,N)
#endif
/*
* NEED MODE_T typedef: ls.c
*
* Define this if mode_t is not defined by your system's include
* files (sys/types.h or sys/stdtypes.h or sys/stat.h).
*/
#if defined (NEED_MODE_T)
typedef unsigned short mode_t;
#endif
/*
* OPEN_MODE_ARG_IS_INT: used: lib/pcompat/open.c
* Define OPEN_MODE_ARG_IS_INT if your system has the optional third argument
* to open() as an int. Don't #define it if the optional third argument to
* open() is a mode_t. You will need to #undef this if you're using the
* sysV interface to SunOS.
*/
/* Not sure how MACH and DOMAINOS actually need it; this is a guess. */
#if defined(ULTRIX) || defined(BSD43) || defined(SUNOS) || defined(SUNOS_V3) \
|| defined(MACH) || defined(DOMAINOS)
#define OPEN_MODE_ARG_IS_INT
#endif
/*
* SIGCONTEXT_LACKS_SC_PC typedef: server/dirsrv.c
*
* Define SIGCONTEXT_LACKS_SC_PC if your system's sigcontext structure lacks
* an sc_pc member. This appears to be the case on HPUX version 8.07 on the
* HP 9000 series 700 workstations. I don't know if it's the case anywhere
* else, and I suspect it's a bug in the release that will be fixed later.
*/
#if (defined(HPUX) && defined(HP9000_S700)) || defined(SOLARIS) || defined(SCOUNIX)
#define SIGCONTEXT_LACKS_SC_PC
#endif
/*
* PROTOTYPE_FOR_OPEN_HAS_EMPTY_ARGLIST: lib/pcompat/open.c
* See the file for how this is used. In GCC, an old-style function prototype
* is not compatible with a full ANSI function definition containing a ...
* (variable argument list). This definition makes sure that we use the
* appropriate definition of open() to correspond with the system include
* files.
*/
/*
* This is triggered if we're using the GCC fixed <sys/fcntlcom.h> under an
* ANSI C compiler; means that open() will be fully prototyped.
*/
#if !defined(HPUX) && !defined(SOLARIS) && (!defined(_PARAMS) && !defined(__STDC__))
#define PROTOTYPE_FOR_OPEN_HAS_EMPTY_ARGLIST
#endif
/*
* Define PROTOTYPE_FOR_SELECT_USES_INT_POINTER if your system prototypes the
* select() function with 'int *' for the second, third, and fourth arguments
* instead of 'fd_set *'. This avoids compilation warnings in libardp.
*/
#if defined(HPUX)
#define PROTOTYPE_FOR_SELECT_USES_INT_POINTER
#endif
#ifdef PROTOTYPE_FOR_SELECT_USES_INT_POINTER
#define select(width, readfds, writefds, exceptfds, timeout) \
select(width, (int *) readfds, (int *) writefds, (int *) exceptfds, timeout)
#endif
/*
* Define BSD_UNION_WAIT if your system doesn't support the new POSIX wait()
* interface and does support the old BSD wait() interface and 'union wait'
* member.
* Used in: lib/pcompat/pmap_cache.c, lib/pcompat/pmap_nfs.c, user/vget.c
*/
#if defined(NOTDEFINED)
#define BSD_UNION_WAIT
#endif
#if defined(SOLARIS)
/* In theory these are defined in stdio.h, but they're not present (at least in
* Solaris 2.3 they're not) and GCC doesn't fix this correctly right now.
*/
#define INCLUDE_FILES_LACK_FDOPEN_PROTOTYPE
#define INCLUDE_FILES_LACK_POPEN_PROTOTYPE
#define INCLUDE_FILES_LACK_TEMPNAM_PROTOTYPE
#endif /* SOLARIS */
/*
* Catch any definitions not in system include files
*
* The comment at the head of each section names the paramter
* and the files that use the definition
*/
/*
* OPEN_MAX: Maximum number of files a process can have open
*/
#ifndef OPEN_MAX
#define OPEN_MAX 64
#endif
/* MAXPATHLEN is still needed despite recommended change to pprot.h
since some files include sys/param.h but not pprot.h and use MAXPATHLEN
XXX MAXPATHLEN will eventually disappear from Prospero. SCO doesn't
provide that interface, and neither does Posix. All the fixed-length
code that uses MAXPATHLEN sized buffers will have to be rewritten to use
flexible-length names. -swa, Mar 10, 1994
*/
#ifndef MAXPATHLEN
#define MAXPATHLEN 1024
#endif
#ifdef SCOUNIX
/* sys/types.h is needed to define u_long, it must be before the FD_SET stuff*/
/* I dont know why this is so, but remember it from another port */
#define vfork fork
#endif
/* End of stuff required for SCO Unix */
/*
* FD_SET: lib/pfs/dirsend.c, user/vget/ftp.c
*/
#include <sys/types.h>
/* FD_SET is provided in SOLARIS by <sys/select.h>. This include file does not
exist on SunOS 4.1.3; on SunOS it's provided in <sys/types.h>.
No <sys/select.h> on HP-UX.
Don't know about other versions of UNIX. */
#ifdef SOLARIS
#include <sys/select.h> /* Include it before override it */
#endif
#ifndef FD_SET
#define NFDBITS 32
#define FD_SETSIZE 32
#define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS)))
#define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS)))
#define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS)))
#define FD_ZERO(p) bzero((char *)(p), sizeof(*(p)))
#endif
/*
* howmany: app/ls.c
*/
#ifndef howmany
#define howmany(x, y) ((((u_int)(x))+(((u_int)(y))-1))/((u_int)(y)))
#endif
/*
* MAXHOSTNAMELEN: user/vget/ftp.c
*/
#ifdef SOLARIS
#include <netdb.h>
#endif
#ifdef SUNOS
#include <sys/param.h>
#endif
#ifdef AIX
#include <sys/param.h>
#endif
#ifndef MAXHOSTNAMELEN
#define MAXHOSTNAMELEN 64
#endif
/*
* O_ACCMODE: lib/pcompat/open.c
*/
#ifndef AIX /* lucb */
#include <sys/fcntl.h> /* Make sure include before overridden */
#else
#include <fcntl.h> /* Make sure include before overridden */
#endif
#ifndef O_ACCMODE
#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR)
#endif
/*
* Definitions from stat.h: app/ls.c lib/pfs/mkdirs.c
*/
#include <sys/stat.h> /* Make sure included before overridden */
#ifndef S_IFMT
#define S_IFMT 070000
#endif
#ifndef S_IFDIR
#define S_IFDIR 040000
#endif
#ifndef S_IFCHR
#define S_IFCHR 020000
#endif
#ifndef S_IFBLK
#define S_IFBLK 060000
#endif
#ifndef S_IXUSR
#define S_IXUSR 0100
#endif
#ifndef S_IXGRP
#define S_IXGRP 0010
#endif
#ifndef S_IXOTH
#define S_IXOTH 0001
#endif
#ifndef S_ISDIR
#define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
#endif
#ifndef S_ISCHR
#define S_ISCHR(m) ((S_IFLNK & m) == S_IFCHR)
#endif
#ifndef S_ISBLK
#define S_ISBLK(m) ((S_IFLNK & m) == S_IFBLK)
#endif
/* The ULTRIX include files don't bother to prototype the non-ansi string
manipulation functions.
*/
#ifdef ULTRIX
char *index(), *rindex();
#endif
#ifndef SCOUNIX
#define HAVE_WRITEV
#endif
#if defined(SCOUNIX) || defined(SOLARIS)
#define POSIX_SIGNALS
#endif
/* Define this if your system doesn't support the readv() and writev()
scatter/gather I/O primitives. If they're present, a couple of minor
optimizations happen.
*/
#ifdef SCOUNIX
#define NO_IOVEC
#endif
/* SOLARIS doesn't have sys_nerr or sys_errlist. It provides the strerror()
interface instead. All references to strerror() or to sys_nerr and
sys_errlist in Prospero now go through the unixerrstr() function in
lib/ardp/unixerrstr.c --swa
*/
#if defined(SOLARIS)
#define HAVESTRERROR
#else
#undef HAVESTRERROR
#endif
#ifdef INCLUDE_FILES_LACK_FDOPEN_PROTOTYPE
/* This seems to be the case only on SOLARIS, at least through 2.3*/
/*Should be defined in stdio.h */
extern FILE *fdopen(const int fd, const char *opts);
#endif
#ifdef INCLUDE_FILES_LACK_TEMPNAM_PROTOTYPE
/* Supposed to be defined in stdio.h, not there in Solaris2.3 */
extern char *tempnam(const char *, const char *);
#endif
#ifdef INCLUDE_FILES_LACK_POPEN_PROTOTYPE
/* This seems to be the case only on SOLARIS, at least through 2.3. */
/*Should be defined in stdio.h */
extern FILE *popen(const char *, const char *);
#endif
#if defined(SCOUNIX)
#define TCPTIMEOUTS
#else
/* Definitely not working on SOLARIS yet */
#undef TCPTIMEOUTS
#endif
#if defined(SOLARIS)
/* Currently used only in lib/psrv/ppasswd.c.
Solaris prototypes the library function crypt() in the crypt.h
include file. */
#define CRYPT_FUNCTION_PROTOTYPE_IN_CRYPT_H
#endif

View File

@@ -0,0 +1,536 @@
/*
* Copyright (c) 1991-1994 by the University of Southern California
*
* For copying and distribution information, please see the file
* <usc-license.h>.
*/
#include <usc-license.h>
/*
* pmachine.h - Processor/OS specific definitions
*/
/*
* Machine types - Supported values
*
* VAX, SUN, HP9000_S300, HP9000_S700, IBM_RTPC, ENCORE_NS32K,
* ENCORE_S93, ENCORE_S91, APOLLO, IBM_RS6000, IBM_PC
*
* MIPS_BE - MIPS Chip (Big Endian Byte Order)
* MIPS_LE - MIPS Chip (Little Endian Byte Order)
*
* Add others as needed.
*
* Files that check these defintions:
* include/pmachine.h
*/
#define P_MACHINE_TYPE "SUN"
#define SUN
/*
* Operating system - Supported values
*
* ULTRIX, BSD43, SUNOS (version 4), SUNOS_V3 (SunOS version 3), HPUX, SYSV,
* MACH, DOMAINOS, AIX, SOLARIS (a.k.a. SunOS version 5), SCOUNIX
*
* Add others as needed.
*
* Files that check these defintions:
* include/pmachine.h, lib/pcompat/opendir.c, lib/pcompat/readdir.c
*/
#define P_OS_TYPE "SUNOS"
#define SUNOS
/*
* Miscellaneous definitions
*
* Even within a particular hardware and OS type, not all systems
* are configured identically. Some systems may need additinal
* definitions, some of which are included below. Note that for
* some system types, these are automatically defined.
*
* define ARDP_MY_WINDOW_SZ if your system has some sort of internal limit
* on the number of UDP packets that can be queued. SOLARIS has a limit of
* 9 or less (6 seems to work for Pandora Systems), which inspired
* this change. If defined, the client will explicity request that
* the server honor this window size. This reduces retries and wasted
* messages.
* define NEED_MODE_T if mode_t is not typedefed on your system
* define DD_SEEKLEN if your system doesn't support dd_bbase and dd_bsize
* define DIRECT if direct is the name of your dirent structure
* This generally goes along with using sys/dir.h.
* define USE_SYS_DIR_H if your system doesn't include sys/dirent.h, and
* sys/dir.h should be used instead.
* define CLOSEDIR_RET_TYPE_VOID if your closedir returns void
* Define GETDENTS if your system supports getdents instead of getdirentries
* Define OPEN_MODE_ARG_IS_INT if your system has the optional third argument
* to open() as an int. Don't #define it if the optional third argument to
* open() is a mode_t. You will need to #undef this if you're using the
* sysV interface to SunOS.
* Define SIGCONTEXT_LACKS_SC_PC if your system's sigcontext structure lacks
* an sc_pc member. This appears to be the case on HPUX version 8.07 on the
* HP 9000 series 700 workstations. I don't know if it's the case anywhere
* else, and I suspect it's a bug in the release that will be fixed later.
* Define PROTOTYPE_FOR_OPEN_HAS_EMPTY_ARGLIST if your system prototypes the
* open() function with an empty argument list. This is necessary because
* gcc requires the prototype to match the function invocation.
* Define PROTOTYPE_FOR_SELECT_USES_INT_POINTER if your system prototypes the
* select() function with 'int *' for the second, third, and fourth arguments
* instead of 'fd_set *'.
* Define BSD_UNION_WAIT if your system doesn't support the new POSIX wait()
* interface and does support the old BSD wait() interface and 'union wait'
* member.
* Define INCLUDE_FILES_LACK_FDOPEN_PROTOTYPE if your system's <stdio.h> lacks
* an fdopen() prototype.
* Define INCLUDE_FILES_LACK_POPEN_PROTOTYPE if your system's <stdio.h> lacks
* an popen() prototype.
* Define INCLUDE_FILES_LACK_TEMPNAM_PROTOTYPE if your system's <stdio.h> lacks
* a prototype for tempnam().
*/
#ifdef SOLARIS
#define ARDP_MY_WINDOW_SZ 6
#endif
/* Not sure if we need this as well, we certainly need the definition
of direct as dirent below */
#ifdef SCOUNIX
#define DIRECT
#endif
/*****************************************************************/
/* If your machine and OS type are listed above, and if your */
/* configuration is relatively standard for your machine and */
/* OS, there should be no need for any changes below this point. */
/*****************************************************************/
/*
* Machine or OS dependent parameters
*
* The comment at the head of each section names the paramter
* and the files that use the definition
*/
/*
* BYTE_ORDER: lib/psrv/plog.c, lib/psrv/check_acl.c
*/
#define BIG_ENDIAN 1
#define LITTLE_ENDIAN 2
#if defined(SUN) || defined(HP9000_S300) || defined(HP9000_S700) || \
defined(IBM_RTPC) || defined(IBM_RS6000) || \
defined(ENCORE_S91) || defined(ENCORE_S93) || defined(APOLLO) || \
defined(MIPS_BE)
#define BYTE_ORDER BIG_ENDIAN
#else
#define BYTE_ORDER LITTLE_ENDIAN
#endif
/*
* PUTENV: lib/pfs/vfsetenv.c
*
* PUTENV must be defined if your C library supports the putenv
* call instead of setenv (e.g. Ultrix and SunOS).
*/
#if defined(ULTRIX) || defined(SUNOS) || defined(SUNOS_V3) || defined(HPUX) \
|| defined(SOLARIS) || defined(SCOUNIX)
#define PUTENV
#endif
/*
* BADSETENV: lib/pfs/penviron.c
*
* Older BSD 4.3 systems have a bug in the C library routine setenv.
* Define BADSETENV if you wish to compile a working version of this
* this routine.
*
* #define BADSETENV
*/
/*
* NOREGEX: lib/pfs/wcmatch.c
*
* NOREGEX must be defined if your C library does not support the
* re_comp and re_exec regular expression routines.
*/
#if defined(HPUX) || defined(SOLARIS) || defined(SCOUNIX)
#define NOREGEX
#endif
/*
* String and byte manipulating
* procedures: lib/pfs/sindex.c, lib/pcompat/pfs_access.c
*/
#if defined(HPUX) || defined(SYSV) || defined(SOLARIS)
#define index strchr
#define rindex strrchr
#define bcopy(a,b,n) memmove(b,a,n)
#define bzero(a,n) memset(a,0,n)
#define bcmp memcmp
#endif
/*
* getwd: server/pstart.c
*/
#if defined(HPUX) || defined(SYSV) || defined(SOLARIS)
#define getwd(d) getcwd(d, MAXPATHLEN)
#endif
/*
* SETSID: server/dirsrv.c
*
* SETSID is to be defined if the system supports the POSIX
* setsid() routine to create a new session and set the process
* group ID.
*/
#if defined(HPUX) || defined(SOLARIS) || defined(SCOUNIX)
#define SETSID
#endif
/*
* NFILES: user/vget/pclose.c
*
* NFILES is the size of the descriptor table.
*/
#if defined(HPUX)
#define NFILES _NFILE
#elif defined (SOLARIS)
#define NFILES sysconf(_SC_OPEN_MAX)
#else
#define NFILES getdtablesize()
#endif
/*
* SIGNAL_RET_TYPE: user/vget/ftp.c, user/vget/pclose.c
*
* This is the type returned by the procedure returned by
* signal(2) (or signal(3C)). In some systems it is void, in others int.
*
*/
#if defined (BSD43) || defined(SUNOS_V3)
#define SIGNAL_RET_TYPE int
#else
#define SIGNAL_RET_TYPE void
#endif
/*
* CLOSEDIR_RET_TYPE_VOID: lib/pcompat/closedir.c
*
* If set, closedir() returns void.
*/
#if defined (NOTDEFINED)
#define CLOSEDIR_RET_TYPE_VOID
#endif
/*
* DIRECT: lib/pcompat/ *dir.c app/ls.c
*
* Use direct as the name of the dirent struct
*/
#if defined(DIRECT)
#define dirent direct
#endif
/*
* USE_SYS_DIR_H: lib/pcompat/ *dir.c app/ls.c
*
* Include the file <sys/dir.h> instead of <dirent.h>
*/
#if defined (NOTDEFINED)
#define USE_SYS_DIR_H /* slowly fading out of necessity */
/* Hopefully it's finally dead. */
#endif
/*
* DIR structure definitions: lib/pcompat/telldir.c,opendir.c
*/
#if defined (SUNOS) || defined(SUNOS_V3)
#define dd_bbase dd_off
#endif
#if defined (DD_SEEKLEN)
#define dd_bbase dd_seek
#define dd_bsize dd_len
#endif
/*
* GETDENTS: lib/pcompar/readdir.c
*
* Define GETDENTS if your system supports getdents instead of
* getdirentries.
*/
#if defined (SOLARIS)
#define GETDENTS
#endif
#if defined (GETDENTS)
#define getdirentries(F,B,N,P) getdents(F,B,N)
#endif
/*
* NEED MODE_T typedef: ls.c
*
* Define this if mode_t is not defined by your system's include
* files (sys/types.h or sys/stdtypes.h or sys/stat.h).
*/
#if defined (NEED_MODE_T)
typedef unsigned short mode_t;
#endif
/*
* OPEN_MODE_ARG_IS_INT: used: lib/pcompat/open.c
* Define OPEN_MODE_ARG_IS_INT if your system has the optional third argument
* to open() as an int. Don't #define it if the optional third argument to
* open() is a mode_t. You will need to #undef this if you're using the
* sysV interface to SunOS.
*/
/* Not sure how MACH and DOMAINOS actually need it; this is a guess. */
#if defined(ULTRIX) || defined(BSD43) || defined(SUNOS) || defined(SUNOS_V3) \
|| defined(MACH) || defined(DOMAINOS)
#define OPEN_MODE_ARG_IS_INT
#endif
/*
* SIGCONTEXT_LACKS_SC_PC typedef: server/dirsrv.c
*
* Define SIGCONTEXT_LACKS_SC_PC if your system's sigcontext structure lacks
* an sc_pc member. This appears to be the case on HPUX version 8.07 on the
* HP 9000 series 700 workstations. I don't know if it's the case anywhere
* else, and I suspect it's a bug in the release that will be fixed later.
*/
#if (defined(HPUX) && defined(HP9000_S700)) || defined(SOLARIS) || defined(SCOUNIX)
#define SIGCONTEXT_LACKS_SC_PC
#endif
/*
* PROTOTYPE_FOR_OPEN_HAS_EMPTY_ARGLIST: lib/pcompat/open.c
* See the file for how this is used. In GCC, an old-style function prototype
* is not compatible with a full ANSI function definition containing a ...
* (variable argument list). This definition makes sure that we use the
* appropriate definition of open() to correspond with the system include
* files.
*/
/*
* This is triggered if we're using the GCC fixed <sys/fcntlcom.h> under an
* ANSI C compiler; means that open() will be fully prototyped.
*/
#if !defined(HPUX) && !defined(SOLARIS) && (!defined(_PARAMS) && !defined(__STDC__))
#define PROTOTYPE_FOR_OPEN_HAS_EMPTY_ARGLIST
#endif
/*
* Define PROTOTYPE_FOR_SELECT_USES_INT_POINTER if your system prototypes the
* select() function with 'int *' for the second, third, and fourth arguments
* instead of 'fd_set *'. This avoids compilation warnings in libardp.
*/
#if defined(HPUX)
#define PROTOTYPE_FOR_SELECT_USES_INT_POINTER
#endif
#ifdef PROTOTYPE_FOR_SELECT_USES_INT_POINTER
#define select(width, readfds, writefds, exceptfds, timeout) \
select(width, (int *) readfds, (int *) writefds, (int *) exceptfds, timeout)
#endif
/*
* Define BSD_UNION_WAIT if your system doesn't support the new POSIX wait()
* interface and does support the old BSD wait() interface and 'union wait'
* member.
* Used in: lib/pcompat/pmap_cache.c, lib/pcompat/pmap_nfs.c, user/vget.c
*/
#if defined(NOTDEFINED)
#define BSD_UNION_WAIT
#endif
#if defined(SOLARIS)
/* In theory these are defined in stdio.h, but they're not present (at least in
* Solaris 2.3 they're not) and GCC doesn't fix this correctly right now.
*/
#define INCLUDE_FILES_LACK_FDOPEN_PROTOTYPE
#define INCLUDE_FILES_LACK_POPEN_PROTOTYPE
#define INCLUDE_FILES_LACK_TEMPNAM_PROTOTYPE
#endif /* SOLARIS */
/*
* Catch any definitions not in system include files
*
* The comment at the head of each section names the paramter
* and the files that use the definition
*/
/*
* OPEN_MAX: Maximum number of files a process can have open
*/
#ifndef OPEN_MAX
#define OPEN_MAX 64
#endif
/* MAXPATHLEN is still needed despite recommended change to pprot.h
since some files include sys/param.h but not pprot.h and use MAXPATHLEN
XXX MAXPATHLEN will eventually disappear from Prospero. SCO doesn't
provide that interface, and neither does Posix. All the fixed-length
code that uses MAXPATHLEN sized buffers will have to be rewritten to use
flexible-length names. -swa, Mar 10, 1994
*/
#ifndef MAXPATHLEN
#define MAXPATHLEN 1024
#endif
#ifdef SCOUNIX
/* sys/types.h is needed to define u_long, it must be before the FD_SET stuff*/
/* I dont know why this is so, but remember it from another port */
#define vfork fork
#endif
/* End of stuff required for SCO Unix */
/*
* FD_SET: lib/pfs/dirsend.c, user/vget/ftp.c
*/
#include <sys/types.h>
/* FD_SET is provided in SOLARIS by <sys/select.h>. This include file does not
exist on SunOS 4.1.3; on SunOS it's provided in <sys/types.h>.
No <sys/select.h> on HP-UX.
Don't know about other versions of UNIX. */
#ifdef SOLARIS
#include <sys/select.h> /* Include it before override it */
#endif
#ifndef FD_SET
#define NFDBITS 32
#define FD_SETSIZE 32
#define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS)))
#define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS)))
#define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS)))
#define FD_ZERO(p) bzero((char *)(p), sizeof(*(p)))
#endif
/*
* howmany: app/ls.c
*/
#ifndef howmany
#define howmany(x, y) ((((u_int)(x))+(((u_int)(y))-1))/((u_int)(y)))
#endif
/*
* MAXHOSTNAMELEN: user/vget/ftp.c
*/
#ifndef MAXHOSTNAMELEN
#define MAXHOSTNAMELEN 64
#endif
/*
* O_ACCMODE: lib/pcompat/open.c
*/
#include <sys/fcntl.h> /* Make sure include before overridden */
#ifndef O_ACCMODE
#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR)
#endif
/*
* Definitions from stat.h: app/ls.c lib/pfs/mkdirs.c
*/
#include <sys/stat.h> /* Make sure included before overridden */
#ifndef S_IFMT
#define S_IFMT 070000
#endif
#ifndef S_IFDIR
#define S_IFDIR 040000
#endif
#ifndef S_IFCHR
#define S_IFCHR 020000
#endif
#ifndef S_IFBLK
#define S_IFBLK 060000
#endif
#ifndef S_IXUSR
#define S_IXUSR 0100
#endif
#ifndef S_IXGRP
#define S_IXGRP 0010
#endif
#ifndef S_IXOTH
#define S_IXOTH 0001
#endif
#ifndef S_ISDIR
#define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
#endif
#ifndef S_ISCHR
#define S_ISCHR(m) ((S_IFLNK & m) == S_IFCHR)
#endif
#ifndef S_ISBLK
#define S_ISBLK(m) ((S_IFLNK & m) == S_IFBLK)
#endif
/* The ULTRIX include files don't bother to prototype the non-ansi string
manipulation functions.
*/
#ifdef ULTRIX
char *index(), *rindex();
#endif
#ifndef SCOUNIX
#define HAVE_WRITEV
#endif
#if defined(SCOUNIX) || defined(SOLARIS)
#define POSIX_SIGNALS
#endif
/* Define this if your system doesn't support the readv() and writev()
scatter/gather I/O primitives. If they're present, a couple of minor
optimizations happen.
*/
#ifdef SCOUNIX
#define NO_IOVEC
#endif
/* SOLARIS doesn't have sys_nerr or sys_errlist. It provides the strerror()
interface instead. All references to strerror() or to sys_nerr and
sys_errlist in Prospero now go through the unixerrstr() function in
lib/ardp/unixerrstr.c --swa
*/
#if defined(SOLARIS)
#define HAVESTRERROR
#else
#undef HAVESTRERROR
#endif
#ifdef INCLUDE_FILES_LACK_FDOPEN_PROTOTYPE
/* This seems to be the case only on SOLARIS, at least through 2.3*/
/*Should be defined in stdio.h */
extern FILE *fdopen(const int fd, const char *opts);
#endif
#ifdef INCLUDE_FILES_LACK_TEMPNAM_PROTOTYPE
/* Supposed to be defined in stdio.h, not there in Solaris2.3 */
extern char *tempnam(const char *, const char *);
#endif
#ifdef INCLUDE_FILES_LACK_POPEN_PROTOTYPE
/* This seems to be the case only on SOLARIS, at least through 2.3. */
/*Should be defined in stdio.h */
extern FILE *popen(const char *, const char *);
#endif
#if defined(SCOUNIX)
#define TCPTIMEOUTS
#else
/* Definitely not working on SOLARIS yet */
#undef TCPTIMEOUTS
#endif
#if defined(SOLARIS)
/* Currently used only in lib/psrv/ppasswd.c.
Solaris prototypes the library function crypt() in the crypt.h
include file. */
#define CRYPT_FUNCTION_PROTOTYPE_IN_CRYPT_H
#endif

View File

@@ -0,0 +1,17 @@
/* Make sure sys/types included here before included by signal.h */
#include <sys/types.h>
#ifdef _POSIX_C_SOURCE
#define OLD_POSIX_C_SOURCE _POSIX_C_SOURCE
#else
#undef OLD_POSIX_C_SOURCE
#endif
#define _POSIX_C_SOURCE 1
#include "/usr/include/signal.h"
#ifdef OLD_POSIX_C_SOURCE
#define _POSIX_C_SOURCE OLD_POSIX_C_SOURCE
#undef OLD_POSIX_C_SOURCE
#else
#undef _POSIX_C_SOURCE
#endif

208
prospero/include/pparse.h Normal file
View File

@@ -0,0 +1,208 @@
/* pparse.h */
/* Copyright (c) 1992, 1993 by the University of Southern California
For copying information, see the file <usc-copyr.h>
*/
#ifndef PPARSE_H_INCLUDED
#define PPARSE_H_INCLUDED
#include <usc-copyr.h>
#ifndef FILE
#include <stdio.h>
#endif
#ifndef PFS_SW_ID
#include <pfs.h>
#endif
#include <stddef.h>
#include <stdarg.h>
#include <ardp.h>
/* This structure is used by the parsing code. It defines a standard IO type
that lets the parsing code know where to read its input from. This code is
shared among the client protocol interface, server protocol interface, and
server directory format reading mechanism. All information about the next
location to read input from is contained INSIDE this structure.
That means that if we make a duplicate of the structure (using input_copy())
and feed it to a function that resets the pointer (e.g., in_inc(), or
in_line()), the input pointer will be reset for the copy but not for the
original.
If there are any data structures which have been allocated for an INPUT,
then input_freelinks() will free them. At the moment, this is a null
macro.
The user is responsible for freeing any memory that the user passed to
rreqtoin() or filetoin(). The sending functions will normally do this, as
will fclose().
The only low-level functions that actually read from this all eventually
call in_readc() and in_readcahead() and in_incc().
*/
enum iotype {IO_UNSET = 0, IO_RREQ, IO_STRING, IO_FILE, IO_BSTRING};
struct input {
enum iotype sourcetype;
RREQ rreq; /* server or client reading */
struct ptext *inpkt; /* packet in process. Null iff no more input.
*/
char *ptext_ioptr; /* position of next character from within ptxt.
This will point to a null iff there is no
more input. */
const char *s; /* Current position in string or bstring */
FILE *file; /* server, set if reading via dsrfile() or
dsrdir() */
long bstring_length; /* Length of the bstring. */
long offset; /* Offset from start of file or input stream.
This is repeatedly set and tested.
Used to make sure that having two INPUT
variables referring to the same FILE with
different read pointers will not cause
problems. Also used in in_line() to
allocate appropriate memory. */
/* Also used for BSTRINGs to see how much data
is still readable. */
int flags;
#define CONSUME_INPUT 0x1 /* qscanf() should consume input.
Not currently implemented. */
#define PERCENT_R_TARGET_IS_STRING 0x2 /* if set, the target for %r is a
string. Otherwise, it's an IN.
This is temporarily set by the
qsscanf() interface to qscanf()
*/
#define JUST_INITIALIZED 0x4 /* set upon initialization.
Not currently used. */
#define SERVER_DATA_FILE 0x8 /* A server data file,
whether Cached by the
wholefiletoin() or treated in
raw form by the (unused)
filetoin() interface. */
};
typedef struct input INPUT_ST;
typedef struct input *INPUT;
/* Copy the whole schmeer. */
#define input_copy(src,dest) do { \
*dest = *src; \
} while (0)
#define input_freelinks() do ; while (0)
/* All of these input functions, except for input_line, report their errors to
their callers. */
/* in_line does not do this, though. */
/* Set up for input. Fills in its 2nd argument. Found in lib/pfs/in_line.c */
extern void rreqtoin(RREQ rreq, INPUT in);
extern void filetoin(FILE *file, INPUT in);
extern int wholefiletoin(FILE *file, INPUT in);
/* These are the low-level input routines. */
/* This replaces in_line(), eventually. */
extern int qscanf(INPUT in, const char fmt[], ...);
extern int vqscanf(INPUT in, const char fmt[], va_list ap);
extern int in_line(INPUT in, char **commandp, char **next_wordp);
extern char *in_nextline(INPUT in); /* returns the command that the next
in_line would read. Just the first
word is enough. NULL If no more
stuff. */
extern int in_readc(INPUT in);
extern int in_readcahead(INPUT in, int howfar);
extern void in_incc(INPUT in);
extern int in_eof(INPUT in); /* test for EOF status. 1 if true; 0 if not.
*/
/* These handy little functions parse input for us. */
extern int in_acl(INPUT in, ACL *aclp);
extern int in_ge1_acl(INPUT in, char *command, char *next_word, ACL *aclp);
extern int in_atr_data(INPUT in, char *command, char *next_word, int nesting,
PATTRIB at);
extern int in_atrs(INPUT in, int nesting, PATTRIB *valuep);
extern int in_ge1_atrs(INPUT in, char *command, char *next_word,
PATTRIB *valuep);
extern int in_filter(INPUT in, char *command, char *next_word, int nesting,
FILTER *valuep);
extern int in_forwarded_data(INPUT in, char *command, char *next_word,
VLINK dlink);
extern int in_id(INPUT in, long *magic_nop);
extern int in_select(INPUT in, long *magic_nop);
extern int in_link(INPUT in, char *command, char *next_word, int nesting,
VLINK *valuep, TOKEN *argsp);
extern int in_sequence(INPUT in, char *command, char *next_word,
TOKEN *valuep);
/* Used to look at error messages */
extern int scan_error(char *line, RREQ req);
/* This structure is used by the formatting code. It defines a standard
output type that lets the formatting code know where to send the output.
*/
struct output {
RREQ req; /* Server -- replying to client request */
RREQ request; /* Client -- querying the server */
FILE *f; /* Server, writing to dsfile.c or dsdir.c */
/* No need for string output. */
};
typedef struct output *OUTPUT;
typedef struct output OUTPUT_ST;
/* requesttoout() and reqtoout() are inherently different, because libardp has
an asymmetry between a client sending a request to a server and a server
replying to a client's request.
Requests to the server are sent as a unit, whereas replies are returned a
packet at a time as data becomes available. Also, the functions they use to
push the output & terminate the request are different.
*/
/* Automatic reply and formatting utilities (unparsing, sort of :)). */
/* Set up for output. Fills in its 2nd argument.*/
/* lib/pfs/cl_qoprintf.c */
extern int requesttoout(RREQ req, OUTPUT out);
/* lib/psrv/srv_qoprintf.c */
extern void reqtoout(RREQ req, OUTPUT out);
extern void filetoout(FILE *file, OUTPUT out);
/* outputs raw lines and data. */
extern int (*qoprintf)(OUTPUT out, const char format[], ...);
/* set to one of the two below. */
extern int cl_qoprintf(OUTPUT out, const char format[], ...);
extern int srv_qoprintf(OUTPUT out, const char format[], ...);
/* outputs formatted stuff. */
extern int out_acl(OUTPUT out, ACL acl);
extern int out_atr(OUTPUT out, PATTRIB at, int nesting);
extern int out_atrs(OUTPUT out, PATTRIB at, int nesting);
extern int out_filter(OUTPUT out, FILTER fil, int nesting);
extern int out_link(OUTPUT out, VLINK vlink, int nesting, TOKEN args);
extern int out_sequence(OUTPUT out, TOKEN tk);
/* in LIBPSRV. */
/* Attribute manipulation stuff that is used by the parsing code too. */
/* These report errors by writing to p_err_string and returning error codes. */
/* Used by in_link() in LIBPFS and by edit_link_info() in the server. */
extern int vl_add_atrs(PATTRIB at, VLINK clink);
extern int vl_add_atr(PATTRIB at, VLINK clink);
extern void vl_atput(VLINK vl, char *name, ...);
/* Used ONLY by in_atrs() and atr_out() */
/* used by atr_out() */
extern char * lookup_precedencename_by_precedence(int precedence);
extern char * lookup_avtypename_by_avtype(int avtype);
/* used by in_atrs() */
extern int lookup_avtype_by_field_name(const char aname[]);
extern int lookup_precedence_by_precedencename(const char t_precedence[]);
extern int lookup_avtype_by_avtypename(const char []);
/* This variable is set to the real function in the stdio library if you
want the IN package to deal with input streams as defined in <stdio.h>.
They are set by dirsrv.c and by shadowcvt.c
They should be set when you set qoprintf().
*/
extern int (*stdio_fseek)();
#endif /* PPARSE_H_INCLUDED */

View File

@@ -0,0 +1,41 @@
/*
* Copyright (c) 1989, 1990, 1991 by the University of Washington
* Copyright (c) 1991, 1992, 1993 by the University of Southern California
*
* For copying and distribution information, please see the files
* <uw-copyright.h> and <usc-copyr.h>.
*/
#include <uw-copyright.h>
#include <usc-copyr.h>
#ifndef P_PASSWD_H_INCLUDED
#define P_PASSWD_H_INCLUDED
/* Structure used to contain entry for the prospero password file */
typedef struct _p_passwd {
char *principal;
char *encrypted_passwd;
} p_passwd;
/* Get password file entry for principal. Returns pointer to p_passwd */
/* structure if found, else returns NULL. */
p_passwd *get_ppw_entry(char *principal);
/* Set password for principal in password file, overwriting old */
/* entry if one exists. */
int set_passwd(char *principal, char *passwd);
/* Returns TRUE if password specified for the principal matches */
/* password in entry for principal in password file, and FALSE */
/* otherwise */
int passwd_correct(char *principal, char *passwd);
/* Deletes principal's password entry from file */
int delete_ppw_entry(char *principal);
/* Lists the principals in the Prospero password file */
int list_ppw_file(void);
#endif /* P_PASSWD_H_INCLUDED */

72
prospero/include/pprot.h Normal file
View File

@@ -0,0 +1,72 @@
/*
* Copyright (c) 1989, 1990, 1991 by the University of Washington
* Copyright (c) 1991, 1992 by the University of Southern California
*
* For copying and distribution information, please see the files
* <uw-copyright.h> and <usc-copyr.h>.
*/
#include <uw-copyright.h>
#include <usc-copyr.h>
/*
* CONFLICT_BETWEEN_DEFINITION_OF_NULL_IN_SYS_PARAM_H_AND_STDDEF_H:
* include/pprot.h, server/dirsrv.h, server/shadowcvt.c
* This appears to be an unpleasant interaction between GCC
* version 1.41 and the Ultrix version 4.2A system include files. The
* compiler complained about conflicting definitions of NULL in <sys/param.h>
* and <stddef.h>. The definitions are in fact the same, but with different
* spacing, which the ANSI standard says should be irrelevant.
* (Section 3.8.3, 'Macro Replacement' clearly states that:
* "An object currently defined as a macro without use of lparen (an
* object-like macro) may be reedefined by another #define preprocessing
* directive provided that the second definition is an object-like macro
* definition and the two replacement lists are identical."
* It also clearly states that, in considering whether the replacment lists
* are identical, "all white-space separations are considered identical"
* You can #define this if you encounter this bug. It will slightly slow
* down the compilation if this is left #defined, but not very much.
* I suggest you define it by modifying the definition of MACHDEF in the
* top-level MAKEFILE, since this gross kludge is necessary in
* include/pprot.h, server/dirsrv.h, and server/shadowcvt.c.
*/
#if defined (NOTDEFINED)
#define CONFLICT_BETWEEN_DEFINITION_OF_NULL_IN_SYS_PARAM_H_AND_STDDEF_H
#endif
#ifndef MAXPATHLEN
#ifdef CONFLICT_BETWEEN_DEFINITION_OF_NULL_IN_SYS_PARAM_H_AND_STDDEF_H
#undef NULL
#endif /* #ifdef CONFLICT... */
#include <sys/param.h> /* XXX This should Change. MAXPATHLEN is too
UNIX-specific. It is almost always 1024,
but we should use MAX_VPATH instead. */
/* Not defined on SCO Unix */
#ifndef MAXPATHLEN
#define MAXPATHLEN 1024
#endif
#ifdef CONFLICT_BETWEEN_DEFINITION_OF_NULL_IN_SYS_PARAM_H_AND_STDDEF_H
#ifndef NULL
#include <stddef.h>
#endif /* #ifndef NULL */
#endif /* #ifdef CONFLICT... */
#endif /* #ifndef MAXPATHLEN */
/* Protocol Definitions */
#define VFPROT_VNO 5 /* Protocol Version Number */
#define DIRSRV_PORT 1525 /* Server port used if not in srvtab */
#define PROSPERO_PORT 191 /* Officially assigned prived port */
#define SEQ_SIZE 32 /* Max size of sequence text in resp */
/* This definition is now obsolete. It only exists to support Version 1
code; version 5 code dynamically allocates buffers. */
#define MAX_DIR_LINESIZE 160+MAXPATHLEN /* Max linesize in directory */
#define MAX_FWD_DEPTH 20 /* Max fwd pointers to follow */
#define S_AD_SZ sizeof(struct sockaddr_in)

604
prospero/include/pserver.h Normal file
View File

@@ -0,0 +1,604 @@
/*
* pserver.h - server specific parameters for Prospero
*
* This file contains local definitions for the Prospero server.
* It is expected that it will be different on different systems.
*/
/*
* Written by bcn 1989 as part of psite.h
* Modified by bcn 1/19/93 to leave only server specific definitions
*/
/*
* Copyright (c) 1991-1994 by the University of Southern California
*
* For copying and distribution information, please see the file
* <usc-license.h>.
*/
#include <usc-license.h>
/*
* This option is temporary, until we make the forwarding mechanism more
* efficient.
* It hikes the efficiency considerably. Developers having long turnaround
* times on rd_vdir() need it. Talk to swa@ISI.EDU.
*/
#define SERVER_DO_NOT_SUPPORT_FORWARDING
/*
* SERVER_SUPPORT_V1 indicates that the server is to reply to version 1
* Prospero Protocol requests. It is recommended that you define
* this for the time being since there are many Version 1 clients still
* in use. Note that version 1 clients will *not* be able to speak
* to certain new services so it's a good idea to upgrade your clients.
*/
#define SERVER_SUPPORT_V1
#define SERVER_DONT_FLAG_V1
/*
* P_DIRSRV_BINARY defines the full path by which pstart will
* find the binary for the directory server.
*/
#if 0
#define P_DIRSRV_BINARY "/usr/pfs/bin/dirsrv"
#else
#define P_DIRSRV_BINARY (char *) get_pfs_file("bin/dirsrv")
#endif
/*
* PROSPERO_CONTACT specifies the e-mail address of the individual
* or individuals responsible for running the Prospero server on the
* local system. If specified, this string will appear in responses to
* status requests. This definition is optional.
*
* #define PROSPERO_CONTACT "yourname@host.org.domain"
*/
#define PROSPERO_CONTACT "info-prospero@ISI.EDU"
/*
* PSRV_HOSTNAME specifies the name of the host on which the server
* will run. It only needs to be defined if gethostbyname does not
* return the name of the host as a fully qualified domain name.
*
* #define PSRV_HOSTNAME "HOST.ORG.DOMAIN"
*
*/
/*
* PSRV_USER_ID specifies the user name under which the Prospero
* server will run. The server will run under the home group of
* PSRV_USER_ID, but (in systems which support membership in multiple
* groups) not under any supplementary groups to which that user may
* belong.
*/
#if 0
#define PSRV_USER_ID "pfs"
#else
#define PSRV_USER_ID "archie"
#endif
/*
* P_RUNDIR is the name of the directory under which the Prospero
* server will run. If left out, it defaults to /tmp.
*
* #define PSRV_RUNDIR "/tmp"
*/
/*
* PSRV_LOGFILE is the name of the file in which events are logged.
* By default Prospero logs all requests if PSRV_LOGFILE is defined. If you
* would like to change the list of events that are logged, or if you would
* like to use syslog for logging, edit the file plog.h.
*/
#define PSRV_LOGFILE "/pfs/pfs.log"
/*
* PSRV_ROOT defines that part of the system's directory tree for which
* directory information will be readable over the network. Directory
* information will also be available for files under AFTPDIRECTORY and
* AFSDIRECTORY if these access methods are supported.
*
* If PSRV_ROOT is not defined, then directory information will only be
* available for those files under AFTPDIRECTORY or AFSDIRECTORY.
*
* #define PSRV_ROOT "/"
*/
#define PSRV_ROOT "/pfs/info-tree"
/*
* PSRV_READ_ONLY specifies that the server is only to accept
* operations that read the directory structure. No changes to virtual
* directories stored on this system will be allowed. NODOTDOT is used to
* disallow the use of path names that include "..". If you are
* restricting the part of the directory tree which will be accessible
* (i.e. if PSRV_ROOT is other than "/"), NODOTDOT should be set.
*
* #define PSRV_READ_ONLY
* #define NODOTDOT
*/
#if 0
#define PSRV_READ_ONLY
#define NODOTDOT
#endif
/*
* PSRV_SHADOW is the name of the shadow hierarchy that contains additional
* information about Prospero files. PSRV_STORAGE is the name of the directory
* under which new files can be created, if that option is supported by
* your distribution. PSRV_SECURITY is the name of the directory where
* security information is stored by the prospero server. All three names are
* relative to the home directory for the
* user ID specified by P_USER_ID.
*
* You will normally have no desire to change this, but it IS posible and legal
* to do so. If you do change it, then please make a corresponding change in
* section III of Makefile.config.
*/
#define PSRV_SHADOW "shadow"
#define PSRV_STORAGE "pfsdat"
#define PSRV_SECURITY "security"
/*
* If PSRV_UNDER_UDIR is defined, pstart calculates the full path names of
* of the directories corresponding to PSRV_SHADOW and PSRV_STORAGE and
* PSRV_SECURITY by
* finding the home directory for the Prospero user ID, then appending
* PSRV_SHADOW or PSRV_STORAGE or PSRV_SECURITY.
*
* If PSRV_UNDER_UDIR is not defined, or if dirsrv is called directly,
* the full path names are taken from PSRV_FSHADOW and PSRV_FSTORAGE and
* PSRV_FSECURITY. These
* should be stable names for those directories. They may be aliases
* (symbolic links) if the directories move around. If they are symbolic
* links, the links should be updated whenever the directories move.
*
* Note that if PSRV_UNDER_UDIR is set, the full path names are calculated
* only when the Prospero server is started by pstart. If you expect
* to start the server by hand (for example, when debugging), PSRV_FSHADOW
* and PSRV_FSTORAGE should also be defined.
*
* In any case these must match the definitions at the top of Makefile
*/
#define PSRV_UNDER_UDIR
#define PSRV_FSHADOW "/pfs/shadow"
#define PSRV_FSTORAGE "/pfs/pfsdat"
#define PSRV_FSECURITY "/pfs/security"
/*
* AFTPDIRECTORY contains the name of the root directory as seen through
* anonymous FTP. It is used to determine which files may be accessed
* using the anonymous FTP access mechanism, and to determine the file name
* that must be used when doing so. It also adds to the set of files about
* which directory information is available.
*
* Note: AFTPDIRECTORY should be a stable name for the FTP directory.
* It may be an alias (symbolic link) if the FTP directory
* moves around. If it is a symbolic link, that symbolic link should
* be updated whenever the directory moves.
*/
/* #define AFTPDIRECTORY "/usr/ftp" */
/*
* AFTPUSER contains the name of the anonymous FTP user (usually ftp)
* If defined, pstart will look up the home directory for this user
* and use it instead of AFTPDIRECTORY. If it fails, the value of
* AFTPDIRECTORY (defined above) will be used.
*
* Note that if AFTPUSER is set, the path name of the FTP directory is
* calculated only when the Prospero server is started by pstart.
* If you expect to start the server by hand (for example, when
* debugging), AFTPDIRECTORY should also be defined.
*
* Also note that when started by pstart, if AFTPUSER is defined, the
* path taken from the password file will override that specified by
* AFTPDIRECTORY. If AFTPDIRECTORY is a stable path, do not define
* AFTPUSER.
*
* #define AFTPUSER "ftp"
*/
/*
* NFS_EXPORT should be defined if your system allows others to
* access files using NFS. If defined, you will have to modify
* lib/psrv/check_nfs.c so that the directory server is aware of
* your system's policy for NFS mounts (this is necessary so that
* the directory server will not tell the client to use NFS when
* such access is not supported).
*
* #define NFS_EXPORT
*/
/*
* AFSDIRECTORY contains the name of the root of the AFS directory
* hierarchy. It should only be defined if your host supports AFS
* and you are willing to make information about AFS files available
* through your server. AFSDIRECTORY is used to to determine which files
* may be accessed using the AFS access mechanism. It also adds to
* the set of files about which directory information is available.
*
* Note: AFSDIRECTORY must be the true name for the directory
* after all symbolic links have been expanded.
*
* #define AFSDIRECTORY "/afs"
*/
/*
* PSRV_KERBEROS, if defined, means that the server will understand
* Kerberos (version 5) authentication information. This should be
* #defined if your site uses Kerberos authentication; otherwise, you
* won't have a use for it. If you #define this, then you also need
* to make the appropriate definitions in the top-level makefile.
*
* Note that most Kerberos sites still use the older version 4,
* which is not supported by Prospero.
*
* #define PSRV_KERBEROS
*/
/*
* KERBEROS_SRVTAB, if defined, tells the server the location of the
* server's keytab file that contains its Kerberos key. Define this
* only if, firstly, you are using Kerberos (i.e. PSRV_KERBEROS is
* defined), and, secondly, if you want to keep this key in a location
* different from its default location (typically /etc/v5srvtab).
*
* #define KERBEROS_SRVTAB "/usr/pfs/v5srvtab"
*/
/*
* PSRV_P_PASSWORD, if defined, means that server will understand
* the Prospero password authentication information. It will not do you
* any harm to define this, and we have left it turned on by default.
* The passwording mechanism is described more fully in the user's manual
* (or will be after it's updated).
*/
#define PSRV_P_PASSWORD
#ifdef PSRV_P_PASSWORD
/* PSRV_PW_FILE contains the name of the servers password file used
* for P_PASSWORD authentication. Define this only if you are using
* this type of authentication.
*
* #define PSRV_PW_FILE "/usr/pfs/ppasswd"
*/
#define PSRV_PW_FILE "/pfs/ppasswd"
#endif
/*
* PSRV_ACCOUNT, if defined, the server will understand accounting
* information and may charge clients for services.
*
* #define PSRV_ACCOUNT
*/
/*
* DEFAULT_ACL, SYSTEM_ACL, OVERRIDE_ACL and MAINT_ACL are access
* control lists used to control access to Prospero directories.
* DEFAULT_ACL applies to those directories for which no individual
* access control list has been specified. All access control lists
* initially include SYSTEM_ACL, but the entry may be explicitly
* removed by the administrator of a directory or link. OVERRIDE_ACL
* grants rights to a directory regardless of the contents of any
* other access control list. MAINT_ACL is an access control list
* for performing remote maintenance on the server.
*/
#if 0
#define DEFAULT_ACL {{ACL_ANY, NULL, "YvlGgrwu" }}
#else
#define DEFAULT_ACL {{ACL_ANY, NULL, "ALRMDIWYvlGgr", "*@%.%.%.%"}}
#endif
#define SYSTEM_ACL {{ACL_ASRTHOST, NULL, "ALRWD", "pfs@128.9.*.*"}}
#define OVERRIDE_ACL {{ACL_TRSTHOST, NULL, "A", "root@%.%.%.%"},\
{ACL_OWNER, NULL, "A"}}
#ifdef 0
#define MAINT_ACL {{ACL_ASRTHOST, NULL, "STUP", "pfs@128.9.*.*"},\
{ACL_ASRTHOST, NULL, "STU", "*@128.9.*.*"},\
{ACL_ANY, NULL, "Y"}}
#endif
#define MAINT_ACL {{ACL_ASRTHOST, NULL, "STUP", "root@%.%.%.%"},\
{ACL_ASRTHOST, NULL, "STUP", "root@192.77.55.2"},\
{ACL_ANY, NULL, "Y"}}
/*
* PSRV_ARCHIE, if defined, indicates that your server is to
* make available information from the archie database. You
* must already have the archie database installed on your
* machine and you must follow the additional directions in
* lib/psrv/archie2 or lib/psrv/archie3 to configure the server.
*
* #define PSRV_ARCHIE
*/
#define PSRV_ARCHIE
/* PSRV_GOPHER_GW, if defined, indicates that this server will have
* the capability to make Gopher protocol queries in response to
* Prospero protocol queries. If you install this option, you must
* uncomment the line reading
* #SUBDIR=gopher_gw.dir
* in lib/psrv/Makefile, and uncomment the line reading:
* #DB_LIBS= ../lib/psrv/gopher_gw/libpgoph_gw.a
* in server/Makefile. This option *is* presently supported.
*
* #define PSRV_GOPHER_GW
*/
/*
* Gopher servers frequently gateway queries to anonymous FTP sites. When
* they return links in this form, all retrievals then proceed through
* that server. This is inefficient.
*
* You can set GOPHER_GW_NEARBY_GOPHER_SERVER to be a
* Gopher server at your site or nearby that you want the gopher
* gateway to to gateway Gopher AFTP queries through
* instead of the GOPHER server that returned the AFTP links. Thanks to
* mitra@path.net for this optimization.
*
* If you don't define this, things will still work OK; the gopher server
* just won't rewrite such links. In other words, if you don't define this,
* the gopher gateway will exhibit the default behavior for most Gopher
* clients, as distributed.
*
* #define GOPHER_GW_NEARBY_GOPHER_SERVER "gopher.your.net(70)"
*/
/* PSRV_WAIS_GW, if defined, indicates that this server will have
* the capability to make Wais protocol queries in response to
* Prospero protocol queries. If you install this option, you must
* uncomment the line reading
* #SUBDIR=wais_gw.dir
* in lib/psrv/Makefile, and uncomment the line reading:
* #DB_LIBS= ../lib/psrv/wais_gw/libwais_gw.a
* in server/Makefile. This option *is* presently supported.
* #define PSRV_WAIS_GW
*/
/*
* PSRV_GOPHER, if defined, indicates that your server is to make
* available information from gopher files locally stored on your
* machine. You must already have gopher installed on your machine and
* you must follow the additional directions in lib/psrv/gopher to
* configure the server. This option is not presently supported.
*
* XXX This might not ever be a supported part of the distribution, if it
* turns out that the existing GOPHER_GW code meets the needs this
* was intended to fulfill. Please send feedback to
* info-prospero@isi.edu.
*
* #define PSRV_GOPHER
*/
/*
* SHARED_PREFIXES, if defined, indicates that the host on which your
* server runs shares some part of its filesystem with other specified
* hosts (perhaps via an NFS auto-mounter). If you define
* SHARED_PREFIXES appropriately, then Prospero clients on machines
* with access to the shared part of the filesystem will be able to
* retrieve files on the server that might be unreachable via another
* access method.
*
* You should specify SHARED_PREFIXES only if you want the server to
* return a LOCAL access-method for files in these areas on your
* server. If you don't understand this definition, just leave it
* undefined.
*
* The format of the SHARED_PREFIXES definition is a concatenated series of
* entries, each one describing a particular subtree of the filesystem
* that is exported. Each entry is composed of 4 subitems. The subitems
* are:
*
* a) Name (or names, if alternate names for directories are present) of
* the subtree on the server host. The last name is followed by a NULL
* b) Name of the subtree on the client host(s). There must be no more
* than one of these entries. This subitem is followed by a NULL.
* c) Internet addresses of the hosts which have this subtree as part
* of the local filesystem namespace. These can be wildcarded;
* - any octet may be replaced with a '*' (indicating match any).
* - any octet may be replaced with a '%' (indicating to match
* with the value of this octet in the server host's address)
* This subitem is followed by a NULL.
* d) exception list: a list of hosts which do NOT have this subtree
* as part of the local filesystem namespace. This lets one exclude
* special hosts or subnets that don't share in an organization's
* overall networked filesystem. This subitem is followed by a NULL.
*
*
* An example may make this clearer. Here is the entry we use on the
* server on PROSPERO.ISI.EDU:
*
* #define SHARED_PREFIXES { \
* "/nfs", NULL, "/nfs", NULL, "128.9.*.*", NULL, NULL, \
* "/ftp", NULL, "/auto/gum/gum/ftp", NULL, "128.9.*.*", NULL, NULL, \
* "/afs", NULL, "/nfs/afs", NULL, "128.9.*.*", NULL, NULL }
*/
/******************************************************************
* You should not need to change any definitions below this line. *
******************************************************************/
/*
* DSHADOW and DCONTENTS are the names of the file in the shadow
* directory used to store information about directories. There
* should be no need to change them.
*/
#define DSHADOW ".directory#shadow"
#define DCONTENTS ".directory#contents"
/*
* ARCHIE_PREFIX is an entry for archie that will appear
* in the DATABASE_PREFIXES definition. It should not be set
* directly but is instead set automatically if PSRV_ARCHIE is
* defined. If not, it will be empty. If set, it must be
* followed by a ,.
*/
#ifdef PSRV_ARCHIE
#define ARCHIE
#define ARCHIE_PREFIX {"ASCII", "ARCHIE", arch_dsdb, NULL, "ARCHIE"},
#ifdef SERVER_SUPPORT_V1
#define DATABASE_PREFIX "ARCHIE" /* Backwards compatability; v1 stuff */
#endif
#else
#define ARCHIE_PREFIX
#endif
/* GOPHER_GW_PREFIX is an entry for GOPHER that will appear in the
* DATABASE_PREFIXES definition. It should not be set
* directly but is instead set automatically if PSRV_GOPHER_GW is
* defined. If not, it will be empty. If set, it must be
* followed by a ,.
*/
#ifdef PSRV_GOPHER_GW
#define GOPHER_GW_PREFIX {"ASCII", "GOPHER-GW", gopher_gw_dsdb, NULL, "GOPHER-GW"},
#else
#define GOPHER_GW_PREFIX
#endif
/* WAIS_GW_PREFIX is an entry for WAIS that will appear in the
* DATABASE_PREFIXES definition. It should not be set
* directly but is instead set automatically if PSRV_WAIS_GW is
* defined. If not, it will be empty. If set, it must be
* followed by a ,.
*/
#ifdef PSRV_WAIS_GW
#define WAIS_GW_PREFIX {"ASCII", "WAIS-GW", wais_gw_dsdb, NULL, "WAIS-GW"},
#else
#define WAIS_GW_PREFIX
#endif
/*
* GOPHER_PREFIXES are the entries for gopher that will appear
* in the DATABASE_PREFIXES definition. It should not be set
* directly but is instead set automatically if PSRV_GOPHER is
* defined. If not, it will be empty. If set, it must be
* followed by a ,.
*
* XXX This is not yet a supported part of the distribution.
* XXX This might not ever be a supported part of the distribution, if it
* turns out that the existing GOPHER_GW code meets the needs this
* was intended to fulfill.
*
* If you run a Gopher server, define GOPHER to be a list of
* pairs of Gopher hierarchy root directories and TCP ports. This list
* must be terminated with the record {"", 0}.
*
* #define GOPHER {{"/nfs/pfs/gopherroot", 70}, {"", 0}}
*
*/
#ifdef PSRV_GOPHER
#define GOPHER_PREFIX {"ASCII", "GOPHER", gopher_dsdb, NULL, "GOPHER"},
#else
#define GOPHER_PREFIX
#endif
/*
* DATABASE_PREFIXES is an array of structures, each representing
* a particular database prefix and its acompanying prospero query
* function. It is for use when the Prospero server provides information
* from sources other than the file system. It should be set
* automatically if the appropriate database has been configured.
* you should not need to set it directly. The last element in the
* array must be a NULL pointer.
*
* DATABASE_PREFIXES supersedes the old DATABASE_PREFIX option.
*
*/
#define DATABASE_PREFIXES { ARCHIE_PREFIX GOPHER_GW_PREFIX GOPHER_PREFIX \
WAIS_GW_PREFIX }
/*
* If DIRSRV_EXPLAIN_LAST_RESTART is defined and the server detects an
* internal error and restarts itself, the message that caused the
* error will be explained in the logfile and in the message returned
* by pstatus.
*/
#define DIRSRV_EXPLAIN_LAST_RESTART
/*
* If PSRV_CACHE_NATIVE is defined, the server will cache directories which
* are entirely native (e.g., directories in the anonymous FTP area which
* contain no links with special attributes defined on them.)
* This option is unset by default because otherwise the prospero server
* running on a big anonymous FTP site would consume too much disk space.
*
* #define PSRV_CACHE_NATIVE
*/
/*
* If DNSCACHE_MAX is defined, then dirsrv will cache up to that many
* DNS addresses. "undef" this for no caching at all.
*
*/
#define DNSCACHE_MAX 300
/*
* If DIRECTORYCACHING is defined, then dirsrv will cache directories
* on disk under /usr/pfs/shadow/{GOPHER-GW,WAIS-GW,<other-database-name>}
* Note that this isn't a GREAT way of structuring the database, in case there
* really is a directory named /GOPHER-GW on the machine (confusion). This is
* a risk we currently take.
*
* #define DIRECTORYCACHING
*/
/* These following definitions override those in plog.h
*
* Place any definitions you like here that should override those in plog.h
* By changing this file instead of <plog.h>, we can keep down the number of
* files that must be changed in order to configure Prospero.
*/
#define L_WTTIME_THRESHOLD 1
#define L_SVCTIME_THRESHOLD 1
#define L_SYSTIME_THRESHOLD 9999
#define L_COMP_THRESHOLD 1
#define INITIAL_LOG_VECTOR { \
L_FIELDS_USER|L_FIELDS_HADDR|L_FIELDS_SW_ID|L_FIELDS_STIME, /* L_FIELDS */ \
LOG_PROSPERO|LOG_NOTICE|PLOG_TOFILE, /* L_STATUS */ \
LOG_PROSPERO|LOG_CRIT|PLOG_TOFILE, /* L_FAILURE */ \
PLOG_TOFILE, /* L_STATS */ \
LOG_PROSPERO|LOG_ERR|PLOG_TOFILE, /* L_NET_ERR */ \
LOG_PROSPERO|LOG_ERR|PLOG_TOFILE, /* L_NET_RDPERR */ \
0, /* L_NET_INFO */ \
LOG_PROSPERO|LOG_INFO|PLOG_TOFILE, /* L_QUEUE_INFO */ \
LOG_PROSPERO|LOG_INFO|PLOG_TOFILE, /* L_QUEUE_COMP */ \
LOG_PROSPERO|LOG_ERR|PLOG_TOFILE, /* L_DIR_PERR */ \
LOG_PROSPERO|LOG_WARNING|PLOG_TOFILE, /* L_DIR_PWARN */ \
LOG_PROSPERO|LOG_INFO|PLOG_TOFILE, /* L_DIR_PINFO */ \
LOG_PROSPERO|LOG_ERR|PLOG_TOFILE, /* L_DIR_ERR */ \
LOG_PROSPERO|LOG_WARNING|PLOG_TOFILE, /* L_DIR_WARN */ \
LOG_PROSPERO|LOG_INFO|PLOG_TOFILE, /* L_DIR_REQUEST */ \
LOG_PROSPERO|LOG_INFO|PLOG_TOFILE, /* L_DIR_UPDATE */ \
LOG_PROSPERO|LOG_WARNING|PLOG_TOFILE, /* L_AUTH_ERR */ \
LOG_PROSPERO|LOG_ERR|PLOG_TOFILE, /* L_DATA_FRM_ERR */ \
LOG_PROSPERO|LOG_ERR|PLOG_TOFILE, /* L_DB_ERROR */ \
LOG_PROSPERO|LOG_INFO|PLOG_TOFILE /* L_DB_INFO */ \
}

View File

@@ -0,0 +1,581 @@
/*
* pserver.h - server specific parameters for Prospero
*
* This file contains local definitions for the Prospero server.
* It is expected that it will be different on different systems.
*/
/*
* Written by bcn 1989 as part of psite.h
* Modified by bcn 1/19/93 to leave only server specific definitions
*/
/*
* Copyright (c) 1991-1994 by the University of Southern California
*
* For copying and distribution information, please see the file
* <usc-license.h>.
*/
#include <usc-license.h>
/*
* This option is temporary, until we make the forwarding mechanism more
* efficient.
* It hikes the efficiency considerably. Developers having long turnaround
* times on rd_vdir() need it. Talk to swa@ISI.EDU.
*/
#define SERVER_DO_NOT_SUPPORT_FORWARDING
/*
* SERVER_SUPPORT_V1 indicates that the server is to reply to version 1
* Prospero Protocol requests. It is recommended that you define
* this for the time being since there are many Version 1 clients still
* in use. Note that version 1 clients will *not* be able to speak
* to certain new services so it's a good idea to upgrade your clients.
*/
#define SERVER_SUPPORT_V1
#define SERVER_DONT_FLAG_V1
/*
* P_DIRSRV_BINARY defines the full path by which pstart will
* find the binary for the directory server.
*/
#define P_DIRSRV_BINARY "/usr/pfs/bin/dirsrv"
/*
* PROSPERO_CONTACT specifies the e-mail address of the individual
* or individuals responsible for running the Prospero server on the
* local system. If specified, this string will appear in responses to
* status requests. This definition is optional.
*
* #define PROSPERO_CONTACT "yourname@host.org.domain"
*/
/*
* PSRV_HOSTNAME specifies the name of the host on which the server
* will run. It only needs to be defined if gethostbyname does not
* return the name of the host as a fully qualified domain name.
*
* #define PSRV_HOSTNAME "HOST.ORG.DOMAIN"
*
*/
/*
* PSRV_USER_ID specifies the user name under which the Prospero
* server will run. The server will run under the home group of
* PSRV_USER_ID, but (in systems which support membership in multiple
* groups) not under any supplementary groups to which that user may
* belong.
*/
#define PSRV_USER_ID "pfs"
/*
* P_RUNDIR is the name of the directory under which the Prospero
* server will run. If left out, it defaults to /tmp.
*
* #define PSRV_RUNDIR "/tmp"
*/
/*
* PSRV_LOGFILE is the name of the file in which events are logged.
* By default Prospero logs all requests if PSRV_LOGFILE is defined. If you
* would like to change the list of events that are logged, or if you would
* like to use syslog for logging, edit the file plog.h.
*/
#define PSRV_LOGFILE "/usr/pfs/pfs.log"
/*
* PSRV_ROOT defines that part of the system's directory tree for which
* directory information will be readable over the network. Directory
* information will also be available for files under AFTPDIRECTORY and
* AFSDIRECTORY if these access methods are supported.
*
* If PSRV_ROOT is not defined, then directory information will only be
* available for those files under AFTPDIRECTORY or AFSDIRECTORY.
*
* #define PSRV_ROOT "/"
*/
/*
* PSRV_READ_ONLY specifies that the server is only to accept
* operations that read the directory structure. No changes to virtual
* directories stored on this system will be allowed. NODOTDOT is used to
* disallow the use of path names that include "..". If you are
* restricting the part of the directory tree which will be accessible
* (i.e. if PSRV_ROOT is other than "/"), NODOTDOT should be set.
*
* #define NODOTDOT
*/
#define PSRV_READ_ONLY
#define NODOTDOT
/*
* PSRV_SHADOW is the name of the shadow hierarchy that contains additional
* information about Prospero files. PSRV_STORAGE is the name of the directory
* under which new files can be created, if that option is supported by
* your distribution. PSRV_SECURITY is the name of the directory where
* security information is stored by the prospero server. All three names are
* relative to the home directory for the
* user ID specified by P_USER_ID.
*
* You will normally have no desire to change this, but it IS posible and legal
* to do so. If you do change it, then please make a corresponding change in
* section III of Makefile.config.
*/
#define PSRV_SHADOW "shadow"
#define PSRV_STORAGE "pfsdat"
#define PSRV_SECURITY "security"
/*
* If PSRV_UNDER_UDIR is defined, pstart calculates the full path names of
* of the directories corresponding to PSRV_SHADOW and PSRV_STORAGE and
* PSRV_SECURITY by
* finding the home directory for the Prospero user ID, then appending
* PSRV_SHADOW or PSRV_STORAGE or PSRV_SECURITY.
*
* If PSRV_UNDER_UDIR is not defined, or if dirsrv is called directly,
* the full path names are taken from PSRV_FSHADOW and PSRV_FSTORAGE and
* PSRV_FSECURITY. These
* should be stable names for those directories. They may be aliases
* (symbolic links) if the directories move around. If they are symbolic
* links, the links should be updated whenever the directories move.
*
* Note that if PSRV_UNDER_UDIR is set, the full path names are calculated
* only when the Prospero server is started by pstart. If you expect
* to start the server by hand (for example, when debugging), PSRV_FSHADOW
* and PSRV_FSTORAGE should also be defined.
*
* In any case these must match the definitions at the top of Makefile
*/
#define PSRV_FSHADOW "/usr/pfs/shadow"
#define PSRV_FSTORAGE "/usr/pfs/pfsdat"
#define PSRV_FSECURITY "/usr/pfs/security"
/*
* AFTPDIRECTORY contains the name of the root directory as seen through
* anonymous FTP. It is used to determine which files may be accessed
* using the anonymous FTP access mechanism, and to determine the file name
* that must be used when doing so. It also adds to the set of files about
* which directory information is available.
*
* Note: AFTPDIRECTORY should be a stable name for the FTP directory.
* It may be an alias (symbolic link) if the FTP directory
* moves around. If it is a symbolic link, that symbolic link should
* be updated whenever the directory moves.
*/
/* #define AFTPDIRECTORY "/usr/ftp" */
/*
* AFTPUSER contains the name of the anonymous FTP user (usually ftp)
* If defined, pstart will look up the home directory for this user
* and use it instead of AFTPDIRECTORY. If it fails, the value of
* AFTPDIRECTORY (defined above) will be used.
*
* Note that if AFTPUSER is set, the path name of the FTP directory is
* calculated only when the Prospero server is started by pstart.
* If you expect to start the server by hand (for example, when
* debugging), AFTPDIRECTORY should also be defined.
*
* Also note that when started by pstart, if AFTPUSER is defined, the
* path taken from the password file will override that specified by
* AFTPDIRECTORY. If AFTPDIRECTORY is a stable path, do not define
* AFTPUSER.
*
* #define AFTPUSER "ftp"
*/
/*
* NFS_EXPORT should be defined if your system allows others to
* access files using NFS. If defined, you will have to modify
* lib/psrv/check_nfs.c so that the directory server is aware of
* your system's policy for NFS mounts (this is necessary so that
* the directory server will not tell the client to use NFS when
* such access is not supported).
*
* #define NFS_EXPORT
*/
/*
* AFSDIRECTORY contains the name of the root of the AFS directory
* hierarchy. It should only be defined if your host supports AFS
* and you are willing to make information about AFS files available
* through your server. AFSDIRECTORY is used to to determine which files
* may be accessed using the AFS access mechanism. It also adds to
* the set of files about which directory information is available.
*
* Note: AFSDIRECTORY must be the true name for the directory
* after all symbolic links have been expanded.
*
* #define AFSDIRECTORY "/afs"
*/
/*
* PSRV_KERBEROS, if defined, means that the server will understand
* Kerberos (version 5) authentication information. This should be
* #defined if your site uses Kerberos authentication; otherwise, you
* won't have a use for it. If you #define this, then you also need
* to make the appropriate definitions in the top-level makefile.
*
* Note that most Kerberos sites still use the older version 4,
* which is not supported by Prospero.
*
* #define PSRV_KERBEROS
*/
/*
* KERBEROS_SRVTAB, if defined, tells the server the location of the
* server's keytab file that contains its Kerberos key. Define this
* only if, firstly, you are using Kerberos (i.e. PSRV_KERBEROS is
* defined), and, secondly, if you want to keep this key in a location
* different from its default location (typically /etc/v5srvtab).
*
* #define KERBEROS_SRVTAB "/usr/pfs/v5srvtab"
*/
/*
* PSRV_P_PASSWORD, if defined, means that server will understand
* the Prospero password authentication information. It will not do you
* any harm to define this, and we have left it turned on by default.
* The passwording mechanism is described more fully in the user's manual
* (or will be after it's updated).
*
*
*/
#define PSRV_P_PASSWORD
#ifdef PSRV_P_PASSWORD
/* PSRV_PW_FILE contains the name of the servers password file used
* for P_PASSWORD authentication. Define this only if you are using
* this type of authentication.
*
* #define PSRV_PW_FILE "/usr/pfs/ppasswd"
*/
#endif
/*
* PSRV_ACCOUNT, if defined, the server will understand accounting
* information and may charge clients for services.
*
* #define PSRV_ACCOUNT
*/
/*
* DEFAULT_ACL, SYSTEM_ACL, OVERRIDE_ACL and MAINT_ACL are access
* control lists used to control access to Prospero directories.
* DEFAULT_ACL applies to those directories for which no individual
* access control list has been specified. All access control lists
* initially include SYSTEM_ACL, but the entry may be explicitly
* removed by the administrator of a directory or link. OVERRIDE_ACL
* grants rights to a directory regardless of the contents of any
* other access control list. MAINT_ACL is an access control list
* for performing remote maintenance on the server.
*/
#define DEFAULT_ACL {{ACL_ANY, NULL, "YvlGgr" }}
#define SYSTEM_ACL {{ACL_ASRTHOST, NULL, "ALRWD", "pfs@%.%.%.%"}, \
{ACL_ASRTHOST, NULL, "ALRWD", "pfs@128.9.*.*"}}
#define OVERRIDE_ACL {{ACL_TRSTHOST, NULL, "A", "root@%.%.%.%"},\
{ACL_OWNER, NULL, "A"}}
#define MAINT_ACL {{ACL_ASRTHOST, NULL, "STUP", "root@%.%.%.%"},\
{ACL_ANY, NULL, "Y"}}
/*
* PSRV_ARCHIE, if defined, indicates that your server is to
* make available information from the archie database. You
* must already have the archie database installed on your
* machine and you must follow the additional directions in
* lib/psrv/archie2 or lib/psrv/archie3 to configure the server.
*
* #define PSRV_ARCHIE
*/
/* PSRV_GOPHER_GW, if defined, indicates that this server will have
* the capability to make Gopher protocol queries in response to
* Prospero protocol queries. If you install this option, you must
* uncomment the line reading
* #SUBDIR=gopher_gw.dir
* in lib/psrv/Makefile, and uncomment the line reading:
* #DB_LIBS= ../lib/psrv/gopher_gw/libpgoph_gw.a
* in server/Makefile. This option *is* presently supported.
*
* #define PSRV_GOPHER_GW
*/
/*
* Gopher servers frequently gateway queries to anonymous FTP sites. When
* they return links in this form, all retrievals then proceed through
* that server. This is inefficient.
*
* You can set GOPHER_GW_NEARBY_GOPHER_SERVER to be a
* Gopher server at your site or nearby that you want the gopher
* gateway to to gateway Gopher AFTP queries through
* instead of the GOPHER server that returned the AFTP links. Thanks to
* mitra@path.net for this optimization.
*
* If you don't define this, things will still work OK; the gopher server
* just won't rewrite such links. In other words, if you don't define this,
* the gopher gateway will exhibit the default behavior for most Gopher
* clients, as distributed.
*
* #define GOPHER_GW_NEARBY_GOPHER_SERVER "gopher.your.net(70)"
*/
/* PSRV_WAIS_GW, if defined, indicates that this server will have
* the capability to make Wais protocol queries in response to
* Prospero protocol queries. If you install this option, you must
* uncomment the line reading
* #SUBDIR=wais_gw.dir
* in lib/psrv/Makefile, and uncomment the line reading:
* #DB_LIBS= ../lib/psrv/wais_gw/libwais_gw.a
* in server/Makefile. This option *is* presently supported.
* #define PSRV_WAIS_GW
*/
/*
* PSRV_GOPHER, if defined, indicates that your server is to make
* available information from gopher files locally stored on your
* machine. You must already have gopher installed on your machine and
* you must follow the additional directions in lib/psrv/gopher to
* configure the server. This option is not presently supported.
*
* XXX This might not ever be a supported part of the distribution, if it
* turns out that the existing GOPHER_GW code meets the needs this
* was intended to fulfill. Please send feedback to
* info-prospero@isi.edu.
*
* #define PSRV_GOPHER
*/
/*
* SHARED_PREFIXES, if defined, indicates that the host on which your
* server runs shares some part of its filesystem with other specified
* hosts (perhaps via an NFS auto-mounter). If you define
* SHARED_PREFIXES appropriately, then Prospero clients on machines
* with access to the shared part of the filesystem will be able to
* retrieve files on the server that might be unreachable via another
* access method.
*
* You should specify SHARED_PREFIXES only if you want the server to
* return a LOCAL access-method for files in these areas on your
* server. If you don't understand this definition, just leave it
* undefined.
*
* The format of the SHARED_PREFIXES definition is a concatenated series of
* entries, each one describing a particular subtree of the filesystem
* that is exported. Each entry is composed of 4 subitems. The subitems
* are:
*
* a) Name (or names, if alternate names for directories are present) of
* the subtree on the server host. The last name is followed by a NULL
* b) Name of the subtree on the client host(s). There must be no more
* than one of these entries. This subitem is followed by a NULL.
* c) Internet addresses of the hosts which have this subtree as part
* of the local filesystem namespace. These can be wildcarded;
* - any octet may be replaced with a '*' (indicating match any).
* - any octet may be replaced with a '%' (indicating to match
* with the value of this octet in the server host's address)
* This subitem is followed by a NULL.
* d) exception list: a list of hosts which do NOT have this subtree
* as part of the local filesystem namespace. This lets one exclude
* special hosts or subnets that don't share in an organization's
* overall networked filesystem. This subitem is followed by a NULL.
*
*
* An example may make this clearer. Here is the entry we use on the
* server on PROSPERO.ISI.EDU:
*
* #define SHARED_PREFIXES { \
* "/nfs", NULL, "/nfs", NULL, "128.9.*.*", NULL, NULL, \
* "/ftp", NULL, "/auto/gum/gum/ftp", NULL, "128.9.*.*", NULL, NULL, \
* "/afs", NULL, "/nfs/afs", NULL, "128.9.*.*", NULL, NULL }
*/
#define SHARED_PREFIXES { \
"/nfs", NULL, "/nfs", NULL, "128.9.*.*", NULL, NULL }
/******************************************************************
* You should not need to change any definitions below this line. *
******************************************************************/
/*
* DSHADOW and DCONTENTS are the names of the file in the shadow
* directory used to store information about directories. There
* should be no need to change them.
*/
#define DSHADOW ".directory#shadow"
#define DCONTENTS ".directory#contents"
/*
* ARCHIE_PREFIX is an entry for archie that will appear
* in the DATABASE_PREFIXES definition. It should not be set
* directly but is instead set automatically if PSRV_ARCHIE is
* defined. If not, it will be empty. If set, it must be
* followed by a ,.
*/
#ifdef PSRV_ARCHIE
#define ARCHIE
#define ARCHIE_PREFIX {"ASCII", "ARCHIE", arch_dsdb, NULL, "ARCHIE"},
#ifdef SERVER_SUPPORT_V1
#define DATABASE_PREFIX "ARCHIE" /* Backwards compatability; v1 stuff */
#endif
#else
#define ARCHIE_PREFIX
#endif
/* GOPHER_GW_PREFIX is an entry for GOPHER that will appear in the
* DATABASE_PREFIXES definition. It should not be set
* directly but is instead set automatically if PSRV_GOPHER_GW is
* defined. If not, it will be empty. If set, it must be
* followed by a ,.
*/
#ifdef PSRV_GOPHER_GW
#define GOPHER_GW_PREFIX {"ASCII", "GOPHER-GW", gopher_gw_dsdb, NULL, "GOPHER-GW"},
#else
#define GOPHER_GW_PREFIX
#endif
/* WAIS_GW_PREFIX is an entry for WAIS that will appear in the
* DATABASE_PREFIXES definition. It should not be set
* directly but is instead set automatically if PSRV_WAIS_GW is
* defined. If not, it will be empty. If set, it must be
* followed by a ,.
*/
#ifdef PSRV_WAIS_GW
#define WAIS_GW_PREFIX {"ASCII", "WAIS-GW", wais_gw_dsdb, NULL, "WAIS-GW"},
#else
#define WAIS_GW_PREFIX
#endif
/*
* GOPHER_PREFIXES are the entries for gopher that will appear
* in the DATABASE_PREFIXES definition. It should not be set
* directly but is instead set automatically if PSRV_GOPHER is
* defined. If not, it will be empty. If set, it must be
* followed by a ,.
*
* XXX This is not yet a supported part of the distribution.
* XXX This might not ever be a supported part of the distribution, if it
* turns out that the existing GOPHER_GW code meets the needs this
* was intended to fulfill.
*
* If you run a Gopher server, define GOPHER to be a list of
* pairs of Gopher hierarchy root directories and TCP ports. This list
* must be terminated with the record {"", 0}.
*
* #define GOPHER {{"/nfs/pfs/gopherroot", 70}, {"", 0}}
*
*/
#ifdef PSRV_GOPHER
#define GOPHER_PREFIX {"ASCII", "GOPHER", gopher_dsdb, NULL, "GOPHER"},
#else
#define GOPHER_PREFIX
#endif
/*
* DATABASE_PREFIXES is an array of structures, each representing
* a particular database prefix and its acompanying prospero query
* function. It is for use when the Prospero server provides information
* from sources other than the file system. It should be set
* automatically if the appropriate database has been configured.
* you should not need to set it directly. The last element in the
* array must be a NULL pointer.
*
* DATABASE_PREFIXES supersedes the old DATABASE_PREFIX option.
*
*/
#define DATABASE_PREFIXES { ARCHIE_PREFIX GOPHER_GW_PREFIX GOPHER_PREFIX \
WAIS_GW_PREFIX }
/*
* If DIRSRV_EXPLAIN_LAST_RESTART is defined and the server detects an
* internal error and restarts itself, the message that caused the
* error will be explained in the logfile and in the message returned
* by pstatus.
*/
#define DIRSRV_EXPLAIN_LAST_RESTART
/*
* If PSRV_CACHE_NATIVE is defined, the server will cache directories which
* are entirely native (e.g., directories in the anonymous FTP area which
* contain no links with special attributes defined on them.)
* This option is unset by default because otherwise the prospero server
* running on a big anonymous FTP site would consume too much disk space.
*
* #define PSRV_CACHE_NATIVE
*/
/*
* If DNSCACHE_MAX is defined, then dirsrv will cache up to that many
* DNS addresses. "undef" this for no caching at all.
*
*/
#define DNSCACHE_MAX 300
/*
* If DIRECTORYCACHING is defined, then dirsrv will cache directories
* on disk under /usr/pfs/shadow/{GOPHER-GW,WAIS-GW,<other-database-name>}
* Note that this isn't a GREAT way of structuring the database, in case there
* really is a directory named /GOPHER-GW on the machine (confusion). This is
* a risk we currently take.
*
* #define DIRECTORYCACHING
*/
/* These following definitions override those in plog.h
*
* Place any definitions you like here that should override those in plog.h
* By changing this file instead of <plog.h>, we can keep down the number of
* files that must be changed in order to configure Prospero.
*/
#define L_WTTIME_THRESHOLD 1
#define L_SVCTIME_THRESHOLD 1
#define L_SYSTIME_THRESHOLD 9999
#define L_COMP_THRESHOLD 1
#define INITIAL_LOG_VECTOR { \
L_FIELDS_USER|L_FIELDS_HADDR|L_FIELDS_SW_ID|L_FIELDS_STIME, /* L_FIELDS */ \
LOG_PROSPERO|LOG_NOTICE|PLOG_TOFILE, /* L_STATUS */ \
LOG_PROSPERO|LOG_CRIT|PLOG_TOFILE, /* L_FAILURE */ \
PLOG_TOFILE, /* L_STATS */ \
LOG_PROSPERO|LOG_ERR|PLOG_TOFILE, /* L_NET_ERR */ \
LOG_PROSPERO|LOG_ERR|PLOG_TOFILE, /* L_NET_RDPERR */ \
0, /* L_NET_INFO */ \
LOG_PROSPERO|LOG_INFO|PLOG_TOFILE, /* L_QUEUE_INFO */ \
LOG_PROSPERO|LOG_INFO|PLOG_TOFILE, /* L_QUEUE_COMP */ \
LOG_PROSPERO|LOG_ERR|PLOG_TOFILE, /* L_DIR_PERR */ \
LOG_PROSPERO|LOG_WARNING|PLOG_TOFILE, /* L_DIR_PWARN */ \
LOG_PROSPERO|LOG_INFO|PLOG_TOFILE, /* L_DIR_PINFO */ \
LOG_PROSPERO|LOG_ERR|PLOG_TOFILE, /* L_DIR_ERR */ \
LOG_PROSPERO|LOG_WARNING|PLOG_TOFILE, /* L_DIR_WARN */ \
LOG_PROSPERO|LOG_INFO|PLOG_TOFILE, /* L_DIR_REQUEST */ \
LOG_PROSPERO|LOG_INFO|PLOG_TOFILE, /* L_DIR_UPDATE */ \
LOG_PROSPERO|LOG_WARNING|PLOG_TOFILE, /* L_AUTH_ERR */ \
LOG_PROSPERO|LOG_ERR|PLOG_TOFILE, /* L_DATA_FRM_ERR */ \
LOG_PROSPERO|LOG_ERR|PLOG_TOFILE, /* L_DB_ERROR */ \
LOG_PROSPERO|LOG_INFO|PLOG_TOFILE /* L_DB_INFO */ \
}

332
prospero/include/psite.h Normal file
View File

@@ -0,0 +1,332 @@
/*
* Copyright (c) 1992, 1993, 1994 by the University of Southern California
*
* For copying and distribution information, please see the file
* <usc-license.h>
*
* Written by bcn 1989 modified 1989-1992
* Modified by bcn 1/19/93 to eliminate server specific definitions
* Modified by swa 5/2/94 to add section 3 and reorder things to be less
* intimidating to neophytes.
*/
#include <usc-license.h>
/*
* psite.h - site selected parameters for Prospero
*
* This file contains local definitions for the Prospero utilities.
* It is expected that it will be different on different systems.
*/
/*
* Section 1: Installation specifc definitions for the Prospero Applications
*
* The definitions in the following section provide information about
* the proper configuration of Prospero clients on your system.
* They may change from system to system.
*/
/*
* If P_BINARIES is defined and not empty, it defines the directory
* in which the Prospero clients will look for executables. If set in
* the users environment, P_BINARIES will override the definition
* here. If neither are defined, or if the definition is the empty
* string, then the clients will use the user's search path to find
* the binaries.
*
* The only executable program that the prospero clients and compatability
* library call currently is VCACHE.
*/
#define P_BINARIES "/pfs/bin"
/*
* If P_PATH, if defined, is a directory that will be added to the
* user's search path by the Prospero initialization script
* (vfsetup.source for CSH users, vfsetup.profil for SH users).
* It only needs to be defined if the Prospero binaries will not already be
* in the user's search path. Multiple directories separated by spaces may
* be specified.
*/
#define P_PATH P_BINARIES
/*
* P_AFS is the name of the directory under which AFS files are found.
* If should be set only if your system supports the Andrew File System.
*
* #define P_AFS "/afs"
*/
#define P_AFS "/nfs/afs"
/*
* P_KERBEROS, if defined, means that the clients will transmit Kerberos
* (version 5) authentication information and that the server will understand
* such information. This should be #defined if your site uses Kerberos
* authentication; otherwise, you won't have a use for it. If you #define
* this, then you also need to configure the top-level Makefile with the
* location of the Kerberos libraries and include directory.
*
* Note that most Kerberos sites out there are still using the older version 4,
* which is not compatible with the new version 5.
*
* #define P_KERBEROS
*/
/*
* P_P_PASSWORD, if defined, means that the clients will transmit password
* authentication information.
*
* #define P_P_PASSWORD
*/
#define P_P_PASSWORD
/*
* P_ACCOUNT, if defined, means that the clients will transmit
* accounting information.
*
* #define P_ACCOUNT
*/
/*
* Section 2: Site Definitions for the Prospero Applications
*
* The definitions in the following section define the Prospero site.
* They will not necessarily change from system to system. These definitions
* should only be changed if you are setting up your own prospero site.
* Setting up a site is different than installing the software on a new
* system. Unless your site supports storage of new virtual systems,
* do not change these definitions.
*/
/* Section 2a: Site definitions we expect you might need to change
* for your site.
*/
/*
* P_SITE_HOST and DIRECTORY define the system level name of the
* virtual directory under which site data and meta-data are stored.
* It will vary from site to site.
*/
#define P_SITE_HOST "PROSPERO.ISI.EDU"
#define P_SITE_DIRECTORY "/pfs/pfsdat"
/*
* P_SITE_MASTER_VSLIST is the name of the virtual directory (relative
* to P_SITE) under which reference to local virtual systems can be
* found. When setting up a new site, choose a one component name
* that seems appropriate.
*/
#define P_SITE_MASTER_VSLIST "vs_root_isi"
/*
* Section 2b: Site Definitions we expect you to not change except in unusual
* circumstances.
*/
/*
* P_GLOBAL_VS_ROOT* is a reference to the global root for the
* underlying ugly-names of virtual systems. These definitions should not
* be changed unless your site is not connected to the Internet.
*/
#define P_GLOBAL_VS_ROOT_HOST "PROSPERO.ISI.EDU"
#define P_GLOBAL_VS_ROOT_FILE "/pfs/pfsdat/vs_root_g"
/*
* Section 2c: Site definitions you should never have a need to change
* (they can be reconfigured because we did not want
* Prospero to have any particular directory names hardcoded
* into it, and it will not hurt Prospero in any way if you
* change them, but we think it is unlikely you would want to..)
*/
/*
* P_MASTER_VS is the name (relative to MASTER_VSLIST) of the virtual
* system to be used when creating new virtual systems with newvs.
* There should be no need to change these definitions.
*/
#define P_MASTER_VS "master"
#define P_PROTOTYPE_VS "prototype"
/*
* P_SITE_STORAGE is the name (relative to master) of a directory
* with references to the storage areas of the individual systems that
* compose a site. There should be no need to change this
* definitions.
*/
#define P_SITE_STORAGE "pfs_storage"
/*
* P_VS_STORAGE is the name (relative to the directories named in
* P_SITE_STORAGE) of the directory under which new virtual systems
* may be stored. There should be no need to change this definition.
*/
#define P_VS_STORAGE "local_vsystems"
/*
* Section 3: Special-purpose configuration options for the Prospero
* Applications
*
*
* The configuration options in this section are used only to meet special
* needs. They have been added to meet the special needs of particular
* Prospero commercial and research users. They have general utility, but they
* are more in the nature of optimizations and tuning. Prospero will function
* just fine if you leave them alone, although not as efficiently in some
* applications.
*
* Unless you are an experienced Prospero user, you do not want to
* alter any of these definitions.
*/
/*
* If NFS is supported P_NFS can defined. If set, the clients will attempt
* to use NFS to retrieve files from remote systems.
*
* *WARNING* *WARNING* *WARNING* *WARNING* *WARNING* *WARNING* *WARNING*
*
* If you will be using this option, you need to modify the
* function pmap_nfs() in the file lib/psrv/pmap_nfs.c to do proper NFS
* retrievals from the server. You also will need to modify the function
* check_nfs() in the file lib/psrv/check_nfs.c to make sure that your
* server publishes NFS data only for exportable filesystems, and that it
* publishes the data with the correct NFS filesystem names. The version of
* lib/psrv/check_nfs.c we provide is only a stub, and does not perform
* this function appropriately for most environments.
*
* This option is growing obsolescent with the existence of automounters.
* It's still useful for using sites such as WU-ARCHIVE, which allow one to
* anonymously mount NFS partitions, and you are welcome to experiment with it
* for those purposes.
*
* *WARNING* *WARNING* *WARNING* *WARNING* *WARNING* *WARNING* *WARNING*
*
* Until you customize lib/psrv/check_nfs.c and lib/psrv/pmap_nfs.c, do NOT
* #define P_NFS. If your clients run an NFS automounter,
* you can accomplish the same result by defining SHARED_PREFIXES in the
* pserver.h file.
*
*
* #define P_NFS
*/
/*
* P_CACHE_* define locations for files associated with the caching on
* the client.
*
* P_CACHE_TMP is for temporary files during transfer,
* P_CACHE_VC is for the cache itself
* P_CACHE_P is for personal copies of files to ensure they don't change
*
* Allthough these can be symbolic links, they MUST all be in the same
* filesystem since hard-links are used to move them around
*
* They must also match the definitions at the top of Makefile
*
* Note that each of these directories needs to be writable by whatever ids
* are running Prospero clients. Directories under P_CACHE_P can be restricted
* to specific users, and if "vcache" was to run setuid "pfs" then
* P_CACHE_VC could be restricted to that user, although code would
* then be needed in vcache to chown files to the particular user -- and
* that won't be possible on some (e.g. Sun) unixes.
* (swa: I don't understand why mitra made the comment above. This can be
* accomplished by setting the sticky bit on directories.)
*
* This caching code was provided by mitra@path.net and is still experimental.
* It is not a supported part of this release.
*
* It lacks a number of facilities that willl have to be present before this
* becomes a supported part of the release. Send email to
* info-prospero@ISI.EDU if you want to know what changes need to be made.
*
* The strategy for expiring items from the cache is in lib/pfs/pmap_cache.c.
*
* #define P_CACHE_ENABLED
*/
/* These definitions will have no effect unless P_CACHE_ENABLED is defined. */
#define P_CACHE_P "/nfs/u5/divirs/vcache/p"
#define P_CACHE_VC "/nfs/u5/divirs/vcache/vc"
#define P_CACHE_TMP "/nfs/u5/divirs/vcache/tmp"
/*
* This option is not currently supported in the release, because it needs
* cleanup; notes available from SWA on what steps need to be taken to clean
* it up to be of production quality.
*
* It lacks a number of facilities that will have to be present before this
* becomes a supported part of the release. Send email to
* info-prospero@ISI.EDU if you want to know what changes need to be made.
*
* You can have the ACCESS-METHOD interpreting code that does retrievals
* linked directly with your client executables. This significantly bloats
* executable size, but gains you more speed on the retrievals (as long as you
* manage to avoid thrashing.) This optimization is useful in circumstances
* where the cost of slower response is greater than the cost of buying some
* more RAM for your machine.
*
* N.B.: if your machine is paging or swapping
* under these usage conditions, this optimization will cost
* you time rather than saving it, unless you are able to configure
* libpvcache on your system to be a shared library where only one copy of the
* library exists in RAM for all of the clients.
*
* This is a traditional space/time tradeoff.
* To set the tradeoff in favor of reducing time and increasing space,
* define INCREASE_CLIENT_EXECUTABLE_SIZE_DO_NOT_EXEC_VCACHE. By default,
* a separate executable named 'vcache' is run to perform some types of
* retrievals.
*
* If you define this, then also edit VCACHE_LIBS in the top-level Prospero
* Makefile. You will need to link VCACHE_LIBS with all the client programs
* that want to use the VCACHE library.
*
* #define INCREASE_CLIENT_EXECUTABLE_SIZE_DO_NOT_EXEC_VCACHE
*/
/* Location of wais sources, note trailing slash. MITRAism.
*
* Note that it is not clear to me (swa) why this is useful to have for the
* clients. Isn't this a server-specific thing? It's on my TODO list.
*/
#define WAIS_SOURCE_DIR "/usr/local/wais/wais-sources/"
/*
* Filters are not supported in the default distribution because they
* currently only work on the VAX. We are working on resolving these
* problems.
*/
#define P_NO_FILTERS
/* If you want to use the UNIX compatability library (documented in the
* Prospero Library Reference Manual), remove the definition of
* P_NO_PCOMPAT and follow the additional directions in the INSTALLATION file.
* This option is currently slightly broken, because Prospero has undergone
* a number of changes. it can easily be reported.
*
*/
#ifdef AIX /* lucb */
#define P_NO_PCOMPAT /**/
#else
/* #define P_NO_PCOMPAT */
#endif
/*
* This option exists for sites that have special applications. If this option
* is defined, the pcompat library's open() routines will prompt for an FTP
* username and password to retrieve files, if necessary. This may increase
* the amount of information available through applications linked with the
* compatability library, but at the cost of changing the user interface
* to applications such as 'cat' which never normally prompt for a password.
* Only #define this if you have a special application.
*
* #define PCOMPAT_SUPPORT_FTP
*/

View File

@@ -0,0 +1,328 @@
/*
* Copyright (c) 1992, 1993, 1994 by the University of Southern California
*
* For copying and distribution information, please see the file
* <usc-license.h>
*
* Written by bcn 1989 modified 1989-1992
* Modified by bcn 1/19/93 to eliminate server specific definitions
* Modified by swa 5/2/94 to add section 3 and reorder things to be less
* intimidating to neophytes.
*/
#include <usc-license.h>
/*
* psite.h - site selected parameters for Prospero
*
* This file contains local definitions for the Prospero utilities.
* It is expected that it will be different on different systems.
*/
/*
* Section 1: Installation specifc definitions for the Prospero Applications
*
* The definitions in the following section provide information about
* the proper configuration of Prospero clients on your system.
* They may change from system to system.
*/
/*
* If P_BINARIES is defined and not empty, it defines the directory
* in which the Prospero clients will look for executables. If set in
* the users environment, P_BINARIES will override the definition
* here. If neither are defined, or if the definition is the empty
* string, then the clients will use the user's search path to find
* the binaries.
*
* The only executable program that the prospero clients and compatability
* library call currently is VCACHE.
*/
#define P_BINARIES "/usr/pfs/bin"
/*
* If P_PATH, if defined, is a directory that will be added to the
* user's search path by the Prospero initialization script
* (vfsetup.source for CSH users, vfsetup.profil for SH users).
* It only needs to be defined if the Prospero binaries will not already be
* in the user's search path. Multiple directories separated by spaces may
* be specified.
*/
#define P_PATH P_BINARIES
/*
* P_AFS is the name of the directory under which AFS files are found.
* If should be set only if your system supports the Andrew File System.
*
* #define P_AFS "/afs"
*/
/*
* P_KERBEROS, if defined, means that the clients will transmit Kerberos
* (version 5) authentication information and that the server will understand
* such information. This should be #defined if your site uses Kerberos
* authentication; otherwise, you won't have a use for it. If you #define
* this, then you also need to configure the top-level Makefile with the
* location of the Kerberos libraries and include directory.
*
* Note that most Kerberos sites out there are still using the older version 4,
* which is not compatible with the new version 5.
*
* #define P_KERBEROS
*/
/*
* P_P_PASSWORD, if defined, means that the clients will transmit password
* authentication information.
*
* #define P_P_PASSWORD
*/
/*
* P_ACCOUNT, if defined, means that the clients will transmit
* accounting information.
*
* #define P_ACCOUNT
*/
/*
* Section 2: Site Definitions for the Prospero Applications
*
* The definitions in the following section define the Prospero site.
* They will not necessarily change from system to system. These definitions
* should only be changed if you are setting up your own prospero site.
* Setting up a site is different than installing the software on a new
* system. Unless your site supports storage of new virtual systems,
* do not change these definitions.
*/
/* Section 2a: Site definitions we expect you might need to change
* for your site.
*/
/*
* P_SITE_HOST and DIRECTORY define the system level name of the
* virtual directory under which site data and meta-data are stored.
* It will vary from site to site.
*/
#define P_SITE_HOST "PROSPERO.ISI.EDU"
#define P_SITE_DIRECTORY "/pfs/pfsdat/guest"
/*
* P_SITE_MASTER_VSLIST is the name of the virtual directory (relative
* to P_SITE) under which reference to local virtual systems can be
* found. When setting up a new site, choose a one component name
* that seems appropriate.
*/
#define P_SITE_MASTER_VSLIST "vs_root_isi-guest"
/*
* Section 2b: Site Definitions we expect you to not change except in unusual
* circumstances.
*/
/*
* P_GLOBAL_VS_ROOT* is a reference to the global root for the
* underlying ugly-names of virtual systems. These definitions should not
* be changed unless your site is not connected to the Internet.
*/
#define P_GLOBAL_VS_ROOT_HOST "PROSPERO.ISI.EDU"
#define P_GLOBAL_VS_ROOT_FILE "/pfs/pfsdat/vs_root_g"
/*
* Section 2c: Site definitions you should never have a need to change
* (they can be reconfigured because we did not want
* Prospero to have any particular directory names hardcoded
* into it, and it will not hurt Prospero in any way if you
* change them, but we think it is unlikely you would want to..)
*/
/*
* P_MASTER_VS is the name (relative to MASTER_VSLIST) of the virtual
* system to be used when creating new virtual systems with newvs.
* There should be no need to change these definitions.
*/
#define P_MASTER_VS "master"
#define P_PROTOTYPE_VS "prototype"
/*
* P_SITE_STORAGE is the name (relative to master) of a directory
* with references to the storage areas of the individual systems that
* compose a site. There should be no need to change this
* definitions.
*/
#define P_SITE_STORAGE "pfs_storage"
/*
* P_VS_STORAGE is the name (relative to the directories named in
* P_SITE_STORAGE) of the directory under which new virtual systems
* may be stored. There should be no need to change this definition.
*/
#define P_VS_STORAGE "local_vsystems"
/*
* Section 3: Special-purpose configuration options for the Prospero
* Applications
*
*
* The configuration options in this section are used only to meet special
* needs. They have been added to meet the special needs of particular
* Prospero commercial and research users. They have general utility, but they
* are more in the nature of optimizations and tuning. Prospero will function
* just fine if you leave them alone, although not as efficiently in some
* applications.
*
* Unless you are an experienced Prospero user, you do not want to
* alter any of these definitions.
*/
/*
* If NFS is supported P_NFS can defined. If set, the clients will attempt
* to use NFS to retrieve files from remote systems.
*
* *WARNING* *WARNING* *WARNING* *WARNING* *WARNING* *WARNING* *WARNING*
*
* If you will be using this option, you need to modify the
* function pmap_nfs() in the file lib/psrv/pmap_nfs.c to do proper NFS
* retrievals from the server. You also will need to modify the function
* check_nfs() in the file lib/psrv/check_nfs.c to make sure that your
* server publishes NFS data only for exportable filesystems, and that it
* publishes the data with the correct NFS filesystem names. The version of
* lib/psrv/check_nfs.c we provide is only a stub, and does not perform
* this function appropriately for most environments.
*
* This option is growing obsolescent with the existence of automounters.
* It's still useful for using sites such as WU-ARCHIVE, which allow one to
* anonymously mount NFS partitions, and you are welcome to experiment with it
* for those purposes.
*
* *WARNING* *WARNING* *WARNING* *WARNING* *WARNING* *WARNING* *WARNING*
*
* Until you customize lib/psrv/check_nfs.c and lib/psrv/pmap_nfs.c, do NOT
* #define P_NFS. If your clients run an NFS automounter,
* you can accomplish the same result by defining SHARED_PREFIXES in the
* pserver.h file.
*
*
* #define P_NFS
*/
/*
* P_CACHE_* define locations for files associated with the caching on
* the client.
*
* P_CACHE_TMP is for temporary files during transfer,
* P_CACHE_VC is for the cache itself
* P_CACHE_P is for personal copies of files to ensure they don't change
*
* Allthough these can be symbolic links, they MUST all be in the same
* filesystem since hard-links are used to move them around
*
* They must also match the definitions at the top of Makefile
*
* Note that each of these directories needs to be writable by whatever ids
* are running Prospero clients. Directories under P_CACHE_P can be restricted
* to specific users, and if "vcache" was to run setuid "pfs" then
* P_CACHE_VC could be restricted to that user, although code would
* then be needed in vcache to chown files to the particular user -- and
* that won't be possible on some (e.g. Sun) unixes.
* (swa: I don't understand why mitra made the comment above. This can be
* accomplished by setting the sticky bit on directories.)
*
* This caching code was provided by mitra@path.net and is still experimental.
* It is not a supported part of this release.
*
* It lacks a number of facilities that willl have to be present before this
* becomes a supported part of the release. Send email to
* info-prospero@ISI.EDU if you want to know what changes need to be made.
*
* The strategy for expiring items from the cache is in lib/pfs/pmap_cache.c.
*
* #define P_CACHE_ENABLED
*/
/* These definitions will have no effect unless P_CACHE_ENABLED is defined. */
#ifdef P_CACHE_ENABLED
#define P_CACHE_P "/nfs/u5/divirs/vcache/p"
#define P_CACHE_VC "/nfs/u5/divirs/vcache/vc"
#define P_CACHE_TMP "/nfs/u5/divirs/vcache/tmp"
#endif
/*
* This option is not currently supported in the release, because it needs
* cleanup; notes available from SWA on what steps need to be taken to clean
* it up to be of production quality.
*
* It lacks a number of facilities that will have to be present before this
* becomes a supported part of the release. Send email to
* info-prospero@ISI.EDU if you want to know what changes need to be made.
*
* You can have the ACCESS-METHOD interpreting code that does retrievals
* linked directly with your client executables. This significantly bloats
* executable size, but gains you more speed on the retrievals (as long as you
* manage to avoid thrashing.) This optimization is useful in circumstances
* where the cost of slower response is greater than the cost of buying some
* more RAM for your machine.
*
* N.B.: if your machine is paging or swapping
* under these usage conditions, this optimization will cost
* you time rather than saving it, unless you are able to configure
* libpvcache on your system to be a shared library where only one copy of the
* library exists in RAM for all of the clients.
*
* This is a traditional space/time tradeoff.
* To set the tradeoff in favor of reducing time and increasing space,
* define INCREASE_CLIENT_EXECUTABLE_SIZE_DO_NOT_EXEC_VCACHE. By default,
* a separate executable named 'vcache' is run to perform some types of
* retrievals.
*
* If you define this, then also edit VCACHE_LIBS in the top-level Prospero
* Makefile. You will need to link VCACHE_LIBS with all the client programs
* that want to use the VCACHE library.
*
* #define INCREASE_CLIENT_EXECUTABLE_SIZE_DO_NOT_EXEC_VCACHE
*/
/* Location of wais sources, note trailing slash. MITRAism.
*
* Note that it is not clear to me (swa) why this is useful to have for the
* clients. Isn't this a server-specific thing? It's on my TODO list.
*/
#define WAIS_SOURCE_DIR "/usr/local/wais/wais-sources/"
/*
* Filters are not supported in the default distribution because they
* currently only work on the VAX. We are working on resolving these
* problems.
*/
#define P_NO_FILTERS
/* If you want to use the UNIX compatability library (documented in the
* Prospero Library Reference Manual), remove the definition of
* P_NO_PCOMPAT and follow the additional directions in the INSTALLATION file.
* This option is currently slightly broken, because Prospero has undergone
* a number of changes. it can easily be reported.
*
*/
#define P_NO_PCOMPAT
/*
* This option exists for sites that have special applications. If this option
* is defined, the pcompat library's open() routines will prompt for an FTP
* username and password to retrieve files, if necessary. This may increase
* the amount of information available through applications linked with the
* compatability library, but at the cost of changing the user interface
* to applications such as 'cat' which never normally prompt for a password.
* Only #define this if you have a special application.
*
* #define PCOMPAT_SUPPORT_FTP
*/

360
prospero/include/psrv.h Normal file
View File

@@ -0,0 +1,360 @@
/* psrv.h */
/*
* Copyright (c) 1992, 1993 by the University of Southern California
*
* For copying and distribution information, please see the file
* <usc-license.h>
*/
#include <usc-license.h>
/* Cranked out by swa@isi.edu */
#ifndef PSRV_H
#define PSRV_H
#ifndef PPARSE_H_INCLUDED /* needed for INPUT */
#include <pparse.h>
#endif
#if 0 /* This is ridiculous; I don't need it right now. */
/* Return values for the optquery() function. */
#define OPT_UNSET 0 /* Option not set. */
#define OPT_ARGS 1 /* Option set with arguments */
#define OPT_NOARGS 2 /* Option set with no arguments. */
struct opt {
char *name;
int used; /* reference if used. */
struct opt *args; /* The parsed argument string, set by the
application. */
char *argstring; /* The unparsed arguments. Not necessarily
useful once the args have been generated. */
struct opts *next;
};
typedef struct opt *OPT;
typedef struct opt OPT_ST;
extern OPT optalloc(char *name);
extern void optlfree(OPT);
extern OPT optparse(char * optionstr, char separator);
extern int optquery(OPT opts, char * optname);
extern OPT optargs(OPT opts, char * optname); /* Returns a list of tokens that
are the option's arguments. */
extern int optnargs(OPT opts, char *); /* # of arguments to the option. 0
if none specified. */
extern OPT optremaining(OPT opts); /* Any options which haven't been queried
yet. Check for leftovers! */
#endif /* 0 */
/* Temporary hack to get this going. Don't want to waste the time to do more.
The only option that currently takes arguments is "attributes". And sending
too much stuff back is never wrong, only slightly inefficient. So we will
Not Worry About It.
*/
#define optdecl char *optset_options
#define optstart(optstr) (optset_options = optstr)
#define opttest(optname) (sindex(optset_options, optname))
/* Flags for srv_change_acl */
#define SCA_LINK 0
#define SCA_DIRECTORY 1
#define SCA_LINKDIR 2
#define SCA_OBJECT 3
#define SCA_MISC 4
#define SCA_CONTAINER 4
#define reply(req, mesg) ardp_breply((req), ARDP_R_INCOMPLETE, (mesg), 0)
#define creply(req, mesg) ardp_breply((req), ARDP_R_COMPLETE, (mesg), 0)
extern int vcreplyf(RREQ req, const char *format, va_list ap);
extern int vreplyf(RREQ req, const char *format, va_list ap);
extern int creplyf(RREQ req, const char *format, ...);
extern int replyf(RREQ req, const char *format, ...);
int error_reply(RREQ req, char formatstring[], ...);
extern int dsrfinfo(char *nm, long magic, PFILE fi);
extern int dswfinfo(char *nm, PFILE fi);
/* This structure defines how you request attributes, whether they be
associated with the object or with the link. */
struct requested_attributes {
TOKEN specific; /* This is a list of TOKENs. They are the
names of specific attributes that have been
requested by name. */
/* These are BITfields that specify various classes or sets of attributes
that you are looking for. */
int all:1;
int interesting:1;
/* Others to be implemented later on an as-needed basis. 'all' is a
surrogate for them right now. */
/* int object:1; */
/* int field:1; */
};
/* This is called by dsrfinfo(), internally. */
extern int
dsrfinfo_with_attribs(char *nm,long magic,PFILE fi,
struct requested_attributes *req_obj_ats);
/* Special options given to dsrobject() when it's called with the LIST or
GET-OBJECT-INFO protocol messages on a directory. */
struct dsrobject_list_options {
char **thiscompp; /* This option only valid for LIST ..
COMPONENTS */
/* if '*' and no remcomp, then exactly
equivalent to empty. */
TOKEN *remcompp; /* This option only valid for LIST ..
COMPONENTS */
/* If last one '*', exactly equivalent to being
empty. */
struct requested_attributes
req_link_ats; /* Requested attributes associated with the
links contained by this object (i.e., LINK,
CACHED, REPLACEMENT, or ADDITIONAL, and
OBJECT iff very convenient). */
struct requested_attributes
req_obj_ats; /* Requested attributes associated with this
object itself. (only OBJECT precedence).
*/
FILTER filters; /* This option currently only valid for LIST
... COMPONENTS. OBJECT filters, when
implemented, will need this option for
GET-OBJECT-INFO. */
/* Get rid of the following definition as soon as all the databases are
updated. It is set by dirsrv() and looked at only by some older databases.
(The older databases will be unable to compile if they are using this. So
you'll know.) */
#define DSROBJECT_LIST_OPTIONS_REQUESTED_ATTRS_BACK_COMPATIBILITY
#ifdef DSROBJECT_LIST_OPTIONS_REQUESTED_ATTRS_BACK_COMPATIBILITY
const char *requested_attrs; /* this is now nearly obsolete. It will be
obsolete as soon as all the databases are
updated. It is an unholy combination of
req_link_ats and req_obj_ats. It is either
NULL or consists of a concatenated series
of attribute names, separated by the '+'
character. Every attribute name is
preceded and followed by a '+' (in other
words, the string starts and
ends with a '+' character.) */
#endif /* DSROBJECT_LIST_OPTIONS_REQUESTED_ATTRS_BACK_COMPATIBILITY */
};
#ifdef DSROBJECT_SPEEDUP_IS_EXPERIMENTAL
#define dsrobject_list_options_init(dlo) do { \
ZERO(dlo); \
if (!dsrobject_speedup) \
(dlo)->all = 1; /* emulate old inefficient behavior */ \
} while(0)
#else
#define dsrobject_list_options_init(dlo) \
ZERO(dlo);
#endif
/* Used by get_obj_info() and by list(). */
extern void
p__parse_requested_attrs(const char *requested_atlist_unparsed,
struct requested_attributes * parsed);
extern int
was_attribute_requested(char *atname, struct requested_attributes *parsed);
extern int dsrobject(RREQ req, char hsoname_type[], char hsoname[],
long version, long magic_no, int flags,
struct dsrobject_list_options *listopts, P_OBJECT ob);
#define DRO_NULLOPT (struct dsrobject_list_options *) 0
/* Flags for DSROBJECT */
#define DRO_ACCESS_METHOD_ONLY 0x1 /* only want access-method attribute. */
#define DRO_VERIFY 0x2 /* Verify that the object exists.
This is implemented for
ARCHIE and GOPHER-GW; otherwise, still a
full cost call. */
#define DRO_VERIFY_DIR 0x4 /* Verify that the object exists and that it
is a directory. This is implemented for
the local PFSDAT directories. If this is
given to a call that is eventually passed
to a call to a DSDB function, then
whether it is noticed depends upon the
individual DSDB function; might still be
a full-cost call. */
/* --- */
/* From lib/psrv/dsrdir.c */
/* DSRDIR will die soon, superseded by dsrobject(). --swa */
extern int dsrdir(char *name,int magic,VDIR dir,VLINK ul,int flags);
/* Flags for dsrdir() */
#define DSRD_ATTRIBUTES 0x1 /* Fill in attributes for links */
#define DSRD_VERIFY_DIR 0x2 /* Verify that the directory exists
and is a directory. Returns
PSUCCESS upon SUCCESS, PFAILURE
upon FAILURE. This flag implies
that the DIR option to dsrdir()
could be set to NULL with no ill
consequences. In fact, dsrdir()
does just that, as a safety
check. */
/* ---- */
/* The following is unimplemented. */
extern void dswobject(char hsonametype[], char hsoname[], P_OBJECT ob);
extern void set_client_addr(long addr); /* short-term hack */
extern size_t nativize_prefix(char *hsoname, char native_buf[],
size_t native_bufsiz);
extern int dswdir(char *name, VDIR dir);
extern int fdswdir_v5(FILE *vfs_dir, VDIR dir);
TOKEN check_nfs(char filename[], long client_addr);
char *check_localpath(char filename[], long client_addr);
extern int srv_check_acl(ACL pacl,ACL sacl,RREQ req,char *op,int flags,char *objid,char *itemid);
extern int change_acl(ACL *aclp, ACL ae, RREQ req, int flags, ACL diracl);
extern ACL get_container_acl(char *path);
extern ACL maint_acl;
extern int delete_matching_at(PATTRIB key, PATTRIB *headp,
int (*equal)(PATTRIB, PATTRIB));
extern int delete_matching_fl(FILTER key, FILTER *headp);
#ifdef PSRV_ARCHIE /* This is still old format. */
extern int arch_dsdb(RREQ req, /* Request pointer (unused) */
char *hsoname, /* Name of the directory */
long version, /* Version #; currently ignored */
long magic_no, /* Magic #; currently ignored */
int flags, /* Currently only recognize DRO_VERIFY */
struct dsrobject_list_options *listopts, /* options (use *remcompp
and *thiscompp)*/
P_OBJECT ob); /* Object to be filled in */
#endif
#ifdef PSRV_GOPHER /* Currently unused. Probably never used. */
#error this is unimplemented
int gopher_dsdb(RREQ req, char name[], char **componentsp, TOKEN *rcompp,
VDIR dir, int options, const char *rattrib, FILTER filters);
#endif
#ifdef PSRV_GOPHER_GW
int gopher_gw_dsdb(RREQ req, char hsoname[], long version, long magic_no,
int flags, struct dsrobject_list_options *listopts,
P_OBJECT ob);
void gopher_gw_init_mutexes(void);
#ifndef NDEBUG
void gopher_gw_diagnose_mutexes(void);
#endif /*NDEBUG*/
/* Memory allocators used inside GOPHER_GW library. */
extern int glink_count, glink_max;
#endif
#ifdef PSRV_WAIS_GW
int wais_gw_dsdb(RREQ req, char hsoname[], long version, long magic_no,
int flags, struct dsrobject_list_options *listopts,
P_OBJECT ob);
void wais_gw_init_mutexes(void);
/* Memory allocators used inside WAIS library. */
extern int waismsgbuff_count, waismsgbuff_max;
extern int ietftype_count, ietftype_max;
extern int waissource_count, waissource_max;
#ifndef NDEBUG
void wais_gw_diagnose_mutexes(void);
#endif /*NDEBUG*/
#endif
#ifdef PSRV_KERBEROS
extern int
check_krb_auth(char *auth, struct sockaddr_in client, char **ret_client_name);
#endif
extern char shadow[];
extern char pfsdat[];
extern char dirshadow[];
extern char dircont[];
extern char security[];
extern char root[];
extern char aftpdir[];
extern char afsdir[];
extern char *db_prefix; /* For old v1 support. */
extern char hostname[]; /* Server's host name */
extern char hostwport[]; /* Host name w/ port if non-standard
*/
extern char *logfile_arg;
struct db_entry {
char *hsoname_type; /* hsoname type for database; should always
be ASCII */
char *prefix; /* Prefix for database */
/* Hsonametype is already known; doesn't need to be passed. */
int (*read_function)(RREQ req, char hsoname[], long version,
long magic_no, int flags,
struct dsrobject_list_options *listopts,
P_OBJECT ob);
int (*write_function)(char hsoname[], P_OBJECT ob);
char *named_acl; /* name of the NAMED ACL that the database
reads as a pre-filter. If no such ACL or if
NULL, unused. Normally same as db_prefix.
*/
};
extern struct db_entry db_prefixes[];
extern int db_num_ents;
#define OBJECT_VNO 5 /* version # of the object format. */
/* Used internally by dswobject() and
dsrobject(). */
extern int get_named_acl(char *t_name, ACL *wacl);
extern int set_named_acl(char *t_name, ACL wacl);
/* lib/psrv/magic.c */
extern long generate_magic(VLINK vl);
extern int magic_no_in_list(long magic, VLINK links);
/* lib/psrv/dsrobject.c */
extern int requested_contents(struct dsrobject_list_options *listopts);
/* lib/psrv/psrv_mutexes.c */
extern void psrv_init_mutexes(void);
#ifndef NDEBUG
extern void psrv_diagnose_mutexes(void);
#endif
extern void p_init_shared_prefixes(void);
extern void p_srv_check_acl_initialize_defaults(void);
#ifdef PFS_THREADS
p_th_mutex p_th_mutexPSRV_CHECK_ACL_INET_DEF_LOCAL;
p_th_mutex p_th_mutexPSRV_CHECK_NFS_MYADDR;
p_th_mutex p_th_mutexPSRV_LOG;
#endif
extern void get_access_method(char filename[], long caddr, PATTRIB *retval);
extern int set_logfile(char *filename);
extern int check_handle(char *handle);
extern void srv_add_client_to_acl(char *rights, RREQ r, ACL *a, int f);
extern int check_prvport(RREQ req);
extern void close_plog(void);
extern retrieve_fp(VLINK l);
extern int stat_object(P_OBJECT ob); /* not yet defined. */
#ifdef DIRECTORYCACHING
extern int dsrobject_fail; /* How many times did DSROBJECT fail? Used
only in a DIRECTORYCACHING context. */
#endif /* DIRECTORYCACHING */
#endif /*PSRV_H*/

View File

@@ -0,0 +1,43 @@
/* These definitions are destined for pmachine.h, they are herer to
prevent LONG recompile's and can be moved when stable */
/*
* This file determines how we handle various approaches to multithreading
* or timing out on TCP opens.
* The appropriate approaches for the single-threaded and multi-threaded
* cases are different.
*/
/* Several different approaches to handling timeouts
1. Do nothing - (old prospero) - problems occur when prospero is used
mostly for gatewaying since connect could take 2 mins to time out,
leaving hte gateway program to wait - or even worse, timeout itself.
2. Use SIGALRM - this works on SCOUNIX, and probably on most others
it does NOT work on SOLARIS2.3 mutli-threaded, probably due to
problems in the call to signal (at least that is where it crashes).
3. Non-blocking, works fast, since it doesnt need to wait for connects,
but this is probably not relevant on gateways. It still has the problems
of (1). SWA reports problems with this in opentcp.c
4. Non-blocking and waiting, run non-blocking, but wait (using select) at
crucial points. - Currently used by Mitra for AOL
*/
/* For Approach 1 - undef all of these */
#undef TIMEOUT_APPROACH /*Approach 2*/
#undef NONBLOCKING_APPROACH /*Approach 3*/
#define SELECT_APPROACH /*Approach 4*/
/* SETSOCKOPTS are generally usefull, but they will fail under SOLARIS 2.3
setting Errno to the ambiguous "0" */
#ifndef SOLARIS
#define SETSOCKOPTS /* Set various socket options */
#endif
/* This should go in pfs.h */
extern wait_till_readable(int fd, int timeout);
/* Open a stream (or start an opening of a stream). Returns a filedescriptor
* or -1.
*/
extern int p_open_tcp_stream(const char host[], int port);

View File

@@ -0,0 +1,17 @@
/* This is for SOLARIS, but may be usefull elsewhere */
/* SOLARIS and GCC conspire to exclude putenv */
#ifdef _XOPEN_SOURCE
#define OLD_XOPEN_SOURCE _XOPEN_SOURCE
#else
#undef OLD_XOPEN_SOURCE
#endif
#define _XOPEN_SOURCE 1
#include "/usr/include/stdlib.h"
#ifdef OLD_XOPEN_SOURCE
#define _XOPEN_SOURCE OLD_XOPEN_SOURCE
#undef OLD_XOPEN_SOURCE
#else
#undef _XOPEN_SOURCE
#endif

View File

@@ -0,0 +1,26 @@
/*
* <string_with_strcasecmp.h>
* Includes standard POSIX/ANSI C <string.h>, plus
* strcasecmp() prototype.
*/
#ifdef SOLARIS
/* This is for SOLARIS, but may be usefull elsewhere */
/* SOLARIS and GCC conspire to exclude strcasecmp */
#ifdef _XOPEN_SOURCE
#define OLD_XOPEN_SOURCE _XOPEN_SOURCE
#else
#undef OLD_XOPEN_SOURCE
#endif
#define _XOPEN_SOURCE 1
#include "/usr/include/string.h"
#ifdef OLD_XOPEN_SOURCE
#define _XOPEN_SOURCE OLD_XOPEN_SOURCE
#undef OLD_XOPEN_SOURCE
#else
#undef _XOPEN_SOURCE
#endif
#else /* SOLARIS */
#include <string.h>
#endif /* SOLARIS */

View File

@@ -0,0 +1 @@
#include "pfs_threads.h"

View File

@@ -0,0 +1,33 @@
/*
Copyright (c) 1991, 1992, 1993 by the University of Southern California
All rights reserved.
Permission to use, copy, modify, and distribute this software and its
documentation in source and binary forms for non-commercial purposes
and without fee is hereby granted, provided that the above copyright
notice appear in all copies and that both the copyright notice and
this permission notice appear in supporting documentation. and that
any documentation, advertising materials, and other materials related
to such distribution and use acknowledge that the software was
developed by the University of Southern California, Information
Sciences Institute. The name of the University may not be used to
endorse or promote products derived from this software without
specific prior written permission.
THE UNIVERSITY OF SOUTHERN CALIFORNIA makes no representations about
the suitability of this software for any purpose. THIS SOFTWARE IS
PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
Other copyrights might apply to parts of the Prospero distribution
and are so noted when applicable.
Prospero was originally written by Clifford Neuman (bcn@isi.edu).
Contributors include Steven Seger Augart (swa@isi.edu), Benjamin Britt
(britt@isi.edu) and others identified in individual modules.
Questions concerning this software should be directed to
info-prospero@isi.edu.
*/

View File

@@ -0,0 +1,125 @@
/*
* Copyright (c) 1991-1994 by the University of Southern California
* All rights reserved.
*
* PROSPERO(TM) LICENSE AGREEMENT
*
* 1. COPYRIGHT. The Prospero software is owned by the University of
* Southern California and is protected by the United States copyright
* laws and international treaty provisions. Other copyrights may
* apply to parts of the Prospero distribution and are so noted when
* known to be applicable.
*
* 2. DISCLAIMER OF WARRANTY. THIS SOFTWARE IS PROVIDED "AS IS". The
* University of Southern California MAKES NO REPRESENTATIONS OR
* WARRANTIES, EXPRESS OR IMPLIED. By way of example, but not
* limitation, the University of Southern California MAKES NO
* REPRESENTATIONS OR WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY
* PARTICULAR PURPOSE OR THAT THE USE OF THE LICENSED SOFTWARE
* COMPONENTS OR DOCUMENTATION WILL NOT INFRINGE ANY PATENTS,
* COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. The University of Southern
* California shall not be held liable for any liability nor for any
* direct, indirect, or consequential damages with respect to any
* claim by the user or distributor of the Prospero software or any
* third party on account of or arising from this Agreement or the use
* or distribution of the Prospero software.
*
* 3. GRANT OF LICENSE.
*
* a) Permission to use, copy, modify, and distribute this software and
* its documentation in source and binary forms is hereby granted,
* provided that:
*
* i) the use, copying, or distribution is not done for direct
* commercial advantage;
*
* ii) any distribution of the software is on the same terms as in
* this Prospero License Agreement, and each copy contains the
* copyright notices and the license agreement that appear in
* this software and supporting documentation; and
*
* iii) any documentation or other materials related to such
* distribution or use acknowledge that the software was developed
* by the University of Southern California.
*
* b) Permission to copy, modify, and distribute this software and its
* documentation in source and binary forms AS PART OF ANOTHER
* PRODUCT for commercial advantage is hereby granted, provided that:
*
* i) notice is provided to the University of Southern California
* describing the use of Prospero in the product;
*
* ii) any distribution of the software is on the same terms as in
* this Prospero License Agreement, and those terms apply also to
* the distribution and use of that part of the product derived
* from the Prospero distribution (it is acceptable to
* impose additional restrictions on other parts of the product),
* and each copy contains the copyright notices and the license
* agreement that appear in this software and supporting
* documentation;
*
* iii) any documentation or other materials related to such
* distribution or use acknowledge that the software was developed
* by the University of Southern California; and
*
* iv) one of the following three conditions is met:
*
* a. The product so distributed has been developed
* independently and it incorporates only files and related
* functions (e.g. allocators) from the Prospero distribution
* needed to providing compatibility with the Prospero
* distribution; or
*
* b. the product so distributed has been developed independently
* and the parts of the Prospero distribution included
* constitute less than 25% of the product, and the total annual
* sales of products incorporating Prospero does not exceed
* $100,000 (U.S. Dollars); or
*
* c. parties to which the product is sold or distributed are
* allowed to use or distribute the product in source and binary
* forms without fee if the party's use or distribution of the
* product is not for direct commercial advantage.
*
* c) Permission to use this software to provide a service for a fee is
* granted provided that notice is provided to the University of
* Southern California describing the nature of the service and
* provided that the total annual revenues for the service provided
* using Prospero does not exceed $250,000 (U.S. dollars).
*
* d) Any use, copying, modification, or distribution other than as
* provided for above requires an additional license from the
* University of Southern California. The University of Southern
* California is prepared to license this software for such use on
* reasonable terms.
*
* 4. OTHER RESTRICTIONS. Nothing in this Agreement shall be construed
* as conferring rights to use in advertising, publicity, or
* otherwise, the name of the University of Southern California, or
* any trademark thereof.
*
* This agreement shall be construed, interpreted, and applied in
* accordance with the laws of the State of California, United States of
* America. If any part of this Agreement is held illegal or
* unenforceable, the remaining portions shall not be affected.
*
* Any notice required under this agreement shall be sent to the Prospero
* Project; Information Sciences Institute; University of Southern
* California; 4676 Admiralty Way; Marina del Rey, California 90292-6695
* USA. Any questions concerning the Prospero distribution should be
* directed to info-prospero@isi.edu.
*
* Prospero was originally written by Clifford Neuman (bcn@isi.edu) while
* a graduate student at the University of Washington, and subsequently at
* the Information Sciences Institute of the University of Southern
* California. Contributors include Steven Seger Augart (swa@isi.edu),
* Santosh Rao (srao@isi.edu), and other individuals identified in the
* software distribution and accompanying documentation.
*
* Prospero, the Prospero Directory Service, the Prospero File System,
* and the Prospero Resource Manager are trademarks of the
* University of Southern California.
*
*/
extern char *usc_license_string;

View File

@@ -0,0 +1,20 @@
/*
Copyright (c) 1989, 1990, 1991 by the University of Washington
Permission to use, copy, modify, and distribute this software and its
documentation for non-commercial purposes and without fee is hereby
granted, provided that the above copyright notice appear in all copies
and that both the copyright notice and this permission notice appear in
supporting documentation, and that the name of the University of
Washington not be used in advertising or publicity pertaining to
distribution of the software without specific, written prior
permission. The University of Washington makes no representations
about the suitability of this software for any purpose. It is
provided "as is" without express or implied warranty.
Prospero was written by Clifford Neuman (bcn@isi.edu).
Questions concerning this software should be directed to
info-prospero@isi.edu.
*/

10
prospero/include/vcache.h Normal file
View File

@@ -0,0 +1,10 @@
/* Internal commands used in user/vcache */
void setpeer(char *hostn);
void set_type(char *t);
int recvrequest(char *cmd, char *local, char *remote, char *amode);
int ruserpass(char *host, char **aname, char **apass, char **aacct);
void lostpeer(void);
int login(char *host);
/* Dont define command - it should use vargs, but doesnt */
void pswitch(int flag);

View File

@@ -0,0 +1,2 @@
#include "../lib/psrv/wais_gw/source.h"

7
prospero/lib/FILES Normal file
View File

@@ -0,0 +1,7 @@
FILES
FILES.ftp-only
ardp
filters
pcompat
pfs
psrv

View File

@@ -0,0 +1,4 @@
FILES.ftp-only
ardp
pfs
psrv

1
prospero/lib/ardp/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
Makefile

32
prospero/lib/ardp/FILES Normal file
View File

@@ -0,0 +1,32 @@
FILES
Makefile
ardp.doc
ardp_abort.c
ardp_accept.c
ardp_add2req.c
ardp_breply.c
ardp_error.c
ardp_get_nxt.c
ardp_headers.c
ardp_int_err.c
ardp_mutexes.c
ardp_perrno.c
ardp_pr_actv.c
ardp_ptalloc.c
ardp_reply.c
ardp_respond.c
ardp_retriev.c
ardp_rqalloc.c
ardp_send.c
ardp_showbuf.c
ardp_snd_pkt.c
ardp_srv_ini.c
ardp_xmit.c
dnscache_alloc.c
dnscache_alloc.h
flocks.c
flocks.h
hostname2adr.c
p__th_self_num.c
unixerrstr.c
usc_lic_str.c

Some files were not shown because too many files have changed in this diff Show More