home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-01-17 | 88.8 KB | 2,976 lines |
- Newsgroups: comp.sources.misc
- From: youki-k@is.aist-nara.ac.jp (Youki Kadobayashi)
- Subject: v41i103: wwfs - WorldWide File System, Part18/22
- Message-ID: <1994Jan17.202522.20511@sparky.sterling.com>
- X-Md4-Signature: 6db4256a3643bc73b76da3896a133086
- Sender: kent@sparky.sterling.com (Kent Landfield)
- Organization: Nara Institute of Science and Technology, Japan
- Date: Mon, 17 Jan 1994 20:25:22 GMT
- Approved: kent@sparky.sterling.com
-
- Submitted-by: youki-k@is.aist-nara.ac.jp (Youki Kadobayashi)
- Posting-number: Volume 41, Issue 103
- Archive-name: wwfs/part18
- Environment: UNIX, inet
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then feed it
- # into a shell via "sh file" or similar. To overwrite existing files,
- # type "sh file -c".
- # Contents: Makefile.com Makefile.top config/misc-hpux.h
- # config/mtab_aix.c config/mtab_bsd.c config/mtab_ultrix.c
- # config/os-aux.h config/os-dgux.h config/os-irix3.h
- # config/os-newsos4.h config/os-osf1.h config/os-riscos4.h
- # config/os-sos4.h config/os-xinu43.h csd/pol.c csd/thrd.c
- # csd/trace.c gtr/dig.pl gtr/gtr.txt libww/libww.h
- # mosaic/urlrename.pl rpc/nfs_prot_svc.c
- # Wrapped by kent@sparky on Sun Jan 16 17:48:39 1994
- PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
- echo If this archive is complete, you will see the following message:
- echo ' "shar: End of archive 18 (of 22)."'
- if test -f 'Makefile.com' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'Makefile.com'\"
- else
- echo shar: Extracting \"'Makefile.com'\" \(3634 characters\)
- sed "s/^X//" >'Makefile.com' <<'END_OF_FILE'
- X#
- X# Makefile.com for Worldwide File System.
- X#
- X# Author: Youki Kadobayashi, Osaka University, Japan
- X# E-mail: <youki@wide.ad.jp>
- X#
- X#
- X# WorldWide File System
- X# Copyright (c) 1992,1993 Youki Kadobayashi
- X# Copyright (c) 1992,1993 Osaka University
- X# All rights reserved.
- X#
- X# Permission to use, copy, modify and distribute this software and its
- X# documentation is hereby granted, provided that the following conditions
- X# are met:
- X# 1. Both the copyright notice and this permission notice appear in
- X# all copies of the software, derivative works or modified versions,
- X# and any portions thereof, and that both notices appear in
- X# supporting documentation.
- X# 2. All advertising materials mentioning features or use of this software
- X# must display the following acknowledgement:
- X# This product includes software developed by the Osaka University
- X# and its contributors.
- X# 3. Neither the name of the University nor the names of its contributors
- X# may be used to endorse or promote products derived from this software
- X# without specific prior written permission.
- X#
- X# THIS SOFTWARE IS PROVIDED BY THE DEVELOPER ``AS IS'' AND OSAKA
- X# UNIVERSITY DISCLAIMS ANY LIABILITY OF ANY KIND FOR ANY DAMAGES
- X# WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- X#
- X# Osaka University requests users of this software to return to
- X#
- X# Youki Kadobayashi
- X# Department of Information and Computer Sciences
- X# Osaka University, Toyonaka 560, Osaka, Japan
- X#
- X# any improvements or extensions that they make and grant Osaka
- X# University the rights to redistribute these changes.
- X
- X# $Header: Makefile.com[109.2] Thu Dec 16 20:38:07 1993 youki-k@is.aist-nara.ac.jp saved $
- X#
- X
- X#
- X# -------- Users may care to override these values --------
- X#
- X# Any of these values can be overridden by redefining them
- X# in a file called config/Makefile.local or config/Makefile.local.foo
- X# (where "foo" is the OS name)
- X#
- X
- X# Full pathname of where to install wwmount, wwumount
- XETCDIR = /usr/local/etc
- X
- X# Full pathname of where to install libraries (e.g., libww.a)
- XLIBDIR= /usr/local/lib
- X
- X# Full pathname of where to install header files (e.g., libww.h)
- XINCDIR= /usr/local/include
- X
- X# Installed files are owned by this group.
- XGROUP = daemon
- X
- X# How to install binaries
- XINSTBIN = install -o wwfs -g $(GROUP) -c -m 755
- X# How to install header files, documents, libraries etc.
- XINSTALL = install -o wwfs -g $(GROUP) -c -m 644
- X
- X# Your favorite C compiler
- XCC = cc
- X
- X# Use -O for production use; use -g otherwise.
- XCCOPTS = -O
- X
- X# This space for rent :-)
- XDEBUG =
- X
- X# Define RPCINC if you have RPC header files in non-standard places
- XRPCINC =
- X
- X# Define RPCGEN as the name of your "rpcgen" program
- XRPCGEN = rpcgen
- X
- X# Your friendly printer
- XPRINTER=ls4pa
- X
- X# For old makes
- XSHELL = /bin/sh
- X
- X# -------- YOU SHOULD NOT NEED TO CHANGE ANYTHING BELOW THIS LINE --------
- X
- XOS_HDR = os-$(OS).h
- XOSDEF = -DOS_HDR=\"$(OS_HDR)\"
- XCFLAGS = $(CCOPTS) $(DEBUG) $(OSDEF) $(RPCINC) -I../rpc -I../config -I../include -I.
- X
- XSTAGE= beta
- XGEN= 109
- XREV= 4
- XVERSION= $(STAGE)-$(GEN).$(REV)
- X
- Xbaseline::
- X -save -f -lock -q -m "$(STAGE)$(GEN) baseline" \
- X -setvnum $(GEN).$(REV) `/bin/csh -c "echo *.[chlyx] *.{sh,pl,el,tcl,conf,vol,txt,tex,ps,eps} Makefile* README*; cat AtFS-files"`
- X
- Xcopyright::
- X -vattr copyright="^$(TOP)/$(STAGE)/Copyright" `vl -lastsaved`
- X -vattr copyright_el="^$(TOP)/$(STAGE)/Copyright.el" `vl -lastsaved`
- X -vattr copyright_mk="^$(TOP)/$(STAGE)/Copyright.mk" `vl -lastsaved`
- X
- Xversion::
- X -save -lock -q `/bin/csh -c "echo *.[chlyx] *.{sh,pl,el,tcl,conf,vol,txt,tex,ps,eps} Makefile* README*; cat AtFS-files"`
- X
- Xprint::
- X vgrind -t $(FILE) | lpr -P$(PRINTER)
- X
- Xclean::
- X -rm -f *~ *.o
- X
- END_OF_FILE
- if test 3634 -ne `wc -c <'Makefile.com'`; then
- echo shar: \"'Makefile.com'\" unpacked with wrong size!
- fi
- # end of 'Makefile.com'
- fi
- if test -f 'Makefile.top' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'Makefile.top'\"
- else
- echo shar: Extracting \"'Makefile.top'\" \(3511 characters\)
- sed "s/^X//" >'Makefile.top' <<'END_OF_FILE'
- X#
- X# Makefile.top for Worldwide File System.
- X#
- X# Author: Youki Kadobayashi, Osaka University, Japan
- X# E-mail: <youki@wide.ad.jp>
- X#
- X#
- X# WorldWide File System
- X# Copyright (c) 1992,1993 Youki Kadobayashi
- X# Copyright (c) 1992,1993 Osaka University
- X# All rights reserved.
- X#
- X# Permission to use, copy, modify and distribute this software and its
- X# documentation is hereby granted, provided that the following conditions
- X# are met:
- X# 1. Both the copyright notice and this permission notice appear in
- X# all copies of the software, derivative works or modified versions,
- X# and any portions thereof, and that both notices appear in
- X# supporting documentation.
- X# 2. All advertising materials mentioning features or use of this software
- X# must display the following acknowledgement:
- X# This product includes software developed by the Osaka University
- X# and its contributors.
- X# 3. Neither the name of the University nor the names of its contributors
- X# may be used to endorse or promote products derived from this software
- X# without specific prior written permission.
- X#
- X# THIS SOFTWARE IS PROVIDED BY THE DEVELOPER ``AS IS'' AND OSAKA
- X# UNIVERSITY DISCLAIMS ANY LIABILITY OF ANY KIND FOR ANY DAMAGES
- X# WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- X#
- X# Osaka University requests users of this software to return to
- X#
- X# Youki Kadobayashi
- X# Department of Information and Computer Sciences
- X# Osaka University, Toyonaka 560, Osaka, Japan
- X#
- X# any improvements or extensions that they make and grant Osaka
- X# University the rights to redistribute these changes.
- X
- X# $Header: Makefile.top[109.0] Wed Nov 24 03:46:29 1993 youki-k@is.aist-nara.ac.jp saved $
- X#
- X
- X# -------- Users may care to override these values --------
- X
- X# Machine architecture
- XARCH = `PATH=$${PATH}:. /bin/sh $(TOP)/config/arch.sh`
- X
- X# OS Name
- XOS = `PATH=$${PATH}:. /bin/sh $(TOP)/config/os-type.sh`
- X
- X# version of make
- XMake = make
- XMAK = $(Make) Make="$(Make)"
- XMKARGS = -f $(TOP)/Makefile.com
- XSHELL = /bin/sh
- X# for HP-UX with bash
- X# SHELL = /bin/bash
- X
- X# -------- You should leave the rest alone! --------
- X
- XOS_SUPPORTED = \
- X bsd386 bsd44 hpux irix4 newsos4 next riscos4 sos4 u4_2 \
- X uniosb luna2M luna88k osf1
- XCHECK_OS = \
- X case " $(OS_SUPPORTED) " in *" $${OS} "*) ;; \
- X *) case "$${OS}" in unknown);; *) echo "Unknown OS '$${OS}'";; esac; \
- X echo "OS should be one of $(OS_SUPPORTED)"; \
- X exit 1;; \
- X esac
- X
- X# definition of Makefile inheritance mechanism
- X
- Xall clean dist baseline copyright version install install-server install-client alpha beta csd doc libc libww rpc wwget wwmount wwumount index: FRC
- X @CF="$(TOP)/config" OS="$(OS)" ARCH="$(ARCH)" MKARGS="$(MKARGS)"; \
- X $(CHECK_OS); \
- X case "`echo M?kefile.build`" in \
- X Makefile.build) MKARGS="$${MKARGS} -f Makefile.build";; \
- X esac; \
- X case "`echo $${CF}/M?kefile.config`" in \
- X $${CF}/Makefile.config) MKARGS="$${MKARGS} -f $${CF}/Makefile.config";; \
- X esac; \
- X case "`echo $${CF}/M?kefile.$${OS}`" in \
- X $${CF}/Makefile.$${OS}) MKARGS="$${MKARGS} -f $${CF}/Makefile.$${OS}";; \
- X esac; \
- X case "`echo $${CF}/M?kefile.local`" in \
- X $${CF}/Makefile.local) MKARGS="$${MKARGS} -f $${CF}/Makefile.local";; \
- X esac; \
- X case "`echo $${CF}/M?kefile.local.$${OS}`" in \
- X $${CF}/Makefile.local.$${OS}) MKARGS="$${MKARGS} -f $${CF}/Makefile.local.$${OS}";; \
- X esac; \
- X case "`echo $${CF}/c?d.conf`" in \
- X $${CF}/csd.conf) MKARGS="$${MKARGS} -f $${CF}/csd.conf";; \
- X esac; \
- X echo "make $${MKARGS} ARCH=$${ARCH} OS=$${OS} $@"; \
- X $(MAK) $${MKARGS} ARCH=$${ARCH} OS=$${OS} $@
- X
- XFRC:
- END_OF_FILE
- if test 3511 -ne `wc -c <'Makefile.top'`; then
- echo shar: \"'Makefile.top'\" unpacked with wrong size!
- fi
- # end of 'Makefile.top'
- fi
- if test -f 'config/misc-hpux.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'config/misc-hpux.h'\"
- else
- echo shar: Extracting \"'config/misc-hpux.h'\" \(3404 characters\)
- sed "s/^X//" >'config/misc-hpux.h' <<'END_OF_FILE'
- X/*
- X * Copyright (c) 1989 Jan-Simon Pendry
- X * Copyright (c) 1989 Imperial College of Science, Technology & Medicine
- X * Copyright (c) 1989 The Regents of the University of California.
- X * All rights reserved.
- X *
- X * This code is derived from software contributed to Berkeley by
- X * Jan-Simon Pendry at Imperial College, London.
- X *
- X * Redistribution and use in source and binary forms, with or without
- X * modification, are permitted provided that the following conditions
- X * are met:
- X * 1. Redistributions of source code must retain the above copyright
- X * notice, this list of conditions and the following disclaimer.
- X * 2. Redistributions in binary form must reproduce the above copyright
- X * notice, this list of conditions and the following disclaimer in the
- X * documentation and/or other materials provided with the distribution.
- X * 3. All advertising materials mentioning features or use of this software
- X * must display the following acknowledgement:
- X * This product includes software developed by the University of
- X * California, Berkeley and its contributors.
- X * 4. Neither the name of the University nor the names of its contributors
- X * may be used to endorse or promote products derived from this software
- X * without specific prior written permission.
- X *
- X * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- X * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- X * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- X * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- X * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- X * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- X * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- X * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- X * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- X * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- X * SUCH DAMAGE.
- X *
- X * %W% (Berkeley) %G%
- X *
- X * $Id: misc-hpux.h,v 5.2.2.1 1992/02/09 15:10:24 jsp beta $
- X *
- X */
- X
- X/*
- X * These definitions are from <nfs/nfs.h>
- X * Unfortunately, that file cannot be included
- X * because it contains lots of structure definitions
- X * that are not wanted (they produce name clashes).
- X * Isn't HP-UX wonderful!
- X */
- X
- X/*
- X * HP-UX specific definitions
- X */
- Xstruct nfs_args {
- X struct sockaddr_in *addr; /* file server address */
- X fhandle_t *fh; /* File handle to be mounted */
- X int flags; /* flags */
- X int wsize; /* write size in bytes */
- X int rsize; /* read size in bytes */
- X int timeo; /* initial timeout in .1 secs */
- X int retrans; /* times to retry send */
- X char *hostname; /* server's name */
- X#ifdef __hp9000s700 /* XXX for HPUX 8.0 */
- X char *fsname; /* server's filesystem name */
- X#endif
- X};
- X
- X/*
- X * NFS mount option flags
- X */
- X#define NFSMNT_SOFT 0x001 /* soft mount (hard is default) */
- X#define NFSMNT_WSIZE 0x002 /* set write size */
- X#define NFSMNT_RSIZE 0x004 /* set read size */
- X#define NFSMNT_TIMEO 0x008 /* set initial timeout */
- X#define NFSMNT_RETRANS 0x010 /* set number of request retrys */
- X#define NFSMNT_HOSTNAME 0x020 /* set hostname for error printf */
- X#define NFSMNT_INT 0x040 /* set option to have interruptable mounts */
- X#define NFSMNT_NODEVS 0x080 /* turn off device file access (default on) */
- END_OF_FILE
- if test 3404 -ne `wc -c <'config/misc-hpux.h'`; then
- echo shar: \"'config/misc-hpux.h'\" unpacked with wrong size!
- fi
- # end of 'config/misc-hpux.h'
- fi
- if test -f 'config/mtab_aix.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'config/mtab_aix.c'\"
- else
- echo shar: Extracting \"'config/mtab_aix.c'\" \(3882 characters\)
- sed "s/^X//" >'config/mtab_aix.c' <<'END_OF_FILE'
- X/*
- X * Copyright (c) 1990 Jan-Simon Pendry
- X * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
- X * Copyright (c) 1990 The Regents of the University of California.
- X * All rights reserved.
- X *
- X * This code is derived from software contributed to Berkeley by
- X * Jan-Simon Pendry at Imperial College, London.
- X *
- X * Redistribution and use in source and binary forms, with or without
- X * modification, are permitted provided that the following conditions
- X * are met:
- X * 1. Redistributions of source code must retain the above copyright
- X * notice, this list of conditions and the following disclaimer.
- X * 2. Redistributions in binary form must reproduce the above copyright
- X * notice, this list of conditions and the following disclaimer in the
- X * documentation and/or other materials provided with the distribution.
- X * 3. All advertising materials mentioning features or use of this software
- X * must display the following acknowledgement:
- X * This product includes software developed by the University of
- X * California, Berkeley and its contributors.
- X * 4. Neither the name of the University nor the names of its contributors
- X * may be used to endorse or promote products derived from this software
- X * without specific prior written permission.
- X *
- X * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- X * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- X * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- X * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- X * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- X * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- X * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- X * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- X * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- X * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- X * SUCH DAMAGE.
- X *
- X * %W% (Berkeley) %G%
- X *
- X * $Id: mtab_aix.c,v 5.2.2.1 1992/02/09 15:10:07 jsp beta $
- X *
- X */
- X
- X#include "am.h"
- X
- X#ifdef READ_MTAB_AIX3_STYLE
- X
- X#include <sys/mntctl.h>
- X#include <sys/vmount.h>
- X
- Xstatic struct mntent *mnt_dup(mp)
- Xstruct vmount *mp;
- X{
- X struct mntent *new_mp = ALLOC(mntent);
- X
- X char *ty;
- X new_mp->mnt_fsname = strdup(vmt2dataptr(mp, VMT_OBJECT));
- X new_mp->mnt_dir = strdup(vmt2dataptr(mp, VMT_STUB));
- X new_mp->mnt_opts = strdup(vmt2dataptr(mp, VMT_ARGS));
- X switch (mp->vmt_gfstype) {
- X case MNT_JFS: ty = MTAB_TYPE_UFS; break;
- X case MNT_NFS:
- X ty = MTAB_TYPE_NFS;
- X new_mp->mnt_fsname = str3cat(new_mp->mnt_fsname,
- X vmt2dataptr(mp, VMT_HOSTNAME),
- X ":", new_mp->mnt_fsname);
- X break;
- X default: ty = "unknown"; break;
- X }
- X new_mp->mnt_type = strdup(ty);
- X new_mp->mnt_passno = mp->vmt_vfsnumber;
- X new_mp->mnt_freq = 0;
- X
- X return new_mp;
- X}
- X
- X/*
- X * Read a mount table into memory
- X */
- Xmntlist *read_mtab(fs)
- Xchar *fs;
- X{
- X mntlist **mpp, *mhp;
- X
- X int i;
- X char *mntinfo = 0, *cp;
- X struct vmount *vp;
- X int ret;
- X
- X /*
- X * First figure out size of mount table
- X * and allocate space for a copy...
- X * Then get mount table for real.
- X */
- X ret = mntctl(MCTL_QUERY, sizeof(i), &i);
- X if (ret == 0) {
- X mntinfo = xmalloc(i);
- X ret = mntctl(MCTL_QUERY, i, mntinfo);
- X }
- X
- X if (ret <= 0) {
- X plog(XLOG_ERROR, "mntctl: %m");
- X goto out;
- X }
- X#ifdef DEBUG
- X /*dlog("mntctl returns %d structures", ret);*/
- X#endif /* DEBUG */
- X
- X mpp = &mhp;
- X for (i = 0, cp = mntinfo; i < ret; i++, cp += vp->vmt_length) {
- X vp = (struct vmount *) cp;
- X
- X /*
- X * Allocate a new slot
- X */
- X *mpp = ALLOC(mntlist);
- X
- X /*
- X * Copy the data returned by mntctl
- X */
- X (*mpp)->mnt = mnt_dup(vp);
- X
- X /*
- X * Move to next pointer
- X */
- X mpp = &(*mpp)->mnext;
- X }
- X
- X *mpp = 0;
- X
- Xout:
- X if (mntinfo)
- X free(mntinfo);
- X return mhp;
- X}
- X
- X#endif /* READ_MTAB_AIX3_STYLE */
- END_OF_FILE
- if test 3882 -ne `wc -c <'config/mtab_aix.c'`; then
- echo shar: \"'config/mtab_aix.c'\" unpacked with wrong size!
- fi
- # end of 'config/mtab_aix.c'
- fi
- if test -f 'config/mtab_bsd.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'config/mtab_bsd.c'\"
- else
- echo shar: Extracting \"'config/mtab_bsd.c'\" \(3342 characters\)
- sed "s/^X//" >'config/mtab_bsd.c' <<'END_OF_FILE'
- X/*
- X * Copyright (c) 1990 Jan-Simon Pendry
- X * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
- X * Copyright (c) 1990 The Regents of the University of California.
- X * All rights reserved.
- X *
- X * This code is derived from software contributed to Berkeley by
- X * Jan-Simon Pendry at Imperial College, London.
- X *
- X * Redistribution and use in source and binary forms, with or without
- X * modification, are permitted provided that the following conditions
- X * are met:
- X * 1. Redistributions of source code must retain the above copyright
- X * notice, this list of conditions and the following disclaimer.
- X * 2. Redistributions in binary form must reproduce the above copyright
- X * notice, this list of conditions and the following disclaimer in the
- X * documentation and/or other materials provided with the distribution.
- X * 3. All advertising materials mentioning features or use of this software
- X * must display the following acknowledgement:
- X * This product includes software developed by the University of
- X * California, Berkeley and its contributors.
- X * 4. Neither the name of the University nor the names of its contributors
- X * may be used to endorse or promote products derived from this software
- X * without specific prior written permission.
- X *
- X * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- X * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- X * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- X * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- X * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- X * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- X * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- X * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- X * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- X * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- X * SUCH DAMAGE.
- X *
- X * %W% (Berkeley) %G%
- X *
- X * $Id: mtab_bsd.c,v 5.2.2.1 1992/02/09 15:10:13 jsp beta $
- X *
- X */
- X
- X#include "am.h"
- X
- X#ifdef READ_MTAB_BSD_STYLE
- X
- X#include <sys/mount.h>
- X
- Xstatic struct mntent *mnt_dup(mp)
- Xstruct statfs *mp;
- X{
- X struct mntent *new_mp = ALLOC(mntent);
- X char *ty;
- X
- X new_mp->mnt_fsname = strdup(mp->f_mntfromname);
- X new_mp->mnt_dir = strdup(mp->f_mntonname);
- X switch (mp->f_type) {
- X case MOUNT_UFS: ty = MTAB_TYPE_UFS; break;
- X case MOUNT_NFS: ty = MTAB_TYPE_NFS; break;
- X case MOUNT_MFS: ty = MTAB_TYPE_MFS; break;
- X default: ty = "unknown"; break;
- X }
- X new_mp->mnt_type = strdup(ty);
- X new_mp->mnt_opts = strdup("unset");
- X new_mp->mnt_freq = 0;
- X new_mp->mnt_passno = 0;
- X
- X return new_mp;
- X}
- X
- X/*
- X * Read a mount table into memory
- X */
- Xmntlist *read_mtab(fs)
- Xchar *fs;
- X{
- X mntlist **mpp, *mhp;
- X struct statfs *mntbufp, *mntp;
- X
- X int nloc = getmntinfo(&mntbufp, MNT_NOWAIT);
- X
- X if (nloc == 0) {
- X plog(XLOG_ERROR, "Can't read mount table");
- X return 0;
- X }
- X
- X mpp = &mhp;
- X for (mntp = mntbufp; mntp < mntbufp + nloc; mntp++) {
- X /*
- X * Allocate a new slot
- X */
- X *mpp = ALLOC(mntlist);
- X
- X /*
- X * Copy the data returned by getmntent
- X */
- X (*mpp)->mnt = mnt_dup(mntp);
- X
- X /*
- X * Move to next pointer
- X */
- X mpp = &(*mpp)->mnext;
- X }
- X
- X return mhp;
- X}
- X
- X#endif /* READ_MTAB_BSD_STYLE */
- END_OF_FILE
- if test 3342 -ne `wc -c <'config/mtab_bsd.c'`; then
- echo shar: \"'config/mtab_bsd.c'\" unpacked with wrong size!
- fi
- # end of 'config/mtab_bsd.c'
- fi
- if test -f 'config/mtab_ultrix.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'config/mtab_ultrix.c'\"
- else
- echo shar: Extracting \"'config/mtab_ultrix.c'\" \(3549 characters\)
- sed "s/^X//" >'config/mtab_ultrix.c' <<'END_OF_FILE'
- X/*
- X * Copyright (c) 1990 Jan-Simon Pendry
- X * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
- X * Copyright (c) 1990 The Regents of the University of California.
- X * All rights reserved.
- X *
- X * This code is derived from software contributed to Berkeley by
- X * Jan-Simon Pendry at Imperial College, London.
- X *
- X * Redistribution and use in source and binary forms, with or without
- X * modification, are permitted provided that the following conditions
- X * are met:
- X * 1. Redistributions of source code must retain the above copyright
- X * notice, this list of conditions and the following disclaimer.
- X * 2. Redistributions in binary form must reproduce the above copyright
- X * notice, this list of conditions and the following disclaimer in the
- X * documentation and/or other materials provided with the distribution.
- X * 3. All advertising materials mentioning features or use of this software
- X * must display the following acknowledgement:
- X * This product includes software developed by the University of
- X * California, Berkeley and its contributors.
- X * 4. Neither the name of the University nor the names of its contributors
- X * may be used to endorse or promote products derived from this software
- X * without specific prior written permission.
- X *
- X * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- X * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- X * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- X * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- X * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- X * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- X * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- X * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- X * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- X * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- X * SUCH DAMAGE.
- X *
- X * %W% (Berkeley) %G%
- X *
- X * $Id: mtab_ultrix.c,v 5.2.2.1 1992/02/09 15:10:50 jsp beta $
- X *
- X */
- X
- X#include "am.h"
- X
- X#ifdef READ_MTAB_ULTRIX_STYLE
- X
- X#include <sys/mount.h>
- X#include <sys/fs_types.h>
- X
- Xstatic struct mntent *mnt_dup(mp)
- Xstruct fs_data *mp;
- X{
- X struct mntent *new_mp = ALLOC(mntent);
- X
- X new_mp->mnt_fsname = strdup(mp->fd_devname);
- X new_mp->mnt_dir = strdup(mp->fd_path);
- X if (mp->fd_fstype >= GT_NUMTYPES)
- X mp->fd_fstype = GT_UNKWN;
- X else if (gt_names[mp->fd_fstype] == 0)
- X mp->fd_fstype = GT_UNKWN;
- X new_mp->mnt_type = strdup(gt_names[mp->fd_fstype]);
- X new_mp->mnt_opts = strdup("unset");
- X
- X new_mp->mnt_freq = 0;
- X new_mp->mnt_passno = mp->fd_dev;
- X
- X return new_mp;
- X}
- X
- X/*
- X * Read a mount table into memory
- X */
- Xmntlist *read_mtab(fs)
- Xchar *fs;
- X{
- X mntlist **mpp, *mhp;
- X
- X/* From: Piete Brooks <pb@cl.cam.ac.uk> */
- X
- X int loc=0;
- X#undef NMOUNT
- X#define NMOUNT 20
- X struct fs_data mountbuffer[NMOUNT], *fs_data;
- X int ret;
- X
- X mpp = &mhp;
- X while ((ret = getmountent(&loc, mountbuffer, NMOUNT)) > 0) {
- X for (fs_data = mountbuffer; fs_data < &mountbuffer[ret]; fs_data++) {
- X /*
- X * Allocate a new slot
- X */
- X *mpp = ALLOC(mntlist);
- X
- X /*
- X * Copy the data returned by getmntent
- X */
- X (*mpp)->mnt = mnt_dup(fs_data);
- X
- X /*
- X * Move to next pointer
- X */
- X mpp = &(*mpp)->mnext;
- X }
- X }
- X if (ret < 0) {
- X plog(XLOG_ERROR, "getmountent: %m");
- X return 0;
- X }
- X *mpp = 0;
- X
- X return mhp;
- X}
- X
- X#endif /* READ_MTAB_ULTRIX_STYLE */
- END_OF_FILE
- if test 3549 -ne `wc -c <'config/mtab_ultrix.c'`; then
- echo shar: \"'config/mtab_ultrix.c'\" unpacked with wrong size!
- fi
- # end of 'config/mtab_ultrix.c'
- fi
- if test -f 'config/os-aux.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'config/os-aux.h'\"
- else
- echo shar: Extracting \"'config/os-aux.h'\" \(3620 characters\)
- sed "s/^X//" >'config/os-aux.h' <<'END_OF_FILE'
- X/*
- X * Copyright (c) 1989 Jan-Simon Pendry
- X * Copyright (c) 1989 Imperial College of Science, Technology & Medicine
- X * Copyright (c) 1989 The Regents of the University of California.
- X * All rights reserved.
- X *
- X * This code is derived from software contributed to Berkeley by
- X * Jan-Simon Pendry at Imperial College, London.
- X *
- X * Redistribution and use in source and binary forms, with or without
- X * modification, are permitted provided that the following conditions
- X * are met:
- X * 1. Redistributions of source code must retain the above copyright
- X * notice, this list of conditions and the following disclaimer.
- X * 2. Redistributions in binary form must reproduce the above copyright
- X * notice, this list of conditions and the following disclaimer in the
- X * documentation and/or other materials provided with the distribution.
- X * 3. All advertising materials mentioning features or use of this software
- X * must display the following acknowledgement:
- X * This product includes software developed by the University of
- X * California, Berkeley and its contributors.
- X * 4. Neither the name of the University nor the names of its contributors
- X * may be used to endorse or promote products derived from this software
- X * without specific prior written permission.
- X *
- X * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- X * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- X * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- X * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- X * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- X * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- X * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- X * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- X * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- X * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- X * SUCH DAMAGE.
- X *
- X * %W% (Berkeley) %G%
- X *
- X * $Id: os-aux.h,v 5.2.2.1 1992/02/09 15:10:10 jsp beta $
- X *
- X * A/UX macII definitions for Amd (automounter)
- X * Contributed by Julian Onions <jpo@cs.nott.ac.uk>
- X */
- X
- X/*
- X * Does the compiler grok void *
- X */
- X#define VOIDP
- X
- X/*
- X * Which version of the Sun RPC library we are using
- X * This is the implementation release number, not
- X * the protocol revision number.
- X */
- X#define RPC_3
- X
- X/*
- X * Which version of the NFS interface are we using.
- X * This is the implementation release number, not
- X * the protocol revision number.
- X */
- X#define NFS_3
- X
- X/*
- X * Byte ordering
- X */
- X#undef ARCH_ENDIAN
- X#define ARCH_ENDIAN "big"
- X
- X/*
- X * No support for ndbm
- X */
- X#undef OS_HAS_NDBM
- X
- X/*
- X * Name of filesystem types
- X */
- X#define MOUNT_TYPE_UFS MOUNT_UFS
- X#define MOUNT_TYPE_NFS MOUNT_NFS
- X
- X#undef MTAB_TYPE_UFS
- X#define MTAB_TYPE_UFS "5.2"
- X
- X#define SIGCHLD SIGCLD
- X#define SYS5_SIGNALS
- X
- X/*
- X * Use <fcntl.h> rather than <sys/file.h>
- X */
- X#define USE_FCNTL
- X
- X/*
- X * Use fcntl() rather than flock()
- X */
- X#define LOCK_FCNTL
- X
- X#ifdef __GNUC__
- X#define alloca(sz) __builtin_alloca(sz)
- X#endif
- X
- X#define bzero(ptr, len) memset(ptr, 0, len)
- X#define bcopy(from, to, len) memcpy(to, from, len)
- X#define getpagesize() (2048)
- X#undef MOUNT_TRAP
- X#define MOUNT_TRAP(type, mnt, flags, mnt_data) \
- X fsmount(type, mnt->mnt_dir, flags, mnt_data)
- X#undef UNMOUNT_TRAP
- X#define UNMOUNT_TRAP(mnt) unmount(mnt->mnt_dir)
- X#define NFDS 30 /* conservative */
- X
- X/* not included in sys/param.h */
- X#include <sys/types.h>
- X/* not part of sys/time.h */
- X#include <time.h>
- X/* for NMOUNT */
- X#include <sys/config.h>
- END_OF_FILE
- if test 3620 -ne `wc -c <'config/os-aux.h'`; then
- echo shar: \"'config/os-aux.h'\" unpacked with wrong size!
- fi
- # end of 'config/os-aux.h'
- fi
- if test -f 'config/os-dgux.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'config/os-dgux.h'\"
- else
- echo shar: Extracting \"'config/os-dgux.h'\" \(3663 characters\)
- sed "s/^X//" >'config/os-dgux.h' <<'END_OF_FILE'
- X/*
- X * Copyright (c) 1990 Jan-Simon Pendry
- X * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
- X * Copyright (c) 1990 The Regents of the University of California.
- X * All rights reserved.
- X *
- X * This code is derived from software contributed to Berkeley by
- X * Jan-Simon Pendry at Imperial College, London.
- X *
- X * Redistribution and use in source and binary forms, with or without
- X * modification, are permitted provided that the following conditions
- X * are met:
- X * 1. Redistributions of source code must retain the above copyright
- X * notice, this list of conditions and the following disclaimer.
- X * 2. Redistributions in binary form must reproduce the above copyright
- X * notice, this list of conditions and the following disclaimer in the
- X * documentation and/or other materials provided with the distribution.
- X * 3. All advertising materials mentioning features or use of this software
- X * must display the following acknowledgement:
- X * This product includes software developed by the University of
- X * California, Berkeley and its contributors.
- X * 4. Neither the name of the University nor the names of its contributors
- X * may be used to endorse or promote products derived from this software
- X * without specific prior written permission.
- X *
- X * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- X * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- X * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- X * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- X * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- X * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- X * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- X * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- X * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- X * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- X * SUCH DAMAGE.
- X *
- X * %W% (Berkeley) %G%
- X *
- X * $Id: os-dgux.h,v 5.2.2.1 1992/02/09 15:10:18 jsp beta $
- X *
- X * dg/ux definitions for Amd (automounter)
- X */
- X
- X/*
- X * Does the compiler grok void *
- X */
- X#define VOIDP
- X
- X/*
- X * Which version of the Sun RPC library we are using
- X * This is the implementation release number, not
- X * the protocol revision number.
- X */
- X#define RPC_4
- X
- X/*
- X * Which version of the NFS interface are we using.
- X * This is the implementation release number, not
- X * the protocol revision number.
- X */
- X#define NFS_4
- X
- X/*
- X * Name of filesystem types
- X */
- X#define MOUNT_TYPE_NFS "nfs"
- X#define MOUNT_TYPE_UFS "dg/ux"
- X#undef MTAB_TYPE_UFS
- X#define MTAB_TYPE_UFS "dg/ux"
- X
- X/*
- X * Need the following in more places than just NFS_HDR
- X */
- X#include <sys/dg_mount.h>
- X/*
- X * This is braindead
- X * dg/ux has nfs 4.0 but doesn't have the following options
- X */
- X#define NFSMNT_HOSTNAME 0x0
- X#define NFSMNT_INT 0x0
- X#define M_NEWTYPE 0
- X
- X/*
- X * DG have their own filesystem.
- X */
- X#define ufs_args dgux_args
- X
- X/*
- X * Byte ordering
- X */
- X
- X#undef ARCH_ENDIAN
- X#define ARCH_ENDIAN "big"
- X
- X#define _BSD_WAIT_FLAVOR
- X#define _BSD_TTY_FLAVOR
- X#define _BSD_SIGNAL_FLAVOR
- X#define _DGUX_SOURCE
- X
- X/*
- X * Use fcntl() rather than flock()
- X */
- X#define LOCK_FCNTL
- X
- X#define bzero(ptr, len) memset(ptr, 0, len)
- X#define bcopy(from, to, len) memcpy(to, from, len)
- X#undef MOUNT_TRAP
- X#define MOUNT_TRAP(type, mnt, flags, mnt_data) \
- X ((struct nfs_args *)mnt_data)->version = !strcmp(type, MOUNT_TYPE_UFS)?\
- X DG_MOUNT_DGUX_VERSION:DG_MOUNT_NFS_VERSION, \
- X dg_mount(type, mnt->mnt_dir, flags, mnt_data)
- X#undef UNMOUNT_TRAP
- X#define UNMOUNT_TRAP(mnt) umount(mnt->mnt_dir)
- END_OF_FILE
- if test 3663 -ne `wc -c <'config/os-dgux.h'`; then
- echo shar: \"'config/os-dgux.h'\" unpacked with wrong size!
- fi
- # end of 'config/os-dgux.h'
- fi
- if test -f 'config/os-irix3.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'config/os-irix3.h'\"
- else
- echo shar: Extracting \"'config/os-irix3.h'\" \(3915 characters\)
- sed "s/^X//" >'config/os-irix3.h' <<'END_OF_FILE'
- X/*
- X * Copyright (c) 1990 Jan-Simon Pendry
- X * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
- X * Copyright (c) 1990 The Regents of the University of California.
- X * All rights reserved.
- X *
- X * This code is derived from software contributed to Berkeley by
- X * Jan-Simon Pendry at Imperial College, London.
- X *
- X * Redistribution and use in source and binary forms, with or without
- X * modification, are permitted provided that the following conditions
- X * are met:
- X * 1. Redistributions of source code must retain the above copyright
- X * notice, this list of conditions and the following disclaimer.
- X * 2. Redistributions in binary form must reproduce the above copyright
- X * notice, this list of conditions and the following disclaimer in the
- X * documentation and/or other materials provided with the distribution.
- X * 3. All advertising materials mentioning features or use of this software
- X * must display the following acknowledgement:
- X * This product includes software developed by the University of
- X * California, Berkeley and its contributors.
- X * 4. Neither the name of the University nor the names of its contributors
- X * may be used to endorse or promote products derived from this software
- X * without specific prior written permission.
- X *
- X * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- X * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- X * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- X * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- X * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- X * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- X * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- X * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- X * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- X * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- X * SUCH DAMAGE.
- X *
- X * %W% (Berkeley) %G%
- X *
- X * $Id: os-irix3.h,v 5.2 1992/05/31 16:40:22 jsp Exp $
- X *
- X * IRIX 3.3 definitions for Amd (automounter)
- X * Contributed by Scott R. Presnell <srp@cgl.ucsf.edu>
- X */
- X
- X/*
- X * Does the compiler grok void *
- X */
- X#define VOIDP
- X
- X/*
- X * Which version of the Sun RPC library we are using
- X * This is the implementation release number, not
- X * the protocol revision number.
- X */
- X#define RPC_3
- X
- X/*
- X * Which version of the NFS interface are we using.
- X * This is the implementation release number, not
- X * the protocol revision number.
- X */
- X#define NFS_3
- X
- X/*
- X * Byte ordering
- X */
- X#undef ARCH_ENDIAN
- X#define ARCH_ENDIAN "big"
- X
- X/*
- X * Has support for syslog()
- X */
- X#define HAS_SYSLOG
- X
- X#define M_GRPID MS_GRPID
- X#define M_RDONLY MS_RDONLY
- X/*
- X * Support for ndbm
- X */
- X#define OS_HAS_NDBM
- X
- X#define UPDATE_MTAB
- X
- X#undef MTAB_TYPE_NFS
- X#define MTAB_TYPE_NFS "nfs"
- X
- X#undef MTAB_TYPE_UFS
- X#define MTAB_TYPE_UFS "efs"
- X
- X#define NMOUNT 40 /* The std sun value */
- X/*
- X * Name of filesystem types
- X */
- X#define MOUNT_TYPE_UFS sysfs(GETFSIND, FSID_EFS)
- X#define MOUNT_TYPE_NFS sysfs(GETFSIND, FSID_NFS)
- X
- X#define SYS5_SIGNALS
- X
- X/*
- X * Use <fcntl.h> rather than <sys/file.h>
- X */
- X/*#define USE_FCNTL*/
- X
- X/*
- X * Use fcntl() rather than flock()
- X */
- X/*#define LOCK_FCNTL*/
- X
- X#ifdef __GNUC__
- X#define alloca(sz) __builtin_alloca(sz)
- X#endif
- X
- X#define bzero(ptr, len) memset(ptr, 0, len)
- X#define bcopy(from, to, len) memcpy(to, from, len)
- X
- X#undef MOUNT_TRAP
- X#define MOUNT_TRAP(type, mnt, flags, mnt_data) \
- X irix_mount(mnt->mnt_fsname, mnt->mnt_dir,flags, type, mnt_data)
- X#undef UNMOUNT_TRAP
- X#define UNMOUNT_TRAP(mnt) umount(mnt->mnt_dir)
- X#define NFDS 30 /* conservative */
- X
- X#define NFS_HDR "misc-irix.h"
- X#define UFS_HDR "misc-irix.h"
- X
- X/* not included in sys/param.h */
- X#include <sys/types.h>
- X
- X#define MOUNT_HELPER_SOURCE "mount_irix.c"
- X
- X#define MNTINFO_DEV "fsid"
- X#define MNTINFO_PREF "0x"
- END_OF_FILE
- if test 3915 -ne `wc -c <'config/os-irix3.h'`; then
- echo shar: \"'config/os-irix3.h'\" unpacked with wrong size!
- fi
- # end of 'config/os-irix3.h'
- fi
- if test -f 'config/os-newsos4.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'config/os-newsos4.h'\"
- else
- echo shar: Extracting \"'config/os-newsos4.h'\" \(3531 characters\)
- sed "s/^X//" >'config/os-newsos4.h' <<'END_OF_FILE'
- X/*
- X * Copyright (c) 1989 Jan-Simon Pendry
- X * Copyright (c) 1989 Imperial College of Science, Technology & Medicine
- X * Copyright (c) 1989 The Regents of the University of California.
- X * All rights reserved.
- X *
- X * This code is derived from software contributed to Berkeley by
- X * Jan-Simon Pendry at Imperial College, London.
- X *
- X * Redistribution and use in source and binary forms, with or without
- X * modification, are permitted provided that the following conditions
- X * are met:
- X * 1. Redistributions of source code must retain the above copyright
- X * notice, this list of conditions and the following disclaimer.
- X * 2. Redistributions in binary form must reproduce the above copyright
- X * notice, this list of conditions and the following disclaimer in the
- X * documentation and/or other materials provided with the distribution.
- X * 3. All advertising materials mentioning features or use of this software
- X * must display the following acknowledgement:
- X * This product includes software developed by the University of
- X * California, Berkeley and its contributors.
- X * 4. Neither the name of the University nor the names of its contributors
- X * may be used to endorse or promote products derived from this software
- X * without specific prior written permission.
- X *
- X * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- X * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- X * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- X * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- X * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- X * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- X * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- X * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- X * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- X * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- X * SUCH DAMAGE.
- X *
- X * %W% (Berkeley) %G%
- X *
- X * $Id$
- X *
- X * Sony NEWS-OS 4.[12] definitions for Amd (automounter)
- X */
- X
- X/*
- X * Does the compiler grok void *
- X */
- X#define VOIDP
- X
- X/*
- X * What type is free(void*) returning?
- X */
- X#undef FREE_RETURN_TYPE
- X#define FREE_RETURN_TYPE void
- X
- X/*
- X * Which version of the Sun RPC library we are using
- X * This is the implementation release number, not
- X * the protocol revision number.
- X */
- X#define RPC_4
- X
- X/*
- X * Which version of the NFS interface are we using.
- X * This is the implementation release number, not
- X * the protocol revision number.
- X */
- X#define NFS_4
- X
- X/*
- X * Does this OS have NDBM support?
- X */
- X#define OS_HAS_NDBM
- X
- X/*
- X * Byte ordering
- X */
- X#ifndef BYTE_ORDER
- X#include <machine/endian.h>
- X#endif /* BYTE_ORDER */
- X
- X#undef ARCH_ENDIAN
- X#if BYTE_ORDER == LITTLE_ENDIAN
- X#define ARCH_ENDIAN "little"
- X#else
- X#if BYTE_ORDER == BIG_ENDIAN
- X#define ARCH_ENDIAN "big"
- X#else
- XXXX - Probably no hope of running Amd on this machine!
- X#endif /* BIG */
- X#endif /* LITTLE */
- X
- X/*
- X * Name of filesystem types
- X */
- X#define MOUNT_TYPE_NFS "nfs"
- X#define MOUNT_TYPE_UFS "4.2"
- X
- X/*
- X * Type of a file handle
- X */
- X#undef NFS_FH_TYPE
- X#define NFS_FH_TYPE caddr_t
- X
- X/*
- X * Type of filesystem type
- X */
- X#undef MTYPE_TYPE
- X#define MTYPE_TYPE char *
- X
- X/*
- X * System Vr4 / SunOS 4.1 compatibility
- X * - put dev= in the options list
- X *
- X * From: Brent Callaghan <brent@eng.sun.com>
- X */
- X#define MNTINFO_DEV "dev"
- X#define MNTINFO_PREF ""
- X
- X/*
- X * prototype for index(), strdup() etc.
- X */
- X#include <strings.h>
- END_OF_FILE
- if test 3531 -ne `wc -c <'config/os-newsos4.h'`; then
- echo shar: \"'config/os-newsos4.h'\" unpacked with wrong size!
- fi
- # end of 'config/os-newsos4.h'
- fi
- if test -f 'config/os-osf1.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'config/os-osf1.h'\"
- else
- echo shar: Extracting \"'config/os-osf1.h'\" \(3977 characters\)
- sed "s/^X//" >'config/os-osf1.h' <<'END_OF_FILE'
- X/*
- X * OSF/1 definitions for Amd (automounter)
- X *
- X * Copyright (c) 1990 Jan-Simon Pendry
- X * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
- X * Copyright (c) 1990 The Regents of the University of California.
- X * (c) Copyright 1990, OPEN SOFTWARE FOUNDATION, INC.
- X * All rights reserved.
- X *
- X * This code is derived from software contributed to Berkeley by
- X * Jan-Simon Pendry at Imperial College, London.
- X *
- X * Redistribution and use in source and binary forms are permitted provided
- X * that: (1) source distributions retain this entire copyright notice and
- X * comment, and (2) distributions including binaries display the following
- X * acknowledgement: ``This product includes software developed by the
- X * University of California, Berkeley and its contributors'' in the
- X * documentation or other materials provided with the distribution and in
- X * all advertising materials mentioning features or use of this software.
- X * Neither the name of the University nor the names of its contributors may
- X * be used to endorse or promote products derived from this software without
- X * specific prior written permission.
- X * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
- X * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
- X * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- X *
- X * $Id: os-osf1.h,v 5.2.2.1 1992/02/09 15:10:35 jsp beta $
- X *
- X * %W% (Berkeley) %G%
- X */
- X
- X/*
- X * Does the compiler grok void *
- X */
- X#define VOIDP
- X
- X/*
- X * Which version of the Sun RPC library we are using
- X * This is the implementation release number, not
- X * the protocol revision number.
- X */
- X#define RPC_4
- X
- X/*
- X * Which version of the NFS interface are we using.
- X * This is the implementation release number, not
- X * the protocol revision number.
- X */
- X#define NFS_44
- X
- X/*
- X * Support NFS over TCP?
- X */
- X/*#define HAS_TCP_NFS*/
- X
- X/*
- X * Does this OS have NDBM support?
- X */
- X#define OS_HAS_NDBM
- X
- X/*
- X * The mount table is obtained from the kernel
- X */
- X#undef UPDATE_MTAB
- X
- X/*
- X * No mntent info on OSF/1
- X */
- X#undef MNTENT_HDR
- X
- X/*
- X * Name of filesystem types
- X */
- X#define MOUNT_TYPE_NFS MOUNT_NFS
- X#define MOUNT_TYPE_UFS MOUNT_UFS
- X#undef MTAB_TYPE_UFS
- X#define MTAB_TYPE_UFS "ufs"
- X#define MTAB_TYPE_MFS "mfs"
- X
- X/*
- X * How to unmount filesystems
- X */
- X#undef UNMOUNT_TRAP
- X#undef NEED_UMOUNT_FS
- X#define NEED_UMOUNT_OSF
- X#undef UMOUNT_FS
- X#define UMOUNT_FS(dir) umount_fs(dir)
- X
- X/*
- X * Byte ordering
- X */
- X#ifndef BYTE_ORDER
- X#include <machine/endian.h>
- X#endif /* BYTE_ORDER */
- X
- X#undef ARCH_ENDIAN
- X#if BYTE_ORDER == LITTLE_ENDIAN
- X#define ARCH_ENDIAN "little"
- X#else
- X#if BYTE_ORDER == BIG_ENDIAN
- X#define ARCH_ENDIAN "big"
- X#else
- XXXX - Probably no hope of running Amd on this machine!
- X#endif /* BIG */
- X#endif /* LITTLE */
- X
- X/*
- X * Miscellaneous OSF/1 bits
- X */
- X/*#define MISC_RPC*/
- X#define NEED_MNTOPT_PARSER
- X#define SHORT_MOUNT_NAME
- X
- X#define MNTMAXSTR 128
- X
- X#define MNTTYPE_UFS "ufs" /* Un*x file system */
- X#define MNTTYPE_NFS "nfs" /* network file system */
- X#define MNTTYPE_MFS "mfs" /* memory file system */
- X#define MNTTYPE_IGNORE "ignore" /* No type specified, ignore this entry */
- X
- X#define MNTOPT_SOFT "soft" /* soft mount */
- X#define MNTOPT_INTR "intr" /* interrupts allowed */
- X#define MNTOPT_NOCONN "noconn" /* accept any responder */
- X
- Xstruct mntent {
- X char *mnt_fsname; /* name of mounted file system */
- X char *mnt_dir; /* file system path prefix */
- X char *mnt_type; /* MNTTYPE_* */
- X char *mnt_opts; /* MNTOPT* */
- X int mnt_freq; /* dump frequency, in days */
- X int mnt_passno; /* pass number on parallel fsck */
- X};
- X
- X/*
- X * Type of a file handle
- X */
- X#undef NFS_FH_TYPE
- X#define NFS_FH_TYPE nfsv2fh_t *
- X
- X/*
- X * How to get a mount list
- X */
- X#undef READ_MTAB_FROM_FILE
- X#define READ_MTAB_BSD_STYLE
- X
- X/*
- X * The data for the mount syscall needs the path in addition to the
- X * host name since that is the only source of information about the
- X * mounted filesystem.
- X */
- X#define NFS_ARGS_NEEDS_PATH
- X
- X/*
- X * 4.4 has RE support built in
- X */
- X#undef RE_HDR
- X#define RE_HDR <regexp.h>
- END_OF_FILE
- if test 3977 -ne `wc -c <'config/os-osf1.h'`; then
- echo shar: \"'config/os-osf1.h'\" unpacked with wrong size!
- fi
- # end of 'config/os-osf1.h'
- fi
- if test -f 'config/os-riscos4.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'config/os-riscos4.h'\"
- else
- echo shar: Extracting \"'config/os-riscos4.h'\" \(3461 characters\)
- sed "s/^X//" >'config/os-riscos4.h' <<'END_OF_FILE'
- X/*
- X * Copyright (c) 1989 Jan-Simon Pendry
- X * Copyright (c) 1989 Imperial College of Science, Technology & Medicine
- X * Copyright (c) 1989 The Regents of the University of California.
- X * All rights reserved.
- X *
- X * This code is derived from software contributed to Berkeley by
- X * Jan-Simon Pendry at Imperial College, London.
- X *
- X * Redistribution and use in source and binary forms, with or without
- X * modification, are permitted provided that the following conditions
- X * are met:
- X * 1. Redistributions of source code must retain the above copyright
- X * notice, this list of conditions and the following disclaimer.
- X * 2. Redistributions in binary form must reproduce the above copyright
- X * notice, this list of conditions and the following disclaimer in the
- X * documentation and/or other materials provided with the distribution.
- X * 3. All advertising materials mentioning features or use of this software
- X * must display the following acknowledgement:
- X * This product includes software developed by the University of
- X * California, Berkeley and its contributors.
- X * 4. Neither the name of the University nor the names of its contributors
- X * may be used to endorse or promote products derived from this software
- X * without specific prior written permission.
- X *
- X * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- X * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- X * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- X * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- X * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- X * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- X * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- X * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- X * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- X * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- X * SUCH DAMAGE.
- X *
- X * %W% (Berkeley) %G%
- X *
- X * $Id: os-sos4.h,v 5.2.2.1 1992/02/09 15:10:41 jsp beta $
- X *
- X * RISC/os 4.x definitions for Amd (automounter)
- X */
- X
- X/*
- X * Does the compiler grok void *
- X */
- X#define VOIDP
- X
- X/*
- X * What type is free(void*) returning?
- X */
- X#undef FREE_RETURN_TYPE
- X#define FREE_RETURN_TYPE void
- X
- X/*
- X * Which version of the Sun RPC library we are using
- X * This is the implementation release number, not
- X * the protocol revision number.
- X */
- X#define RPC_4
- X
- X/*
- X * Which version of the NFS interface are we using.
- X * This is the implementation release number, not
- X * the protocol revision number.
- X */
- X#define NFS_4
- X
- X/*
- X * Does this OS have NDBM support?
- X */
- X#define OS_HAS_NDBM
- X
- X/*
- X * Byte ordering
- X */
- X/* some versions of RISC/os does not have <machine/endian.h>, so.. */
- X#undef ARCH_ENDIAN
- X#if defined(MIPSEB)
- X#define ARCH_ENDIAN "big"
- X#endif
- X#if defined(MIPSEL)
- X#define ARCH_ENDIAN "little"
- X#endif
- X
- X/*
- X * Name of filesystem types
- X */
- X#define MOUNT_TYPE_NFS "nfs"
- X#define MOUNT_TYPE_UFS "4.2"
- X
- X/*
- X * Type of a file handle
- X */
- X#undef NFS_FH_TYPE
- X#define NFS_FH_TYPE caddr_t
- X
- X/*
- X * Type of filesystem type
- X */
- X#undef MTYPE_TYPE
- X#define MTYPE_TYPE char *
- X
- X/*
- X * System Vr4 / SunOS 4.1 compatibility
- X * - put dev= in the options list
- X *
- X * From: Brent Callaghan <brent@eng.sun.com>
- X */
- X#define MNTINFO_DEV "dev"
- X#define MNTINFO_PREF ""
- X
- X/*
- X * prototype for index(), strdup() etc.
- X */
- X#include <strings.h>
- END_OF_FILE
- if test 3461 -ne `wc -c <'config/os-riscos4.h'`; then
- echo shar: \"'config/os-riscos4.h'\" unpacked with wrong size!
- fi
- # end of 'config/os-riscos4.h'
- fi
- if test -f 'config/os-sos4.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'config/os-sos4.h'\"
- else
- echo shar: Extracting \"'config/os-sos4.h'\" \(3431 characters\)
- sed "s/^X//" >'config/os-sos4.h' <<'END_OF_FILE'
- X/*
- X * Copyright (c) 1989 Jan-Simon Pendry
- X * Copyright (c) 1989 Imperial College of Science, Technology & Medicine
- X * Copyright (c) 1989 The Regents of the University of California.
- X * All rights reserved.
- X *
- X * This code is derived from software contributed to Berkeley by
- X * Jan-Simon Pendry at Imperial College, London.
- X *
- X * Redistribution and use in source and binary forms, with or without
- X * modification, are permitted provided that the following conditions
- X * are met:
- X * 1. Redistributions of source code must retain the above copyright
- X * notice, this list of conditions and the following disclaimer.
- X * 2. Redistributions in binary form must reproduce the above copyright
- X * notice, this list of conditions and the following disclaimer in the
- X * documentation and/or other materials provided with the distribution.
- X * 3. All advertising materials mentioning features or use of this software
- X * must display the following acknowledgement:
- X * This product includes software developed by the University of
- X * California, Berkeley and its contributors.
- X * 4. Neither the name of the University nor the names of its contributors
- X * may be used to endorse or promote products derived from this software
- X * without specific prior written permission.
- X *
- X * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- X * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- X * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- X * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- X * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- X * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- X * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- X * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- X * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- X * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- X * SUCH DAMAGE.
- X *
- X * %W% (Berkeley) %G%
- X *
- X * $Id: os-sos4.h,v 5.2.2.1 1992/02/09 15:10:41 jsp beta $
- X *
- X * SunOS 4.0 definitions for Amd (automounter)
- X */
- X
- X/*
- X * Does the compiler grok void *
- X */
- X#define VOIDP
- X
- X/*
- X * What type is free(void*) returning?
- X */
- X#undef FREE_RETURN_TYPE
- X#define FREE_RETURN_TYPE int
- X
- X/*
- X * Which version of the Sun RPC library we are using
- X * This is the implementation release number, not
- X * the protocol revision number.
- X */
- X#define RPC_4
- X
- X/*
- X * Which version of the NFS interface are we using.
- X * This is the implementation release number, not
- X * the protocol revision number.
- X */
- X#define NFS_4
- X
- X/*
- X * Does this OS have NDBM support?
- X */
- X#define OS_HAS_NDBM
- X
- X/*
- X * Byte ordering
- X */
- X#undef ARCH_ENDIAN
- X#if defined(mc68010) || defined(mc68020) || defined(sparc)
- X#define ARCH_ENDIAN "big"
- X#endif
- X#if defined(i386)
- X#define ARCH_ENDIAN "little"
- X#endif
- X
- X/*
- X * Name of filesystem types
- X */
- X#define MOUNT_TYPE_NFS "nfs"
- X#define MOUNT_TYPE_UFS "4.2"
- X
- X/*
- X * Type of a file handle
- X */
- X#undef NFS_FH_TYPE
- X#define NFS_FH_TYPE caddr_t
- X
- X/*
- X * Type of filesystem type
- X */
- X#undef MTYPE_TYPE
- X#define MTYPE_TYPE char *
- X
- X/*
- X * Add support for SunOS 4 automounter files
- X */
- X#define SUNOS4_COMPAT
- X
- X/*
- X * System Vr4 / SunOS 4.1 compatibility
- X * - put dev= in the options list
- X *
- X * From: Brent Callaghan <brent@eng.sun.com>
- X */
- X#define MNTINFO_DEV "dev"
- X#define MNTINFO_PREF ""
- END_OF_FILE
- if test 3431 -ne `wc -c <'config/os-sos4.h'`; then
- echo shar: \"'config/os-sos4.h'\" unpacked with wrong size!
- fi
- # end of 'config/os-sos4.h'
- fi
- if test -f 'config/os-xinu43.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'config/os-xinu43.h'\"
- else
- echo shar: Extracting \"'config/os-xinu43.h'\" \(3544 characters\)
- sed "s/^X//" >'config/os-xinu43.h' <<'END_OF_FILE'
- X/*
- X * Copyright (c) 1989 Jan-Simon Pendry
- X * Copyright (c) 1989 Imperial College of Science, Technology & Medicine
- X * Copyright (c) 1989 The Regents of the University of California.
- X * All rights reserved.
- X *
- X * This code is derived from software contributed to Berkeley by
- X * Jan-Simon Pendry at Imperial College, London.
- X *
- X * Redistribution and use in source and binary forms, with or without
- X * modification, are permitted provided that the following conditions
- X * are met:
- X * 1. Redistributions of source code must retain the above copyright
- X * notice, this list of conditions and the following disclaimer.
- X * 2. Redistributions in binary form must reproduce the above copyright
- X * notice, this list of conditions and the following disclaimer in the
- X * documentation and/or other materials provided with the distribution.
- X * 3. All advertising materials mentioning features or use of this software
- X * must display the following acknowledgement:
- X * This product includes software developed by the University of
- X * California, Berkeley and its contributors.
- X * 4. Neither the name of the University nor the names of its contributors
- X * may be used to endorse or promote products derived from this software
- X * without specific prior written permission.
- X *
- X * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- X * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- X * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- X * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- X * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- X * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- X * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- X * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- X * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- X * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- X * SUCH DAMAGE.
- X *
- X * %W% (Berkeley) %G%
- X *
- X * $Id: os-xinu43.h,v 5.2.2.1 1992/02/09 15:10:58 jsp beta $
- X *
- X * mt Xinu 4.3 (MORE/bsd) definitions for Amd (automounter)
- X * Should work on both Vax and HP ...
- X */
- X
- X/*
- X * Does the compiler grok void *
- X */
- X#ifdef __GNUC__
- X#define VOIDP
- X#endif
- X
- X/*
- X * Which version of the Sun RPC library we are using
- X * This is the implementation release number, not
- X * the protocol revision number.
- X */
- X#define RPC_4
- X
- X/*
- X * mt Xinu have a compatibility problem
- X * with getreq vs. getreqset. On SunOS
- X * getreqset takes a pointer to an fd_set,
- X * whereas on MORE/bsd, getreq takes a
- X * fd_set directly (cf. an integer on SunOS).
- X */
- X#define svc_getreqset(p) svc_getreq(*p)
- X
- X/*
- X * Which version of the NFS interface are we using.
- X * This is the implementation release number, not
- X * the protocol revision number.
- X */
- X#define NFS_4
- X
- X/*
- X * Name of filesystem types
- X */
- X#define MOUNT_TYPE_NFS "nfs"
- X#define MOUNT_TYPE_UFS "ufs"
- X#undef MTAB_TYPE_UFS
- X#define MTAB_TYPE_UFS "ufs"
- X
- X/*
- X * Byte ordering
- X */
- X#ifndef BYTE_ORDER
- X#include <machine/endian.h>
- X#endif /* BYTE_ORDER */
- X
- X#undef ARCH_ENDIAN
- X#if BYTE_ORDER == LITTLE_ENDIAN
- X#define ARCH_ENDIAN "little"
- X#else
- X#if BYTE_ORDER == BIG_ENDIAN
- X#define ARCH_ENDIAN "big"
- X#else
- XXXX - Probably no hope of running Amd on this machine!
- X#endif /* BIG */
- X#endif /* LITTLE */
- X
- X/*
- X * Type of a file handle
- X */
- X#undef NFS_FH_TYPE
- X#define NFS_FH_TYPE caddr_t
- X
- X/*
- X * Type of filesystem type
- X */
- X#undef MTYPE_TYPE
- X#define MTYPE_TYPE char *
- END_OF_FILE
- if test 3544 -ne `wc -c <'config/os-xinu43.h'`; then
- echo shar: \"'config/os-xinu43.h'\" unpacked with wrong size!
- fi
- # end of 'config/os-xinu43.h'
- fi
- if test -f 'csd/pol.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'csd/pol.c'\"
- else
- echo shar: Extracting \"'csd/pol.c'\" \(3700 characters\)
- sed "s/^X//" >'csd/pol.c' <<'END_OF_FILE'
- X/*
- X * WorldWide File System
- X * Copyright (c) 1992,1993 Youki Kadobayashi
- X * Copyright (c) 1992,1993 Osaka University
- X * All rights reserved.
- X *
- X * Permission to use, copy, modify and distribute this software and its
- X * documentation is hereby granted, provided that the following conditions
- X * are met:
- X * 1. Both the copyright notice and this permission notice appear in
- X * all copies of the software, derivative works or modified versions,
- X * and any portions thereof, and that both notices appear in
- X * supporting documentation.
- X * 2. All advertising materials mentioning features or use of this software
- X * must display the following acknowledgement:
- X * This product includes software developed by the Osaka University
- X * and its contributors.
- X * 3. Neither the name of the University nor the names of its contributors
- X * may be used to endorse or promote products derived from this software
- X * without specific prior written permission.
- X *
- X * THIS SOFTWARE IS PROVIDED BY THE DEVELOPER ``AS IS'' AND OSAKA
- X * UNIVERSITY DISCLAIMS ANY LIABILITY OF ANY KIND FOR ANY DAMAGES
- X * WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- X *
- X * Osaka University requests users of this software to return to
- X *
- X * Youki Kadobayashi
- X * Department of Information and Computer Sciences
- X * Osaka University, Toyonaka 560, Osaka, Japan
- X *
- X * any improvements or extensions that they make and grant Osaka
- X * University the rights to redistribute these changes.
- X */
- Xstatic char *AtFSid = "$Header: pol.c[109.0] Wed Nov 24 03:47:15 1993 youki-k@is.aist-nara.ac.jp saved $";
- X
- X#include "wfs.h"
- X#include "util.h"
- X#include "global.h"
- X
- X/*
- X * Policy-based protocol selection. Work in progress.
- X *
- X * Appropriate protocol will be selected from protocol set, based on
- X * the following four constraints:
- X *
- X * - Volume constraints. Protocols may be narrowed due to security concern,
- X * server load, or purpose of the volume.
- X * - Session constraints (or server constraints). Protocol may be narrowed
- X * for better user response. This is effective particularly if there are
- X * existing connection to a server serving the volume.
- X * - Cluster-site constraints. Site manager can specify certain protocol set
- X * to gain better security and/or performance.
- X * - User constraints. User or user agent may prefer particular protcol set
- X * from others for some reason, such as provision of better semantics
- X * for the application in use.
- X *
- X * For more detailed discussion please expect my upcoming paper.
- X * I haven't implemented this model so far because I don't need it right now.
- X * It must be useful however, if you want to implement WAIS-FS or Archie-FS
- X * or NNTP-FS or TCP-NFS...
- X */
- Xwf_proto *
- Xpol_select_proto(volp)
- Xwf_vol *volp;
- X{
- X switch (volp->id) {
- X case WF_ROOT_VOL_ID:
- X return &proto_root;
- X#if 0
- X case WF_HOST_VOL_ID:
- X return &proto_host;
- X case WF_CWD_VOL_ID:
- X return &proto_cwd;
- X#endif
- X case WF_FH_VOL_ID:
- X return &proto_fh;
- X }
- X if (volp->flag & WF_VOL_DIRECTFILE) {
- X return &proto_ufs;
- X } else {
- X return &proto_ftp; /* XXX */
- X }
- X}
- X
- X/*
- X * Policy-based server selection. Work in progress.
- X *
- X * A file server may be selected from given set of file servers, with
- X * the following considerations for each server in choice:
- X *
- X * - Reliability of the candidate.
- X * - Mean RTT between the candidate and the cluster server.
- X * - Average load of the candidate.
- X * - Policy; such as the number of connections the candidate permit.
- X * - Protocol set the candidate can speak.
- X */
- Xwf_srvq *
- Xpol_select_srv(volp)
- Xwf_vol *volp;
- X{
- X wf_srvq *q;
- X ITER(q, wf_srvq, &volp->srvq->q) {
- X if (q->srv->flag == 0)
- X return q;
- X }
- X q = NEXT(wf_srvq, volp->srvq); /* firewall */
- X return q;
- X}
- END_OF_FILE
- if test 3700 -ne `wc -c <'csd/pol.c'`; then
- echo shar: \"'csd/pol.c'\" unpacked with wrong size!
- fi
- # end of 'csd/pol.c'
- fi
- if test -f 'csd/thrd.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'csd/thrd.c'\"
- else
- echo shar: Extracting \"'csd/thrd.c'\" \(3584 characters\)
- sed "s/^X//" >'csd/thrd.c' <<'END_OF_FILE'
- X/*
- X * WorldWide File System
- X * Copyright (c) 1992,1993 Youki Kadobayashi
- X * Copyright (c) 1992,1993 Osaka University
- X * All rights reserved.
- X *
- X * Permission to use, copy, modify and distribute this software and its
- X * documentation is hereby granted, provided that the following conditions
- X * are met:
- X * 1. Both the copyright notice and this permission notice appear in
- X * all copies of the software, derivative works or modified versions,
- X * and any portions thereof, and that both notices appear in
- X * supporting documentation.
- X * 2. All advertising materials mentioning features or use of this software
- X * must display the following acknowledgement:
- X * This product includes software developed by the Osaka University
- X * and its contributors.
- X * 3. Neither the name of the University nor the names of its contributors
- X * may be used to endorse or promote products derived from this software
- X * without specific prior written permission.
- X *
- X * THIS SOFTWARE IS PROVIDED BY THE DEVELOPER ``AS IS'' AND OSAKA
- X * UNIVERSITY DISCLAIMS ANY LIABILITY OF ANY KIND FOR ANY DAMAGES
- X * WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- X *
- X * Osaka University requests users of this software to return to
- X *
- X * Youki Kadobayashi
- X * Department of Information and Computer Sciences
- X * Osaka University, Toyonaka 560, Osaka, Japan
- X *
- X * any improvements or extensions that they make and grant Osaka
- X * University the rights to redistribute these changes.
- X */
- X/* thread status manager */
- Xstatic char *AtFSid = "$Header: thrd.c[109.0] Wed Nov 24 03:47:17 1993 youki-k@is.aist-nara.ac.jp saved $";
- X
- X#include "wfs.h"
- X#include "util.h"
- X#include "global.h"
- X
- Xextern qelem thrd_head;
- Xqelem thrd_head = { &thrd_head, &thrd_head };
- Xstatic void *thrd_callout;
- X
- Xwf_thrd *
- Xthrd_alloc()
- X{
- X wf_thrd *thrdp;
- X
- X thrdp = ALLOC(wf_thrd);
- X return thrdp;
- X}
- X
- Xvoid
- Xthrd_watch(thrdp)
- Xwf_thrd *thrdp;
- X{
- X q_insert(thrdp, &thrd_head);
- X}
- X
- Xvoid
- Xthrd_ignore(thrdp)
- Xwf_thrd *thrdp;
- X{
- X q_remove(thrdp);
- X}
- X
- Xvoid
- Xthrd_free(thrdp)
- Xwf_thrd *thrdp;
- X{
- X if (NEXT(wf_thrd, thrdp)) q_remove(thrdp);
- X if (thrdp->rqstp) FREE(thrdp->rqstp);
- X FREE(thrdp);
- X}
- X
- Xvoid
- Xthrd_srvfailure(srvp)
- Xwf_srv *srvp;
- X{
- X /* server failure */
- X wf_thrd *p, *p2;
- X
- X ITER2(p, p2, wf_thrd, &thrd_head) {
- X if (p->cp && p->cp->srv == srvp) {
- X (*p->give_up)(p->closure);
- X }
- X }
- X}
- X
- Xstatic void
- Xthrd_gc()
- X{
- X wf_thrd *p, *p2;
- X
- X ITER2(p, p2, wf_thrd, &thrd_head) {
- X if (p->flag & WF_THREAD_ERROR) {
- X (*p->give_up)(p->closure);
- X p->flag &= ~WF_THREAD_ERROR; /* called only once */
- X } else if ((p->flag & WF_THREAD_RISKY)
- X && p->idle > WF_THREAD_TTL) {
- X if (p->cp)
- X srv_flag(p->cp->srv, WF_SRV_TIMEOUT);
- X (*p->give_up)(p->closure);
- X p->flag &= ~WF_THREAD_RISKY; /* called only once */
- X }
- X if (p->flag & WF_THREAD_RISKY)
- X p->idle += 60;
- X }
- X thrd_callout = timeout_set(gettime()+60, thrd_gc, 0);
- X}
- X
- Xvoid
- Xthrd_start()
- X{
- X thrd_callout = timeout_set(gettime()+60, thrd_gc, 0);
- X}
- X
- Xvoid
- Xthrd_stop()
- X{
- X wf_thrd *p;
- X
- X ITER(p, wf_thrd, &thrd_head) {
- X (*p->give_up)(p->closure);
- X p->flag &= ~(WF_THREAD_ERROR|WF_THREAD_RISKY);
- X /* called only once */
- X }
- X}
- X
- Xvoid
- Xthrd_inspect(reqp)
- Xwf_req *reqp;
- X{
- X wf_thrd *p;
- X
- X ITER(p, wf_thrd, &thrd_head) {
- X req_send(reqp, "thread %lx: vol= %s, dir= %s\n",
- X p, PROT(p->child_volp->name), PROT(p->dirp->name));
- X req_send(reqp, "\tstep= %d, flag= %d, fh= {%lx, %lx, %lx, %lx}\n",
- X p->step, p->flag,
- X p->fhp->parent_vol, p->fhp->dir_id,
- X p->fhp->child_vol, p->fhp->file_id);
- X req_send(reqp, "\tfname= %s, idle= %d, conn= %lx\n",
- X PROT(p->fname), p->idle, p->cp);
- X }
- X}
- END_OF_FILE
- if test 3584 -ne `wc -c <'csd/thrd.c'`; then
- echo shar: \"'csd/thrd.c'\" unpacked with wrong size!
- fi
- # end of 'csd/thrd.c'
- fi
- if test -f 'csd/trace.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'csd/trace.c'\"
- else
- echo shar: Extracting \"'csd/trace.c'\" \(3710 characters\)
- sed "s/^X//" >'csd/trace.c' <<'END_OF_FILE'
- X/*
- X * WorldWide File System
- X * Copyright (c) 1992,1993 Youki Kadobayashi
- X * Copyright (c) 1992,1993 Osaka University
- X * All rights reserved.
- X *
- X * Permission to use, copy, modify and distribute this software and its
- X * documentation is hereby granted, provided that the following conditions
- X * are met:
- X * 1. Both the copyright notice and this permission notice appear in
- X * all copies of the software, derivative works or modified versions,
- X * and any portions thereof, and that both notices appear in
- X * supporting documentation.
- X * 2. All advertising materials mentioning features or use of this software
- X * must display the following acknowledgement:
- X * This product includes software developed by the Osaka University
- X * and its contributors.
- X * 3. Neither the name of the University nor the names of its contributors
- X * may be used to endorse or promote products derived from this software
- X * without specific prior written permission.
- X *
- X * THIS SOFTWARE IS PROVIDED BY THE DEVELOPER ``AS IS'' AND OSAKA
- X * UNIVERSITY DISCLAIMS ANY LIABILITY OF ANY KIND FOR ANY DAMAGES
- X * WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- X *
- X * Osaka University requests users of this software to return to
- X *
- X * Youki Kadobayashi
- X * Department of Information and Computer Sciences
- X * Osaka University, Toyonaka 560, Osaka, Japan
- X *
- X * any improvements or extensions that they make and grant Osaka
- X * University the rights to redistribute these changes.
- X */
- Xstatic char *AtFSid = "$Header: trace.c[109.0] Wed Nov 24 03:47:18 1993 youki-k@is.aist-nara.ac.jp saved $";
- X
- X#include <stdio.h>
- X#include "wfs.h"
- X#include "global.h"
- X#include "util.h"
- X
- Xextern qelem trace_head;
- Xqelem trace_head = { &trace_head, &trace_head }; /* chain of wf_trace */
- Xstatic void *trace_callout;
- X
- Xstatic int idle = 0;
- Xstatic FILE *fp;
- Xstatic int closed = 1;
- X
- Xvoid
- Xtrace_event(handle, tracep)
- Xvoid *handle;
- Xwf_trace *tracep;
- X{
- X /* use casted pointer to discriminate sessions. */
- X tracep->cookie = (long) handle;
- X q_insert(tracep, LAST(wf_trace, &trace_head));
- X idle = 0;
- X}
- X
- Xstatic void
- Xtrace_open()
- X{
- X char path[MAXPATHLEN];
- X
- X sprintf(path, "%s/log/trace%s", cs_topdir, cs_date);
- X fp = fopen(path, "a+");
- X if (fp == NULL) {
- X dlog("cannot write to trace file \"%s\"", path);
- X } else {
- X closed = 0;
- X }
- X}
- X
- Xstatic void
- Xtrace_close()
- X{
- X if (!closed) {
- X fclose(fp);
- X closed = 1;
- X }
- X}
- X
- Xstatic void
- Xtrace_write()
- X{
- X#define TRACE_SIZE (sizeof (wf_trace) - sizeof (qelem))
- X wf_trace *tracep;
- X char *p, *buf;
- X int count = 0;
- X static int maxcount = NFS_MAXDATA / TRACE_SIZE;
- X
- X /*
- X * open file if necessary
- X */
- X if (! MORE(&trace_head)) return;
- X if (closed)
- X trace_open();
- X if (fp == NULL) return;
- X
- X /*
- X * write data
- X */
- X p = buf = so_getbuf(fileno(fp)); /* of size NFS_MAXDATA */
- X ITER(tracep, wf_trace, &trace_head) {
- X bcopy(&tracep->cookie, p, TRACE_SIZE);
- X p += TRACE_SIZE;
- X ++count;
- X if (count >= maxcount) {
- X fwrite(buf, TRACE_SIZE, count, fp);
- X p = buf;
- X count = 0;
- X }
- X }
- X if (count) {
- X fwrite(buf, TRACE_SIZE, count, fp);
- X }
- X
- X /*
- X * forget data
- X */
- X q_allfree(&trace_head);
- X}
- X
- X/*
- X * automagically close trace file if no activity has been observed recently.
- X */
- Xstatic void
- Xtrace_gc()
- X{
- X trace_write();
- X if (!closed) {
- X idle += 60;
- X if (idle > 120) {
- X trace_close();
- X }
- X }
- X trace_callout = timeout_set(gettime()+60, trace_gc, 0);
- X}
- X
- X/* forcibly flush trace file and execute shell script. */
- Xvoid
- Xtrace_report()
- X{
- X char path[MAXPATHLEN];
- X
- X trace_write();
- X trace_close();
- X sprintf(path, "%s/bin/report.sh %s/log/trace%s %s.%s",
- X cs_topdir,
- X cs_topdir, cs_date, cs_hostname, cs_domain);
- X unix_command(path);
- X}
- X
- Xvoid
- Xtrace_start()
- X{
- X trace_callout = timeout_set(gettime()+60, trace_gc, 0);
- X}
- X
- END_OF_FILE
- if test 3710 -ne `wc -c <'csd/trace.c'`; then
- echo shar: \"'csd/trace.c'\" unpacked with wrong size!
- fi
- # end of 'csd/trace.c'
- fi
- if test -f 'gtr/dig.pl' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'gtr/dig.pl'\"
- else
- echo shar: Extracting \"'gtr/dig.pl'\" \(1182 characters\)
- sed "s/^X//" >'gtr/dig.pl' <<'END_OF_FILE'
- X#!/usr/local/bin/perl
- X#
- X# Domain Internet Groper, written in Perl. 5 minutes hack.
- X# Usage: dig.pl [-t type] [-c class] hostname
- X# NOTE: Trailing dot is necessary -- domainname attached otherwise.
- X# Type and class argument must be uppercase.
- X#
- X# Author: Youki Kadobayashi <youki@wide.ad.jp>
- X# This file is part of WWFS.
- X#
- X
- Xrequire 'resolv.pl';
- Xrequire 'getopts.pl';
- Xdo Getopts('c:t:');
- X
- X(@ARGV == 1) || die "$0: 1 args.";
- X
- X# $res'options |= &RES_DEBUG;
- X# $res'options |= &RES_USEVC;
- X
- X$ns = &res_open;
- X$q = &res_mkquery($ARGV[0],
- X $opt_t ? $opt_t : "ANY",
- X $opt_c ? $opt_c : "IN");
- X@resp = &res_send($ns, $q);
- X
- Xprint "; Perl DiG\n";
- Xprint ";; QUESTIONS:\n";
- Xprint ";;\t", @resp[3],
- X ", type = ", &res'qtype_numtostr($resp[4]),
- X ", class = ", &res'qclass_numtostr($resp[5]), "\n";
- X
- Xprint "\n;; ANSWERS:\n";
- X&print_records($resp[6], $resp[7]);
- Xprint "\n;; AUTHORITY RECORDS:\n";
- X&print_records($resp[8], $resp[9]);
- Xprint "\n;; ADDITIONAL RECORDS:\n";
- X&print_records($resp[10], $resp[11]);
- X
- Xsub print_records {
- X local ($from, $to) = @_;
- X
- X for ($i = $from; $i < $to; $i += 5) {
- X print $resp[$i], "\t", $resp[$i+1], "\t", $resp[$i+2], "\t", $resp[$i+3], "\t", $resp[$i+4], "\n";
- X }
- X}
- X
- END_OF_FILE
- if test 1182 -ne `wc -c <'gtr/dig.pl'`; then
- echo shar: \"'gtr/dig.pl'\" unpacked with wrong size!
- fi
- chmod +x 'gtr/dig.pl'
- # end of 'gtr/dig.pl'
- fi
- if test -f 'gtr/gtr.txt' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'gtr/gtr.txt'\"
- else
- echo shar: Extracting \"'gtr/gtr.txt'\" \(3815 characters\)
- sed "s/^X//" >'gtr/gtr.txt' <<'END_OF_FILE'
- X#
- X# gtr.txt: GTR-based server selection table.
- X#
- X
- X#
- X# JP: Japan
- X#
- X133.4 255.255.0.0 Japan-WIDE-JP
- X133.4.1.0 255.255.255.224 Fujisawa-WIDE-JP
- X133.4.3.0 255.255.255.224 Tokyo-WIDE-JP
- X133.4.8.0 255.255.255.224 Kyoto-WIDE-JP
- X133.4.11.0 255.255.255.224 Fujisawa-WIDE-JP
- X133.4.14.0 255.255.255.224 Fukuoka-WIDE-JP
- X131.113 Fujisawa-WIDE-JP
- X133.27 Fujisawa-WIDE-JP
- X129.249 Fujisawa-WIDE-JP
- X133.107 Fujisawa-WIDE-JP
- X133.196 Fujisawa-WIDE-JP
- X133.160 Fujisawa-WIDE-JP
- X133.152 Fujisawa-WIDE-JP
- X133.229 Fujisawa-WIDE-JP
- X192.51.51 Fujisawa-WIDE-JP
- X150.61 Fujisawa-WIDE-JP
- X133.179 Fujisawa-WIDE-JP
- X136.198 Fujisawa-WIDE-JP
- X192.47.168 Fujisawa-WIDE-JP
- X192.50.240 Fujisawa-WIDE-JP
- X133.235 Tokyo-WIDE-JP
- X130.153 Tokyo-WIDE-JP
- X133.147 Tokyo-WIDE-JP
- X192.26.9 Tokyo-WIDE-JP
- X133.139 Tokyo-WIDE-JP
- X133.137 Tokyo-WIDE-JP
- X133.2 Tokyo-WIDE-JP
- X133.143 Tokyo-WIDE-JP
- X133.43 Tokyo-WIDE-JP
- X192.135.93 Tokyo-WIDE-JP
- X133.9 Tokyo-WIDE-JP
- X133.26 Tokyo-WIDE-JP
- X133.156 Tokyo-WIDE-JP
- X162.213 Tokyo-WIDE-JP
- X192.31.197 Tokyo-WIDE-JP
- X133.144 Tokyo-WIDE-JP
- X133.138 Tokyo-WIDE-JP
- X157.18 Tokyo-WIDE-JP
- X130.69 Tokyo-WIDE-JP
- X157.2 Tokyo-WIDE-JP
- X133.72 Tokyo-WIDE-JP
- X163.142 Tokyo-WIDE-JP
- X131.112 Tokyo-WIDE-JP
- X192.26.91 Tokyo-WIDE-JP
- X150.65 Tokyo-WIDE-JP
- X133.194 Tokyo-WIDE-JP
- X133.14 Tokyo-WIDE-JP
- X133.20 Tokyo-WIDE-JP
- X192.47.52 Tokyo-WIDE-JP
- X133.12 Tokyo-WIDE-JP
- X192.156.220 Tokyo-WIDE-JP
- X133.233 Tokyo-WIDE-JP
- X133.166 Tokyo-WIDE-JP
- X133.112 Tokyo-WIDE-JP
- X133.123 Tokyo-WIDE-JP
- X192.218.88 Tokyo-WIDE-JP
- X133.140 Tokyo-WIDE-JP
- X133.227 Tokyo-WIDE-JP
- X155.160 Tokyo-WIDE-JP
- X150.88 Tokyo-WIDE-JP
- X133.99 Tokyo-WIDE-JP
- X192.51.48 Tokyo-WIDE-JP
- X192.50.188 Tokyo-WIDE-JP
- X202.17.180 Tokyo-WIDE-JP
- X192.50.17 Tokyo-WIDE-JP
- X133.11 Tokyo-TISN-JP
- X157.82 Tokyo-UTnet-JP
- X192.41.197 Tokyo-TIX-JP
- X192.31.121 Tokyo-TRAIN-JP
- X133.82 Tokyo-TRAIN-JP
- X192.244.176 Tokyo-IIJ-JP
- X150.80 Sendai-WIDE-JP
- X130.34 Sendai-WIDE-JP
- X192.51.251 Sapporo-WIDE-JP
- X133.50 Sapporo-WIDE-JP
- X133.87 Sapporo-WIDE-JP
- X192.50.101 Sapporo-WIDE-JP
- X163.130 Sapporo-WIDE-JP
- X192.51.160 Sapporo-WIDE-JP
- X192.51.252 Sapporo-WIDE-JP
- X133.232 Sapporo-WIDE-JP
- X192.51.254 Sapporo-WIDE-JP
- X202.13.62 Sapporo-WIDE-JP
- X163.221 Nara-WIDE-JP
- X192.218.128 Nara-WIDE-JP
- X133.1 255.255.0.0 Osaka-WIDE-JP
- X192.47.241 Nara-WIDE-JP
- X133.18 Kyoto-WIDE-JP
- X133.83 Kyoto-WIDE-JP
- X133.210 Kyoto-WIDE-JP
- X133.186 Kyoto-WIDE-JP
- X192.51.37 Kyoto-WIDE-JP
- X130.54 Kyoto-WIDE-JP
- X133.3 Kyoto-WIDE-JP
- X192.50.8 Kyoto-WIDE-JP
- X133.155 Osaka-WIDE-JP
- X133.30 Osaka-WIDE-JP
- X132.182 Osaka-WIDE-JP
- X133.243 Osaka-WIDE-JP
- X133.1.12 255.255.255.0 Osaka.Toyonaka-WIDE-JP
- X133.1.4 255.255.255.0 Osaka.Suita-WIDE-JP
- X133.125 Fukuoka-WIDE-JP
- X133.5 Fukuoka-WIDE-JP
- X131.206 Fukuoka-WIDE-JP
- X133.130 Fukuoka-WIDE-JP
- X133.37 Fukuoka-WIDE-JP
- X133.17 Fukuoka-WIDE-JP
- X133.94 Fukuoka-WIDE-JP
- X150.43 Fukuoka-WIDE-JP
- X133.22 Fukuoka-WIDE-JP
- X#
- X# US: United States
- X#
- X128.174 Illinois-XXX-US # uiuc.edu
- X128.146 Ohio-XXX-US # ohio-state.edu
- X128.196 Arizona-XXX-US # arizona.edu
- X35 Michigan-XXX-US # umich.edu
- X141.211 Michigan-XXX-US # umich.edu
- X129.79 Indiana-XXX-US # indiana.edu
- X128.32 California-XXX-US # berkeley.edu
- X128.114 California-XXX-US # ucsc.edu
- X128.200 California-XXX-US # uci.edu
- X128.54 California-XXX-US # ucsd.edu
- X132.239 California-XXX-US # ucsd.edu
- X36 California-XXX-US # stanford.edu
- X128.9 California-XXX-US # isi.edu
- X26 California-XXX-US # isi.edu
- X128.125 California-XXX-US # usc.edu
- X128.223 Oregon-XXX-US # uoregon.edu
- X#
- X# US unresolved (where is it?)
- X#
- X128.210 XXX-XXX-US # purdue.edu
- X128.59 NY-XXX-US # columbia.edu
- X198.41.0 XXX-XXX-US # internic.net
- X128.252 XXX-XXX-US # wustl.edu
- X16 XXX-XXX-US # dec.com
- X18 XXX-XXX-US # mit.edu
- X128.52 XXX-XXX-US # mit.edu
- X128.2 XXX-XXX-US # cmu.edu
- X198.112.44 XXX-XXX-US # x.org
- X152.2 XXX-XXX-US # unc.edu
- END_OF_FILE
- if test 3815 -ne `wc -c <'gtr/gtr.txt'`; then
- echo shar: \"'gtr/gtr.txt'\" unpacked with wrong size!
- fi
- # end of 'gtr/gtr.txt'
- fi
- if test -f 'libww/libww.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'libww/libww.h'\"
- else
- echo shar: Extracting \"'libww/libww.h'\" \(3524 characters\)
- sed "s/^X//" >'libww/libww.h' <<'END_OF_FILE'
- X/* $Header: libww.h[109.0] Wed Nov 24 03:49:15 1993 youki-k@is.aist-nara.ac.jp saved $ */
- X/*
- X * WorldWide File System
- X * Copyright (c) 1992,1993 Youki Kadobayashi
- X * Copyright (c) 1992,1993 Osaka University
- X * All rights reserved.
- X *
- X * Permission to use, copy, modify and distribute this software and its
- X * documentation is hereby granted, provided that the following conditions
- X * are met:
- X * 1. Both the copyright notice and this permission notice appear in
- X * all copies of the software, derivative works or modified versions,
- X * and any portions thereof, and that both notices appear in
- X * supporting documentation.
- X * 2. All advertising materials mentioning features or use of this software
- X * must display the following acknowledgement:
- X * This product includes software developed by the Osaka University
- X * and its contributors.
- X * 3. Neither the name of the University nor the names of its contributors
- X * may be used to endorse or promote products derived from this software
- X * without specific prior written permission.
- X *
- X * THIS SOFTWARE IS PROVIDED BY THE DEVELOPER ``AS IS'' AND OSAKA
- X * UNIVERSITY DISCLAIMS ANY LIABILITY OF ANY KIND FOR ANY DAMAGES
- X * WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- X *
- X * Osaka University requests users of this software to return to
- X *
- X * Youki Kadobayashi
- X * Department of Information and Computer Sciences
- X * Osaka University, Toyonaka 560, Osaka, Japan
- X *
- X * any improvements or extensions that they make and grant Osaka
- X * University the rights to redistribute these changes.
- X */
- X/*
- X * libww: WWFS Application Programming Interface.
- X * This file is part of WWFS, the WorldWide File System.
- X *
- X * You do not want to include this file if you have spliced libc routines
- X * in libc_wwfs.a and you are planning to link your program with it.
- X */
- X
- X#ifndef __LIBWW_H__
- X#define __LIBWW_H__ 1
- X
- X#define UIP_BLOCK 1 /* arg: (int *), on=1, off=0. default=off */
- X#define UIP_PROGRESS 2 /* arg: (int *), on=1, off=0. default=off */
- X
- X#ifdef LIBWW /* libww itself */
- X
- X#ifdef RENAME_LIBC /* If renamesym works */
- X#define ww_open open
- X#define ww_fopen fopen
- X#define ww_opendir opendir
- X#else /* RENAME_LIBC */ /* If renamesym doesn't work */
- X#define Open open
- X#define Fopen fopen
- X#define Opendir opendir
- X#endif /* RENAME_LIBC */
- X
- X#else /* LIBWW */ /* libww clients */
- X/*
- X * the following definitions is only useful if libc splicing hack
- X * does not work.
- X */
- X#define open ww_open
- X#define fopen ww_fopen
- X#define opendir ww_opendir
- X
- Xextern int ww_errno;
- X#endif /* LIBWW */
- X
- X#ifndef __CEXTRACT__
- X#if __STDC__
- X
- Xextern char * ww_path ( char *path );
- Xextern char * ww_localpath ( char *path );
- Xextern int ww_control ( int optname, void *optval );
- Xextern int ww_get ( char *subpath );
- Xextern int ww_nfsget ( char *path );
- X#ifndef LIBWW
- Xextern int ww_open ( char *path, int flags, ... );
- X#endif
- X#ifdef FILE
- Xextern FILE * ww_fopen (char *filename, char *mode);
- X#endif
- X#ifdef DIR
- Xextern DIR * ww_opendir (char *filename);
- X#endif
- X
- X#else /* __STDC__ */
- X
- Xextern char * ww_path (/* char *path */);
- Xextern char * ww_localpath (/* char *path */);
- Xextern int ww_control (/* int optname, void *optval */);
- Xextern int ww_get (/* char *subpath */);
- Xextern int ww_nfsget (/* char *path */);
- Xextern int ww_open (/* char *path, int flags, ... */);
- X#ifdef FILE
- Xextern FILE * ww_fopen (/* char *filename, char *mode */);
- X#endif
- X#ifdef DIR
- Xextern DIR * ww_opendir (/* char *filename */);
- X#endif
- X
- X#endif /* __STDC__ */
- X#endif /* __CEXTRACT__ */
- X
- X#endif /* !__LIBWW_H__ */
- X
- END_OF_FILE
- if test 3524 -ne `wc -c <'libww/libww.h'`; then
- echo shar: \"'libww/libww.h'\" unpacked with wrong size!
- fi
- # end of 'libww/libww.h'
- fi
- if test -f 'mosaic/urlrename.pl' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'mosaic/urlrename.pl'\"
- else
- echo shar: Extracting \"'mosaic/urlrename.pl'\" \(3576 characters\)
- sed "s/^X//" >'mosaic/urlrename.pl' <<'END_OF_FILE'
- X#!/usr/local/bin/perl
- X#
- X$usg = "urlrename: Rename URLs using perl expression.
- X Intended as a postprocessing filter for \"htget.pl\".
- X
- XUsage: urlrename [-d <dir>] [-pr] <perl expression> <files...>
- X -d <dir> -- directory to save renamed pages
- X -p -- pipe. take filenames from standard input
- X -r -- recursively process files.
- X -v -- verbose.
- XExample: urlrename -r 's|http://info.cern.ch:80|wwfs:/cern-web|' .
- X";
- X# Author: Youki Kadobayashi <youki@wide.ad.jp>
- X#
- X
- Xrequire '/etc/csd.pl';
- Xunshift(@INC, "$WWFSDIR/lib");
- Xrequire 'url.pl';
- Xrequire 'dirutil.pl';
- Xrequire 'find.pl';
- X
- Xrequire 'getopts.pl';
- Xdo Getopts('d:prv');
- X$prefix = $opt_d ? $opt_d : "../url_renamed";
- Xif ($opt_r && $opt_d !~ m|^/|) {
- X die "Directory for -d must be absolute path if using -r option.\n";
- X}
- X
- Xif ($#ARGV < $[) {
- X die $usg;
- X}
- X
- X$/ = '>'; # input record separator
- X$expr = shift @ARGV;
- Xif ($opt_r) {
- X die $usg if $opt_p;
- X
- X foreach $file (@ARGV) {
- X &find($file);
- X }
- X} else {
- X if ($opt_p) { chop ($_ = <STDIN>); push (@ARGV, $_); }
- X foreach $file (@ARGV) {
- X ($dir, $file) = &basename($file);
- X &urlrename($dir, $dir, $file);
- X if ($opt_p) { chop ($_ = <STDIN>); push (@ARGV, $_); }
- X }
- X}
- X
- Xsub wanted {
- X return 1 unless (-f $_);
- X if (/^.*\.html$/) {
- X print STDERR "urlrename: $name\n" if $opt_v;
- X &urlrename(".", $dir, $_);
- X } elsif ($_ eq ".url") {
- X open(URL, $_);
- X $url = <URL>;
- X close(URL);
- X
- X # keep new URL...
- X eval "\$url =~ $expr";
- X &mkdirhier("$prefix/$dir") || die "mkdir: $!\n";
- X open(URL, "> $prefix/$dir/.url") || die "new url: $!\n";
- X print URL $url;
- X close(URL);
- X } else {
- X print STDERR "mv: $name to $prefix/$name\n" if $opt_v;
- X rename($_, "$prefix/$name");
- X }
- X 1;
- X}
- X
- Xsub urlrename {
- X local ($reldir, $dir, $file) = @_;
- X local ($here, $header, $url, $trailer,
- X $type,$host,$port,$path,$req,
- X $thistype,$thishost, $thisport,$thispath);
- X # finddir goes mad if $_ gets modified
- X local ($_);
- X
- X open(URL, "$reldir/.url") || die "$file: cannot map to url\n";
- X chop ($here = <URL>);
- X close(URL);
- X ($thistype,$thishost, $thisport, $thispath, $thisreq) =
- X &url'parse(undef,undef,undef,undef,$here);
- X
- X &mkdirhier("$prefix/$dir") || die "mkdir: $!\n";
- X open(OUT, ">$prefix/$dir/$file") || die "$prefix/$dir/$file: $!\n";
- X select(OUT);
- X open(IN, "$reldir/$file") || die "$dir/$file: $!\n";
- X while (<IN>) {
- X if (/(<a[^>]*href\s*=\s*")([^"]+)("[^>]*>)/i) {
- X $header = $` . $1;
- X $url = $2;
- X $trailer = $3;
- X
- X if ($url =~ m|/|) {
- X ($type,$host,$port,$path,$req) =
- X &url'parse($thistype,$thishost,
- X $thisport,$thispath,$url);
- X $url = "$type:";
- X $url .= "//$host" if (defined $host);
- X $url .= ":$port" if (defined $port);
- X $url .= $req;
- X if (eval "\$url =~ $expr" && $req =~ /\/$/) {
- X $url .= "urlget_dir.html";
- X }
- X die $@ if $@;
- X }
- X print $header, $url, $trailer;
- X next;
- X }
- X if (/(<img[^>]*src\s*=\s*")([^"]+)("[^>]*>)/i) {
- X $header = $` . $1;
- X $url = $2;
- X $trailer = $3;
- X
- X if ($url =~ m|/|) {
- X ($type,$host,$port,$path,$req) =
- X &url'parse($thistype,$thishost,
- X $thisport,$thispath,$url);
- X $url = "$type:";
- X $url .= "//$host" if (defined $host);
- X $url .= ":$port" if (defined $port);
- X $url .= $req;
- X eval "\$url =~ $expr";
- X die $@ if $@;
- X }
- X print $header, $url, $trailer;
- X next;
- X }
- X if (/<ISINDEX>/i) {
- X $header = $`;
- X # libhtmlw/HTMLformat.c told me...
- X print $header, "<ISINDEX ACTION=\"$here\">";
- X next;
- X }
- X print $_;
- X }
- X close(IN);
- X close(OUT);
- X}
- X
- X# Local Variables:
- X# mode: cperl
- X# cperl-indent-level: 8
- X# cperl-continued-statement-offset: 8
- X# End:
- END_OF_FILE
- if test 3576 -ne `wc -c <'mosaic/urlrename.pl'`; then
- echo shar: \"'mosaic/urlrename.pl'\" unpacked with wrong size!
- fi
- chmod +x 'mosaic/urlrename.pl'
- # end of 'mosaic/urlrename.pl'
- fi
- if test -f 'rpc/nfs_prot_svc.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'rpc/nfs_prot_svc.c'\"
- else
- echo shar: Extracting \"'rpc/nfs_prot_svc.c'\" \(3815 characters\)
- sed "s/^X//" >'rpc/nfs_prot_svc.c' <<'END_OF_FILE'
- X/*
- X * Please do not edit this file.
- X * It was generated using rpcgen.
- X */
- X
- X#include <stdio.h>
- X#include <rpc/rpc.h>
- X#include "util.h"
- X#include "nfs_prot.h"
- X#ifndef NFS_FH_DEFINED /* nfs_fh has been declared in cs_prot.h */
- X#define NFS_FH_DEFINED
- X#endif
- X
- Xvoid
- Xnfs_program_2(rqstp, transp)
- X struct svc_req *rqstp;
- X register SVCXPRT *transp;
- X{
- X union {
- X nfs_fh nfsproc_getattr_2_arg;
- X sattrargs nfsproc_setattr_2_arg;
- X diropargs nfsproc_lookup_2_arg;
- X nfs_fh nfsproc_readlink_2_arg;
- X readargs nfsproc_read_2_arg;
- X writeargs nfsproc_write_2_arg;
- X createargs nfsproc_create_2_arg;
- X diropargs nfsproc_remove_2_arg;
- X renameargs nfsproc_rename_2_arg;
- X linkargs nfsproc_link_2_arg;
- X symlinkargs nfsproc_symlink_2_arg;
- X createargs nfsproc_mkdir_2_arg;
- X diropargs nfsproc_rmdir_2_arg;
- X readdirargs nfsproc_readdir_2_arg;
- X nfs_fh nfsproc_statfs_2_arg;
- X } argument;
- X char *result;
- X bool_t (*xdr_argument)(), (*xdr_result)();
- X char *(*local)();
- X
- X switch (rqstp->rq_proc) {
- X case NFSPROC_NULL:
- X xdr_argument = xdr_void;
- X xdr_result = xdr_void;
- X local = (char *(*)()) nfsproc_null_2;
- X break;
- X
- X case NFSPROC_GETATTR:
- X xdr_argument = xdr_nfs_fh;
- X xdr_result = xdr_attrstat;
- X local = (char *(*)()) nfsproc_getattr_2;
- X break;
- X
- X case NFSPROC_SETATTR:
- X xdr_argument = xdr_sattrargs;
- X xdr_result = xdr_attrstat;
- X local = (char *(*)()) nfsproc_setattr_2;
- X break;
- X
- X case NFSPROC_ROOT:
- X xdr_argument = xdr_void;
- X xdr_result = xdr_void;
- X local = (char *(*)()) nfsproc_root_2;
- X break;
- X
- X case NFSPROC_LOOKUP:
- X xdr_argument = xdr_diropargs;
- X xdr_result = xdr_diropres;
- X local = (char *(*)()) nfsproc_lookup_2;
- X break;
- X
- X case NFSPROC_READLINK:
- X xdr_argument = xdr_nfs_fh;
- X xdr_result = xdr_readlinkres;
- X local = (char *(*)()) nfsproc_readlink_2;
- X break;
- X
- X case NFSPROC_READ:
- X xdr_argument = xdr_readargs;
- X xdr_result = xdr_readres;
- X local = (char *(*)()) nfsproc_read_2;
- X break;
- X
- X case NFSPROC_WRITECACHE:
- X xdr_argument = xdr_void;
- X xdr_result = xdr_void;
- X local = (char *(*)()) nfsproc_writecache_2;
- X break;
- X
- X case NFSPROC_WRITE:
- X xdr_argument = xdr_writeargs;
- X xdr_result = xdr_attrstat;
- X local = (char *(*)()) nfsproc_write_2;
- X break;
- X
- X case NFSPROC_CREATE:
- X xdr_argument = xdr_createargs;
- X xdr_result = xdr_diropres;
- X local = (char *(*)()) nfsproc_create_2;
- X break;
- X
- X case NFSPROC_REMOVE:
- X xdr_argument = xdr_diropargs;
- X xdr_result = xdr_nfsstat;
- X local = (char *(*)()) nfsproc_remove_2;
- X break;
- X
- X case NFSPROC_RENAME:
- X xdr_argument = xdr_renameargs;
- X xdr_result = xdr_nfsstat;
- X local = (char *(*)()) nfsproc_rename_2;
- X break;
- X
- X case NFSPROC_LINK:
- X xdr_argument = xdr_linkargs;
- X xdr_result = xdr_nfsstat;
- X local = (char *(*)()) nfsproc_link_2;
- X break;
- X
- X case NFSPROC_SYMLINK:
- X xdr_argument = xdr_symlinkargs;
- X xdr_result = xdr_nfsstat;
- X local = (char *(*)()) nfsproc_symlink_2;
- X break;
- X
- X case NFSPROC_MKDIR:
- X xdr_argument = xdr_createargs;
- X xdr_result = xdr_diropres;
- X local = (char *(*)()) nfsproc_mkdir_2;
- X break;
- X
- X case NFSPROC_RMDIR:
- X xdr_argument = xdr_diropargs;
- X xdr_result = xdr_nfsstat;
- X local = (char *(*)()) nfsproc_rmdir_2;
- X break;
- X
- X case NFSPROC_READDIR:
- X xdr_argument = xdr_readdirargs;
- X xdr_result = xdr_readdirres;
- X local = (char *(*)()) nfsproc_readdir_2;
- X break;
- X
- X case NFSPROC_STATFS:
- X xdr_argument = xdr_nfs_fh;
- X xdr_result = xdr_statfsres;
- X local = (char *(*)()) nfsproc_statfs_2;
- X break;
- X
- X default:
- X svcerr_noproc(transp);
- X return;
- X }
- X bzero((char *)&argument, sizeof(argument));
- X if (!svc_getargs(transp, xdr_argument, &argument)) {
- X svcerr_decode(transp);
- X return;
- X }
- X result = (*local)(&argument, rqstp);
- X if (result != NULL && !svc_sendreply(transp, xdr_result, result)) {
- X svcerr_systemerr(transp);
- X }
- X if (!svc_freeargs(transp, xdr_argument, &argument)) {
- X dlog( "unable to free arguments");
- X csd_abort(1);
- X }
- X return;
- X}
- END_OF_FILE
- if test 3815 -ne `wc -c <'rpc/nfs_prot_svc.c'`; then
- echo shar: \"'rpc/nfs_prot_svc.c'\" unpacked with wrong size!
- fi
- # end of 'rpc/nfs_prot_svc.c'
- fi
- echo shar: End of archive 18 \(of 22\).
- cp /dev/null ark18isdone
- MISSING=""
- for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 22 archives.
- rm -f ark[1-9]isdone ark[1-9][0-9]isdone
- else
- echo You still must unpack the following archives:
- echo " " ${MISSING}
- fi
- exit 0
- exit 0 # Just in case...
-