aboutsummaryrefslogtreecommitdiff
path: root/contrib/amd/include
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/amd/include')
-rw-r--r--contrib/amd/include/am_compat.h91
-rw-r--r--contrib/amd/include/am_defs.h80
-rw-r--r--contrib/amd/include/am_utils.h121
-rw-r--r--contrib/amd/include/am_xdr_func.h1049
-rw-r--r--contrib/amd/include/amq_defs.h50
-rw-r--r--contrib/amd/include/mount_headers1.h96
-rw-r--r--contrib/amd/include/mount_headers2.h8
-rw-r--r--contrib/amd/include/nfs_common.h99
8 files changed, 1432 insertions, 162 deletions
diff --git a/contrib/amd/include/am_compat.h b/contrib/amd/include/am_compat.h
index dc3b71d74468..3463f3fa591c 100644
--- a/contrib/amd/include/am_compat.h
+++ b/contrib/amd/include/am_compat.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2006 Erez Zadok
+ * Copyright (c) 1997-2014 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -16,11 +16,7 @@
* 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 acknowledgment:
- * 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
+ * 3. 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.
*
@@ -90,6 +86,10 @@
# define MNTTAB_OPT_NOAC "noac"
#endif /* defined(MNT2_NFS_OPT_NOAC) && !defined(MNTTAB_OPT_NOAC) */
+#if defined(MNT2_NFS_OPT_NOACL) && !defined(MNTTAB_OPT_NOACL)
+# define MNTTAB_OPT_NOACL "noacl"
+#endif /* defined(MNT2_NFS_OPT_NOACL) && !defined(MNTTAB_OPT_NOACL) */
+
#if defined(MNT2_NFS_OPT_NOCONN) && !defined(MNTTAB_OPT_NOCONN)
# define MNTTAB_OPT_NOCONN "noconn"
# ifndef MNTTAB_OPT_CONN
@@ -176,10 +176,30 @@
#if defined(MNT2_CDFS_OPT_GENS) && !defined(MNTTAB_OPT_GENS)
# define MNTTAB_OPT_GENS "gens"
#endif /* defined(MNT2_CDFS_OPT_GENS) && !defined(MNTTAB_OPT_GENS) */
+
#if defined(MNT2_CDFS_OPT_EXTATT) && !defined(MNTTAB_OPT_EXTATT)
# define MNTTAB_OPT_EXTATT "extatt"
#endif /* defined(MNT2_CDFS_OPT_EXTATT) && !defined(MNTTAB_OPT_EXTATT) */
+#if defined(MNT2_CDFS_OPT_NOJOLIET) && !defined(MNTTAB_OPT_NOJOLIET)
+# define MNTTAB_OPT_NOJOLIET "nojoliet"
+#endif /* defined(MNT2_CDFS_OPT_NOJOLIET) && !defined(MNTTAB_OPT_NOJOLIET) */
+
+#if defined(MNT2_CDFS_OPT_NOCASETRANS) && !defined(MNTTAB_OPT_NOCASETRANS)
+# define MNTTAB_OPT_NOCASETRANS "nocasetrans"
+#endif /* defined(MNT2_CDFS_OPT_NOCASETRANS) && !defined(MNTTAB_OPT_NOCASETRANS) */
+
+#if defined(MNT2_CDFS_OPT_RRCASEINS) && !defined(MNTTAB_OPT_RRCASEINS)
+# define MNTTAB_OPT_RRCASEINS "rrcaseins"
+#endif /* defined(MNT2_CDFS_OPT_RRCASEINS) && !defined(MNTTAB_OPT_RRCASEINS) */
+
+/*
+ * Complete MNTTAB_OPT_* options based on MNT2_UDF_OPT_* mount options.
+ */
+#if defined(MNT2_UDF_OPT_CLOSESESSION) && !defined(MNTTAB_OPT_CLOSESESSION)
+# define MNTTAB_OPT_CLOSESESSION "closesession"
+#endif /* defined(MNT2_UDF_OPT_CLOSESESSION) && !defined(MNTTAB_OPT_CLOSESESSION) */
+
/*
* Complete MNTTAB_OPT_* options based on MNT2_PCFS_OPT_* mount options.
*/
@@ -236,6 +256,29 @@
# define MNTTAB_OPT_SYNC "sync"
#endif /* defined(MNT2_GEN_OPT_SYNC) && !defined(MNTTAB_OPT_SYNC) */
+#if defined(MNT2_GEN_OPT_LOG) && !defined(MNTTAB_OPT_LOG)
+# define MNTTAB_OPT_LOG "log"
+#endif /* defined(MNT2_GEN_OPT_LOG) && !defined(MNTTAB_OPT_LOG) */
+
+#if defined(MNT2_GEN_OPT_NOATIME) && !defined(MNTTAB_OPT_NOATIME)
+# define MNTTAB_OPT_NOATIME "noatime"
+#endif /* defined(MNT2_GEN_OPT_NOATIME) && !defined(MNTTAB_OPT_NOATIME) */
+
+#if defined(MNT2_GEN_OPT_NODEVMTIME) && !defined(MNTTAB_OPT_NODEVMTIME)
+# define MNTTAB_OPT_NODEVMTIME "nodevmtime"
+#endif /* defined(MNT2_GEN_OPT_NODEVMTIME) && !defined(MNTTAB_OPT_NODEVMTIME) */
+
+#if defined(MNT2_GEN_OPT_SOFTDEP) && !defined(MNTTAB_OPT_SOFTDEP)
+# define MNTTAB_OPT_SOFTDEP "softdep"
+#endif /* defined(MNT2_GEN_OPT_SOFTDEP) && !defined(MNTTAB_OPT_SOFTDEP) */
+
+#if defined(MNT2_GEN_OPT_SYMPERM) && !defined(MNTTAB_OPT_SYMPERM)
+# define MNTTAB_OPT_SYMPERM "symperm"
+#endif /* defined(MNT2_GEN_OPT_SYMPERM) && !defined(MNTTAB_OPT_SYMPERM) */
+
+#if defined(MNT2_GEN_OPT_UNION) && !defined(MNTTAB_OPT_UNION)
+# define MNTTAB_OPT_UNION "union"
+#endif /* defined(MNT2_GEN_OPT_UNION) && !defined(MNTTAB_OPT_UNION) */
/*
* Add missing MNTTAB_OPT_* options.
@@ -298,6 +341,20 @@
# define MNTTAB_OPT_DIRMASK "dirmask"
#endif /* not MNTTAB_OPT_DIRMASK */
+/* useful for udf mounts */
+#ifndef MNTTAB_OPT_USER
+# define MNTTAB_OPT_USER "user"
+#endif /* not MNTTAB_OPT_USER */
+#ifndef MNTTAB_OPT_GROUP
+# define MNTTAB_OPT_GROUP "group"
+#endif /* not MNTTAB_OPT_GROUP */
+#ifndef MNTTAB_OPT_GMTOFF
+# define MNTTAB_OPT_GMTOFF "gmtoff"
+#endif /* not MNTTAB_OPT_GMTOFF */
+#ifndef MNTTAB_OPT_SESSIONNR
+# define MNTTAB_OPT_SESSIONNR "sessionnr"
+#endif /* not MNTTAB_OPT_SESSIONNR */
+
/*
* Incomplete filesystem definitions (sunos4, irix6, solaris2)
*/
@@ -335,18 +392,32 @@ struct hsfs_args {
#endif /* defined(HAVE_FS_UFS) && !defined(ufs_args_t) */
/*
+ * if does not define struct udf_args, assume integer bit-field (linux)
+ */
+#if defined(HAVE_FS_UDF) && !defined(udf_args_t)
+# define udf_args_t u_int
+#endif /* defined(HAVE_FS_UDF) && !defined(udf_args_t) */
+
+/*
* if does not define struct efs_args, assume integer bit-field (linux)
*/
#if defined(HAVE_FS_EFS) && !defined(efs_args_t)
# define efs_args_t u_int
#endif /* defined(HAVE_FS_EFS) && !defined(efs_args_t) */
+#if defined(HAVE_FS_TMPFS) && !defined(tmpfs_args_t)
+# define tmpfs_args_t u_int
+#endif /* defined(HAVE_FS_TMPFS) && !defined(tmpfs_args_t) */
+
/*
* if does not define struct xfs_args, assume integer bit-field (linux)
*/
#if defined(HAVE_FS_XFS) && !defined(xfs_args_t)
# define xfs_args_t u_int
#endif /* defined(HAVE_FS_XFS) && !defined(xfs_args_t) */
+#if defined(HAVE_FS_EXT) && !defined(ext_args_t)
+# define ext_args_t u_int
+#endif /* defined(HAVE_FS_EXT) && !defined(ext_args_t) */
#if defined(HAVE_FS_AUTOFS) && defined(MOUNT_TYPE_AUTOFS) && !defined(MNTTYPE_AUTOFS)
# define MNTTYPE_AUTOFS "autofs"
@@ -366,6 +437,14 @@ struct hsfs_args {
#endif /* not HAVE_FS_NFS3 */
/*
+ * If NFS4, then make sure that the "sec" mnttab option is available.
+ */
+#ifdef HAVE_FS_NFS4
+# ifndef MNTTAB_OPT_SEC
+# define MNTTAB_OPT_SEC "sec"
+# endif /* not MNTTAB_OPT_SEC */
+#endif /* not HAVE_FS_NFS4 */
+/*
* If loop device (header file) exists, define mount table option
*/
#if defined(HAVE_LOOP_DEVICE) && !defined(MNTTAB_OPT_LOOP)
diff --git a/contrib/amd/include/am_defs.h b/contrib/amd/include/am_defs.h
index f3767f5b905e..bb867a49b5a5 100644
--- a/contrib/amd/include/am_defs.h
+++ b/contrib/amd/include/am_defs.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2006 Erez Zadok
+ * Copyright (c) 1997-2014 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -16,11 +16,7 @@
* 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 acknowledgment:
- * 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
+ * 3. 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.
*
@@ -67,7 +63,7 @@
# define strchr index
# define strrchr rindex
# endif /* not HAVE_STRCHR */
-char *strchr(), *strrchr(), *strdup();
+char *strchr(), *strrchr();
#endif /* not STDC_HEADERS */
/*
@@ -88,6 +84,14 @@ char *strchr(), *strrchr(), *strdup();
# endif /* __GNUC__ < 2 ... */
#endif /* not __attribute__ */
+#define __IGNORE(result) \
+ __ignore((unsigned long)result)
+
+static inline void
+__ignore(unsigned long result) {
+ (void)&result;
+}
+
/*
* How to handle signals of any type
*/
@@ -134,11 +138,19 @@ struct sigevent;
/*
* Big-endian or little-endian?
*/
-#ifdef WORDS_BIGENDIAN
-# define ARCH_ENDIAN "big"
-#else /* not WORDS_BIGENDIAN */
-# define ARCH_ENDIAN "little"
-#endif /* not WORDS_BIGENDIAN */
+#ifndef BYTE_ORDER
+# if defined(WORDS_BIGENDIAN)
+# define ARCH_ENDIAN "big"
+# else /* not WORDS_BIGENDIAN */
+# define ARCH_ENDIAN "little"
+# endif /* not WORDS_BIGENDIAN */
+#else
+# if BYTE_ORDER == BIG_ENDIAN
+# define ARCH_ENDIAN "big"
+# else
+# define ARCH_ENDIAN "little"
+# endif
+#endif
/*
* Actions to take if HAVE_SYS_TYPES_H is defined.
@@ -209,12 +221,6 @@ struct sigevent;
* Actions to take if HAVE_FCNTL_H is defined.
*/
#if HAVE_FCNTL_H
-# ifdef HAVE_LINUX_LOOP_H
-/* so I can mount large files as loop devices */
-/* XXX: need to move these two LARGEFILE defines to a better place */
-# define _LARGEFILE64_SOURCE
-# define __USE_LARGEFILE64
-# endif /* HAVE_LINUX_LOOP_H */
# include <fcntl.h>
#endif /* HAVE_FCNTL_H */
@@ -318,14 +324,6 @@ typedef bool_t (*xdrproc_t) __P ((XDR *, __ptr_t, ...));
#endif /* HAVE_MNTENT_H */
/*
- * Actions to take if <sys/errno.h> exists.
- */
-#ifdef HAVE_SYS_ERRNO_H
-# include <sys/errno.h>
-extern int errno;
-#endif /* HAVE_SYS_ERRNO_H */
-
-/*
* Actions to take if <sys/fsid.h> exists.
*/
#ifdef HAVE_SYS_FSID_H
@@ -864,6 +862,10 @@ struct sockaddr_dl;
#ifdef HAVE_SYS_FS_TMP_H
# include <sys/fs/tmp.h>
#endif /* HAVE_SYS_FS_TMP_H */
+#ifdef HAVE_FS_TMPFS_TMPFS_ARGS_H
+# include <fs/tmpfs/tmpfs_args.h>
+#endif /* HAVE_FS_TMPFS_TMPFS_ARGS_H */
+
/*
* Actions to take if <sys/fs/ufs_mount.h> exists.
@@ -886,6 +888,9 @@ struct sockaddr_dl;
#ifdef HAVE_SYS_FS_EFS_CLNT_H
# include <sys/fs/efs_clnt.h>
#endif /* HAVE_SYS_FS_EFS_CLNT_H */
+#ifdef HAVE_FS_EFS_EFS_MOUNT_H
+# include <fs/efs/efs_mount.h>
+#endif /* HAVE_FS_EFS_EFS_MOUNT_H */
/*
* Actions to take if <sys/fs/xfs_clnt.h> exists.
@@ -927,6 +932,14 @@ struct sockaddr_dl;
*/
#ifdef HAVE_ERRNO_H
# include <errno.h>
+#else
+/*
+ * Actions to take if <sys/errno.h> exists.
+ */
+# ifdef HAVE_SYS_ERRNO_H
+# include <sys/errno.h>
+extern int errno;
+# endif /* HAVE_SYS_ERRNO_H */
#endif /* HAVE_ERRNO_H */
/*
@@ -958,6 +971,13 @@ struct sockaddr_dl;
#endif /* HAVE_ISOFS_CD9660_CD9660_MOUNT_H */
/*
+ * Actions to take if <fs/udf/udf_mount.h> exists.
+ */
+#ifdef HAVE_FS_UDF_UDF_MOUNT_H
+# include <fs/udf/udf_mount.h>
+#endif /* HAVE_FS_UDF_UDF_MOUNT_H */
+
+/*
* Actions to take if <mount.h> exists.
*/
#ifdef HAVE_MOUNT_H
@@ -1517,14 +1537,6 @@ extern unsigned int sleep(unsigned int seconds);
extern int strcasecmp(const char *s1, const char *s2);
#endif /* not HAVE_EXTERN_STRCASECMP */
-#ifndef HAVE_EXTERN_STRDUP
-/*
- * define this extern even if function does not exist, for it will
- * be filled in by libamu/strdup.c
- */
-extern char *strdup(const char *s);
-#endif /* not HAVE_EXTERN_STRDUP */
-
#ifndef HAVE_EXTERN_STRLCAT
/*
* define this extern even if function does not exist, for it will
diff --git a/contrib/amd/include/am_utils.h b/contrib/amd/include/am_utils.h
index b7e55ce33e2c..0de881ad8c85 100644
--- a/contrib/amd/include/am_utils.h
+++ b/contrib/amd/include/am_utils.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2006 Erez Zadok
+ * Copyright (c) 1997-2014 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -16,11 +16,7 @@
* 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 acknowledgment:
- * 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
+ * 3. 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.
*
@@ -109,8 +105,14 @@
#define XLOG_DEBUG 0x0020
#define XLOG_MAP 0x0040
#define XLOG_STATS 0x0080
-#define XLOG_DEFSTR "all,nomap,nostats" /* Default log options */
+/* log option compositions */
+#define XLOG_MASK 0x00ff /* mask for all flags */
+#define XLOG_MANDATORY (XLOG_FATAL|XLOG_ERROR) /* cannot turn these off */
#define XLOG_ALL (XLOG_FATAL|XLOG_ERROR|XLOG_USER|XLOG_WARNING|XLOG_INFO|XLOG_MAP|XLOG_STATS)
+/* default: fatal + error + user + warning + info */
+#define XLOG_DEFAULT (XLOG_MASK & (XLOG_ALL & ~XLOG_MAP & ~XLOG_STATS))
+
+/* default: no logging options */
#define NO_SUBNET "notknown" /* default subnet name for no subnet */
#define NEXP_AP (1022) /* gdmr: was 254 */
@@ -258,8 +260,6 @@ extern pid_t am_mypid;
extern int foreground; /* Foreground process */
extern int orig_umask; /* umask() on startup */
-extern int xlog_level; /* Logging level */
-extern int xlog_level_init;
extern serv_state amd_state; /* Should we go now */
extern struct in_addr myipaddr; /* (An) IP address of this host */
extern struct opt_tab xlog_opt[];
@@ -278,15 +278,17 @@ extern char *get_version_string(void);
extern char *inet_dquad(char *, size_t, u_long);
extern char *print_wires(void);
extern char *str3cat(char *, char *, char *, char *);
+extern char *strvcat(const char *, ...);
extern char *strealloc(char *, char *);
extern char *strip_selectors(char *, char *);
extern char *strnsave(const char *, int);
extern int amu_close(int fd);
extern int bind_resv_port(int, u_short *);
-extern int cmdoption(char *, struct opt_tab *, int *);
+extern int cmdoption(char *, struct opt_tab *, u_int *);
extern int compute_automounter_mount_flags(mntent_t *);
extern int compute_mount_flags(mntent_t *);
-extern int get_amd_program_number(void);
+extern void discard_nfs_args(void *, u_long);
+extern u_long get_amd_program_number(void);
extern int getcreds(struct svc_req *, uid_t *, gid_t *, SVCXPRT *);
extern int hasmntval(mntent_t *, char *);
extern unsigned int hasmntvalerr(mntent_t *, char *, int *);
@@ -300,6 +302,9 @@ extern int make_rpc_packet(char *, int, u_long, struct rpc_msg *, voidp, XDRPROC
extern int mkdirs(char *, int);
extern int mount_fs(mntent_t *, int, caddr_t, int, MTYPE_TYPE, u_long, const char *, const char *, int);
extern void nfs_program_2(struct svc_req *rqstp, SVCXPRT *transp);
+extern void nfs_program_3(struct svc_req *rqstp, SVCXPRT *transp);
+#define get_nfs_dispatcher_version(a) \
+ ((a) == nfs_program_2 ? NFS_VERSION : NFS_VERSION3)
extern int pickup_rpc_reply(voidp, int, voidp, XDRPROC_T_TYPE);
extern int switch_option(char *);
extern int switch_to_logfile(char *logfile, int orig_umask, int truncate_log);
@@ -320,14 +325,16 @@ extern void plog(int, const char *,...)
__attribute__ ((__format__ (__printf__, 2, 3)));
extern void rmdirs(char *);
extern void rpc_msg_init(struct rpc_msg *, u_long, u_long, u_long);
-extern void set_amd_program_number(int program);
+extern void set_amd_program_number(u_long program);
extern void show_opts(int ch, struct opt_tab *);
extern void unregister_amq(void);
extern voidp xmalloc(int);
extern voidp xrealloc(voidp, int);
extern voidp xzalloc(int);
+extern char *xstrdup(const char *);
extern int check_pmap_up(char *host, struct sockaddr_in* sin);
-extern u_long get_nfs_version(char *host, struct sockaddr_in *sin, u_long nfs_version, const char *proto);
+extern u_long get_nfs_version(char *host, struct sockaddr_in *sin, u_long nfs_version, const char *proto, u_long def);
+extern int nfs_valid_version(u_long vers);
extern long get_server_pid(void);
extern void setup_sighandler(int signum, void (*handler)(int));
extern time_t clocktime(nfstime *nt);
@@ -367,9 +374,10 @@ extern void write_mntent(mntent_t *, const char *);
extern int syslogging;
#endif /* defined(HAVE_SYSLOG_H) || defined(HAVE_SYS_SYSLOG_H) */
-extern void compute_nfs_args(nfs_args_t *nap, mntent_t *mntp, int genflags, struct netconfig *nfsncp, struct sockaddr_in *ip_addr, u_long nfs_version, char *nfs_proto, am_nfs_handle_t *fhp, char *host_name, char *fs_name);
+extern void compute_nfs_args(void *nap, mntent_t *mntp, int genflags, struct netconfig *nfsncp, struct sockaddr_in *ip_addr, u_long nfs_version, char *nfs_proto, am_nfs_handle_t *fhp, char *host_name, char *fs_name);
+extern void destroy_nfs_args(void *nap, u_long nfs_version);
extern int create_amq_service(int *udp_soAMQp, SVCXPRT **udp_amqpp, struct netconfig **udp_amqncpp, int *tcp_soAMQp, SVCXPRT **tcp_amqpp, struct netconfig **tcp_amqncpp, u_short preferred_amq_port);
-extern int create_nfs_service(int *soNFSp, u_short *nfs_portp, SVCXPRT **nfs_xprtp, void (*dispatch_fxn)(struct svc_req *rqstp, SVCXPRT *transp));
+extern int create_nfs_service(int *soNFSp, u_short *nfs_portp, SVCXPRT **nfs_xprtp, void (*dispatch_fxn)(struct svc_req *rqstp, SVCXPRT *transp), u_long nfs_version);
extern int amu_svc_register(SVCXPRT *, u_long, u_long, void (*)(struct svc_req *, SVCXPRT *), u_long, struct netconfig *);
#ifdef HAVE_TRANSPORT_TYPE_TLI
@@ -392,8 +400,14 @@ extern int unregister_autofs_service(char *autofs_conftype);
/*
- * Network File System: the new generation
- * NFS V.3
+ * Network File System: the old faithful generation NFS V.2
+ */
+#ifndef NFS_VERSION2
+# define NFS_VERSION2 ((u_int) 2)
+#endif /* not NFS_VERSION2 */
+
+/*
+ * Network File System: the not so new anymore generation NFS V.3
*/
#ifdef HAVE_FS_NFS3
# ifndef NFS_VERSION3
@@ -401,6 +415,14 @@ extern int unregister_autofs_service(char *autofs_conftype);
# endif /* not NFS_VERSION3 */
#endif /* HAVE_FS_NFS3 */
+/*
+ * Network File System: the new generation NFS V.4
+ */
+#ifdef HAVE_FS_NFS4
+# ifndef NFS_VERSION4
+# define NFS_VERSION4 ((u_int) 4)
+# endif /* not NFS_VERSION4 */
+#endif /* HAVE_FS_NFS4 */
/**************************************************************************/
/*** DEBUGGING ***/
@@ -412,30 +434,32 @@ extern int unregister_autofs_service(char *autofs_conftype);
#ifdef DEBUG
-# define D_ALL (~(D_MTAB|D_HRTIME|D_XDRTRACE|D_DAEMON|D_FORK|D_AMQ))
-# define D_DAEMON 0x0001 /* Don't enter daemon mode */
+# define D_DAEMON 0x0001 /* Enter daemon mode */
# define D_TRACE 0x0002 /* Do protocol trace */
# define D_FULL 0x0004 /* Do full trace */
# define D_MTAB 0x0008 /* Use local mtab */
-# define D_AMQ 0x0010 /* Don't register amq program */
+# define D_AMQ 0x0010 /* Register amq program */
# define D_STR 0x0020 /* Debug string munging */
# ifdef DEBUG_MEM
# define D_MEM 0x0040 /* Trace memory allocations */
# else /* not DEBUG_MEM */
# define D_MEM 0x0000 /* Dummy */
# endif /* not DEBUG_MEM */
-# define D_FORK 0x0080 /* Don't fork server */
- /* info service specific debugging (hesiod, nis, etc) */
-# define D_INFO 0x0100
+# define D_FORK 0x0080 /* Fork server (hlfsd only) */
+# define D_INFO 0x0100 /* info service specific debugging (hesiod, nis, etc) */
# define D_HRTIME 0x0200 /* Print high resolution time stamps */
# define D_XDRTRACE 0x0400 /* Trace xdr routines */
# define D_READDIR 0x0800 /* Show browsable_dir progress */
-
-/*
- * Test mode is test mode: don't daemonize, don't register amq, don't fork,
- * don't touch system mtab, etc.
- */
-# define D_TEST (~(D_MEM|D_STR|D_XDRTRACE))
+/* debug option compositions */
+# define D_MASK 0x0fff /* mask of known flags */
+# define D_BASIC (D_TRACE|D_FULL|D_STR|D_MEM|D_INFO|D_XDRTRACE|D_READDIR)
+# define D_CONTROL (D_DAEMON|D_AMQ|D_FORK)
+/* immutable flags: cannot be changed via "amq -D" */
+# define D_IMMUTABLE (D_MTAB | D_CONTROL)
+# define D_ALL (D_BASIC | D_CONTROL)
+# define D_DEFAULT (D_MASK & D_ALL & ~D_XDRTRACE)
+/* test mode: nodaemon, noamq, nofork, (local) mtab */
+# define D_TEST (D_BASIC | D_MTAB)
# define amuDebug(x) (debug_flags & (x))
# define dlog if (amuDebug(D_FULL)) dplog
@@ -460,34 +484,49 @@ extern void malloc_verify(void);
# endif /* not DEBUG_MEM */
/* functions that depend solely on debugging */
-extern void print_nfs_args(const nfs_args_t *nap, u_long nfs_version);
+extern void print_nfs_args(const void *, u_long nfs_version);
extern int debug_option (char *opt);
extern void dplog(const char *fmt, ...)
__attribute__ ((__format__ (__printf__, 1, 2)));
#else /* not DEBUG */
+/* set dummy flags to zero */
+# define D_DAEMON 0x0001 /* Enter daemon mode */
+# define D_TRACE 0x0000 /* dummy: Do protocol trace */
+# define D_FULL 0x0000 /* dummy: Do full trace */
+# define D_MTAB 0x0000 /* dummy: Use local mtab */
+# define D_AMQ 0x0010 /* Register amq program */
+# define D_STR 0x0000 /* dummy: Debug string munging */
+# define D_MEM 0x0000 /* dummy: Trace memory allocations */
+# define D_FORK 0x0080 /* Fork server (hlfsd only) */
+# define D_INFO 0x0000 /* dummy: info service debugging */
+# define D_HRTIME 0x0000 /* dummy: hi-res time stamps */
+# define D_XDRTRACE 0x0000 /* dummy: Trace xdr routines */
+# define D_READDIR 0x0000 /* dummy: browsable_dir progress */
+# define D_CONTROL (D_DAEMON|D_AMQ|D_FORK)
+# define amuDebug(x) (debug_flags & (x))
/*
* If not debugging, then also reset the pointer.
* It's safer -- and besides, free() should do that anyway.
*/
-# define XFREE(x) do { free((voidp)x); x = NULL;} while (0)
-
-#define amuDebug(x) (0)
+# define XFREE(x) do { free((voidp)x); x = NULL;} while (0)
-#ifdef __GNUC__
-#define dlog(fmt...)
-#else /* not __GNUC__ */
+# if defined(HAVE_GCC_VARARGS_MACROS)
+# define dlog(fmt...)
+# elif defined(HAVE_C99_VARARGS_MACROS)
+# define dlog(...)
+# else /* no c99 varargs */
/* this define means that we CCP leaves code behind the (list,of,args) */
-#define dlog
-#endif /* not __GNUC__ */
+# define dlog
+# endif /* no c99 varargs */
-#define print_nfs_args(nap, nfs_version)
-#define debug_option(x) (1)
+# define print_nfs_args(nap, nfs_version)
+# define debug_option(x) (1)
#endif /* not DEBUG */
-extern int debug_flags; /* Debug options */
+extern u_int debug_flags; /* Debug options */
extern struct opt_tab dbg_opt[];
/**************************************************************************/
diff --git a/contrib/amd/include/am_xdr_func.h b/contrib/amd/include/am_xdr_func.h
index c4159188c799..3659942ecb6a 100644
--- a/contrib/amd/include/am_xdr_func.h
+++ b/contrib/amd/include/am_xdr_func.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2006 Erez Zadok
+ * Copyright (c) 1997-2014 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -16,11 +16,7 @@
* 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 acknowledgment:
- * 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
+ * 3. 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.
*
@@ -43,8 +39,26 @@
#ifdef HAVE_FS_NFS3
+#define AM_MOUNTVERS3 ((unsigned long)(3))
+
#define AM_FHSIZE3 64 /* size in bytes of a file handle (v3) */
-#define AM_MOUNTVERS3 ((unsigned long)(3))
+#define AM_NFS3_WRITEVERFSIZE 8
+#define AM_NFS3_CREATEVERFSIZE 8
+#define AM_NFS3_COOKIEVERFSIZE 8
+#define AM_ACCESS3_READ 0x0001
+#define AM_ACCESS3_LOOKUP 0x0002
+#define AM_ACCESS3_MODIFY 0x0004
+#define AM_ACCESS3_EXTEND 0x0008
+#define AM_ACCESS3_DELETE 0x0010
+#define AM_ACCESS3_EXECUTE 0x0020
+#define AM_FSF3_LINK 0x0001
+#define AM_FSF3_SYMLINK 0x0002
+#define AM_FSF3_HOMOGENEOUS 0x0008
+#define AM_FSF3_CANSETTIME 0x0010
+
+typedef char am_cookieverf3[AM_NFS3_COOKIEVERFSIZE];
+
+typedef uint64 am_cookie3;
/* NFSv3 handle */
struct am_nfs_fh3 {
@@ -131,37 +145,830 @@ struct am_diropargs3 {
};
typedef struct am_diropargs3 am_diropargs3;
+enum am_ftype3 {
+ AM_NF3REG = 1,
+ AM_NF3DIR = 2,
+ AM_NF3BLK = 3,
+ AM_NF3CHR = 4,
+ AM_NF3LNK = 5,
+ AM_NF3SOCK = 6,
+ AM_NF3FIFO = 7,
+};
+typedef enum am_ftype3 am_ftype3;
+
+typedef u_int am_mode3;
+
+typedef u_int am_uid3;
+
+typedef u_int am_gid3;
+
+typedef uint64 am_size3;
+
+typedef uint64 am_fileid3;
+
+struct am_specdata3 {
+ u_int specdata1;
+ u_int specdata2;
+};
+typedef struct am_specdata3 am_specdata3;
+
+struct am_nfstime3 {
+ u_int seconds;
+ u_int nseconds;
+};
+typedef struct am_nfstime3 am_nfstime3;
+
+struct am_fattr3 {
+ am_ftype3 type;
+ am_mode3 mode;
+ u_int nlink;
+ am_uid3 uid;
+ am_gid3 gid;
+ am_size3 size;
+ am_size3 used;
+ am_specdata3 rdev;
+ uint64 fsid;
+ am_fileid3 fileid;
+ am_nfstime3 atime;
+ am_nfstime3 mtime;
+ am_nfstime3 ctime;
+};
+typedef struct am_fattr3 am_fattr3;
+
+struct am_post_op_attr {
+ bool_t attributes_follow;
+ union {
+ am_fattr3 attributes;
+ } am_post_op_attr_u;
+};
+typedef struct am_post_op_attr am_post_op_attr;
+
+enum am_stable_how {
+ AM_UNSTABLE = 0,
+ AM_DATA_SYNC = 1,
+ AM_FILE_SYNC = 2,
+};
+typedef enum am_stable_how am_stable_how;
+
+typedef uint64 am_offset3;
+
+typedef u_int am_count3;
+
+struct am_wcc_attr {
+ am_size3 size;
+ am_nfstime3 mtime;
+ am_nfstime3 ctime;
+};
+typedef struct am_wcc_attr am_wcc_attr;
+
+struct am_pre_op_attr {
+ bool_t attributes_follow;
+ union {
+ am_wcc_attr attributes;
+ } am_pre_op_attr_u;
+};
+typedef struct am_pre_op_attr am_pre_op_attr;
+
+struct am_wcc_data {
+ am_pre_op_attr before;
+ am_post_op_attr after;
+};
+typedef struct am_wcc_data am_wcc_data;
+
+struct am_WRITE3args {
+ am_nfs_fh3 file;
+ am_offset3 offset;
+ am_count3 count;
+ am_stable_how stable;
+ struct {
+ u_int data_len;
+ char *data_val;
+ } data;
+};
+typedef struct am_WRITE3args am_WRITE3args;
+
+typedef char am_writeverf3[AM_NFS3_WRITEVERFSIZE];
+
+struct am_WRITE3resok {
+ am_wcc_data file_wcc;
+ am_count3 count;
+ am_stable_how committed;
+ am_writeverf3 verf;
+};
+typedef struct am_WRITE3resok am_WRITE3resok;
+
+struct am_WRITE3resfail {
+ am_wcc_data file_wcc;
+};
+typedef struct am_WRITE3resfail am_WRITE3resfail;
+
+struct am_WRITE3res {
+ am_nfsstat3 status;
+ union {
+ am_WRITE3resok ok;
+ am_WRITE3resfail fail;
+ } res_u;
+};
+typedef struct am_WRITE3res am_WRITE3res;
+
struct am_LOOKUP3args {
- am_diropargs3 what;
+ am_diropargs3 what;
};
typedef struct am_LOOKUP3args am_LOOKUP3args;
struct am_LOOKUP3resok {
- am_nfs_fh3 object;
-#if 0
- post_op_attr obj_attributes;
- post_op_attr dir_attributes;
-#endif
+ am_nfs_fh3 object;
+ am_post_op_attr obj_attributes;
+ am_post_op_attr dir_attributes;
};
typedef struct am_LOOKUP3resok am_LOOKUP3resok;
struct am_LOOKUP3resfail {
-#if 0
- post_op_attr dir_attributes;
-#else
- char dummy; /* cannot have an empty declaration */
-#endif
+ am_post_op_attr dir_attributes;
};
typedef struct am_LOOKUP3resfail am_LOOKUP3resfail;
struct am_LOOKUP3res {
- am_nfsstat3 status;
- union {
- am_LOOKUP3resok ok;
- am_LOOKUP3resfail fail;
- } res_u;
+ am_nfsstat3 status;
+ union {
+ am_LOOKUP3resok ok;
+ am_LOOKUP3resfail fail;
+ } res_u;
};
typedef struct am_LOOKUP3res am_LOOKUP3res;
+
+struct am_COMMIT3args {
+ am_nfs_fh3 file;
+ am_offset3 offset;
+ am_count3 count;
+};
+typedef struct am_COMMIT3args am_COMMIT3args;
+
+struct am_COMMIT3resok {
+ am_wcc_data file_wcc;
+ am_writeverf3 verf;
+};
+typedef struct am_COMMIT3resok am_COMMIT3resok;
+
+struct am_COMMIT3resfail {
+ am_wcc_data file_wcc;
+};
+typedef struct am_COMMIT3resfail am_COMMIT3resfail;
+
+struct am_COMMIT3res {
+ am_nfsstat3 status;
+ union {
+ am_COMMIT3resok ok;
+ am_COMMIT3resfail fail;
+ } res_u;
+};
+typedef struct am_COMMIT3res am_COMMIT3res;
+
+struct am_ACCESS3args {
+ am_nfs_fh3 object;
+ u_int access;
+};
+typedef struct am_ACCESS3args am_ACCESS3args;
+
+struct am_ACCESS3resok {
+ am_post_op_attr obj_attributes;
+ u_int access;
+};
+typedef struct am_ACCESS3resok am_ACCESS3resok;
+
+struct am_ACCESS3resfail {
+ am_post_op_attr obj_attributes;
+};
+typedef struct am_ACCESS3resfail am_ACCESS3resfail;
+
+struct am_ACCESS3res {
+ am_nfsstat3 status;
+ union {
+ am_ACCESS3resok ok;
+ am_ACCESS3resfail fail;
+ } res_u;
+};
+typedef struct am_ACCESS3res am_ACCESS3res;
+
+struct am_GETATTR3args {
+ am_nfs_fh3 object;
+};
+typedef struct am_GETATTR3args am_GETATTR3args;
+
+struct am_GETATTR3resok {
+ am_fattr3 obj_attributes;
+};
+typedef struct am_GETATTR3resok am_GETATTR3resok;
+
+struct am_GETATTR3res {
+ am_nfsstat3 status;
+ union {
+ am_GETATTR3resok ok;
+ } res_u;
+};
+typedef struct am_GETATTR3res am_GETATTR3res;
+
+enum am_time_how {
+ AM_DONT_CHANGE = 0,
+ AM_SET_TO_SERVER_TIME = 1,
+ AM_SET_TO_CLIENT_TIME = 2,
+};
+typedef enum am_time_how am_time_how;
+
+struct am_set_mode3 {
+ bool_t set_it;
+ union {
+ am_mode3 mode;
+ } am_set_mode3_u;
+};
+typedef struct am_set_mode3 am_set_mode3;
+
+struct am_set_uid3 {
+ bool_t set_it;
+ union {
+ am_uid3 uid;
+ } am_set_uid3_u;
+};
+typedef struct am_set_uid3 am_set_uid3;
+
+struct am_set_gid3 {
+ bool_t set_it;
+ union {
+ am_gid3 gid;
+ } am_set_gid3_u;
+};
+typedef struct am_set_gid3 am_set_gid3;
+
+struct am_set_size3 {
+ bool_t set_it;
+ union {
+ am_size3 size;
+ } am_set_size3_u;
+};
+typedef struct am_set_size3 am_set_size3;
+
+struct am_set_atime {
+ am_time_how set_it;
+ union {
+ am_nfstime3 atime;
+ } am_set_atime_u;
+};
+typedef struct am_set_atime am_set_atime;
+
+struct am_set_mtime {
+ am_time_how set_it;
+ union {
+ am_nfstime3 mtime;
+ } am_set_mtime_u;
+};
+typedef struct am_set_mtime am_set_mtime;
+
+struct am_sattr3 {
+ am_set_mode3 mode;
+ am_set_uid3 uid;
+ am_set_gid3 gid;
+ am_set_size3 size;
+ am_set_atime atime;
+ am_set_mtime mtime;
+};
+typedef struct am_sattr3 am_sattr3;
+
+enum am_createmode3 {
+ AM_UNCHECKED = 0,
+ AM_GUARDED = 1,
+ AM_EXCLUSIVE = 2,
+};
+typedef enum am_createmode3 am_createmode3;
+
+typedef char am_createverf3[AM_NFS3_CREATEVERFSIZE];
+
+struct am_createhow3 {
+ am_createmode3 mode;
+ union {
+ am_sattr3 obj_attributes;
+ am_sattr3 g_obj_attributes;
+ am_createverf3 verf;
+ } am_createhow3_u;
+};
+typedef struct am_createhow3 am_createhow3;
+
+struct am_CREATE3args {
+ am_diropargs3 where;
+ am_createhow3 how;
+};
+typedef struct am_CREATE3args am_CREATE3args;
+
+struct am_post_op_fh3 {
+ bool_t handle_follows;
+ union {
+ am_nfs_fh3 handle;
+ } am_post_op_fh3_u;
+};
+typedef struct am_post_op_fh3 am_post_op_fh3;
+
+struct am_CREATE3resok {
+ am_post_op_fh3 obj;
+ am_post_op_attr obj_attributes;
+ am_wcc_data dir_wcc;
+};
+typedef struct am_CREATE3resok am_CREATE3resok;
+
+struct am_CREATE3resfail {
+ am_wcc_data dir_wcc;
+};
+typedef struct am_CREATE3resfail am_CREATE3resfail;
+
+struct am_CREATE3res {
+ am_nfsstat3 status;
+ union {
+ am_CREATE3resok ok;
+ am_CREATE3resfail fail;
+ } res_u;
+};
+typedef struct am_CREATE3res am_CREATE3res;
+
+struct am_REMOVE3args {
+ am_diropargs3 object;
+};
+typedef struct am_REMOVE3args am_REMOVE3args;
+
+struct am_REMOVE3resok {
+ am_wcc_data dir_wcc;
+};
+typedef struct am_REMOVE3resok am_REMOVE3resok;
+
+struct am_REMOVE3resfail {
+ am_wcc_data dir_wcc;
+};
+typedef struct am_REMOVE3resfail am_REMOVE3resfail;
+
+struct am_REMOVE3res {
+ am_nfsstat3 status;
+ union {
+ am_REMOVE3resok ok;
+ am_REMOVE3resfail fail;
+ } res_u;
+};
+typedef struct am_REMOVE3res am_REMOVE3res;
+
+struct am_READ3args {
+ am_nfs_fh3 file;
+ am_offset3 offset;
+ am_count3 count;
+};
+typedef struct am_READ3args am_READ3args;
+
+struct am_READ3resok {
+ am_post_op_attr file_attributes;
+ am_count3 count;
+ bool_t eof;
+ struct {
+ u_int data_len;
+ char *data_val;
+ } data;
+};
+typedef struct am_READ3resok am_READ3resok;
+
+struct am_READ3resfail {
+ am_post_op_attr file_attributes;
+};
+typedef struct am_READ3resfail am_READ3resfail;
+
+struct am_READ3res {
+ am_nfsstat3 status;
+ union {
+ am_READ3resok ok;
+ am_READ3resfail fail;
+ } res_u;
+};
+typedef struct am_READ3res am_READ3res;
+
+struct am_FSINFO3args {
+ am_nfs_fh3 fsroot;
+};
+typedef struct am_FSINFO3args am_FSINFO3args;
+
+struct am_FSINFO3resok {
+ am_post_op_attr obj_attributes;
+ u_int rtmax;
+ u_int rtpref;
+ u_int rtmult;
+ u_int wtmax;
+ u_int wtpref;
+ u_int wtmult;
+ u_int dtpref;
+ am_size3 maxfilesize;
+ am_nfstime3 time_delta;
+ u_int properties;
+};
+typedef struct am_FSINFO3resok am_FSINFO3resok;
+
+struct am_FSINFO3resfail {
+ am_post_op_attr obj_attributes;
+};
+typedef struct am_FSINFO3resfail am_FSINFO3resfail;
+
+struct am_FSINFO3res {
+ am_nfsstat3 status;
+ union {
+ am_FSINFO3resok ok;
+ am_FSINFO3resfail fail;
+ } res_u;
+};
+typedef struct am_FSINFO3res am_FSINFO3res;
+
+struct am_FSSTAT3args {
+ am_nfs_fh3 fsroot;
+};
+typedef struct am_FSSTAT3args am_FSSTAT3args;
+
+struct am_FSSTAT3resok {
+ am_post_op_attr obj_attributes;
+ am_size3 tbytes;
+ am_size3 fbytes;
+ am_size3 abytes;
+ am_size3 tfiles;
+ am_size3 ffiles;
+ am_size3 afiles;
+ u_int invarsec;
+};
+typedef struct am_FSSTAT3resok am_FSSTAT3resok;
+
+struct am_FSSTAT3resfail {
+ am_post_op_attr obj_attributes;
+};
+typedef struct am_FSSTAT3resfail am_FSSTAT3resfail;
+
+struct am_FSSTAT3res {
+ am_nfsstat3 status;
+ union {
+ am_FSSTAT3resok ok;
+ am_FSSTAT3resfail fail;
+ } res_u;
+};
+typedef struct am_FSSTAT3res am_FSSTAT3res;
+
+struct am_PATHCONF3args {
+ am_nfs_fh3 object;
+};
+typedef struct am_PATHCONF3args am_PATHCONF3args;
+
+struct am_PATHCONF3resok {
+ am_post_op_attr obj_attributes;
+ u_int linkmax;
+ u_int name_max;
+ bool_t no_trunc;
+ bool_t chown_restricted;
+ bool_t case_insensitive;
+ bool_t case_preserving;
+};
+typedef struct am_PATHCONF3resok am_PATHCONF3resok;
+
+struct am_PATHCONF3resfail {
+ am_post_op_attr obj_attributes;
+};
+typedef struct am_PATHCONF3resfail am_PATHCONF3resfail;
+
+struct am_PATHCONF3res {
+ am_nfsstat3 status;
+ union {
+ am_PATHCONF3resok ok;
+ am_PATHCONF3resfail fail;
+ } res_u;
+};
+typedef struct am_PATHCONF3res am_PATHCONF3res;
+
+typedef char *am_nfspath3;
+
+struct am_symlinkdata3 {
+ am_sattr3 symlink_attributes;
+ am_nfspath3 symlink_data;
+};
+typedef struct am_symlinkdata3 am_symlinkdata3;
+
+struct am_SYMLINK3args {
+ am_diropargs3 where;
+ am_symlinkdata3 symlink;
+};
+typedef struct am_SYMLINK3args am_SYMLINK3args;
+
+struct am_SYMLINK3resok {
+ am_post_op_fh3 obj;
+ am_post_op_attr obj_attributes;
+ am_wcc_data dir_wcc;
+};
+typedef struct am_SYMLINK3resok am_SYMLINK3resok;
+
+struct am_SYMLINK3resfail {
+ am_wcc_data dir_wcc;
+};
+typedef struct am_SYMLINK3resfail am_SYMLINK3resfail;
+
+struct am_SYMLINK3res {
+ am_nfsstat3 status;
+ union {
+ am_SYMLINK3resok ok;
+ am_SYMLINK3resfail fail;
+ } res_u;
+};
+typedef struct am_SYMLINK3res am_SYMLINK3res;
+
+struct am_READLINK3args {
+ am_nfs_fh3 symlink;
+};
+typedef struct am_READLINK3args am_READLINK3args;
+
+struct am_READLINK3resok {
+ am_post_op_attr symlink_attributes;
+ am_nfspath3 data;
+};
+typedef struct am_READLINK3resok am_READLINK3resok;
+
+struct am_READLINK3resfail {
+ am_post_op_attr symlink_attributes;
+};
+typedef struct am_READLINK3resfail am_READLINK3resfail;
+
+struct am_READLINK3res {
+ am_nfsstat3 status;
+ union {
+ am_READLINK3resok ok;
+ am_READLINK3resfail fail;
+ } res_u;
+};
+typedef struct am_READLINK3res am_READLINK3res;
+
+struct am_devicedata3 {
+ am_sattr3 dev_attributes;
+ am_specdata3 spec;
+};
+typedef struct am_devicedata3 am_devicedata3;
+
+struct am_mknoddata3 {
+ am_ftype3 type;
+ union {
+ am_devicedata3 chr_device;
+ am_devicedata3 blk_device;
+ am_sattr3 sock_attributes;
+ am_sattr3 pipe_attributes;
+ } am_mknoddata3_u;
+};
+typedef struct am_mknoddata3 am_mknoddata3;
+
+struct am_MKNOD3args {
+ am_diropargs3 where;
+ am_mknoddata3 what;
+};
+typedef struct am_MKNOD3args am_MKNOD3args;
+
+struct am_MKNOD3resok {
+ am_post_op_fh3 obj;
+ am_post_op_attr obj_attributes;
+ am_wcc_data dir_wcc;
+};
+typedef struct am_MKNOD3resok am_MKNOD3resok;
+
+struct am_MKNOD3resfail {
+ am_wcc_data dir_wcc;
+};
+typedef struct am_MKNOD3resfail am_MKNOD3resfail;
+
+struct am_MKNOD3res {
+ am_nfsstat3 status;
+ union {
+ am_MKNOD3resok ok;
+ am_MKNOD3resfail fail;
+ } res_u;
+};
+typedef struct am_MKNOD3res am_MKNOD3res;
+
+struct am_MKDIR3args {
+ am_diropargs3 where;
+ am_sattr3 attributes;
+};
+typedef struct am_MKDIR3args am_MKDIR3args;
+
+struct am_MKDIR3resok {
+ am_post_op_fh3 obj;
+ am_post_op_attr obj_attributes;
+ am_wcc_data dir_wcc;
+};
+typedef struct am_MKDIR3resok am_MKDIR3resok;
+
+struct am_MKDIR3resfail {
+ am_wcc_data dir_wcc;
+};
+typedef struct am_MKDIR3resfail am_MKDIR3resfail;
+
+struct am_MKDIR3res {
+ am_nfsstat3 status;
+ union {
+ am_MKDIR3resok ok;
+ am_MKDIR3resfail fail;
+ } res_u;
+};
+typedef struct am_MKDIR3res am_MKDIR3res;
+
+struct am_RMDIR3args {
+ am_diropargs3 object;
+};
+typedef struct am_RMDIR3args am_RMDIR3args;
+
+struct am_RMDIR3resok {
+ am_wcc_data dir_wcc;
+};
+typedef struct am_RMDIR3resok am_RMDIR3resok;
+
+struct am_RMDIR3resfail {
+ am_wcc_data dir_wcc;
+};
+typedef struct am_RMDIR3resfail am_RMDIR3resfail;
+
+struct am_RMDIR3res {
+ am_nfsstat3 status;
+ union {
+ am_RMDIR3resok ok;
+ am_RMDIR3resfail fail;
+ } res_u;
+};
+typedef struct am_RMDIR3res am_RMDIR3res;
+
+struct am_RENAME3args {
+ am_diropargs3 from;
+ am_diropargs3 to;
+};
+typedef struct am_RENAME3args am_RENAME3args;
+
+struct am_RENAME3resok {
+ am_wcc_data fromdir_wcc;
+ am_wcc_data todir_wcc;
+};
+typedef struct am_RENAME3resok am_RENAME3resok;
+
+struct am_RENAME3resfail {
+ am_wcc_data fromdir_wcc;
+ am_wcc_data todir_wcc;
+};
+typedef struct am_RENAME3resfail am_RENAME3resfail;
+
+struct am_RENAME3res {
+ am_nfsstat3 status;
+ union {
+ am_RENAME3resok ok;
+ am_RENAME3resfail fail;
+ } res_u;
+};
+typedef struct am_RENAME3res am_RENAME3res;
+
+struct am_READDIRPLUS3args {
+ am_nfs_fh3 dir;
+ am_cookie3 cookie;
+ am_cookieverf3 cookieverf;
+ am_count3 dircount;
+ am_count3 maxcount;
+};
+typedef struct am_READDIRPLUS3args am_READDIRPLUS3args;
+
+struct am_entryplus3 {
+ am_fileid3 fileid;
+ am_filename3 name;
+ am_cookie3 cookie;
+ am_post_op_attr name_attributes;
+ am_post_op_fh3 name_handle;
+ struct am_entryplus3 *nextentry;
+};
+typedef struct am_entryplus3 am_entryplus3;
+
+struct am_dirlistplus3 {
+ am_entryplus3 *entries;
+ bool_t eof;
+};
+typedef struct am_dirlistplus3 am_dirlistplus3;
+
+struct am_READDIRPLUS3resok {
+ am_post_op_attr dir_attributes;
+ am_cookieverf3 cookieverf;
+ am_dirlistplus3 reply;
+};
+typedef struct am_READDIRPLUS3resok am_READDIRPLUS3resok;
+
+struct am_READDIRPLUS3resfail {
+ am_post_op_attr dir_attributes;
+};
+typedef struct am_READDIRPLUS3resfail am_READDIRPLUS3resfail;
+
+struct am_READDIRPLUS3res {
+ am_nfsstat3 status;
+ union {
+ am_READDIRPLUS3resok ok;
+ am_READDIRPLUS3resfail fail;
+ } res_u;
+};
+typedef struct am_READDIRPLUS3res am_READDIRPLUS3res;
+
+struct am_READDIR3args {
+ am_nfs_fh3 dir;
+ am_cookie3 cookie;
+ am_cookieverf3 cookieverf;
+ am_count3 count;
+};
+typedef struct am_READDIR3args am_READDIR3args;
+
+struct am_entry3 {
+ am_fileid3 fileid;
+ am_filename3 name;
+ am_cookie3 cookie;
+ struct am_entry3 *nextentry;
+};
+typedef struct am_entry3 am_entry3;
+
+struct am_dirlist3 {
+ am_entry3 *entries;
+ bool_t eof;
+};
+typedef struct am_dirlist3 am_dirlist3;
+
+struct am_READDIR3resok {
+ am_post_op_attr dir_attributes;
+ am_cookieverf3 cookieverf;
+ am_dirlist3 reply;
+};
+typedef struct am_READDIR3resok am_READDIR3resok;
+
+struct am_READDIR3resfail {
+ am_post_op_attr dir_attributes;
+};
+typedef struct am_READDIR3resfail am_READDIR3resfail;
+
+struct am_READDIR3res {
+ am_nfsstat3 status;
+ union {
+ am_READDIR3resok ok;
+ am_READDIR3resfail fail;
+ } res_u;
+};
+typedef struct am_READDIR3res am_READDIR3res;
+
+struct am_LINK3args {
+ am_nfs_fh3 file;
+ am_diropargs3 link;
+};
+typedef struct am_LINK3args am_LINK3args;
+
+struct am_LINK3resok {
+ am_post_op_attr file_attributes;
+ am_wcc_data linkdir_wcc;
+};
+typedef struct am_LINK3resok am_LINK3resok;
+
+struct am_LINK3resfail {
+ am_post_op_attr file_attributes;
+ am_wcc_data linkdir_wcc;
+};
+typedef struct am_LINK3resfail am_LINK3resfail;
+
+struct am_LINK3res {
+ am_nfsstat3 status;
+ union {
+ am_LINK3resok ok;
+ am_LINK3resfail fail;
+ } res_u;
+};
+typedef struct am_LINK3res am_LINK3res;
+
+struct am_sattrguard3 {
+ bool_t check;
+ union {
+ am_nfstime3 obj_ctime;
+ } am_sattrguard3_u;
+};
+typedef struct am_sattrguard3 am_sattrguard3;
+
+struct am_SETATTR3args {
+ am_nfs_fh3 object;
+ am_sattr3 new_attributes;
+ am_sattrguard3 guard;
+};
+typedef struct am_SETATTR3args am_SETATTR3args;
+
+struct am_SETATTR3resok {
+ am_wcc_data obj_wcc;
+};
+typedef struct am_SETATTR3resok am_SETATTR3resok;
+
+struct am_SETATTR3resfail {
+ am_wcc_data obj_wcc;
+};
+typedef struct am_SETATTR3resfail am_SETATTR3resfail;
+
+struct am_SETATTR3res {
+ am_nfsstat3 status;
+ union {
+ am_SETATTR3resok ok;
+ am_SETATTR3resfail fail;
+ } res_u;
+};
+typedef struct am_SETATTR3res am_SETATTR3res;
#endif /* HAVE_FS_NFS3 */
/*
@@ -310,6 +1117,74 @@ bool_t xdr_writeargs(XDR *xdrs, nfswriteargs *objp);
* NFS3 XDR FUNCTIONS:
*/
#ifdef HAVE_FS_NFS3
+#define AM_NFS3_NULL 0
+void * am_nfs3_null_3(void *, CLIENT *);
+void * am_nfs3_null_3_svc(void *, struct svc_req *);
+#define AM_NFS3_GETATTR 1
+am_GETATTR3res * am_nfs3_getattr_3(am_GETATTR3args *, CLIENT *);
+am_GETATTR3res * am_nfs3_getattr_3_svc(am_GETATTR3args *, struct svc_req *);
+#define AM_NFS3_SETATTR 2
+am_SETATTR3res * am_nfs3_setattr_3(am_SETATTR3args *, CLIENT *);
+am_SETATTR3res * am_nfs3_setattr_3_svc(am_SETATTR3args *, struct svc_req *);
+#define AM_NFS3_LOOKUP 3
+am_LOOKUP3res * am_nfs3_lookup_3(am_LOOKUP3args *, CLIENT *);
+am_LOOKUP3res * am_nfs3_lookup_3_svc(am_LOOKUP3args *, struct svc_req *);
+#define AM_NFS3_ACCESS 4
+am_ACCESS3res * am_nfs3_access_3(am_ACCESS3args *, CLIENT *);
+am_ACCESS3res * am_nfs3_access_3_svc(am_ACCESS3args *, struct svc_req *);
+#define AM_NFS3_READLINK 5
+am_READLINK3res * am_nfs3_readlink_3(am_READLINK3args *, CLIENT *);
+am_READLINK3res * am_nfs3_readlink_3_svc(am_READLINK3args *, struct svc_req *);
+#define AM_NFS3_READ 6
+am_READ3res * am_nfs3_read_3(am_READ3args *, CLIENT *);
+am_READ3res * am_nfs3_read_3_svc(am_READ3args *, struct svc_req *);
+#define AM_NFS3_WRITE 7
+am_WRITE3res * am_nfs3_write_3(am_WRITE3args *, CLIENT *);
+am_WRITE3res * am_nfs3_write_3_svc(am_WRITE3args *, struct svc_req *);
+#define AM_NFS3_CREATE 8
+am_CREATE3res * am_nfs3_create_3(am_CREATE3args *, CLIENT *);
+am_CREATE3res * am_nfs3_create_3_svc(am_CREATE3args *, struct svc_req *);
+#define AM_NFS3_MKDIR 9
+am_MKDIR3res * am_nfs3_mkdir_3(am_MKDIR3args *, CLIENT *);
+am_MKDIR3res * am_nfs3_mkdir_3_svc(am_MKDIR3args *, struct svc_req *);
+#define AM_NFS3_SYMLINK 10
+am_SYMLINK3res * am_nfs3_symlink_3(am_SYMLINK3args *, CLIENT *);
+am_SYMLINK3res * am_nfs3_symlink_3_svc(am_SYMLINK3args *, struct svc_req *);
+#define AM_NFS3_MKNOD 11
+am_MKNOD3res * am_nfs3_mknod_3(am_MKNOD3args *, CLIENT *);
+am_MKNOD3res * am_nfs3_mknod_3_svc(am_MKNOD3args *, struct svc_req *);
+#define AM_NFS3_REMOVE 12
+am_REMOVE3res * am_nfs3_remove_3(am_REMOVE3args *, CLIENT *);
+am_REMOVE3res * am_nfs3_remove_3_svc(am_REMOVE3args *, struct svc_req *);
+#define AM_NFS3_RMDIR 13
+am_RMDIR3res * am_nfs3_rmdir_3(am_RMDIR3args *, CLIENT *);
+am_RMDIR3res * am_nfs3_rmdir_3_svc(am_RMDIR3args *, struct svc_req *);
+#define AM_NFS3_RENAME 14
+am_RENAME3res * am_nfs3_rename_3(am_RENAME3args *, CLIENT *);
+am_RENAME3res * am_nfs3_rename_3_svc(am_RENAME3args *, struct svc_req *);
+#define AM_NFS3_LINK 15
+am_LINK3res * am_nfs3_link_3(am_LINK3args *, CLIENT *);
+am_LINK3res * am_nfs3_link_3_svc(am_LINK3args *, struct svc_req *);
+#define AM_NFS3_READDIR 16
+am_READDIR3res * am_nfs3_readdir_3(am_READDIR3args *, CLIENT *);
+am_READDIR3res * am_nfs3_readdir_3_svc(am_READDIR3args *, struct svc_req *);
+#define AM_NFS3_READDIRPLUS 17
+am_READDIRPLUS3res * am_nfs3_readdirplus_3(am_READDIRPLUS3args *, CLIENT *);
+am_READDIRPLUS3res * am_nfs3_readdirplus_3_svc(am_READDIRPLUS3args *, struct svc_req *);
+#define AM_NFS3_FSSTAT 18
+am_FSSTAT3res * am_nfs3_fsstat_3(am_FSSTAT3args *, CLIENT *);
+am_FSSTAT3res * am_nfs3_fsstat_3_svc(am_FSSTAT3args *, struct svc_req *);
+#define AM_NFS3_FSINFO 19
+am_FSINFO3res * am_nfs3_fsinfo_3(am_FSINFO3args *, CLIENT *);
+am_FSINFO3res * am_nfs3_fsinfo_3_svc(am_FSINFO3args *, struct svc_req *);
+#define AM_NFS3_PATHCONF 20
+am_PATHCONF3res * am_nfs3_pathconf_3(am_PATHCONF3args *, CLIENT *);
+am_PATHCONF3res * am_nfs3_pathconf_3_svc(am_PATHCONF3args *, struct svc_req *);
+#define AM_NFS3_COMMIT 21
+am_COMMIT3res * am_nfs3_commit_3(am_COMMIT3args *, CLIENT *);
+am_COMMIT3res * am_nfs3_commit_3_svc(am_COMMIT3args *, struct svc_req *);
+int nfs_program_3_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
+
bool_t xdr_am_fhandle3(XDR *xdrs, am_fhandle3 *objp);
bool_t xdr_am_mountstat3(XDR *xdrs, am_mountstat3 *objp);
bool_t xdr_am_mountres3_ok(XDR *xdrs, am_mountres3_ok *objp);
@@ -322,6 +1197,134 @@ bool_t xdr_am_LOOKUP3resfail(XDR *xdrs, am_LOOKUP3resfail *objp);
bool_t xdr_am_LOOKUP3resok(XDR *xdrs, am_LOOKUP3resok *objp);
bool_t xdr_am_nfsstat3(XDR *xdrs, am_nfsstat3 *objp);
bool_t xdr_am_nfs_fh3(XDR *xdrs, am_nfs_fh3 *objp);
+bool_t xdr_am_cookieverf3 (XDR *, am_cookieverf3);
+bool_t xdr_uint64 (XDR *, uint64*);
+bool_t xdr_am_cookie3 (XDR *, am_cookie3*);
+bool_t xdr_am_nfs_fh3 (XDR *, am_nfs_fh3*);
+bool_t xdr_am_nfsstat3 (XDR *, am_nfsstat3*);
+bool_t xdr_am_filename3 (XDR *, am_filename3*);
+bool_t xdr_am_diropargs3 (XDR *, am_diropargs3*);
+bool_t xdr_am_ftype3 (XDR *, am_ftype3*);
+bool_t xdr_am_mode3 (XDR *, am_mode3*);
+bool_t xdr_am_uid3 (XDR *, am_uid3*);
+bool_t xdr_am_gid3 (XDR *, am_gid3*);
+bool_t xdr_am_size3 (XDR *, am_size3*);
+bool_t xdr_am_fileid3 (XDR *, am_fileid3*);
+bool_t xdr_am_specdata3 (XDR *, am_specdata3*);
+bool_t xdr_am_nfstime3 (XDR *, am_nfstime3*);
+bool_t xdr_am_fattr3 (XDR *, am_fattr3*);
+bool_t xdr_am_post_op_attr (XDR *, am_post_op_attr*);
+bool_t xdr_am_stable_how (XDR *, am_stable_how*);
+bool_t xdr_am_offset3 (XDR *, am_offset3*);
+bool_t xdr_am_count3 (XDR *, am_count3*);
+bool_t xdr_am_wcc_attr (XDR *, am_wcc_attr*);
+bool_t xdr_am_pre_op_attr (XDR *, am_pre_op_attr*);
+bool_t xdr_am_wcc_data (XDR *, am_wcc_data*);
+bool_t xdr_am_WRITE3args (XDR *, am_WRITE3args*);
+bool_t xdr_am_writeverf3 (XDR *, am_writeverf3);
+bool_t xdr_am_WRITE3resok (XDR *, am_WRITE3resok*);
+bool_t xdr_am_WRITE3resfail (XDR *, am_WRITE3resfail*);
+bool_t xdr_am_WRITE3res (XDR *, am_WRITE3res*);
+bool_t xdr_am_LOOKUP3args (XDR *, am_LOOKUP3args*);
+bool_t xdr_am_LOOKUP3resok (XDR *, am_LOOKUP3resok*);
+bool_t xdr_am_LOOKUP3resfail (XDR *, am_LOOKUP3resfail*);
+bool_t xdr_am_LOOKUP3res (XDR *, am_LOOKUP3res*);
+bool_t xdr_am_COMMIT3args (XDR *, am_COMMIT3args*);
+bool_t xdr_am_COMMIT3resok (XDR *, am_COMMIT3resok*);
+bool_t xdr_am_COMMIT3resfail (XDR *, am_COMMIT3resfail*);
+bool_t xdr_am_COMMIT3res (XDR *, am_COMMIT3res*);
+bool_t xdr_am_ACCESS3args (XDR *, am_ACCESS3args*);
+bool_t xdr_am_ACCESS3resok (XDR *, am_ACCESS3resok*);
+bool_t xdr_am_ACCESS3resfail (XDR *, am_ACCESS3resfail*);
+bool_t xdr_am_ACCESS3res (XDR *, am_ACCESS3res*);
+bool_t xdr_am_GETATTR3args (XDR *, am_GETATTR3args*);
+bool_t xdr_am_GETATTR3resok (XDR *, am_GETATTR3resok*);
+bool_t xdr_am_GETATTR3res (XDR *, am_GETATTR3res*);
+bool_t xdr_am_time_how (XDR *, am_time_how*);
+bool_t xdr_am_set_mode3 (XDR *, am_set_mode3*);
+bool_t xdr_am_set_uid3 (XDR *, am_set_uid3*);
+bool_t xdr_am_set_gid3 (XDR *, am_set_gid3*);
+bool_t xdr_am_set_size3 (XDR *, am_set_size3*);
+bool_t xdr_am_set_atime (XDR *, am_set_atime*);
+bool_t xdr_am_set_mtime (XDR *, am_set_mtime*);
+bool_t xdr_am_sattr3 (XDR *, am_sattr3*);
+bool_t xdr_am_createmode3 (XDR *, am_createmode3*);
+bool_t xdr_am_createverf3 (XDR *, am_createverf3);
+bool_t xdr_am_createhow3 (XDR *, am_createhow3*);
+bool_t xdr_am_CREATE3args (XDR *, am_CREATE3args*);
+bool_t xdr_am_post_op_fh3 (XDR *, am_post_op_fh3*);
+bool_t xdr_am_CREATE3resok (XDR *, am_CREATE3resok*);
+bool_t xdr_am_CREATE3resfail (XDR *, am_CREATE3resfail*);
+bool_t xdr_am_CREATE3res (XDR *, am_CREATE3res*);
+bool_t xdr_am_REMOVE3args (XDR *, am_REMOVE3args*);
+bool_t xdr_am_REMOVE3resok (XDR *, am_REMOVE3resok*);
+bool_t xdr_am_REMOVE3resfail (XDR *, am_REMOVE3resfail*);
+bool_t xdr_am_REMOVE3res (XDR *, am_REMOVE3res*);
+bool_t xdr_am_READ3args (XDR *, am_READ3args*);
+bool_t xdr_am_READ3resok (XDR *, am_READ3resok*);
+bool_t xdr_am_READ3resfail (XDR *, am_READ3resfail*);
+bool_t xdr_am_READ3res (XDR *, am_READ3res*);
+bool_t xdr_am_FSINFO3args (XDR *, am_FSINFO3args*);
+bool_t xdr_am_FSINFO3resok (XDR *, am_FSINFO3resok*);
+bool_t xdr_am_FSINFO3resfail (XDR *, am_FSINFO3resfail*);
+bool_t xdr_am_FSINFO3res (XDR *, am_FSINFO3res*);
+bool_t xdr_am_FSSTAT3args (XDR *, am_FSSTAT3args*);
+bool_t xdr_am_FSSTAT3resok (XDR *, am_FSSTAT3resok*);
+bool_t xdr_am_FSSTAT3resfail (XDR *, am_FSSTAT3resfail*);
+bool_t xdr_am_FSSTAT3res (XDR *, am_FSSTAT3res*);
+bool_t xdr_am_PATHCONF3args (XDR *, am_PATHCONF3args*);
+bool_t xdr_am_PATHCONF3resok (XDR *, am_PATHCONF3resok*);
+bool_t xdr_am_PATHCONF3resfail (XDR *, am_PATHCONF3resfail*);
+bool_t xdr_am_PATHCONF3res (XDR *, am_PATHCONF3res*);
+bool_t xdr_am_nfspath3 (XDR *, am_nfspath3*);
+bool_t xdr_am_symlinkdata3 (XDR *, am_symlinkdata3*);
+bool_t xdr_am_SYMLINK3args (XDR *, am_SYMLINK3args*);
+bool_t xdr_am_SYMLINK3resok (XDR *, am_SYMLINK3resok*);
+bool_t xdr_am_SYMLINK3resfail (XDR *, am_SYMLINK3resfail*);
+bool_t xdr_am_SYMLINK3res (XDR *, am_SYMLINK3res*);
+bool_t xdr_am_READLINK3args (XDR *, am_READLINK3args*);
+bool_t xdr_am_READLINK3resok (XDR *, am_READLINK3resok*);
+bool_t xdr_am_READLINK3resfail (XDR *, am_READLINK3resfail*);
+bool_t xdr_am_READLINK3res (XDR *, am_READLINK3res*);
+bool_t xdr_am_devicedata3 (XDR *, am_devicedata3*);
+bool_t xdr_am_mknoddata3 (XDR *, am_mknoddata3*);
+bool_t xdr_am_MKNOD3args (XDR *, am_MKNOD3args*);
+bool_t xdr_am_MKNOD3resok (XDR *, am_MKNOD3resok*);
+bool_t xdr_am_MKNOD3resfail (XDR *, am_MKNOD3resfail*);
+bool_t xdr_am_MKNOD3res (XDR *, am_MKNOD3res*);
+bool_t xdr_am_MKDIR3args (XDR *, am_MKDIR3args*);
+bool_t xdr_am_MKDIR3resok (XDR *, am_MKDIR3resok*);
+bool_t xdr_am_MKDIR3resfail (XDR *, am_MKDIR3resfail*);
+bool_t xdr_am_MKDIR3res (XDR *, am_MKDIR3res*);
+bool_t xdr_am_RMDIR3args (XDR *, am_RMDIR3args*);
+bool_t xdr_am_RMDIR3resok (XDR *, am_RMDIR3resok*);
+bool_t xdr_am_RMDIR3resfail (XDR *, am_RMDIR3resfail*);
+bool_t xdr_am_RMDIR3res (XDR *, am_RMDIR3res*);
+bool_t xdr_am_RENAME3args (XDR *, am_RENAME3args*);
+bool_t xdr_am_RENAME3resok (XDR *, am_RENAME3resok*);
+bool_t xdr_am_RENAME3resfail (XDR *, am_RENAME3resfail*);
+bool_t xdr_am_RENAME3res (XDR *, am_RENAME3res*);
+bool_t xdr_am_READDIRPLUS3args (XDR *, am_READDIRPLUS3args*);
+bool_t xdr_am_entryplus3 (XDR *, am_entryplus3*);
+bool_t xdr_am_dirlistplus3 (XDR *, am_dirlistplus3*);
+bool_t xdr_am_READDIRPLUS3resok (XDR *, am_READDIRPLUS3resok*);
+bool_t xdr_am_READDIRPLUS3resfail (XDR *, am_READDIRPLUS3resfail*);
+bool_t xdr_am_READDIRPLUS3res (XDR *, am_READDIRPLUS3res*);
+bool_t xdr_am_READDIR3args (XDR *, am_READDIR3args*);
+bool_t xdr_am_entry3 (XDR *, am_entry3*);
+bool_t xdr_am_dirlist3 (XDR *, am_dirlist3*);
+bool_t xdr_am_READDIR3resok (XDR *, am_READDIR3resok*);
+bool_t xdr_am_READDIR3resfail (XDR *, am_READDIR3resfail*);
+bool_t xdr_am_READDIR3res (XDR *, am_READDIR3res*);
+bool_t xdr_am_LINK3args (XDR *, am_LINK3args*);
+bool_t xdr_am_LINK3resok (XDR *, am_LINK3resok*);
+bool_t xdr_am_LINK3resfail (XDR *, am_LINK3resfail*);
+bool_t xdr_am_LINK3res (XDR *, am_LINK3res*);
+bool_t xdr_am_sattrguard3 (XDR *, am_sattrguard3*);
+bool_t xdr_am_SETATTR3args (XDR *, am_SETATTR3args*);
+bool_t xdr_am_SETATTR3resok (XDR *, am_SETATTR3resok*);
+bool_t xdr_am_SETATTR3resfail (XDR *, am_SETATTR3resfail*);
+bool_t xdr_am_SETATTR3res (XDR *, am_SETATTR3res*);
#endif /* HAVE_FS_NFS3 */
#endif /* not _AM_XDR_FUNC_H */
diff --git a/contrib/amd/include/amq_defs.h b/contrib/amd/include/amq_defs.h
index 75c465171033..4db5133cba42 100644
--- a/contrib/amd/include/amq_defs.h
+++ b/contrib/amd/include/amq_defs.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2006 Erez Zadok
+ * Copyright (c) 1997-2014 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -16,11 +16,7 @@
* 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 acknowledgment:
- * 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
+ * 3. 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.
*
@@ -55,7 +51,7 @@
#define AMQ_VERSION ((u_long)1)
#define AMQPROC_NULL ((u_long)0)
#define AMQPROC_MNTTREE ((u_long)1)
-#define AMQPROC_UMNT ((u_long)2)
+#define AMQPROC_UMNT ((u_long)2) /* asynchronous unmount */
#define AMQPROC_STATS ((u_long)3)
#define AMQPROC_EXPORT ((u_long)4)
#define AMQPROC_SETOPT ((u_long)5)
@@ -64,15 +60,19 @@
#define AMQPROC_GETVERS ((u_long)8)
#define AMQPROC_GETPID ((u_long)9)
#define AMQPROC_PAWD ((u_long)10)
+#define AMQPROC_SYNC_UMNT ((u_long)11) /* synchronous unmount */
+#define AMQPROC_GETMAPINFO ((u_long)12)
/*
* TYPEDEFS
*/
-typedef long *time_type;
+typedef time_t *time_type;
typedef struct amq_mount_info amq_mount_info;
+typedef struct amq_map_info amq_map_info;
typedef struct amq_mount_stats amq_mount_stats;
typedef struct amq_mount_tree amq_mount_tree;
typedef struct amq_setopt amq_setopt;
+typedef struct amq_sync_umnt amq_sync_umnt;
typedef amq_mount_tree *amq_mount_tree_p;
/*
@@ -114,6 +114,22 @@ typedef struct {
amq_mount_tree_p *amq_mount_tree_list_val;
} amq_mount_tree_list;
+struct amq_map_info {
+ amq_string mi_name;
+ amq_string mi_wildcard;
+ time_type mi_modify;
+ int mi_flags;
+ int mi_refc;
+ int mi_up;
+ int mi_reloads;
+ int mi_nentries;
+};
+
+typedef struct {
+ u_int amq_map_info_list_len;
+ amq_map_info *amq_map_info_list_val;
+} amq_map_info_list;
+
struct amq_mount_stats {
int as_drops;
int as_stale;
@@ -122,6 +138,21 @@ struct amq_mount_stats {
int as_uerr;
};
+typedef enum {
+ AMQ_UMNT_OK = 0, /* must be zero! */
+ AMQ_UMNT_FAILED = 1, /* unmount failed */
+ AMQ_UMNT_FORK = 2, /* fork failed */
+ AMQ_UMNT_READ = 3, /* pipe read failed */
+ AMQ_UMNT_SERVER = 4, /* server down */
+ AMQ_UMNT_SIGNAL = 5 /* received signal */
+} au_etype;
+
+struct amq_sync_umnt {
+ au_etype au_etype; /* error type */
+ int au_errno; /* error number */
+ int au_signal; /* signal received */
+};
+
enum amq_opt {
AMOPT_DEBUG = 0,
AMOPT_LOGFILE = 1,
@@ -145,12 +176,15 @@ struct amq_setopt {
*/
extern bool_t xdr_amq_mount_info(XDR *xdrs, amq_mount_info *objp);
extern bool_t xdr_amq_mount_info_list(XDR *xdrs, amq_mount_info_list *objp);
+extern bool_t xdr_amq_map_info(XDR *xdrs, amq_map_info *objp);
+extern bool_t xdr_amq_map_info_list(XDR *xdrs, amq_map_info_list *objp);
extern bool_t xdr_amq_mount_stats(XDR *xdrs, amq_mount_stats *objp);
extern bool_t xdr_amq_mount_tree(XDR *xdrs, amq_mount_tree *objp);
extern bool_t xdr_amq_mount_tree_list(XDR *xdrs, amq_mount_tree_list *objp);
extern bool_t xdr_amq_mount_tree_p(XDR *xdrs, amq_mount_tree_p *objp);
extern bool_t xdr_amq_opt(XDR *xdrs, amq_opt *objp);
extern bool_t xdr_amq_setopt(XDR *xdrs, amq_setopt *objp);
+extern bool_t xdr_amq_sync_umnt(XDR *xdrs, amq_sync_umnt *objp);
extern bool_t xdr_pri_free(XDRPROC_T_TYPE xdr_args, caddr_t args_ptr);
extern bool_t xdr_time_type(XDR *xdrs, time_type *objp);
diff --git a/contrib/amd/include/mount_headers1.h b/contrib/amd/include/mount_headers1.h
index 41f26e59f99d..7d518a06aa26 100644
--- a/contrib/amd/include/mount_headers1.h
+++ b/contrib/amd/include/mount_headers1.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2006 Erez Zadok
+ * Copyright (c) 1997-2014 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -16,11 +16,7 @@
* 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 acknowledgment:
- * 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
+ * 3. 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.
*
@@ -123,50 +119,50 @@
# include <sys/vmount.h>
#endif /* HAVE_SYS_VMOUNT_H */
-/*
- * There is no point in including this on a glibc2 system
- * we're only asking for trouble
- */
-#if defined HAVE_LINUX_FS_H && (!defined __GLIBC__ || __GLIBC__ < 2)
+#if HAVE_LINUX_FS_H
+# if !defined(__GLIBC__) || __GLIBC__ < 2
/*
* There's a conflict of definitions on redhat alpha linux between
* <netinet/in.h> and <linux/fs.h>.
* Also a conflict in definitions of ntohl/htonl in RH-5.1 sparc64
* between <netinet/in.h> and <linux/byteorder/generic.h> (2.1 kernels).
*/
-# ifdef HAVE_SOCKETBITS_H
-# define _LINUX_SOCKET_H
-# undef BLKFLSBUF
-# undef BLKGETSIZE
-# undef BLKRAGET
-# undef BLKRASET
-# undef BLKROGET
-# undef BLKROSET
-# undef BLKRRPART
-# undef MS_MGC_VAL
-# undef MS_RMT_MASK
-# endif /* HAVE_SOCKETBITS_H */
-# ifdef HAVE_LINUX_POSIX_TYPES_H
-# include <linux/posix_types.h>
-# endif /* HAVE_LINUX_POSIX_TYPES_H */
-# ifndef _LINUX_BYTEORDER_GENERIC_H
-# define _LINUX_BYTEORDER_GENERIC_H
-# endif /* _LINUX_BYTEORDER_GENERIC_H */
-# ifndef _LINUX_STRING_H_
-# define _LINUX_STRING_H_
-# endif /* not _LINUX_STRING_H_ */
-# ifdef HAVE_LINUX_KDEV_T_H
-# define __KERNEL__
-# include <linux/kdev_t.h>
-# undef __KERNEL__
-# endif /* HAVE_LINUX_KDEV_T_H */
-# ifdef HAVE_LINUX_LIST_H
-# define __KERNEL__
-# include <linux/list.h>
-# undef __KERNEL__
-# endif /* HAVE_LINUX_LIST_H */
-# include <linux/fs.h>
-#endif /* HAVE_LINUX_FS_H && (!__GLIBC__ || __GLIBC__ < 2) */
+# ifdef HAVE_SOCKETBITS_H
+# define _LINUX_SOCKET_H
+# undef BLKFLSBUF
+# undef BLKGETSIZE
+# undef BLKRAGET
+# undef BLKRASET
+# undef BLKROGET
+# undef BLKROSET
+# undef BLKRRPART
+# undef MS_MGC_VAL
+# undef MS_RMT_MASK
+# endif /* HAVE_SOCKETBITS_H */
+# ifdef HAVE_LINUX_POSIX_TYPES_H
+# include <linux/posix_types.h>
+# endif /* HAVE_LINUX_POSIX_TYPES_H */
+# ifndef _LINUX_BYTEORDER_GENERIC_H
+# define _LINUX_BYTEORDER_GENERIC_H
+# endif /* _LINUX_BYTEORDER_GENERIC_H */
+# ifndef _LINUX_STRING_H_
+# define _LINUX_STRING_H_
+# endif /* not _LINUX_STRING_H_ */
+# ifdef HAVE_LINUX_KDEV_T_H
+# define __KERNEL__
+# include <linux/kdev_t.h>
+# undef __KERNEL__
+# endif /* HAVE_LINUX_KDEV_T_H */
+# ifdef HAVE_LINUX_LIST_H
+# define __KERNEL__
+# include <linux/list.h>
+# undef __KERNEL__
+# endif /* HAVE_LINUX_LIST_H */
+# include <linux/fs.h>
+# else
+# include <linux/fs.h>
+# endif/* (!__GLIBC__ || __GLIBC__ < 2) */
+#endif /* HAVE_LINUX_FS_H */
#ifdef HAVE_SYS_FS_TYPES_H
# include <sys/fs_types.h>
@@ -192,6 +188,10 @@
# include <isofs/cd9660/cd9660_mount.h>
#endif /* HAVE_ISOFS_CD9660_CD9660_MOUNT_H */
+#ifdef HAVE_FS_UDF_UDF_MOUNT_H
+# include <fs/udf/udf_mount.h>
+#endif /* HAVE_FS_UDF_UDF_MOUNT_H */
+
#ifdef HAVE_SYS_FS_PC_FS_H
# include <sys/fs/pc_fs.h>
#endif /* HAVE_SYS_FS_PC_FS_H */
@@ -202,6 +202,14 @@
# include <fs/msdosfs/msdosfsmount.h>
#endif /* HAVE_FS_MSDOSFS_MSDOSFSMOUNT_H */
+#ifdef HAVE_FS_TMPFS_TMPFS_ARGS_H
+# include <fs/tmpfs/tmpfs_args.h>
+#endif /* HAVE_FS_TMPFS_TMPFS_ARGS_H */
+
+#ifdef HAVE_FS_EFS_EFS_MOUNT_H
+# include <fs/efs/efs_mount.h>
+#endif /* HAVE_FS_EFS_EFS_MOUNT_H */
+
#ifdef HAVE_RPC_RPC_H
# include <rpc/rpc.h>
#endif /* HAVE_RPC_RPC_H */
diff --git a/contrib/amd/include/mount_headers2.h b/contrib/amd/include/mount_headers2.h
index 273e89cae10c..87bf18efd8bb 100644
--- a/contrib/amd/include/mount_headers2.h
+++ b/contrib/amd/include/mount_headers2.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2006 Erez Zadok
+ * Copyright (c) 1997-2014 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -16,11 +16,7 @@
* 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 acknowledgment:
- * 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
+ * 3. 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.
*
diff --git a/contrib/amd/include/nfs_common.h b/contrib/amd/include/nfs_common.h
new file mode 100644
index 000000000000..d89632b59330
--- /dev/null
+++ b/contrib/amd/include/nfs_common.h
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2011 Christos Zoulas
+ * All rights reserved.
+ *
+ * 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. 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.
+ *
+ *
+ * File: am-utils/include/nfs_common.c
+ *
+ */
+struct nfs_common_args {
+ u_long flags;
+ u_long acdirmin;
+ u_long acdirmax;
+ u_long acregmin;
+ u_long acregmax;
+ u_long timeo;
+ u_long retrans;
+ u_long rsize;
+ u_long wsize;
+};
+
+#ifdef HAVE_NFS_ARGS_T_ACREGMIN
+#define GET_ACREGMIN(nap, a) nap->acregmin = a.acregmin;
+#define PUT_ACREGMIN(nap, a) a.acregmin = nap->acregmin;
+#else
+#define GET_ACREGMIN(nap, a)
+#define PUT_ACREGMIN(nap, a)
+#endif
+#ifdef HAVE_NFS_ARGS_T_ACREGMAX
+#define GET_ACREGMAX(nap, a) nap->acregmax = a.acregmax;
+#define PUT_ACREGMAX(nap, a) a.acregmax = nap->acregmax;
+#else
+#define GET_ACREGMAX(nap, a)
+#define PUT_ACREGMAX(nap, a)
+#endif
+
+#ifdef HAVE_NFS_ARGS_T_ACDIRMIN
+#define GET_ACDIRMIN(nap, a) nap->acdirmin = a.acdirmin;
+#define PUT_ACDIRMIN(nap, a) a.acdirmin = nap->acdirmin;
+#else
+#define GET_ACDIRMIN(nap, a)
+#define PUT_ACDIRMIN(nap, a)
+#endif
+#ifdef HAVE_NFS_ARGS_T_ACDIRMAX
+#define GET_ACDIRMAX(nap, a) nap->acdirmax = a.acdirmax;
+#define PUT_ACDIRMAX(nap, a) a.acdirmax = nap->acdirmax;
+#else
+#define GET_ACDIRMAX(nap, a)
+#define PUT_ACDIRMAX(nap, a)
+#endif
+
+#define get_nfs_common_args(nap, a) \
+ do { \
+ nap->flags = a.flags; \
+ GET_ACREGMIN(nap, a) \
+ GET_ACREGMAX(nap, a) \
+ GET_ACDIRMIN(nap, a) \
+ GET_ACDIRMAX(nap, a) \
+ nap->timeo = a.timeo; \
+ nap->retrans = a.retrans; \
+ nap->rsize = a.rsize; \
+ nap->wsize = a.wsize; \
+ } while (/*CONSTCOND*/0)
+
+#define put_nfs_common_args(nap, a) \
+ do { \
+ a.flags = nap->flags; \
+ PUT_ACREGMIN(nap, a) \
+ PUT_ACREGMAX(nap, a) \
+ PUT_ACDIRMIN(nap, a) \
+ PUT_ACDIRMAX(nap, a) \
+ a.timeo = nap->timeo; \
+ a.retrans = nap->retrans; \
+ a.rsize = nap->rsize; \
+ a.wsize = nap->wsize; \
+ } while (/*CONSTCOND*/0)