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.4 (Berkeley) 02/09/92 13 * 14 * $Id: os-bsd44.h,v 5.2.2.1 1992/02/09 15:10:11 jsp beta $ 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).addrlen = sizeof(*src); \ 82 (dst).sotype = SOCK_DGRAM; \ 83 (dst).proto = 0; \ 84 } 85 86 /* 87 * Byte ordering 88 */ 89 #ifndef BYTE_ORDER 90 #include <machine/endian.h> 91 #endif /* BYTE_ORDER */ 92 93 #undef ARCH_ENDIAN 94 #if BYTE_ORDER == LITTLE_ENDIAN 95 #define ARCH_ENDIAN "little" 96 #else 97 #if BYTE_ORDER == BIG_ENDIAN 98 #define ARCH_ENDIAN "big" 99 #else 100 XXX - Probably no hope of running Amd on this machine! 101 #endif /* BIG */ 102 #endif /* LITTLE */ 103 104 /* 105 * Miscellaneous 4.4 BSD bits 106 */ 107 #define NEED_MNTOPT_PARSER 108 #define SHORT_MOUNT_NAME 109 110 #define MNTMAXSTR 128 111 112 #define MNTTYPE_UFS "ufs" /* Un*x file system */ 113 #define MNTTYPE_NFS "nfs" /* network file system */ 114 #define MNTTYPE_MFS "mfs" /* memory file system */ 115 #define MNTTYPE_IGNORE "ignore" /* No type specified, ignore this entry */ 116 117 #define M_RDONLY MNT_RDONLY 118 #define M_SYNC MNT_SYNCHRONOUS 119 #define M_NOEXEC MNT_NOEXEC 120 #define M_NOSUID MNT_NOSUID 121 #define M_NODEV MNT_NODEV 122 123 #define MNTOPT_SOFT "soft" /* soft mount */ 124 #define MNTOPT_INTR "intr" /* interrupts allowed */ 125 126 #define NFSMNT_HOSTNAME 0 /* hostname on 4.4 is not optional */ 127 128 struct mntent { 129 char *mnt_fsname; /* name of mounted file system */ 130 char *mnt_dir; /* file system path prefix */ 131 char *mnt_type; /* MNTTYPE_* */ 132 char *mnt_opts; /* MNTOPT* */ 133 int mnt_freq; /* dump frequency, in days */ 134 int mnt_passno; /* pass number on parallel fsck */ 135 }; 136 137 /* 138 * Type of a file handle 139 */ 140 #undef NFS_FH_TYPE 141 #define NFS_FH_TYPE nfsv2fh_t * 142 143 /* 144 * How to get a mount list 145 */ 146 #undef READ_MTAB_FROM_FILE 147 #define READ_MTAB_BSD_STYLE 148 149 /* 150 * The data for the mount syscall needs the path in addition to the 151 * host name since that is the only source of information about the 152 * mounted filesystem. 153 */ 154 #define NFS_ARGS_NEEDS_PATH 155 156 /* 157 * 4.4 has RE support built in 158 */ 159 #undef RE_HDR 160 #define RE_HDR <regexp.h> 161