xref: /original-bsd/usr.sbin/amd/config/os-bsd44.h (revision 08eb28af)
1 /*
2  * Copyright (c) 1990 Jan-Simon Pendry
3  * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
4  * Copyright (c) 1990 The Regents of the University of California.
5  * All rights reserved.
6  *
7  * This code is derived from software contributed to Berkeley by
8  * Jan-Simon Pendry at Imperial College, London.
9  *
10  * %sccs.include.redist.c%
11  *
12  *	@(#)os-bsd44.h	5.3 (Berkeley) 05/12/91
13  *
14  * $Id: os-bsd44.h,v 5.2.1.4 91/05/07 22:19:32 jsp Alpha $
15  *
16  * 4.4 BSD definitions for Amd (automounter)
17  */
18 
19 /*
20  * Does the compiler grok void *
21  */
22 #define	VOIDP
23 
24 /*
25  * Which version of the Sun RPC library we are using
26  * This is the implementation release number, not
27  * the protocol revision number.
28  */
29 #define	RPC_4
30 
31 /*
32  * Which version of the NFS interface are we using.
33  * This is the implementation release number, not
34  * the protocol revision number.
35  */
36 #define	NFS_44
37 #define HAS_TCP_NFS
38 
39 /*
40  * Does this OS have NDBM support?
41  */
42 #define OS_HAS_NDBM
43 
44 /*
45  * 4.4 doesn't provide NIS.
46  */
47 #undef HAS_NIS_MAPS
48 
49 /*
50  * The mount table is obtained from the kernel
51  */
52 #undef	UPDATE_MTAB
53 
54 /*
55  * No mntent info on 4.4 BSD
56  */
57 #undef	MNTENT_HDR
58 
59 /*
60  * Name of filesystem types
61  */
62 #define	MOUNT_TYPE_NFS	MOUNT_NFS
63 #define	MOUNT_TYPE_UFS	MOUNT_UFS
64 #undef MTAB_TYPE_UFS
65 #define	MTAB_TYPE_UFS	"ufs"
66 #define	MTAB_TYPE_MFS	"mfs"
67 
68 /*
69  * How to unmount filesystems
70  */
71 #undef UNMOUNT_TRAP
72 #undef	NEED_UMOUNT_FS
73 #define	NEED_UMOUNT_BSD
74 
75 /*
76  * How to copy an address into an NFS filehandle
77  */
78 #undef NFS_SA_DREF
79 #define	NFS_SA_DREF(dst, src) { \
80 		(dst).addr = (struct sockaddr *) (src); \
81 		(dst).sotype = SOCK_DGRAM; \
82 		(dst).proto = 0; \
83 	}
84 
85 /*
86  * Byte ordering
87  */
88 #ifndef BYTE_ORDER
89 #include <machine/endian.h>
90 #endif /* BYTE_ORDER */
91 
92 #undef ARCH_ENDIAN
93 #if BYTE_ORDER == LITTLE_ENDIAN
94 #define ARCH_ENDIAN "little"
95 #else
96 #if BYTE_ORDER == BIG_ENDIAN
97 #define ARCH_ENDIAN "big"
98 #else
99 XXX - Probably no hope of running Amd on this machine!
100 #endif /* BIG */
101 #endif /* LITTLE */
102 
103 /*
104  * Miscellaneous 4.4 BSD bits
105  */
106 #define	NEED_MNTOPT_PARSER
107 #define	SHORT_MOUNT_NAME
108 
109 #define	MNTMAXSTR       128
110 
111 #define	MNTTYPE_UFS	"ufs"		/* Un*x file system */
112 #define	MNTTYPE_NFS	"nfs"		/* network file system */
113 #define	MNTTYPE_MFS	"mfs"		/* memory file system */
114 #define	MNTTYPE_IGNORE	"ignore"	/* No type specified, ignore this entry */
115 
116 #define	M_RDONLY	MNT_RDONLY
117 #define	M_SYNC		MNT_SYNCHRONOUS
118 #define	M_NOEXEC	MNT_NOEXEC
119 #define	M_NOSUID	MNT_NOSUID
120 #define	M_NODEV		MNT_NODEV
121 
122 #define	MNTOPT_SOFT	"soft"		/* soft mount */
123 #define	MNTOPT_INTR	"intr"		/* interrupts allowed */
124 
125 struct mntent {
126 	char	*mnt_fsname;	/* name of mounted file system */
127 	char	*mnt_dir;	/* file system path prefix */
128 	char	*mnt_type;	/* MNTTYPE_* */
129 	char	*mnt_opts;	/* MNTOPT* */
130 	int	mnt_freq;	/* dump frequency, in days */
131 	int	mnt_passno;	/* pass number on parallel fsck */
132 };
133 
134 /*
135  * Type of a file handle
136  */
137 #undef NFS_FH_TYPE
138 #define	NFS_FH_TYPE	nfsv2fh_t *
139 
140 /*
141  * How to get a mount list
142  */
143 #undef	READ_MTAB_FROM_FILE
144 #define	READ_MTAB_BSD_STYLE
145 
146 /*
147  * The data for the mount syscall needs the path in addition to the
148  * host name since that is the only source of information about the
149  * mounted filesystem.
150  */
151 #define	NFS_ARGS_NEEDS_PATH
152 
153 /*
154  * 4.4 has RE support built in
155  */
156 #undef RE_HDR
157 #define RE_HDR <regexp.h>
158