summaryrefslogtreecommitdiff
path: root/sys/lib
diff options
context:
space:
mode:
Diffstat (limited to 'sys/lib')
-rw-r--r--sys/lib/libsa/bootparam.c4
-rw-r--r--sys/lib/libsa/nfs.c6
-rw-r--r--sys/lib/libsa/nfsv2.h167
-rw-r--r--sys/lib/libsa/rpc.c4
-rw-r--r--sys/lib/libsa/rpcv2.h90
5 files changed, 7 insertions, 264 deletions
diff --git a/sys/lib/libsa/bootparam.c b/sys/lib/libsa/bootparam.c
index 65739a28b17..b6606bea6c7 100644
--- a/sys/lib/libsa/bootparam.c
+++ b/sys/lib/libsa/bootparam.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bootparam.c,v 1.3 1996/04/19 16:09:49 niklas Exp $ */
+/* $OpenBSD: bootparam.c,v 1.4 1996/09/27 07:13:47 mickey Exp $ */
/* $NetBSD: bootparam.c,v 1.7 1996/02/26 23:05:14 gwr Exp $ */
/*
@@ -45,7 +45,7 @@
#include <string.h>
-#include "rpcv2.h"
+#include <nfs/rpcv2.h>
#include "stand.h"
#include "net.h"
diff --git a/sys/lib/libsa/nfs.c b/sys/lib/libsa/nfs.c
index bd4163616f1..5f70b755b8a 100644
--- a/sys/lib/libsa/nfs.c
+++ b/sys/lib/libsa/nfs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs.c,v 1.3 1996/05/22 12:00:44 deraadt Exp $ */
+/* $OpenBSD: nfs.c,v 1.4 1996/09/27 07:13:48 mickey Exp $ */
/* $NetBSD: nfs.c,v 1.15 1996/05/14 10:28:26 leo Exp $ */
/*-
@@ -38,8 +38,8 @@
#include <netinet/in.h>
#include <netinet/in_systm.h>
-#include "rpcv2.h"
-#include "nfsv2.h"
+#include <nfs/rpcv2.h>
+#include <nfs/nfsv2.h>
#include "stand.h"
#include "net.h"
diff --git a/sys/lib/libsa/nfsv2.h b/sys/lib/libsa/nfsv2.h
deleted file mode 100644
index 83464564e6c..00000000000
--- a/sys/lib/libsa/nfsv2.h
+++ /dev/null
@@ -1,167 +0,0 @@
-/* $OpenBSD: nfsv2.h,v 1.1 1996/04/19 16:09:52 niklas Exp $ */
-/* $NetBSD: nfsv2.h,v 1.2 1996/02/26 23:05:23 gwr Exp $ */
-
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Rick Macklem at The University of Guelph.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)nfsv2.h 8.1 (Berkeley) 6/10/93
- */
-
-/*
- * nfs definitions as per the version 2 specs
- */
-
-/*
- * Constants as defined in the Sun NFS Version 2 spec.
- * "NFS: Network File System Protocol Specification" RFC1094
- */
-
-#define NFS_PORT 2049
-#define NFS_PROG 100003
-#define NFS_VER2 2
-#define NFS_MAXDGRAMDATA 8192
-#define NFS_MAXDATA 32768
-#define NFS_MAXPATHLEN 1024
-#define NFS_MAXNAMLEN 255
-#define NFS_FHSIZE 32
-#define NFS_MAXPKTHDR 404
-#define NFS_MAXPACKET (NFS_MAXPKTHDR+NFS_MAXDATA)
-#define NFS_MINPACKET 20
-#define NFS_FABLKSIZE 512 /* Size in bytes of a block wrt fa_blocks */
-
-/* Stat numbers for rpc returns */
-#define NFS_OK 0
-#define NFSERR_PERM 1
-#define NFSERR_NOENT 2
-#define NFSERR_IO 5
-#define NFSERR_NXIO 6
-#define NFSERR_ACCES 13
-#define NFSERR_EXIST 17
-#define NFSERR_NODEV 19
-#define NFSERR_NOTDIR 20
-#define NFSERR_ISDIR 21
-#define NFSERR_FBIG 27
-#define NFSERR_NOSPC 28
-#define NFSERR_ROFS 30
-#define NFSERR_NAMETOL 63
-#define NFSERR_NOTEMPTY 66
-#define NFSERR_DQUOT 69
-#define NFSERR_STALE 70
-#define NFSERR_WFLUSH 99
-
-/* Sizes in bytes of various nfs rpc components */
-#define NFSX_FH 32
-#define NFSX_UNSIGNED 4
-#define NFSX_FATTR 68
-#define NFSX_SATTR 32
-#define NFSX_STATFS 20
-#define NFSX_COOKIE 4
-
-/* nfs rpc procedure numbers */
-#define NFSPROC_NULL 0
-#define NFSPROC_GETATTR 1
-#define NFSPROC_SETATTR 2
-#define NFSPROC_NOOP 3
-#define NFSPROC_ROOT NFSPROC_NOOP /* Obsolete */
-#define NFSPROC_LOOKUP 4
-#define NFSPROC_READLINK 5
-#define NFSPROC_READ 6
-#define NFSPROC_WRITECACHE NFSPROC_NOOP /* Obsolete */
-#define NFSPROC_WRITE 8
-#define NFSPROC_CREATE 9
-#define NFSPROC_REMOVE 10
-#define NFSPROC_RENAME 11
-#define NFSPROC_LINK 12
-#define NFSPROC_SYMLINK 13
-#define NFSPROC_MKDIR 14
-#define NFSPROC_RMDIR 15
-#define NFSPROC_READDIR 16
-#define NFSPROC_STATFS 17
-
-#define NFS_NPROCS 18
-
-
-/* File types */
-typedef enum {
- NFNON=0,
- NFREG=1,
- NFDIR=2,
- NFBLK=3,
- NFCHR=4,
- NFLNK=5
-} nfstype;
-
-/* Structs for common parts of the rpc's */
-struct nfsv2_time {
- n_long nfs_sec;
- n_long nfs_usec;
-};
-
-/*
- * File attributes and setable attributes.
- */
-struct nfsv2_fattr {
- n_long fa_type;
- n_long fa_mode;
- n_long fa_nlink;
- n_long fa_uid;
- n_long fa_gid;
- n_long fa_size;
- n_long fa_blocksize;
- n_long fa_rdev;
- n_long fa_blocks;
- n_long fa_fsid;
- n_long fa_fileid;
- struct nfsv2_time fa_atime;
- struct nfsv2_time fa_mtime;
- struct nfsv2_time fa_ctime;
-};
-
-struct nfsv2_sattr {
- n_long sa_mode;
- n_long sa_uid;
- n_long sa_gid;
- n_long sa_size;
- struct nfsv2_time sa_atime;
- struct nfsv2_time sa_mtime;
-};
-
-struct nfsv2_statfs {
- n_long sf_tsize;
- n_long sf_bsize;
- n_long sf_blocks;
- n_long sf_bfree;
- n_long sf_bavail;
-};
diff --git a/sys/lib/libsa/rpc.c b/sys/lib/libsa/rpc.c
index c3cff959a18..db7ebb9f776 100644
--- a/sys/lib/libsa/rpc.c
+++ b/sys/lib/libsa/rpc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rpc.c,v 1.2 1996/04/19 16:09:53 niklas Exp $ */
+/* $OpenBSD: rpc.c,v 1.3 1996/09/27 07:13:49 mickey Exp $ */
/* $NetBSD: rpc.c,v 1.12 1996/02/26 23:05:26 gwr Exp $ */
/*
@@ -56,7 +56,7 @@
#include <string.h>
-#include "rpcv2.h"
+#include <nfs/rpcv2.h>
#include "stand.h"
#include "net.h"
diff --git a/sys/lib/libsa/rpcv2.h b/sys/lib/libsa/rpcv2.h
deleted file mode 100644
index 75102c14fd1..00000000000
--- a/sys/lib/libsa/rpcv2.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/* $OpenBSD: rpcv2.h,v 1.1 1996/04/19 16:09:55 niklas Exp $ */
-/* $NetBSD: rpcv2.h,v 1.1 1996/02/26 23:05:32 gwr Exp $ */
-
-/*
- * Copyright (c) 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Rick Macklem at The University of Guelph.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)rpcv2.h 8.1 (Berkeley) 6/10/93
- */
-
-/*
- * Definitions for Sun RPC Version 2, from
- * "RPC: Remote Procedure Call Protocol Specification" RFC1057
- */
-
-/* Version # */
-#define RPC_VER2 2
-
-/* Authentication */
-#define RPCAUTH_NULL 0
-#define RPCAUTH_UNIX 1
-#define RPCAUTH_SHORT 2
-#define RPCAUTH_MAXSIZ 400
-#define RPCAUTH_UNIXGIDS 16
-
-/* Rpc Constants */
-#define RPC_CALL 0
-#define RPC_REPLY 1
-#define RPC_MSGACCEPTED 0
-#define RPC_MSGDENIED 1
-#define RPC_PROGUNAVAIL 1
-#define RPC_PROGMISMATCH 2
-#define RPC_PROCUNAVAIL 3
-#define RPC_GARBAGE 4 /* I like this one */
-#define RPC_MISMATCH 0
-#define RPC_AUTHERR 1
-
-/* Authentication failures */
-#define AUTH_BADCRED 1
-#define AUTH_REJECTCRED 2
-#define AUTH_BADVERF 3
-#define AUTH_REJECTVERF 4
-#define AUTH_TOOWEAK 5 /* Give em wheaties */
-
-/* Sizes of rpc header parts */
-#define RPC_SIZ 24
-#define RPC_REPLYSIZ 28
-
-/* RPC Prog definitions */
-#define RPCPROG_MNT 100005
-#define RPCMNT_VER1 1
-#define RPCMNT_MOUNT 1
-#define RPCMNT_DUMP 2
-#define RPCMNT_UMOUNT 3
-#define RPCMNT_UMNTALL 4
-#define RPCMNT_EXPORT 5
-#define RPCMNT_NAMELEN 255
-#define RPCMNT_PATHLEN 1024
-#define RPCPROG_NFS 100003