* Copyright (c) 2015 IETF Trust and the persons identified * as authors of the code. All rights reserved. * * Redistribution and use in source and binary forms, with * or without modification, are permitted provided that the * following conditions are met: * * - Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * - 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. * * - Neither the name of Internet Society, IETF or IETF * Trust, nor the names of specific contributors, may be * used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * 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 COPYRIGHT OWNER 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. NFS VERSION 4 XDR DESCRIPTION /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License, Version 1.0 only * (the "License"). You may not use this file except in compliance * with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright (c) 1993, by Sun Microsystems, Inc. */ #ifndef _RPCSVC_BOOTPARAM_H #define _RPCSVC_BOOTPARAM_H #include #endif /* _RPCSVC_BOOTPARAM_H */ /* * Please do not edit this file. * It was generated using rpcgen. */ #ifndef _BOOTPARAM_PROT_H_RPCGEN #define _BOOTPARAM_PROT_H_RPCGEN #include #ifdef __cplusplus extern "C" { #endif /* * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ /* from bootparam_prot.x */ #define MAX_MACHINE_NAME 255 #define MAX_PATH_LEN 1024 #define MAX_FILEID 32 #define IP_ADDR_TYPE 1 typedef char *bp_machine_name_t; typedef char *bp_path_t; typedef char *bp_fileid_t; struct ip_addr_t { char net; char host; char lh; char impno; }; typedef struct ip_addr_t ip_addr_t; struct bp_address { int address_type; union { ip_addr_t ip_addr; } bp_address_u; }; typedef struct bp_address bp_address; struct bp_whoami_arg { bp_address client_address; }; typedef struct bp_whoami_arg bp_whoami_arg; struct bp_whoami_res { bp_machine_name_t client_name; bp_machine_name_t domain_name; bp_address router_address; }; typedef struct bp_whoami_res bp_whoami_res; struct bp_getfile_arg { bp_machine_name_t client_name; bp_fileid_t file_id; }; typedef struct bp_getfile_arg bp_getfile_arg; struct bp_getfile_res { bp_machine_name_t server_name; bp_address server_address; bp_path_t server_path; }; typedef struct bp_getfile_res bp_getfile_res; #define BOOTPARAMPROG 100026 #define BOOTPARAMVERS 1 #if defined(__STDC__) || defined(__cplusplus) #define BOOTPARAMPROC_WHOAMI 1 extern bp_whoami_res * bootparamproc_whoami_1(bp_whoami_arg *, CLIENT *); extern bp_whoami_res * bootparamproc_whoami_1_svc(bp_whoami_arg *, struct svc_req *); #define BOOTPARAMPROC_GETFILE 2 extern bp_getfile_res * bootparamproc_getfile_1(bp_getfile_arg *, CLIENT *); extern bp_getfile_res * bootparamproc_getfile_1_svc(bp_getfile_arg *, struct svc_req *); extern int bootparamprog_1_freeresult(SVCXPRT *, xdrproc_t, caddr_t); #else /* K&R C */ #define BOOTPARAMPROC_WHOAMI 1 extern bp_whoami_res * bootparamproc_whoami_1(); extern bp_whoami_res * bootparamproc_whoami_1_svc(); #define BOOTPARAMPROC_GETFILE 2 extern bp_getfile_res * bootparamproc_getfile_1(); extern bp_getfile_res * bootparamproc_getfile_1_svc(); extern int bootparamprog_1_freeresult(); #endif /* K&R C */ /* the xdr functions */ #if defined(__STDC__) || defined(__cplusplus) extern bool_t xdr_bp_machine_name_t(XDR *, bp_machine_name_t*); extern bool_t xdr_bp_path_t(XDR *, bp_path_t*); extern bool_t xdr_bp_fileid_t(XDR *, bp_fileid_t*); extern bool_t xdr_ip_addr_t(XDR *, ip_addr_t*); extern bool_t xdr_bp_address(XDR *, bp_address*); extern bool_t xdr_bp_whoami_arg(XDR *, bp_whoami_arg*); extern bool_t xdr_bp_whoami_res(XDR *, bp_whoami_res*); extern bool_t xdr_bp_getfile_arg(XDR *, bp_getfile_arg*); extern bool_t xdr_bp_getfile_res(XDR *, bp_getfile_res*); #else /* K&R C */ extern bool_t xdr_bp_machine_name_t(); extern bool_t xdr_bp_path_t(); extern bool_t xdr_bp_fileid_t(); extern bool_t xdr_ip_addr_t(); extern bool_t xdr_bp_address(); extern bool_t xdr_bp_whoami_arg(); extern bool_t xdr_bp_whoami_res(); extern bool_t xdr_bp_getfile_arg(); extern bool_t xdr_bp_getfile_res(); #endif /* K&R C */ #ifdef __cplusplus } #endif #endif /* !_BOOTPARAM_PROT_H_RPCGEN */ /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License, Version 1.0 only * (the "License"). You may not use this file except in compliance * with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ %/* % * Copyright 2004 Sun Microsystems, Inc. All rights reserved. % * Use is subject to license terms. % */ %/* from bootparam_prot.x */ /* * RPC for bootparms service. * There are two procedures: * WHOAMI takes a net address and returns a client name and also a * likely net address for routing * GETFILE takes a client name and file identifier and returns the * server name, server net address and pathname for the file. * file identifiers typically include root, swap, pub and dump */ const MAX_MACHINE_NAME = 255; const MAX_PATH_LEN = 1024; const MAX_FILEID = 32; const IP_ADDR_TYPE = 1; typedef string bp_machine_name_t; typedef string bp_path_t; typedef string bp_fileid_t; struct ip_addr_t { char net; char host; char lh; char impno; }; union bp_address switch (int address_type) { case IP_ADDR_TYPE: ip_addr_t ip_addr; }; struct bp_whoami_arg { bp_address client_address; }; struct bp_whoami_res { bp_machine_name_t client_name; bp_machine_name_t domain_name; bp_address router_address; }; struct bp_getfile_arg { bp_machine_name_t client_name; bp_fileid_t file_id; }; struct bp_getfile_res { bp_machine_name_t server_name; bp_address server_address; bp_path_t server_path; }; program BOOTPARAMPROG { version BOOTPARAMVERS { bp_whoami_res BOOTPARAMPROC_WHOAMI(bp_whoami_arg) = 1; bp_getfile_res BOOTPARAMPROC_GETFILE(bp_getfile_arg) = 2; } = 1; } = 100026; /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License (the "License"). * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ #ifndef _DAEMON_UTILS_H #define _DAEMON_UTILS_H #include #ifdef __cplusplus extern "C" { #endif #define AUTOMOUNTD "svc:/system/filesystem/autofs:default" #define LOCKD "svc:/network/nfs/nlockmgr:default" #define STATD "svc:/network/nfs/status:default" #define NFSD "svc:/network/nfs/server:default" #define MOUNTD "svc:/network/nfs/mountd:default" #define NFS4CBD "svc:/network/nfs/cbd:default" #define NFSMAPID "svc:/network/nfs/mapid:default" #define RQUOTAD "svc:/network/nfs/rquota:default" #define REPARSED "svc:/system/filesystem/reparse:default" #define DAEMON_UID 1 #define DAEMON_GID 12 #define DAEMON_DIR "/var/run/daemon" #define DAEMON_DIR_MODE (S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH) extern void _check_services(char **); extern int _check_daemon_lock(const char *); extern int _create_daemon_lock(const char *, uid_t, gid_t); extern pid_t _enter_daemon_lock(const char *); #ifdef __cplusplus } #endif #endif /* _DAEMON_UTILS_H */ /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License, Version 1.0 only * (the "License"). You may not use this file except in compliance * with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright 2014, 2016 PALO, Richard. * * Copyright 1989 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ /* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ /* * Portions of this source code were derived from Berkeley 4.3 BSD * under license from the Regents of the University of California. */ #ifndef _RPCSVC_DBM_H #define _RPCSVC_DBM_H #include #include #ifdef __cplusplus extern "C" { #endif #define PBLKSIZ 1024 #define DBLKSIZ 4096 #define BYTESIZ 8 long bitno; long maxbno; long blkno; long hmask; char pagbuf[PBLKSIZ]; char dirbuf[DBLKSIZ]; int dirf; int pagf; int dbrdonly; typedef struct { char *dptr; int dsize; } datum; datum fetch(datum); datum makdatum(char *, int); datum firstkey(void); datum nextkey(datum); datum firsthash(long); long calchash(datum); long hashinc(long); #ifdef __cplusplus } #endif #endif /* _RPCSVC_DBM_H */ /* * Please do not edit this file. * It was generated using rpcgen. */ #ifndef _MOUNT_H_RPCGEN #define _MOUNT_H_RPCGEN #include #ifdef __cplusplus extern "C" { #endif #define MNTPATHLEN 1024 #define MNTNAMLEN 255 #define FHSIZE 32 #define FHSIZE3 64 typedef char fhandle[FHSIZE]; typedef struct { u_int fhandle3_len; char *fhandle3_val; } fhandle3; struct fhstatus { u_int fhs_status; union { fhandle fhs_fhandle; } fhstatus_u; }; typedef struct fhstatus fhstatus; #define fhs_fh fhstatus_u.fhs_fhandle enum mountstat3 { MNT_OK = 0, MNT3ERR_PERM = 1, MNT3ERR_NOENT = 2, MNT3ERR_IO = 5, MNT3ERR_ACCES = 13, MNT3ERR_NOTDIR = 20, MNT3ERR_INVAL = 22, MNT3ERR_NAMETOOLONG = 63, MNT3ERR_NOTSUPP = 10004, MNT3ERR_SERVERFAULT = 10006 }; typedef enum mountstat3 mountstat3; struct mountres3_ok { fhandle3 fhandle; struct { u_int auth_flavors_len; int *auth_flavors_val; } auth_flavors; }; typedef struct mountres3_ok mountres3_ok; struct mountres3 { mountstat3 fhs_status; union { mountres3_ok mountinfo; } mountres3_u; }; typedef struct mountres3 mountres3; typedef char *dirpath; typedef char *name; typedef struct mountbody *mountlist; struct mountbody { name ml_hostname; dirpath ml_directory; mountlist ml_next; }; typedef struct mountbody mountbody; typedef struct groupnode *groups; struct groupnode { name gr_name; groups gr_next; }; typedef struct groupnode groupnode; typedef struct exportnode *exports; struct exportnode { dirpath ex_dir; groups ex_groups; exports ex_next; }; typedef struct exportnode exportnode; struct ppathcnf { int pc_link_max; short pc_max_canon; short pc_max_input; short pc_name_max; short pc_path_max; short pc_pipe_buf; u_char pc_vdisable; char pc_xxx; short pc_mask[2]; }; typedef struct ppathcnf ppathcnf; #define MOUNTPROG 100005 #define MOUNTVERS 1 #if defined(__STDC__) || defined(__cplusplus) #define MOUNTPROC_NULL 0 extern void * mountproc_null_1(void *, CLIENT *); extern void * mountproc_null_1_svc(void *, struct svc_req *); #define MOUNTPROC_MNT 1 extern fhstatus * mountproc_mnt_1(dirpath *, CLIENT *); extern fhstatus * mountproc_mnt_1_svc(dirpath *, struct svc_req *); #define MOUNTPROC_DUMP 2 extern mountlist * mountproc_dump_1(void *, CLIENT *); extern mountlist * mountproc_dump_1_svc(void *, struct svc_req *); #define MOUNTPROC_UMNT 3 extern void * mountproc_umnt_1(dirpath *, CLIENT *); extern void * mountproc_umnt_1_svc(dirpath *, struct svc_req *); #define MOUNTPROC_UMNTALL 4 extern void * mountproc_umntall_1(void *, CLIENT *); extern void * mountproc_umntall_1_svc(void *, struct svc_req *); #define MOUNTPROC_EXPORT 5 extern exports * mountproc_export_1(void *, CLIENT *); extern exports * mountproc_export_1_svc(void *, struct svc_req *); #define MOUNTPROC_EXPORTALL 6 extern exports * mountproc_exportall_1(void *, CLIENT *); extern exports * mountproc_exportall_1_svc(void *, struct svc_req *); extern int mountprog_1_freeresult(SVCXPRT *, xdrproc_t, caddr_t); #else /* K&R C */ #define MOUNTPROC_NULL 0 extern void * mountproc_null_1(); extern void * mountproc_null_1_svc(); #define MOUNTPROC_MNT 1 extern fhstatus * mountproc_mnt_1(); extern fhstatus * mountproc_mnt_1_svc(); #define MOUNTPROC_DUMP 2 extern mountlist * mountproc_dump_1(); extern mountlist * mountproc_dump_1_svc(); #define MOUNTPROC_UMNT 3 extern void * mountproc_umnt_1(); extern void * mountproc_umnt_1_svc(); #define MOUNTPROC_UMNTALL 4 extern void * mountproc_umntall_1(); extern void * mountproc_umntall_1_svc(); #define MOUNTPROC_EXPORT 5 extern exports * mountproc_export_1(); extern exports * mountproc_export_1_svc(); #define MOUNTPROC_EXPORTALL 6 extern exports * mountproc_exportall_1(); extern exports * mountproc_exportall_1_svc(); extern int mountprog_1_freeresult(); #endif /* K&R C */ #define MOUNTVERS_POSIX 2 #if defined(__STDC__) || defined(__cplusplus) extern void * mountproc_null_2(void *, CLIENT *); extern void * mountproc_null_2_svc(void *, struct svc_req *); extern fhstatus * mountproc_mnt_2(dirpath *, CLIENT *); extern fhstatus * mountproc_mnt_2_svc(dirpath *, struct svc_req *); extern mountlist * mountproc_dump_2(void *, CLIENT *); extern mountlist * mountproc_dump_2_svc(void *, struct svc_req *); extern void * mountproc_umnt_2(dirpath *, CLIENT *); extern void * mountproc_umnt_2_svc(dirpath *, struct svc_req *); extern void * mountproc_umntall_2(void *, CLIENT *); extern void * mountproc_umntall_2_svc(void *, struct svc_req *); extern exports * mountproc_export_2(void *, CLIENT *); extern exports * mountproc_export_2_svc(void *, struct svc_req *); extern exports * mountproc_exportall_2(void *, CLIENT *); extern exports * mountproc_exportall_2_svc(void *, struct svc_req *); #define MOUNTPROC_PATHCONF 7 extern ppathcnf * mountproc_pathconf_2(dirpath *, CLIENT *); extern ppathcnf * mountproc_pathconf_2_svc(dirpath *, struct svc_req *); extern int mountprog_2_freeresult(SVCXPRT *, xdrproc_t, caddr_t); #else /* K&R C */ extern void * mountproc_null_2(); extern void * mountproc_null_2_svc(); extern fhstatus * mountproc_mnt_2(); extern fhstatus * mountproc_mnt_2_svc(); extern mountlist * mountproc_dump_2(); extern mountlist * mountproc_dump_2_svc(); extern void * mountproc_umnt_2(); extern void * mountproc_umnt_2_svc(); extern void * mountproc_umntall_2(); extern void * mountproc_umntall_2_svc(); extern exports * mountproc_export_2(); extern exports * mountproc_export_2_svc(); extern exports * mountproc_exportall_2(); extern exports * mountproc_exportall_2_svc(); #define MOUNTPROC_PATHCONF 7 extern ppathcnf * mountproc_pathconf_2(); extern ppathcnf * mountproc_pathconf_2_svc(); extern int mountprog_2_freeresult(); #endif /* K&R C */ #define MOUNTVERS3 3 #if defined(__STDC__) || defined(__cplusplus) extern void * mountproc_null_3(void *, CLIENT *); extern void * mountproc_null_3_svc(void *, struct svc_req *); extern mountres3 * mountproc_mnt_3(dirpath *, CLIENT *); extern mountres3 * mountproc_mnt_3_svc(dirpath *, struct svc_req *); extern mountlist * mountproc_dump_3(void *, CLIENT *); extern mountlist * mountproc_dump_3_svc(void *, struct svc_req *); extern void * mountproc_umnt_3(dirpath *, CLIENT *); extern void * mountproc_umnt_3_svc(dirpath *, struct svc_req *); extern void * mountproc_umntall_3(void *, CLIENT *); extern void * mountproc_umntall_3_svc(void *, struct svc_req *); extern exports * mountproc_export_3(void *, CLIENT *); extern exports * mountproc_export_3_svc(void *, struct svc_req *); extern int mountprog_3_freeresult(SVCXPRT *, xdrproc_t, caddr_t); #else /* K&R C */ extern void * mountproc_null_3(); extern void * mountproc_null_3_svc(); extern mountres3 * mountproc_mnt_3(); extern mountres3 * mountproc_mnt_3_svc(); extern mountlist * mountproc_dump_3(); extern mountlist * mountproc_dump_3_svc(); extern void * mountproc_umnt_3(); extern void * mountproc_umnt_3_svc(); extern void * mountproc_umntall_3(); extern void * mountproc_umntall_3_svc(); extern exports * mountproc_export_3(); extern exports * mountproc_export_3_svc(); extern int mountprog_3_freeresult(); #endif /* K&R C */ /* the xdr functions */ #if defined(__STDC__) || defined(__cplusplus) extern bool_t xdr_fhandle(XDR *, fhandle); extern bool_t xdr_fhandle3(XDR *, fhandle3*); extern bool_t xdr_fhstatus(XDR *, fhstatus*); extern bool_t xdr_mountstat3(XDR *, mountstat3*); extern bool_t xdr_mountres3_ok(XDR *, mountres3_ok*); extern bool_t xdr_mountres3(XDR *, mountres3*); extern bool_t xdr_dirpath(XDR *, dirpath*); extern bool_t xdr_name(XDR *, name*); extern bool_t xdr_mountlist(XDR *, mountlist*); extern bool_t xdr_mountbody(XDR *, mountbody*); extern bool_t xdr_groups(XDR *, groups*); extern bool_t xdr_groupnode(XDR *, groupnode*); extern bool_t xdr_exports(XDR *, exports*); extern bool_t xdr_exportnode(XDR *, exportnode*); extern bool_t xdr_ppathcnf(XDR *, ppathcnf*); #else /* K&R C */ extern bool_t xdr_fhandle(); extern bool_t xdr_fhandle3(); extern bool_t xdr_fhstatus(); extern bool_t xdr_mountstat3(); extern bool_t xdr_mountres3_ok(); extern bool_t xdr_mountres3(); extern bool_t xdr_dirpath(); extern bool_t xdr_name(); extern bool_t xdr_mountlist(); extern bool_t xdr_mountbody(); extern bool_t xdr_groups(); extern bool_t xdr_groupnode(); extern bool_t xdr_exports(); extern bool_t xdr_exportnode(); extern bool_t xdr_ppathcnf(); #endif /* K&R C */ #ifdef __cplusplus } #endif #endif /* !_MOUNT_H_RPCGEN */ /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License, Version 1.0 only * (the "License"). You may not use this file except in compliance * with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright (c) 1988,1990-1992,1998 by Sun Microsystems, Inc. * All rights reserved. */ /* * Protocol description for the mount program */ const MNTPATHLEN = 1024; /* maximum bytes in a pathname argument */ const MNTNAMLEN = 255; /* maximum bytes in a name argument */ const FHSIZE = 32; /* size in bytes of a v2 file handle */ const FHSIZE3 = 64; /* " " " " " v3 " " */ /* * The fhandle is the file handle that the server passes to the client. * All file operations are done using the file handles to refer to a file * or a directory. The file handle can contain whatever information the * server needs to distinguish an individual file. * * Versions 1 and 2 of the protocol share a filehandle of 32 bytes. * * Version 3 supports a 64 byte filehandle that can be used only * with version 3 of the NFS protocol. */ typedef opaque fhandle[FHSIZE]; typedef opaque fhandle3; /* * If a V2 status of zero is returned, the call completed successfully, and * a file handle for the directory follows. A non-zero status indicates * some sort of error. The status corresponds with UNIX error numbers. */ union fhstatus switch (unsigned fhs_status) { case 0: fhandle fhs_fhandle; default: void; }; /* * This #define is added for backwards compatability with applications * which reference the old style fhstatus. The second element of that * structure was called fhs_fh, instead of the current fhs_fhandle. */ % %#define fhs_fh fhstatus_u.fhs_fhandle /* * The following status codes are defined for the V3 mount service: * Note that the precise enum encoding must be followed; the values * are derived from existing implementation practice, and there is * no good reason to disturb them. */ enum mountstat3 { MNT_OK= 0, /* no error */ MNT3ERR_PERM=1, /* Not owner */ MNT3ERR_NOENT=2, /* No such file or directory */ MNT3ERR_IO=5, /* I/O error */ MNT3ERR_ACCES=13, /* Permission denied */ MNT3ERR_NOTDIR=20, /* Not a directory*/ MNT3ERR_INVAL=22, /* Invalid argument.*/ MNT3ERR_NAMETOOLONG=63, /* File name too long */ MNT3ERR_NOTSUPP=10004, /* operation not supported */ MNT3ERR_SERVERFAULT=10006 /* An i/o or similar failure caused */ /* the server to abandon the request */ /* No attributes can be returned. The */ /* client should translate this into EIO */ }; /* * A V3 server returns a file handle and a list of the authentication * flavors that the server will accept for this mount. If the list * is empty, AUTH_UNIX is required. Otherwise, any of the flavors * listed in auth_flavors<> may be used (but no others). * The values of the authentication flavors are defined in the * underlying RPC protocol. */ struct mountres3_ok { fhandle3 fhandle; int auth_flavors<>; }; /* * If a V3 status of MNT_OK is returned, the call completed successfully, and * a file handle for the directory follows. Any other status indicates * some sort of error. */ union mountres3 switch (mountstat3 fhs_status) { case MNT_OK: mountres3_ok mountinfo; default: void; }; /* * The type dirpath is the pathname of a directory */ typedef string dirpath; /* * The type name is used for arbitrary names (hostnames, groupnames) */ typedef string name; /* * A list of who has what mounted. This information is * strictly advisory, since there is no mechanism to * enforce the removal of stale information. The strongest * assertion that can be made is that if a hostname:directory * pair appears in the list, the server has exported the * directory to that client at some point since the server * export data base was (re)initialized. Note also that there * is no limit on the length of the information returned * in this structure, and this may cause problems if the * mount service is accessed via a connectionless transport. * * The ifdef will ensure that these are only carried over to * mount.h - no xdr routines will be generated. We want to * do these by hand, to avoid the recursive stack-blowing ones * that rpcgen will generate. */ #ifdef RPC_HDR typedef struct mountbody *mountlist; struct mountbody { name ml_hostname; dirpath ml_directory; mountlist ml_next; }; #endif /* RPC_HDR */ /* * A list of netgroups */ typedef struct groupnode *groups; struct groupnode { name gr_name; groups gr_next; }; /* * A list of what is exported and to whom */ typedef struct exportnode *exports; struct exportnode { dirpath ex_dir; groups ex_groups; exports ex_next; }; /* * POSIX pathconf information */ struct ppathcnf { int pc_link_max; /* max links allowed */ short pc_max_canon; /* max line len for a tty */ short pc_max_input; /* input a tty can eat all at once */ short pc_name_max; /* max file name length (dir entry) */ short pc_path_max; /* max path name length (/x/y/x/.. ) */ short pc_pipe_buf; /* size of a pipe (bytes) */ u_char pc_vdisable; /* safe char to turn off c_cc[i] */ char pc_xxx; /* alignment padding; cc_t == char */ short pc_mask[2]; /* validity and boolean bits */ }; program MOUNTPROG { /* * Version one of the mount protocol communicates with version two * of the NFS protocol. The only connecting point is the fhandle * structure, which is the same for both protocols. */ version MOUNTVERS { /* * Does no work. It is made available in all RPC services * to allow server reponse testing and timing */ void MOUNTPROC_NULL(void) = 0; /* * If fhs_status is 0, then fhs_fhandle contains the * file handle for the directory. This file handle may * be used in the NFS protocol. This procedure also adds * a new entry to the mount list for this client mounting * the directory. * Unix authentication required. */ fhstatus MOUNTPROC_MNT(dirpath) = 1; /* * Returns the list of remotely mounted filesystems. The * mountlist contains one entry for each hostname and * directory pair. */ mountlist MOUNTPROC_DUMP(void) = 2; /* * Removes the mount list entry for the directory * Unix authentication required. */ void MOUNTPROC_UMNT(dirpath) = 3; /* * Removes all of the mount list entries for this client * Unix authentication required. */ void MOUNTPROC_UMNTALL(void) = 4; /* * Returns a list of all the exported filesystems, and which * machines are allowed to import it. */ exports MOUNTPROC_EXPORT(void) = 5; /* * Identical to MOUNTPROC_EXPORT above */ exports MOUNTPROC_EXPORTALL(void) = 6; } = 1; /* * Version two of the mount protocol communicates with version two * of the NFS protocol. It is identical to version one except for a * new procedure call for posix. */ version MOUNTVERS_POSIX { /* * Does no work. It is made available in all RPC services * to allow server reponse testing and timing */ void MOUNTPROC_NULL(void) = 0; /* * If fhs_status is 0, then fhs_fhandle contains the * file handle for the directory. This file handle may * be used in the NFS protocol. This procedure also adds * a new entry to the mount list for this client mounting * the directory. * Unix authentication required. */ fhstatus MOUNTPROC_MNT(dirpath) = 1; /* * Returns the list of remotely mounted filesystems. The * mountlist contains one entry for each hostname and * directory pair. */ mountlist MOUNTPROC_DUMP(void) = 2; /* * Removes the mount list entry for the directory * Unix authentication required. */ void MOUNTPROC_UMNT(dirpath) = 3; /* * Removes all of the mount list entries for this client * Unix authentication required. */ void MOUNTPROC_UMNTALL(void) = 4; /* * Returns a list of all the exported filesystems, and which * machines are allowed to import it. */ exports MOUNTPROC_EXPORT(void) = 5; /* * Identical to MOUNTPROC_EXPORT above */ exports MOUNTPROC_EXPORTALL(void) = 6; /* * Posix info over the wire isn't supported in NFS version 2 * so we get it here at mount time. */ ppathcnf MOUNTPROC_PATHCONF(dirpath) = 7; } = 2; /* * Version 3 of the mount protocol communicates with version 3 * of the NFS protocol. The only connecting point is the nfs_fh3 * structure, which is the same for both protocols. * * The only significant change over version 2 is that MOUNTPROC_MNT * returns a longer filehandle (64 bytes instead of 32) as well * as authentication information. MOUNTPROC_PATHCONF is subsumed * into V3 of the NFS protocol and MOUNTPROC_EXPORTALL is eliminated. */ version MOUNTVERS3 { /* * Does no work. It is made available in all RPC services * to allow server reponse testing and timing */ void MOUNTPROC_NULL(void) = 0; /* * Mount a file system. * * If mountres.fhs_status is NFS_OK, then mountres.mountinfo * contains the file handle for the directory and * a list of acceptable authentication flavors. This file * handle may only be used in version 3 of the NFS protocol. * This procedure also results in the server adding a new * entry to its mount list recording that this client has * mounted the directory. Unix authentication or better * is required. */ mountres3 MOUNTPROC_MNT(dirpath) = 1; /* * Returns the list of remotely mounted filesystems. The * mountlist contains one entry for each hostname and * directory pair. */ mountlist MOUNTPROC_DUMP(void) = 2; /* * Removes the mount list entry for the directory * Unix authentication or better is required. */ void MOUNTPROC_UMNT(dirpath) = 3; /* * Removes all of the mount list entries for this client * Unix authentication or better is required. */ void MOUNTPROC_UMNTALL(void) = 4; /* * Returns a list of all the exported filesystems, and which * machines are allowed to import each one. */ exports MOUNTPROC_EXPORT(void) = 5; } = 3; } = 100005; /* * Please do not edit this file. * It was generated using rpcgen. */ #ifndef _NFS4_PROT_H_RPCGEN #define _NFS4_PROT_H_RPCGEN #include #ifdef __cplusplus extern "C" { #endif #ifndef _AUTH_SYS_DEFINE_FOR_NFSv42 #define _AUTH_SYS_DEFINE_FOR_NFSv42 #include typedef struct authsys_parms authsys_parms; #endif /* _AUTH_SYS_DEFINE_FOR_NFSv42 */ #define NFS4_FHSIZE 128 #define NFS4_VERIFIER_SIZE 8 #define NFS4_OTHER_SIZE 12 #define NFS4_OPAQUE_LIMIT 1024 #define NFS4_SESSIONID_SIZE 16 #define NFS4_INT64_MAX 0x7fffffffffffffff #define NFS4_UINT64_MAX 0xffffffffffffffff #define NFS4_INT32_MAX 0x7fffffff #define NFS4_UINT32_MAX 0xffffffff #define NFS4_MAXFILELEN 0xffffffffffffffff #define NFS4_MAXFILEOFF 0xfffffffffffffffe enum nfs_ftype4 { NF4REG = 1, NF4DIR = 2, NF4BLK = 3, NF4CHR = 4, NF4LNK = 5, NF4SOCK = 6, NF4FIFO = 7, NF4ATTRDIR = 8, NF4NAMEDATTR = 9 }; typedef enum nfs_ftype4 nfs_ftype4; enum nfsstat4 { NFS4_OK = 0, NFS4ERR_PERM = 1, NFS4ERR_NOENT = 2, NFS4ERR_IO = 5, NFS4ERR_NXIO = 6, NFS4ERR_ACCESS = 13, NFS4ERR_EXIST = 17, NFS4ERR_XDEV = 18, NFS4ERR_NOTDIR = 20, NFS4ERR_ISDIR = 21, NFS4ERR_INVAL = 22, NFS4ERR_FBIG = 27, NFS4ERR_NOSPC = 28, NFS4ERR_ROFS = 30, NFS4ERR_MLINK = 31, NFS4ERR_NAMETOOLONG = 63, NFS4ERR_NOTEMPTY = 66, NFS4ERR_DQUOT = 69, NFS4ERR_STALE = 70, NFS4ERR_BADHANDLE = 10001, NFS4ERR_BAD_COOKIE = 10003, NFS4ERR_NOTSUPP = 10004, NFS4ERR_TOOSMALL = 10005, NFS4ERR_SERVERFAULT = 10006, NFS4ERR_BADTYPE = 10007, NFS4ERR_DELAY = 10008, NFS4ERR_SAME = 10009, NFS4ERR_DENIED = 10010, NFS4ERR_EXPIRED = 10011, NFS4ERR_LOCKED = 10012, NFS4ERR_GRACE = 10013, NFS4ERR_FHEXPIRED = 10014, NFS4ERR_SHARE_DENIED = 10015, NFS4ERR_WRONGSEC = 10016, NFS4ERR_CLID_INUSE = 10017, NFS4ERR_RESOURCE = 10018, NFS4ERR_MOVED = 10019, NFS4ERR_NOFILEHANDLE = 10020, NFS4ERR_MINOR_VERS_MISMATCH = 10021, NFS4ERR_STALE_CLIENTID = 10022, NFS4ERR_STALE_STATEID = 10023, NFS4ERR_OLD_STATEID = 10024, NFS4ERR_BAD_STATEID = 10025, NFS4ERR_BAD_SEQID = 10026, NFS4ERR_NOT_SAME = 10027, NFS4ERR_LOCK_RANGE = 10028, NFS4ERR_SYMLINK = 10029, NFS4ERR_RESTOREFH = 10030, NFS4ERR_LEASE_MOVED = 10031, NFS4ERR_ATTRNOTSUPP = 10032, NFS4ERR_NO_GRACE = 10033, NFS4ERR_RECLAIM_BAD = 10034, NFS4ERR_RECLAIM_CONFLICT = 10035, NFS4ERR_BADXDR = 10036, NFS4ERR_LOCKS_HELD = 10037, NFS4ERR_OPENMODE = 10038, NFS4ERR_BADOWNER = 10039, NFS4ERR_BADCHAR = 10040, NFS4ERR_BADNAME = 10041, NFS4ERR_BAD_RANGE = 10042, NFS4ERR_LOCK_NOTSUPP = 10043, NFS4ERR_OP_ILLEGAL = 10044, NFS4ERR_DEADLOCK = 10045, NFS4ERR_FILE_OPEN = 10046, NFS4ERR_ADMIN_REVOKED = 10047, NFS4ERR_CB_PATH_DOWN = 10048, NFS4ERR_BADIOMODE = 10049, NFS4ERR_BADLAYOUT = 10050, NFS4ERR_BAD_SESSION_DIGEST = 10051, NFS4ERR_BADSESSION = 10052, NFS4ERR_BADSLOT = 10053, NFS4ERR_COMPLETE_ALREADY = 10054, NFS4ERR_CONN_NOT_BOUND_TO_SESSION = 10055, NFS4ERR_DELEG_ALREADY_WANTED = 10056, NFS4ERR_BACK_CHAN_BUSY = 10057, NFS4ERR_LAYOUTTRYLATER = 10058, NFS4ERR_LAYOUTUNAVAILABLE = 10059, NFS4ERR_NOMATCHING_LAYOUT = 10060, NFS4ERR_RECALLCONFLICT = 10061, NFS4ERR_UNKNOWN_LAYOUTTYPE = 10062, NFS4ERR_SEQ_MISORDERED = 10063, NFS4ERR_SEQUENCE_POS = 10064, NFS4ERR_REQ_TOO_BIG = 10065, NFS4ERR_REP_TOO_BIG = 10066, NFS4ERR_REP_TOO_BIG_TO_CACHE = 10067, NFS4ERR_RETRY_UNCACHED_REP = 10068, NFS4ERR_UNSAFE_COMPOUND = 10069, NFS4ERR_TOO_MANY_OPS = 10070, NFS4ERR_OP_NOT_IN_SESSION = 10071, NFS4ERR_HASH_ALG_UNSUPP = 10072, NFS4ERR_CLIENTID_BUSY = 10074, NFS4ERR_PNFS_IO_HOLE = 10075, NFS4ERR_SEQ_FALSE_RETRY = 10076, NFS4ERR_BAD_HIGH_SLOT = 10077, NFS4ERR_DEADSESSION = 10078, NFS4ERR_ENCR_ALG_UNSUPP = 10079, NFS4ERR_PNFS_NO_LAYOUT = 10080, NFS4ERR_NOT_ONLY_OP = 10081, NFS4ERR_WRONG_CRED = 10082, NFS4ERR_WRONG_TYPE = 10083, NFS4ERR_DIRDELEG_UNAVAIL = 10084, NFS4ERR_REJECT_DELEG = 10085, NFS4ERR_RETURNCONFLICT = 10086, NFS4ERR_DELEG_REVOKED = 10087, NFS4ERR_PARTNER_NOTSUPP = 10088, NFS4ERR_PARTNER_NO_AUTH = 10089, NFS4ERR_UNION_NOTSUPP = 10090, NFS4ERR_OFFLOAD_DENIED = 10091, NFS4ERR_WRONG_LFS = 10092, NFS4ERR_BADLABEL = 10093, NFS4ERR_OFFLOAD_NO_REQS = 10094 }; typedef enum nfsstat4 nfsstat4; typedef struct { u_int attrlist4_len; char *attrlist4_val; } attrlist4; typedef struct { u_int bitmap4_len; uint32_t *bitmap4_val; } bitmap4; typedef uint64_t changeid4; typedef uint64_t clientid4; typedef uint32_t count4; typedef uint64_t length4; typedef uint32_t mode4; typedef uint64_t nfs_cookie4; typedef struct { u_int nfs_fh4_len; char *nfs_fh4_val; } nfs_fh4; typedef uint64_t offset4; typedef uint32_t qop4; typedef struct { u_int sec_oid4_len; char *sec_oid4_val; } sec_oid4; typedef uint32_t sequenceid4; typedef uint32_t seqid4; typedef char sessionid4[NFS4_SESSIONID_SIZE]; typedef uint32_t slotid4; typedef struct { u_int utf8string_len; char *utf8string_val; } utf8string; typedef utf8string utf8str_cis; typedef utf8string utf8str_cs; typedef utf8string utf8str_mixed; typedef utf8str_cs component4; typedef struct { u_int linktext4_len; char *linktext4_val; } linktext4; typedef utf8string ascii_REQUIRED4; typedef struct { u_int pathname4_len; component4 *pathname4_val; } pathname4; typedef char verifier4[NFS4_VERIFIER_SIZE]; typedef char *secret4; typedef uint32_t policy4; struct nfstime4 { int64_t seconds; uint32_t nseconds; }; typedef struct nfstime4 nfstime4; enum time_how4 { SET_TO_SERVER_TIME4 = 0, SET_TO_CLIENT_TIME4 = 1 }; typedef enum time_how4 time_how4; struct settime4 { time_how4 set_it; union { nfstime4 time; } settime4_u; }; typedef struct settime4 settime4; typedef uint32_t nfs_lease4; struct fsid4 { uint64_t major; uint64_t minor; }; typedef struct fsid4 fsid4; struct change_policy4 { uint64_t cp_major; uint64_t cp_minor; }; typedef struct change_policy4 change_policy4; struct fs_location4 { struct { u_int server_len; utf8str_cis *server_val; } server; pathname4 rootpath; }; typedef struct fs_location4 fs_location4; struct fs_locations4 { pathname4 fs_root; struct { u_int locations_len; fs_location4 *locations_val; } locations; }; typedef struct fs_locations4 fs_locations4; #define ACL4_SUPPORT_ALLOW_ACL 0x00000001 #define ACL4_SUPPORT_DENY_ACL 0x00000002 #define ACL4_SUPPORT_AUDIT_ACL 0x00000004 #define ACL4_SUPPORT_ALARM_ACL 0x00000008 typedef uint32_t acetype4; #define ACE4_ACCESS_ALLOWED_ACE_TYPE 0x00000000 #define ACE4_ACCESS_DENIED_ACE_TYPE 0x00000001 #define ACE4_SYSTEM_AUDIT_ACE_TYPE 0x00000002 #define ACE4_SYSTEM_ALARM_ACE_TYPE 0x00000003 typedef uint32_t aceflag4; #define ACE4_FILE_INHERIT_ACE 0x00000001 #define ACE4_DIRECTORY_INHERIT_ACE 0x00000002 #define ACE4_NO_PROPAGATE_INHERIT_ACE 0x00000004 #define ACE4_INHERIT_ONLY_ACE 0x00000008 #define ACE4_SUCCESSFUL_ACCESS_ACE_FLAG 0x00000010 #define ACE4_FAILED_ACCESS_ACE_FLAG 0x00000020 #define ACE4_IDENTIFIER_GROUP 0x00000040 #define ACE4_INHERITED_ACE 0x00000080 typedef uint32_t acemask4; #define ACE4_READ_DATA 0x00000001 #define ACE4_LIST_DIRECTORY 0x00000001 #define ACE4_WRITE_DATA 0x00000002 #define ACE4_ADD_FILE 0x00000002 #define ACE4_APPEND_DATA 0x00000004 #define ACE4_ADD_SUBDIRECTORY 0x00000004 #define ACE4_READ_NAMED_ATTRS 0x00000008 #define ACE4_WRITE_NAMED_ATTRS 0x00000010 #define ACE4_EXECUTE 0x00000020 #define ACE4_DELETE_CHILD 0x00000040 #define ACE4_READ_ATTRIBUTES 0x00000080 #define ACE4_WRITE_ATTRIBUTES 0x00000100 #define ACE4_WRITE_RETENTION 0x00000200 #define ACE4_WRITE_RETENTION_HOLD 0x00000400 #define ACE4_DELETE 0x00010000 #define ACE4_READ_ACL 0x00020000 #define ACE4_WRITE_ACL 0x00040000 #define ACE4_WRITE_OWNER 0x00080000 #define ACE4_SYNCHRONIZE 0x00100000 #define ACE4_GENERIC_READ 0x00120081 #define ACE4_GENERIC_WRITE 0x00160106 #define ACE4_GENERIC_EXECUTE 0x001200A0 struct nfsace4 { acetype4 type; aceflag4 flag; acemask4 access_mask; utf8str_mixed who; }; typedef struct nfsace4 nfsace4; typedef uint32_t aclflag4; #define ACL4_AUTO_INHERIT 0x00000001 #define ACL4_PROTECTED 0x00000002 #define ACL4_DEFAULTED 0x00000004 struct nfsacl41 { aclflag4 na41_flag; struct { u_int na41_aces_len; nfsace4 *na41_aces_val; } na41_aces; }; typedef struct nfsacl41 nfsacl41; #define MODE4_SUID 0x800 #define MODE4_SGID 0x400 #define MODE4_SVTX 0x200 #define MODE4_RUSR 0x100 #define MODE4_WUSR 0x080 #define MODE4_XUSR 0x040 #define MODE4_RGRP 0x020 #define MODE4_WGRP 0x010 #define MODE4_XGRP 0x008 #define MODE4_ROTH 0x004 #define MODE4_WOTH 0x002 #define MODE4_XOTH 0x001 struct mode_masked4 { mode4 mm_value_to_set; mode4 mm_mask_bits; }; typedef struct mode_masked4 mode_masked4; struct specdata4 { uint32_t specdata1; uint32_t specdata2; }; typedef struct specdata4 specdata4; #define FH4_PERSISTENT 0x00000000 #define FH4_NOEXPIRE_WITH_OPEN 0x00000001 #define FH4_VOLATILE_ANY 0x00000002 #define FH4_VOL_MIGRATION 0x00000004 #define FH4_VOL_RENAME 0x00000008 struct netaddr4 { char *na_r_netid; char *na_r_addr; }; typedef struct netaddr4 netaddr4; struct nfs_impl_id4 { utf8str_cis nii_domain; utf8str_cs nii_name; nfstime4 nii_date; }; typedef struct nfs_impl_id4 nfs_impl_id4; struct stateid4 { uint32_t seqid; char other[NFS4_OTHER_SIZE]; }; typedef struct stateid4 stateid4; enum layouttype4 { LAYOUT4_NFSV4_1_FILES = 0x1, LAYOUT4_OSD2_OBJECTS = 0x2, LAYOUT4_BLOCK_VOLUME = 0x3 }; typedef enum layouttype4 layouttype4; struct layout_content4 { layouttype4 loc_type; struct { u_int loc_body_len; char *loc_body_val; } loc_body; }; typedef struct layout_content4 layout_content4; /* * LAYOUT4_OSD2_OBJECTS loc_body description * is in a separate .x file. */ /* * LAYOUT4_BLOCK_VOLUME loc_body description * is in a separate .x file. */ struct layouthint4 { layouttype4 loh_type; struct { u_int loh_body_len; char *loh_body_val; } loh_body; }; typedef struct layouthint4 layouthint4; enum layoutiomode4 { LAYOUTIOMODE4_READ = 1, LAYOUTIOMODE4_RW = 2, LAYOUTIOMODE4_ANY = 3 }; typedef enum layoutiomode4 layoutiomode4; struct layout4 { offset4 lo_offset; length4 lo_length; layoutiomode4 lo_iomode; layout_content4 lo_content; }; typedef struct layout4 layout4; #define NFS4_DEVICEID4_SIZE 16 typedef char deviceid4[NFS4_DEVICEID4_SIZE]; struct device_addr4 { layouttype4 da_layout_type; struct { u_int da_addr_body_len; char *da_addr_body_val; } da_addr_body; }; typedef struct device_addr4 device_addr4; struct layoutupdate4 { layouttype4 lou_type; struct { u_int lou_body_len; char *lou_body_val; } lou_body; }; typedef struct layoutupdate4 layoutupdate4; #define LAYOUT4_RET_REC_FILE 1 #define LAYOUT4_RET_REC_FSID 2 #define LAYOUT4_RET_REC_ALL 3 enum layoutreturn_type4 { LAYOUTRETURN4_FILE = LAYOUT4_RET_REC_FILE, LAYOUTRETURN4_FSID = LAYOUT4_RET_REC_FSID, LAYOUTRETURN4_ALL = LAYOUT4_RET_REC_ALL }; typedef enum layoutreturn_type4 layoutreturn_type4; /* layouttype4 specific data */ struct layoutreturn_file4 { offset4 lrf_offset; length4 lrf_length; stateid4 lrf_stateid; struct { u_int lrf_body_len; char *lrf_body_val; } lrf_body; }; typedef struct layoutreturn_file4 layoutreturn_file4; struct layoutreturn4 { layoutreturn_type4 lr_returntype; union { layoutreturn_file4 lr_layout; } layoutreturn4_u; }; typedef struct layoutreturn4 layoutreturn4; enum fs4_status_type { STATUS4_FIXED = 1, STATUS4_UPDATED = 2, STATUS4_VERSIONED = 3, STATUS4_WRITABLE = 4, STATUS4_REFERRAL = 5 }; typedef enum fs4_status_type fs4_status_type; struct fs4_status { bool_t fss_absent; fs4_status_type fss_type; utf8str_cs fss_source; utf8str_cs fss_current; int32_t fss_age; nfstime4 fss_version; }; typedef struct fs4_status fs4_status; #define TH4_READ_SIZE 0 #define TH4_WRITE_SIZE 1 #define TH4_READ_IOSIZE 2 #define TH4_WRITE_IOSIZE 3 typedef length4 threshold4_read_size; typedef length4 threshold4_write_size; typedef length4 threshold4_read_iosize; typedef length4 threshold4_write_iosize; struct threshold_item4 { layouttype4 thi_layout_type; bitmap4 thi_hintset; struct { u_int thi_hintlist_len; char *thi_hintlist_val; } thi_hintlist; }; typedef struct threshold_item4 threshold_item4; struct mdsthreshold4 { struct { u_int mth_hints_len; threshold_item4 *mth_hints_val; } mth_hints; }; typedef struct mdsthreshold4 mdsthreshold4; #define RET4_DURATION_INFINITE 0xffffffffffffffff struct retention_get4 { uint64_t rg_duration; struct { u_int rg_begin_time_len; nfstime4 *rg_begin_time_val; } rg_begin_time; }; typedef struct retention_get4 retention_get4; struct retention_set4 { bool_t rs_enable; struct { u_int rs_duration_len; uint64_t *rs_duration_val; } rs_duration; }; typedef struct retention_set4 retention_set4; #define FSCHARSET_CAP4_CONTAINS_NON_UTF8 0x1 #define FSCHARSET_CAP4_ALLOWS_ONLY_UTF8 0x2 typedef uint32_t fs_charset_cap4; enum netloc_type4 { NL4_NAME = 1, NL4_URL = 2, NL4_NETADDR = 3 }; typedef enum netloc_type4 netloc_type4; struct netloc4 { netloc_type4 nl_type; union { utf8str_cis nl_name; utf8str_cis nl_url; netaddr4 nl_addr; } netloc4_u; }; typedef struct netloc4 netloc4; enum change_attr_type4 { NFS4_CHANGE_TYPE_IS_MONOTONIC_INCR = 0, NFS4_CHANGE_TYPE_IS_VERSION_COUNTER = 1, NFS4_CHANGE_TYPE_IS_VERSION_COUNTER_NOPNFS = 2, NFS4_CHANGE_TYPE_IS_TIME_METADATA = 3, NFS4_CHANGE_TYPE_IS_UNDEFINED = 4 }; typedef enum change_attr_type4 change_attr_type4; struct labelformat_spec4 { policy4 lfs_lfs; policy4 lfs_pi; }; typedef struct labelformat_spec4 labelformat_spec4; struct sec_label4 { labelformat_spec4 slai_lfs; struct { u_int slai_data_len; char *slai_data_val; } slai_data; }; typedef struct sec_label4 sec_label4; struct copy_from_auth_priv { secret4 cfap_shared_secret; netloc4 cfap_destination; utf8str_mixed cfap_username; }; typedef struct copy_from_auth_priv copy_from_auth_priv; struct copy_to_auth_priv { secret4 ctap_shared_secret; struct { u_int ctap_source_len; netloc4 *ctap_source_val; } ctap_source; utf8str_mixed ctap_username; }; typedef struct copy_to_auth_priv copy_to_auth_priv; struct copy_confirm_auth_priv { struct { u_int ccap_shared_secret_mic_len; char *ccap_shared_secret_mic_val; } ccap_shared_secret_mic; utf8str_mixed ccap_username; }; typedef struct copy_confirm_auth_priv copy_confirm_auth_priv; struct app_data_block4 { offset4 adb_offset; length4 adb_block_size; length4 adb_block_count; length4 adb_reloff_blocknum; count4 adb_block_num; length4 adb_reloff_pattern; struct { u_int adb_pattern_len; char *adb_pattern_val; } adb_pattern; }; typedef struct app_data_block4 app_data_block4; struct data4 { offset4 d_offset; struct { u_int d_data_len; char *d_data_val; } d_data; }; typedef struct data4 data4; struct data_info4 { offset4 di_offset; length4 di_length; }; typedef struct data_info4 data_info4; enum data_content4 { NFS4_CONTENT_DATA = 0, NFS4_CONTENT_HOLE = 1 }; typedef enum data_content4 data_content4; enum stable_how4 { UNSTABLE4 = 0, DATA_SYNC4 = 1, FILE_SYNC4 = 2 }; typedef enum stable_how4 stable_how4; struct write_response4 { struct { u_int wr_callback_id_len; stateid4 *wr_callback_id_val; } wr_callback_id; length4 wr_count; stable_how4 wr_committed; verifier4 wr_writeverf; }; typedef struct write_response4 write_response4; typedef bitmap4 fattr4_supported_attrs; typedef nfs_ftype4 fattr4_type; typedef uint32_t fattr4_fh_expire_type; typedef changeid4 fattr4_change; typedef uint64_t fattr4_size; typedef bool_t fattr4_link_support; typedef bool_t fattr4_symlink_support; typedef bool_t fattr4_named_attr; typedef fsid4 fattr4_fsid; typedef bool_t fattr4_unique_handles; typedef nfs_lease4 fattr4_lease_time; typedef nfsstat4 fattr4_rdattr_error; typedef struct { u_int fattr4_acl_len; nfsace4 *fattr4_acl_val; } fattr4_acl; typedef uint32_t fattr4_aclsupport; typedef bool_t fattr4_archive; typedef bool_t fattr4_cansettime; typedef bool_t fattr4_case_insensitive; typedef bool_t fattr4_case_preserving; typedef bool_t fattr4_chown_restricted; typedef uint64_t fattr4_fileid; typedef uint64_t fattr4_files_avail; typedef nfs_fh4 fattr4_filehandle; typedef uint64_t fattr4_files_free; typedef uint64_t fattr4_files_total; typedef fs_locations4 fattr4_fs_locations; typedef bool_t fattr4_hidden; typedef bool_t fattr4_homogeneous; typedef uint64_t fattr4_maxfilesize; typedef uint32_t fattr4_maxlink; typedef uint32_t fattr4_maxname; typedef uint64_t fattr4_maxread; typedef uint64_t fattr4_maxwrite; typedef ascii_REQUIRED4 fattr4_mimetype; typedef mode4 fattr4_mode; typedef mode_masked4 fattr4_mode_set_masked; typedef uint64_t fattr4_mounted_on_fileid; typedef bool_t fattr4_no_trunc; typedef uint32_t fattr4_numlinks; typedef utf8str_mixed fattr4_owner; typedef utf8str_mixed fattr4_owner_group; typedef uint64_t fattr4_quota_avail_hard; typedef uint64_t fattr4_quota_avail_soft; typedef uint64_t fattr4_quota_used; typedef specdata4 fattr4_rawdev; typedef uint64_t fattr4_space_avail; typedef length4 fattr4_space_free; typedef uint64_t fattr4_space_total; typedef uint64_t fattr4_space_used; typedef bool_t fattr4_system; typedef nfstime4 fattr4_time_access; typedef settime4 fattr4_time_access_set; typedef nfstime4 fattr4_time_backup; typedef nfstime4 fattr4_time_create; typedef nfstime4 fattr4_time_delta; typedef nfstime4 fattr4_time_metadata; typedef nfstime4 fattr4_time_modify; typedef settime4 fattr4_time_modify_set; typedef bitmap4 fattr4_suppattr_exclcreat; typedef nfstime4 fattr4_dir_notif_delay; typedef nfstime4 fattr4_dirent_notif_delay; typedef struct { u_int fattr4_fs_layout_types_len; layouttype4 *fattr4_fs_layout_types_val; } fattr4_fs_layout_types; typedef fs4_status fattr4_fs_status; typedef fs_charset_cap4 fattr4_fs_charset_cap; typedef uint32_t fattr4_layout_alignment; typedef uint32_t fattr4_layout_blksize; typedef layouthint4 fattr4_layout_hint; typedef struct { u_int fattr4_layout_types_len; layouttype4 *fattr4_layout_types_val; } fattr4_layout_types; typedef mdsthreshold4 fattr4_mdsthreshold; typedef retention_get4 fattr4_retention_get; typedef retention_set4 fattr4_retention_set; typedef retention_get4 fattr4_retentevt_get; typedef retention_set4 fattr4_retentevt_set; typedef uint64_t fattr4_retention_hold; typedef nfsacl41 fattr4_dacl; typedef nfsacl41 fattr4_sacl; typedef change_policy4 fattr4_change_policy; typedef uint64_t fattr4_space_freed; typedef change_attr_type4 fattr4_change_attr_type; typedef sec_label4 fattr4_sec_label; typedef uint32_t fattr4_clone_blksize; /* * REQUIRED attributes */ #define FATTR4_SUPPORTED_ATTRS 0 #define FATTR4_TYPE 1 #define FATTR4_FH_EXPIRE_TYPE 2 #define FATTR4_CHANGE 3 #define FATTR4_SIZE 4 #define FATTR4_LINK_SUPPORT 5 #define FATTR4_SYMLINK_SUPPORT 6 #define FATTR4_NAMED_ATTR 7 #define FATTR4_FSID 8 #define FATTR4_UNIQUE_HANDLES 9 #define FATTR4_LEASE_TIME 10 #define FATTR4_RDATTR_ERROR 11 #define FATTR4_FILEHANDLE 19 /* * New to NFSv4.1 */ #define FATTR4_SUPPATTR_EXCLCREAT 75 /* * RECOMMENDED attributes */ #define FATTR4_ACL 12 #define FATTR4_ACLSUPPORT 13 #define FATTR4_ARCHIVE 14 #define FATTR4_CANSETTIME 15 #define FATTR4_CASE_INSENSITIVE 16 #define FATTR4_CASE_PRESERVING 17 #define FATTR4_CHOWN_RESTRICTED 18 #define FATTR4_FILEID 20 #define FATTR4_FILES_AVAIL 21 #define FATTR4_FILES_FREE 22 #define FATTR4_FILES_TOTAL 23 #define FATTR4_FS_LOCATIONS 24 #define FATTR4_HIDDEN 25 #define FATTR4_HOMOGENEOUS 26 #define FATTR4_MAXFILESIZE 27 #define FATTR4_MAXLINK 28 #define FATTR4_MAXNAME 29 #define FATTR4_MAXREAD 30 #define FATTR4_MAXWRITE 31 #define FATTR4_MIMETYPE 32 #define FATTR4_MODE 33 #define FATTR4_NO_TRUNC 34 #define FATTR4_NUMLINKS 35 #define FATTR4_OWNER 36 #define FATTR4_OWNER_GROUP 37 #define FATTR4_QUOTA_AVAIL_HARD 38 #define FATTR4_QUOTA_AVAIL_SOFT 39 #define FATTR4_QUOTA_USED 40 #define FATTR4_RAWDEV 41 #define FATTR4_SPACE_AVAIL 42 #define FATTR4_SPACE_FREE 43 #define FATTR4_SPACE_TOTAL 44 #define FATTR4_SPACE_USED 45 #define FATTR4_SYSTEM 46 #define FATTR4_TIME_ACCESS 47 #define FATTR4_TIME_ACCESS_SET 48 #define FATTR4_TIME_BACKUP 49 #define FATTR4_TIME_CREATE 50 #define FATTR4_TIME_DELTA 51 #define FATTR4_TIME_METADATA 52 #define FATTR4_TIME_MODIFY 53 #define FATTR4_TIME_MODIFY_SET 54 #define FATTR4_MOUNTED_ON_FILEID 55 /* * New to NFSv4.1 */ #define FATTR4_DIR_NOTIF_DELAY 56 #define FATTR4_DIRENT_NOTIF_DELAY 57 #define FATTR4_DACL 58 #define FATTR4_SACL 59 #define FATTR4_CHANGE_POLICY 60 #define FATTR4_FS_STATUS 61 #define FATTR4_FS_LAYOUT_TYPES 62 #define FATTR4_LAYOUT_HINT 63 #define FATTR4_LAYOUT_TYPES 64 #define FATTR4_LAYOUT_BLKSIZE 65 #define FATTR4_LAYOUT_ALIGNMENT 66 #define FATTR4_FS_LOCATIONS_INFO 67 #define FATTR4_MDSTHRESHOLD 68 #define FATTR4_RETENTION_GET 69 #define FATTR4_RETENTION_SET 70 #define FATTR4_RETENTEVT_GET 71 #define FATTR4_RETENTEVT_SET 72 #define FATTR4_RETENTION_HOLD 73 #define FATTR4_MODE_SET_MASKED 74 #define FATTR4_FS_CHARSET_CAP 76 /* * New to NFSv4.2 */ #define FATTR4_CLONE_BLKSIZE 77 #define FATTR4_SPACE_FREED 78 #define FATTR4_CHANGE_ATTR_TYPE 79 #define FATTR4_SEC_LABEL 80 struct fattr4 { bitmap4 attrmask; attrlist4 attr_vals; }; typedef struct fattr4 fattr4; struct change_info4 { bool_t atomic; changeid4 before; changeid4 after; }; typedef struct change_info4 change_info4; typedef netaddr4 clientaddr4; struct cb_client4 { uint32_t cb_program; netaddr4 cb_location; }; typedef struct cb_client4 cb_client4; struct nfs_client_id4 { verifier4 verifier; struct { u_int id_len; char *id_val; } id; }; typedef struct nfs_client_id4 nfs_client_id4; struct client_owner4 { verifier4 co_verifier; struct { u_int co_ownerid_len; char *co_ownerid_val; } co_ownerid; }; typedef struct client_owner4 client_owner4; struct server_owner4 { uint64_t so_minor_id; struct { u_int so_major_id_len; char *so_major_id_val; } so_major_id; }; typedef struct server_owner4 server_owner4; struct state_owner4 { clientid4 clientid; struct { u_int owner_len; char *owner_val; } owner; }; typedef struct state_owner4 state_owner4; typedef state_owner4 open_owner4; typedef state_owner4 lock_owner4; enum nfs_lock_type4 { READ_LT = 1, WRITE_LT = 2, READW_LT = 3, WRITEW_LT = 4 }; typedef enum nfs_lock_type4 nfs_lock_type4; /* Input for computing subkeys */ enum ssv_subkey4 { SSV4_SUBKEY_MIC_I2T = 1, SSV4_SUBKEY_MIC_T2I = 2, SSV4_SUBKEY_SEAL_I2T = 3, SSV4_SUBKEY_SEAL_T2I = 4 }; typedef enum ssv_subkey4 ssv_subkey4; /* Input for computing smt_hmac */ struct ssv_mic_plain_tkn4 { uint32_t smpt_ssv_seq; struct { u_int smpt_orig_plain_len; char *smpt_orig_plain_val; } smpt_orig_plain; }; typedef struct ssv_mic_plain_tkn4 ssv_mic_plain_tkn4; /* * Secret State Verifier Generic Security Service (SSV GSS) * PerMsgToken token */ struct ssv_mic_tkn4 { uint32_t smt_ssv_seq; struct { u_int smt_hmac_len; char *smt_hmac_val; } smt_hmac; }; typedef struct ssv_mic_tkn4 ssv_mic_tkn4; /* Input for computing ssct_encr_data and ssct_hmac */ struct ssv_seal_plain_tkn4 { struct { u_int sspt_confounder_len; char *sspt_confounder_val; } sspt_confounder; uint32_t sspt_ssv_seq; struct { u_int sspt_orig_plain_len; char *sspt_orig_plain_val; } sspt_orig_plain; struct { u_int sspt_pad_len; char *sspt_pad_val; } sspt_pad; }; typedef struct ssv_seal_plain_tkn4 ssv_seal_plain_tkn4; /* SSV GSS SealedMessage token */ struct ssv_seal_cipher_tkn4 { uint32_t ssct_ssv_seq; struct { u_int ssct_iv_len; char *ssct_iv_val; } ssct_iv; struct { u_int ssct_encr_data_len; char *ssct_encr_data_val; } ssct_encr_data; struct { u_int ssct_hmac_len; char *ssct_hmac_val; } ssct_hmac; }; typedef struct ssv_seal_cipher_tkn4 ssv_seal_cipher_tkn4; struct fs_locations_server4 { int32_t fls_currency; struct { u_int fls_info_len; char *fls_info_val; } fls_info; utf8str_cis fls_server; }; typedef struct fs_locations_server4 fs_locations_server4; #define FSLI4BX_GFLAGS 0 #define FSLI4BX_TFLAGS 1 #define FSLI4BX_CLSIMUL 2 #define FSLI4BX_CLHANDLE 3 #define FSLI4BX_CLFILEID 4 #define FSLI4BX_CLWRITEVER 5 #define FSLI4BX_CLCHANGE 6 #define FSLI4BX_CLREADDIR 7 #define FSLI4BX_READRANK 8 #define FSLI4BX_WRITERANK 9 #define FSLI4BX_READORDER 10 #define FSLI4BX_WRITEORDER 11 #define FSLI4GF_WRITABLE 0x01 #define FSLI4GF_CUR_REQ 0x02 #define FSLI4GF_ABSENT 0x04 #define FSLI4GF_GOING 0x08 #define FSLI4GF_SPLIT 0x10 #define FSLI4TF_RDMA 0x01 struct fs_locations_item4 { struct { u_int fli_entries_len; fs_locations_server4 *fli_entries_val; } fli_entries; pathname4 fli_rootpath; }; typedef struct fs_locations_item4 fs_locations_item4; struct fs_locations_info4 { uint32_t fli_flags; int32_t fli_valid_for; pathname4 fli_fs_root; struct { u_int fli_items_len; fs_locations_item4 *fli_items_val; } fli_items; }; typedef struct fs_locations_info4 fs_locations_info4; #define FSLI4IF_VAR_SUB 0x00000001 typedef fs_locations_info4 fattr4_fs_locations_info; #define NFL4_UFLG_MASK 0x0000003F #define NFL4_UFLG_DENSE 0x00000001 #define NFL4_UFLG_COMMIT_THRU_MDS 0x00000002 #define NFL42_UFLG_IO_ADVISE_THRU_MDS 0x00000004 #define NFL4_UFLG_STRIPE_UNIT_SIZE_MASK 0xFFFFFFC0 typedef uint32_t nfl_util4; enum filelayout_hint_care4 { NFLH4_CARE_DENSE = NFL4_UFLG_DENSE, NFLH4_CARE_COMMIT_THRU_MDS = NFL4_UFLG_COMMIT_THRU_MDS, NFL42_CARE_IO_ADVISE_THRU_MDS = NFL42_UFLG_IO_ADVISE_THRU_MDS, NFLH4_CARE_STRIPE_UNIT_SIZE = 0x00000040, NFLH4_CARE_STRIPE_COUNT = 0x00000080 }; typedef enum filelayout_hint_care4 filelayout_hint_care4; /* * Encoded in the loh_body field of data type layouthint4: */ struct nfsv4_1_file_layouthint4 { uint32_t nflh_care; nfl_util4 nflh_util; count4 nflh_stripe_count; }; typedef struct nfsv4_1_file_layouthint4 nfsv4_1_file_layouthint4; typedef struct { u_int multipath_list4_len; netaddr4 *multipath_list4_val; } multipath_list4; /* * Encoded in the da_addr_body field of data type device_addr4: */ struct nfsv4_1_file_layout_ds_addr4 { struct { u_int nflda_stripe_indices_len; uint32_t *nflda_stripe_indices_val; } nflda_stripe_indices; struct { u_int nflda_multipath_ds_list_len; multipath_list4 *nflda_multipath_ds_list_val; } nflda_multipath_ds_list; }; typedef struct nfsv4_1_file_layout_ds_addr4 nfsv4_1_file_layout_ds_addr4; /* * Encoded in the loc_body field of data type layout_content4: */ struct nfsv4_1_file_layout4 { deviceid4 nfl_deviceid; nfl_util4 nfl_util; uint32_t nfl_first_stripe_index; offset4 nfl_pattern_offset; struct { u_int nfl_fh_list_len; nfs_fh4 *nfl_fh_list_val; } nfl_fh_list; }; typedef struct nfsv4_1_file_layout4 nfsv4_1_file_layout4; /* New operations for NFSv4.1 */ /* New operations for NFSv4.2 */ enum nfs_opnum4 { OP_ACCESS = 3, OP_CLOSE = 4, OP_COMMIT = 5, OP_CREATE = 6, OP_DELEGPURGE = 7, OP_DELEGRETURN = 8, OP_GETATTR = 9, OP_GETFH = 10, OP_LINK = 11, OP_LOCK = 12, OP_LOCKT = 13, OP_LOCKU = 14, OP_LOOKUP = 15, OP_LOOKUPP = 16, OP_NVERIFY = 17, OP_OPEN = 18, OP_OPENATTR = 19, OP_OPEN_CONFIRM = 20, OP_OPEN_DOWNGRADE = 21, OP_PUTFH = 22, OP_PUTPUBFH = 23, OP_PUTROOTFH = 24, OP_READ = 25, OP_READDIR = 26, OP_READLINK = 27, OP_REMOVE = 28, OP_RENAME = 29, OP_RENEW = 30, OP_RESTOREFH = 31, OP_SAVEFH = 32, OP_SECINFO = 33, OP_SETATTR = 34, OP_SETCLIENTID = 35, OP_SETCLIENTID_CONFIRM = 36, OP_VERIFY = 37, OP_WRITE = 38, OP_RELEASE_LOCKOWNER = 39, OP_BACKCHANNEL_CTL = 40, OP_BIND_CONN_TO_SESSION = 41, OP_EXCHANGE_ID = 42, OP_CREATE_SESSION = 43, OP_DESTROY_SESSION = 44, OP_FREE_STATEID = 45, OP_GET_DIR_DELEGATION = 46, OP_GETDEVICEINFO = 47, OP_GETDEVICELIST = 48, OP_LAYOUTCOMMIT = 49, OP_LAYOUTGET = 50, OP_LAYOUTRETURN = 51, OP_SECINFO_NO_NAME = 52, OP_SEQUENCE = 53, OP_SET_SSV = 54, OP_TEST_STATEID = 55, OP_WANT_DELEGATION = 56, OP_DESTROY_CLIENTID = 57, OP_RECLAIM_COMPLETE = 58, OP_ALLOCATE = 59, OP_COPY = 60, OP_COPY_NOTIFY = 61, OP_DEALLOCATE = 62, OP_IO_ADVISE = 63, OP_LAYOUTERROR = 64, OP_LAYOUTSTATS = 65, OP_OFFLOAD_CANCEL = 66, OP_OFFLOAD_STATUS = 67, OP_READ_PLUS = 68, OP_SEEK = 69, OP_WRITE_SAME = 70, OP_CLONE = 71, OP_ILLEGAL = 10044 }; typedef enum nfs_opnum4 nfs_opnum4; #define ACCESS4_READ 0x00000001 #define ACCESS4_LOOKUP 0x00000002 #define ACCESS4_MODIFY 0x00000004 #define ACCESS4_EXTEND 0x00000008 #define ACCESS4_DELETE 0x00000010 #define ACCESS4_EXECUTE 0x00000020 struct ACCESS4args { uint32_t access; }; typedef struct ACCESS4args ACCESS4args; struct ACCESS4resok { uint32_t supported; uint32_t access; }; typedef struct ACCESS4resok ACCESS4resok; struct ACCESS4res { nfsstat4 status; union { ACCESS4resok resok4; } ACCESS4res_u; }; typedef struct ACCESS4res ACCESS4res; struct CLONE4args { stateid4 cl_src_stateid; stateid4 cl_dst_stateid; offset4 cl_src_offset; offset4 cl_dst_offset; length4 cl_count; }; typedef struct CLONE4args CLONE4args; struct CLONE4res { nfsstat4 cl_status; }; typedef struct CLONE4res CLONE4res; struct CLOSE4args { seqid4 seqid; stateid4 open_stateid; }; typedef struct CLOSE4args CLOSE4args; struct CLOSE4res { nfsstat4 status; union { stateid4 open_stateid; } CLOSE4res_u; }; typedef struct CLOSE4res CLOSE4res; struct COMMIT4args { offset4 offset; count4 count; }; typedef struct COMMIT4args COMMIT4args; struct COMMIT4resok { verifier4 writeverf; }; typedef struct COMMIT4resok COMMIT4resok; struct COMMIT4res { nfsstat4 status; union { COMMIT4resok resok4; } COMMIT4res_u; }; typedef struct COMMIT4res COMMIT4res; struct createtype4 { nfs_ftype4 type; union { linktext4 linkdata; specdata4 devdata; } createtype4_u; }; typedef struct createtype4 createtype4; struct CREATE4args { createtype4 objtype; component4 objname; fattr4 createattrs; }; typedef struct CREATE4args CREATE4args; struct CREATE4resok { change_info4 cinfo; bitmap4 attrset; }; typedef struct CREATE4resok CREATE4resok; struct CREATE4res { nfsstat4 status; union { CREATE4resok resok4; } CREATE4res_u; }; typedef struct CREATE4res CREATE4res; struct DELEGPURGE4args { clientid4 clientid; }; typedef struct DELEGPURGE4args DELEGPURGE4args; struct DELEGPURGE4res { nfsstat4 status; }; typedef struct DELEGPURGE4res DELEGPURGE4res; struct DELEGRETURN4args { stateid4 deleg_stateid; }; typedef struct DELEGRETURN4args DELEGRETURN4args; struct DELEGRETURN4res { nfsstat4 status; }; typedef struct DELEGRETURN4res DELEGRETURN4res; struct GETATTR4args { bitmap4 attr_request; }; typedef struct GETATTR4args GETATTR4args; struct GETATTR4resok { fattr4 obj_attributes; }; typedef struct GETATTR4resok GETATTR4resok; struct GETATTR4res { nfsstat4 status; union { GETATTR4resok resok4; } GETATTR4res_u; }; typedef struct GETATTR4res GETATTR4res; struct GETFH4resok { nfs_fh4 object; }; typedef struct GETFH4resok GETFH4resok; struct GETFH4res { nfsstat4 status; union { GETFH4resok resok4; } GETFH4res_u; }; typedef struct GETFH4res GETFH4res; struct LINK4args { component4 newname; }; typedef struct LINK4args LINK4args; struct LINK4resok { change_info4 cinfo; }; typedef struct LINK4resok LINK4resok; struct LINK4res { nfsstat4 status; union { LINK4resok resok4; } LINK4res_u; }; typedef struct LINK4res LINK4res; struct open_to_lock_owner4 { seqid4 open_seqid; stateid4 open_stateid; seqid4 lock_seqid; lock_owner4 lock_owner; }; typedef struct open_to_lock_owner4 open_to_lock_owner4; struct exist_lock_owner4 { stateid4 lock_stateid; seqid4 lock_seqid; }; typedef struct exist_lock_owner4 exist_lock_owner4; struct locker4 { bool_t new_lock_owner; union { open_to_lock_owner4 open_owner; exist_lock_owner4 lock_owner; } locker4_u; }; typedef struct locker4 locker4; struct LOCK4args { nfs_lock_type4 locktype; bool_t reclaim; offset4 offset; length4 length; locker4 locker; }; typedef struct LOCK4args LOCK4args; struct LOCK4denied { offset4 offset; length4 length; nfs_lock_type4 locktype; lock_owner4 owner; }; typedef struct LOCK4denied LOCK4denied; struct LOCK4resok { stateid4 lock_stateid; }; typedef struct LOCK4resok LOCK4resok; struct LOCK4res { nfsstat4 status; union { LOCK4resok resok4; LOCK4denied denied; } LOCK4res_u; }; typedef struct LOCK4res LOCK4res; struct LOCKT4args { nfs_lock_type4 locktype; offset4 offset; length4 length; lock_owner4 owner; }; typedef struct LOCKT4args LOCKT4args; struct LOCKT4res { nfsstat4 status; union { LOCK4denied denied; } LOCKT4res_u; }; typedef struct LOCKT4res LOCKT4res; struct LOCKU4args { nfs_lock_type4 locktype; seqid4 seqid; stateid4 lock_stateid; offset4 offset; length4 length; }; typedef struct LOCKU4args LOCKU4args; struct LOCKU4res { nfsstat4 status; union { stateid4 lock_stateid; } LOCKU4res_u; }; typedef struct LOCKU4res LOCKU4res; struct LOOKUP4args { component4 objname; }; typedef struct LOOKUP4args LOOKUP4args; struct LOOKUP4res { nfsstat4 status; }; typedef struct LOOKUP4res LOOKUP4res; struct LOOKUPP4res { nfsstat4 status; }; typedef struct LOOKUPP4res LOOKUPP4res; struct NVERIFY4args { fattr4 obj_attributes; }; typedef struct NVERIFY4args NVERIFY4args; struct NVERIFY4res { nfsstat4 status; }; typedef struct NVERIFY4res NVERIFY4res; enum createmode4 { UNCHECKED4 = 0, GUARDED4 = 1, EXCLUSIVE4 = 2, EXCLUSIVE4_1 = 3 }; typedef enum createmode4 createmode4; struct creatverfattr { verifier4 cva_verf; fattr4 cva_attrs; }; typedef struct creatverfattr creatverfattr; struct createhow4 { createmode4 mode; union { fattr4 createattrs; verifier4 createverf; creatverfattr ch_createboth; } createhow4_u; }; typedef struct createhow4 createhow4; enum opentype4 { OPEN4_NOCREATE = 0, OPEN4_CREATE = 1 }; typedef enum opentype4 opentype4; struct openflag4 { opentype4 opentype; union { createhow4 how; } openflag4_u; }; typedef struct openflag4 openflag4; enum limit_by4 { NFS_LIMIT_SIZE = 1, NFS_LIMIT_BLOCKS = 2 }; typedef enum limit_by4 limit_by4; struct nfs_modified_limit4 { uint32_t num_blocks; uint32_t bytes_per_block; }; typedef struct nfs_modified_limit4 nfs_modified_limit4; struct nfs_space_limit4 { limit_by4 limitby; union { uint64_t filesize; nfs_modified_limit4 mod_blocks; } nfs_space_limit4_u; }; typedef struct nfs_space_limit4 nfs_space_limit4; #define OPEN4_SHARE_ACCESS_READ 0x00000001 #define OPEN4_SHARE_ACCESS_WRITE 0x00000002 #define OPEN4_SHARE_ACCESS_BOTH 0x00000003 #define OPEN4_SHARE_DENY_NONE 0x00000000 #define OPEN4_SHARE_DENY_READ 0x00000001 #define OPEN4_SHARE_DENY_WRITE 0x00000002 #define OPEN4_SHARE_DENY_BOTH 0x00000003 #define OPEN4_SHARE_ACCESS_WANT_DELEG_MASK 0xFF00 #define OPEN4_SHARE_ACCESS_WANT_NO_PREFERENCE 0x0000 #define OPEN4_SHARE_ACCESS_WANT_READ_DELEG 0x0100 #define OPEN4_SHARE_ACCESS_WANT_WRITE_DELEG 0x0200 #define OPEN4_SHARE_ACCESS_WANT_ANY_DELEG 0x0300 #define OPEN4_SHARE_ACCESS_WANT_NO_DELEG 0x0400 #define OPEN4_SHARE_ACCESS_WANT_CANCEL 0x0500 #define OPEN4_SHARE_ACCESS_WANT_SIGNAL_DELEG_WHEN_RESRC_AVAIL 0x10000 #define OPEN4_SHARE_ACCESS_WANT_PUSH_DELEG_WHEN_UNCONTENDED 0x20000 enum open_delegation_type4 { OPEN_DELEGATE_NONE = 0, OPEN_DELEGATE_READ = 1, OPEN_DELEGATE_WRITE = 2, OPEN_DELEGATE_NONE_EXT = 3 }; typedef enum open_delegation_type4 open_delegation_type4; enum open_claim_type4 { CLAIM_NULL = 0, CLAIM_PREVIOUS = 1, CLAIM_DELEGATE_CUR = 2, CLAIM_DELEGATE_PREV = 3, CLAIM_FH = 4, CLAIM_DELEG_CUR_FH = 5, CLAIM_DELEG_PREV_FH = 6 }; typedef enum open_claim_type4 open_claim_type4; struct open_claim_delegate_cur4 { stateid4 delegate_stateid; component4 file; }; typedef struct open_claim_delegate_cur4 open_claim_delegate_cur4; struct open_claim4 { open_claim_type4 claim; union { component4 file; open_delegation_type4 delegate_type; open_claim_delegate_cur4 delegate_cur_info; component4 file_delegate_prev; stateid4 oc_delegate_stateid; } open_claim4_u; }; typedef struct open_claim4 open_claim4; struct OPEN4args { seqid4 seqid; uint32_t share_access; uint32_t share_deny; open_owner4 owner; openflag4 openhow; open_claim4 claim; }; typedef struct OPEN4args OPEN4args; struct open_read_delegation4 { stateid4 stateid; bool_t recall; nfsace4 permissions; }; typedef struct open_read_delegation4 open_read_delegation4; struct open_write_delegation4 { stateid4 stateid; bool_t recall; nfs_space_limit4 space_limit; nfsace4 permissions; }; typedef struct open_write_delegation4 open_write_delegation4; enum why_no_delegation4 { WND4_NOT_WANTED = 0, WND4_CONTENTION = 1, WND4_RESOURCE = 2, WND4_NOT_SUPP_FTYPE = 3, WND4_WRITE_DELEG_NOT_SUPP_FTYPE = 4, WND4_NOT_SUPP_UPGRADE = 5, WND4_NOT_SUPP_DOWNGRADE = 6, WND4_CANCELLED = 7, WND4_IS_DIR = 8 }; typedef enum why_no_delegation4 why_no_delegation4; struct open_none_delegation4 { why_no_delegation4 ond_why; union { bool_t ond_server_will_push_deleg; bool_t ond_server_will_signal_avail; } open_none_delegation4_u; }; typedef struct open_none_delegation4 open_none_delegation4; struct open_delegation4 { open_delegation_type4 delegation_type; union { open_read_delegation4 read; open_write_delegation4 write; open_none_delegation4 od_whynone; } open_delegation4_u; }; typedef struct open_delegation4 open_delegation4; #define OPEN4_RESULT_CONFIRM 0x00000002 #define OPEN4_RESULT_LOCKTYPE_POSIX 0x00000004 #define OPEN4_RESULT_PRESERVE_UNLINKED 0x00000008 #define OPEN4_RESULT_MAY_NOTIFY_LOCK 0x00000020 struct OPEN4resok { stateid4 stateid; change_info4 cinfo; uint32_t rflags; bitmap4 attrset; open_delegation4 delegation; }; typedef struct OPEN4resok OPEN4resok; struct OPEN4res { nfsstat4 status; union { OPEN4resok resok4; } OPEN4res_u; }; typedef struct OPEN4res OPEN4res; struct OPENATTR4args { bool_t createdir; }; typedef struct OPENATTR4args OPENATTR4args; struct OPENATTR4res { nfsstat4 status; }; typedef struct OPENATTR4res OPENATTR4res; struct OPEN_CONFIRM4args { stateid4 open_stateid; seqid4 seqid; }; typedef struct OPEN_CONFIRM4args OPEN_CONFIRM4args; struct OPEN_CONFIRM4resok { stateid4 open_stateid; }; typedef struct OPEN_CONFIRM4resok OPEN_CONFIRM4resok; struct OPEN_CONFIRM4res { nfsstat4 status; union { OPEN_CONFIRM4resok resok4; } OPEN_CONFIRM4res_u; }; typedef struct OPEN_CONFIRM4res OPEN_CONFIRM4res; struct OPEN_DOWNGRADE4args { stateid4 open_stateid; seqid4 seqid; uint32_t share_access; uint32_t share_deny; }; typedef struct OPEN_DOWNGRADE4args OPEN_DOWNGRADE4args; struct OPEN_DOWNGRADE4resok { stateid4 open_stateid; }; typedef struct OPEN_DOWNGRADE4resok OPEN_DOWNGRADE4resok; struct OPEN_DOWNGRADE4res { nfsstat4 status; union { OPEN_DOWNGRADE4resok resok4; } OPEN_DOWNGRADE4res_u; }; typedef struct OPEN_DOWNGRADE4res OPEN_DOWNGRADE4res; struct PUTFH4args { nfs_fh4 object; }; typedef struct PUTFH4args PUTFH4args; struct PUTFH4res { nfsstat4 status; }; typedef struct PUTFH4res PUTFH4res; struct PUTPUBFH4res { nfsstat4 status; }; typedef struct PUTPUBFH4res PUTPUBFH4res; struct PUTROOTFH4res { nfsstat4 status; }; typedef struct PUTROOTFH4res PUTROOTFH4res; struct READ4args { stateid4 stateid; offset4 offset; count4 count; }; typedef struct READ4args READ4args; struct READ4resok { bool_t eof; struct { u_int data_len; char *data_val; } data; }; typedef struct READ4resok READ4resok; struct READ4res { nfsstat4 status; union { READ4resok resok4; } READ4res_u; }; typedef struct READ4res READ4res; struct READDIR4args { nfs_cookie4 cookie; verifier4 cookieverf; count4 dircount; count4 maxcount; bitmap4 attr_request; }; typedef struct READDIR4args READDIR4args; struct entry4 { nfs_cookie4 cookie; component4 name; fattr4 attrs; struct entry4 *nextentry; }; typedef struct entry4 entry4; struct dirlist4 { entry4 *entries; bool_t eof; }; typedef struct dirlist4 dirlist4; struct READDIR4resok { verifier4 cookieverf; dirlist4 reply; }; typedef struct READDIR4resok READDIR4resok; struct READDIR4res { nfsstat4 status; union { READDIR4resok resok4; } READDIR4res_u; }; typedef struct READDIR4res READDIR4res; struct READLINK4resok { linktext4 link; }; typedef struct READLINK4resok READLINK4resok; struct READLINK4res { nfsstat4 status; union { READLINK4resok resok4; } READLINK4res_u; }; typedef struct READLINK4res READLINK4res; struct REMOVE4args { component4 target; }; typedef struct REMOVE4args REMOVE4args; struct REMOVE4resok { change_info4 cinfo; }; typedef struct REMOVE4resok REMOVE4resok; struct REMOVE4res { nfsstat4 status; union { REMOVE4resok resok4; } REMOVE4res_u; }; typedef struct REMOVE4res REMOVE4res; struct RENAME4args { component4 oldname; component4 newname; }; typedef struct RENAME4args RENAME4args; struct RENAME4resok { change_info4 source_cinfo; change_info4 target_cinfo; }; typedef struct RENAME4resok RENAME4resok; struct RENAME4res { nfsstat4 status; union { RENAME4resok resok4; } RENAME4res_u; }; typedef struct RENAME4res RENAME4res; struct RENEW4args { clientid4 clientid; }; typedef struct RENEW4args RENEW4args; struct RENEW4res { nfsstat4 status; }; typedef struct RENEW4res RENEW4res; struct RESTOREFH4res { nfsstat4 status; }; typedef struct RESTOREFH4res RESTOREFH4res; struct SAVEFH4res { nfsstat4 status; }; typedef struct SAVEFH4res SAVEFH4res; struct SECINFO4args { component4 name; }; typedef struct SECINFO4args SECINFO4args; enum rpc_gss_svc_t { RPC_GSS_SVC_NONE = 1, RPC_GSS_SVC_INTEGRITY = 2, RPC_GSS_SVC_PRIVACY = 3 }; typedef enum rpc_gss_svc_t rpc_gss_svc_t; struct rpcsec_gss_info { sec_oid4 oid; qop4 qop; rpc_gss_svc_t service; }; typedef struct rpcsec_gss_info rpcsec_gss_info; struct secinfo4 { uint32_t flavor; union { rpcsec_gss_info flavor_info; } secinfo4_u; }; typedef struct secinfo4 secinfo4; typedef struct { u_int SECINFO4resok_len; secinfo4 *SECINFO4resok_val; } SECINFO4resok; struct SECINFO4res { nfsstat4 status; union { SECINFO4resok resok4; } SECINFO4res_u; }; typedef struct SECINFO4res SECINFO4res; struct SETATTR4args { stateid4 stateid; fattr4 obj_attributes; }; typedef struct SETATTR4args SETATTR4args; struct SETATTR4res { nfsstat4 status; bitmap4 attrsset; }; typedef struct SETATTR4res SETATTR4res; struct SETCLIENTID4args { nfs_client_id4 client; cb_client4 callback; uint32_t callback_ident; }; typedef struct SETCLIENTID4args SETCLIENTID4args; struct SETCLIENTID4resok { clientid4 clientid; verifier4 setclientid_confirm; }; typedef struct SETCLIENTID4resok SETCLIENTID4resok; struct SETCLIENTID4res { nfsstat4 status; union { SETCLIENTID4resok resok4; clientaddr4 client_using; } SETCLIENTID4res_u; }; typedef struct SETCLIENTID4res SETCLIENTID4res; struct SETCLIENTID_CONFIRM4args { clientid4 clientid; verifier4 setclientid_confirm; }; typedef struct SETCLIENTID_CONFIRM4args SETCLIENTID_CONFIRM4args; struct SETCLIENTID_CONFIRM4res { nfsstat4 status; }; typedef struct SETCLIENTID_CONFIRM4res SETCLIENTID_CONFIRM4res; struct VERIFY4args { fattr4 obj_attributes; }; typedef struct VERIFY4args VERIFY4args; struct VERIFY4res { nfsstat4 status; }; typedef struct VERIFY4res VERIFY4res; struct WRITE4args { stateid4 stateid; offset4 offset; stable_how4 stable; struct { u_int data_len; char *data_val; } data; }; typedef struct WRITE4args WRITE4args; struct WRITE4resok { count4 count; stable_how4 committed; verifier4 writeverf; }; typedef struct WRITE4resok WRITE4resok; struct WRITE4res { nfsstat4 status; union { WRITE4resok resok4; } WRITE4res_u; }; typedef struct WRITE4res WRITE4res; struct RELEASE_LOCKOWNER4args { lock_owner4 lock_owner; }; typedef struct RELEASE_LOCKOWNER4args RELEASE_LOCKOWNER4args; struct RELEASE_LOCKOWNER4res { nfsstat4 status; }; typedef struct RELEASE_LOCKOWNER4res RELEASE_LOCKOWNER4res; struct ILLEGAL4res { nfsstat4 status; }; typedef struct ILLEGAL4res ILLEGAL4res; typedef struct { u_int gsshandle4_t_len; char *gsshandle4_t_val; } gsshandle4_t; struct gss_cb_handles4 { rpc_gss_svc_t gcbp_service; gsshandle4_t gcbp_handle_from_server; gsshandle4_t gcbp_handle_from_client; }; typedef struct gss_cb_handles4 gss_cb_handles4; struct callback_sec_parms4 { uint32_t cb_secflavor; union { authsys_parms cbsp_sys_cred; gss_cb_handles4 cbsp_gss_handles; } callback_sec_parms4_u; }; typedef struct callback_sec_parms4 callback_sec_parms4; struct BACKCHANNEL_CTL4args { uint32_t bca_cb_program; struct { u_int bca_sec_parms_len; callback_sec_parms4 *bca_sec_parms_val; } bca_sec_parms; }; typedef struct BACKCHANNEL_CTL4args BACKCHANNEL_CTL4args; struct BACKCHANNEL_CTL4res { nfsstat4 bcr_status; }; typedef struct BACKCHANNEL_CTL4res BACKCHANNEL_CTL4res; enum channel_dir_from_client4 { CDFC4_FORE = 0x1, CDFC4_BACK = 0x2, CDFC4_FORE_OR_BOTH = 0x3, CDFC4_BACK_OR_BOTH = 0x7 }; typedef enum channel_dir_from_client4 channel_dir_from_client4; struct BIND_CONN_TO_SESSION4args { sessionid4 bctsa_sessid; channel_dir_from_client4 bctsa_dir; bool_t bctsa_use_conn_in_rdma_mode; }; typedef struct BIND_CONN_TO_SESSION4args BIND_CONN_TO_SESSION4args; enum channel_dir_from_server4 { CDFS4_FORE = 0x1, CDFS4_BACK = 0x2, CDFS4_BOTH = 0x3 }; typedef enum channel_dir_from_server4 channel_dir_from_server4; struct BIND_CONN_TO_SESSION4resok { sessionid4 bctsr_sessid; channel_dir_from_server4 bctsr_dir; bool_t bctsr_use_conn_in_rdma_mode; }; typedef struct BIND_CONN_TO_SESSION4resok BIND_CONN_TO_SESSION4resok; struct BIND_CONN_TO_SESSION4res { nfsstat4 bctsr_status; union { BIND_CONN_TO_SESSION4resok bctsr_resok4; } BIND_CONN_TO_SESSION4res_u; }; typedef struct BIND_CONN_TO_SESSION4res BIND_CONN_TO_SESSION4res; #define EXCHGID4_FLAG_SUPP_MOVED_REFER 0x00000001 #define EXCHGID4_FLAG_SUPP_MOVED_MIGR 0x00000002 #define EXCHGID4_FLAG_SUPP_FENCE_OPS 0x00000004 #define EXCHGID4_FLAG_BIND_PRINC_STATEID 0x00000100 #define EXCHGID4_FLAG_USE_NON_PNFS 0x00010000 #define EXCHGID4_FLAG_USE_PNFS_MDS 0x00020000 #define EXCHGID4_FLAG_USE_PNFS_DS 0x00040000 #define EXCHGID4_FLAG_MASK_PNFS 0x00070000 #define EXCHGID4_FLAG_UPD_CONFIRMED_REC_A 0x40000000 #define EXCHGID4_FLAG_CONFIRMED_R 0x80000000 struct state_protect_ops4 { bitmap4 spo_must_enforce; bitmap4 spo_must_allow; }; typedef struct state_protect_ops4 state_protect_ops4; struct ssv_sp_parms4 { state_protect_ops4 ssp_ops; struct { u_int ssp_hash_algs_len; sec_oid4 *ssp_hash_algs_val; } ssp_hash_algs; struct { u_int ssp_encr_algs_len; sec_oid4 *ssp_encr_algs_val; } ssp_encr_algs; uint32_t ssp_window; uint32_t ssp_num_gss_handles; }; typedef struct ssv_sp_parms4 ssv_sp_parms4; enum state_protect_how4 { SP4_NONE = 0, SP4_MACH_CRED = 1, SP4_SSV = 2 }; typedef enum state_protect_how4 state_protect_how4; struct state_protect4_a { state_protect_how4 spa_how; union { state_protect_ops4 spa_mach_ops; ssv_sp_parms4 spa_ssv_parms; } state_protect4_a_u; }; typedef struct state_protect4_a state_protect4_a; struct EXCHANGE_ID4args { client_owner4 eia_clientowner; uint32_t eia_flags; state_protect4_a eia_state_protect; struct { u_int eia_client_impl_id_len; nfs_impl_id4 *eia_client_impl_id_val; } eia_client_impl_id; }; typedef struct EXCHANGE_ID4args EXCHANGE_ID4args; struct ssv_prot_info4 { state_protect_ops4 spi_ops; uint32_t spi_hash_alg; uint32_t spi_encr_alg; uint32_t spi_ssv_len; uint32_t spi_window; struct { u_int spi_handles_len; gsshandle4_t *spi_handles_val; } spi_handles; }; typedef struct ssv_prot_info4 ssv_prot_info4; struct state_protect4_r { state_protect_how4 spr_how; union { state_protect_ops4 spr_mach_ops; ssv_prot_info4 spr_ssv_info; } state_protect4_r_u; }; typedef struct state_protect4_r state_protect4_r; struct EXCHANGE_ID4resok { clientid4 eir_clientid; sequenceid4 eir_sequenceid; uint32_t eir_flags; state_protect4_r eir_state_protect; server_owner4 eir_server_owner; struct { u_int eir_server_scope_len; char *eir_server_scope_val; } eir_server_scope; struct { u_int eir_server_impl_id_len; nfs_impl_id4 *eir_server_impl_id_val; } eir_server_impl_id; }; typedef struct EXCHANGE_ID4resok EXCHANGE_ID4resok; struct EXCHANGE_ID4res { nfsstat4 eir_status; union { EXCHANGE_ID4resok eir_resok4; } EXCHANGE_ID4res_u; }; typedef struct EXCHANGE_ID4res EXCHANGE_ID4res; struct channel_attrs4 { count4 ca_headerpadsize; count4 ca_maxrequestsize; count4 ca_maxresponsesize; count4 ca_maxresponsesize_cached; count4 ca_maxoperations; count4 ca_maxrequests; struct { u_int ca_rdma_ird_len; uint32_t *ca_rdma_ird_val; } ca_rdma_ird; }; typedef struct channel_attrs4 channel_attrs4; #define CREATE_SESSION4_FLAG_PERSIST 0x00000001 #define CREATE_SESSION4_FLAG_CONN_BACK_CHAN 0x00000002 #define CREATE_SESSION4_FLAG_CONN_RDMA 0x00000004 struct CREATE_SESSION4args { clientid4 csa_clientid; sequenceid4 csa_sequence; uint32_t csa_flags; channel_attrs4 csa_fore_chan_attrs; channel_attrs4 csa_back_chan_attrs; uint32_t csa_cb_program; struct { u_int csa_sec_parms_len; callback_sec_parms4 *csa_sec_parms_val; } csa_sec_parms; }; typedef struct CREATE_SESSION4args CREATE_SESSION4args; struct CREATE_SESSION4resok { sessionid4 csr_sessionid; sequenceid4 csr_sequence; uint32_t csr_flags; channel_attrs4 csr_fore_chan_attrs; channel_attrs4 csr_back_chan_attrs; }; typedef struct CREATE_SESSION4resok CREATE_SESSION4resok; struct CREATE_SESSION4res { nfsstat4 csr_status; union { CREATE_SESSION4resok csr_resok4; } CREATE_SESSION4res_u; }; typedef struct CREATE_SESSION4res CREATE_SESSION4res; struct DESTROY_SESSION4args { sessionid4 dsa_sessionid; }; typedef struct DESTROY_SESSION4args DESTROY_SESSION4args; struct DESTROY_SESSION4res { nfsstat4 dsr_status; }; typedef struct DESTROY_SESSION4res DESTROY_SESSION4res; struct FREE_STATEID4args { stateid4 fsa_stateid; }; typedef struct FREE_STATEID4args FREE_STATEID4args; struct FREE_STATEID4res { nfsstat4 fsr_status; }; typedef struct FREE_STATEID4res FREE_STATEID4res; typedef nfstime4 attr_notice4; struct GET_DIR_DELEGATION4args { bool_t gdda_signal_deleg_avail; bitmap4 gdda_notification_types; attr_notice4 gdda_child_attr_delay; attr_notice4 gdda_dir_attr_delay; bitmap4 gdda_child_attributes; bitmap4 gdda_dir_attributes; }; typedef struct GET_DIR_DELEGATION4args GET_DIR_DELEGATION4args; struct GET_DIR_DELEGATION4resok { verifier4 gddr_cookieverf; stateid4 gddr_stateid; bitmap4 gddr_notification; bitmap4 gddr_child_attributes; bitmap4 gddr_dir_attributes; }; typedef struct GET_DIR_DELEGATION4resok GET_DIR_DELEGATION4resok; enum gddrnf4_status { GDD4_OK = 0, GDD4_UNAVAIL = 1 }; typedef enum gddrnf4_status gddrnf4_status; struct GET_DIR_DELEGATION4res_non_fatal { gddrnf4_status gddrnf_status; union { GET_DIR_DELEGATION4resok gddrnf_resok4; bool_t gddrnf_will_signal_deleg_avail; } GET_DIR_DELEGATION4res_non_fatal_u; }; typedef struct GET_DIR_DELEGATION4res_non_fatal GET_DIR_DELEGATION4res_non_fatal; struct GET_DIR_DELEGATION4res { nfsstat4 gddr_status; union { GET_DIR_DELEGATION4res_non_fatal gddr_res_non_fatal4; } GET_DIR_DELEGATION4res_u; }; typedef struct GET_DIR_DELEGATION4res GET_DIR_DELEGATION4res; struct GETDEVICEINFO4args { deviceid4 gdia_device_id; layouttype4 gdia_layout_type; count4 gdia_maxcount; bitmap4 gdia_notify_types; }; typedef struct GETDEVICEINFO4args GETDEVICEINFO4args; struct GETDEVICEINFO4resok { device_addr4 gdir_device_addr; bitmap4 gdir_notification; }; typedef struct GETDEVICEINFO4resok GETDEVICEINFO4resok; struct GETDEVICEINFO4res { nfsstat4 gdir_status; union { GETDEVICEINFO4resok gdir_resok4; count4 gdir_mincount; } GETDEVICEINFO4res_u; }; typedef struct GETDEVICEINFO4res GETDEVICEINFO4res; struct GETDEVICELIST4args { layouttype4 gdla_layout_type; count4 gdla_maxdevices; nfs_cookie4 gdla_cookie; verifier4 gdla_cookieverf; }; typedef struct GETDEVICELIST4args GETDEVICELIST4args; struct GETDEVICELIST4resok { nfs_cookie4 gdlr_cookie; verifier4 gdlr_cookieverf; struct { u_int gdlr_deviceid_list_len; deviceid4 *gdlr_deviceid_list_val; } gdlr_deviceid_list; bool_t gdlr_eof; }; typedef struct GETDEVICELIST4resok GETDEVICELIST4resok; struct GETDEVICELIST4res { nfsstat4 gdlr_status; union { GETDEVICELIST4resok gdlr_resok4; } GETDEVICELIST4res_u; }; typedef struct GETDEVICELIST4res GETDEVICELIST4res; struct newtime4 { bool_t nt_timechanged; union { nfstime4 nt_time; } newtime4_u; }; typedef struct newtime4 newtime4; struct newoffset4 { bool_t no_newoffset; union { offset4 no_offset; } newoffset4_u; }; typedef struct newoffset4 newoffset4; struct LAYOUTCOMMIT4args { offset4 loca_offset; length4 loca_length; bool_t loca_reclaim; stateid4 loca_stateid; newoffset4 loca_last_write_offset; newtime4 loca_time_modify; layoutupdate4 loca_layoutupdate; }; typedef struct LAYOUTCOMMIT4args LAYOUTCOMMIT4args; struct newsize4 { bool_t ns_sizechanged; union { length4 ns_size; } newsize4_u; }; typedef struct newsize4 newsize4; struct LAYOUTCOMMIT4resok { newsize4 locr_newsize; }; typedef struct LAYOUTCOMMIT4resok LAYOUTCOMMIT4resok; struct LAYOUTCOMMIT4res { nfsstat4 locr_status; union { LAYOUTCOMMIT4resok locr_resok4; } LAYOUTCOMMIT4res_u; }; typedef struct LAYOUTCOMMIT4res LAYOUTCOMMIT4res; struct LAYOUTGET4args { bool_t loga_signal_layout_avail; layouttype4 loga_layout_type; layoutiomode4 loga_iomode; offset4 loga_offset; length4 loga_length; length4 loga_minlength; stateid4 loga_stateid; count4 loga_maxcount; }; typedef struct LAYOUTGET4args LAYOUTGET4args; struct LAYOUTGET4resok { bool_t logr_return_on_close; stateid4 logr_stateid; struct { u_int logr_layout_len; layout4 *logr_layout_val; } logr_layout; }; typedef struct LAYOUTGET4resok LAYOUTGET4resok; struct LAYOUTGET4res { nfsstat4 logr_status; union { LAYOUTGET4resok logr_resok4; bool_t logr_will_signal_layout_avail; } LAYOUTGET4res_u; }; typedef struct LAYOUTGET4res LAYOUTGET4res; struct LAYOUTRETURN4args { bool_t lora_reclaim; layouttype4 lora_layout_type; layoutiomode4 lora_iomode; layoutreturn4 lora_layoutreturn; }; typedef struct LAYOUTRETURN4args LAYOUTRETURN4args; struct layoutreturn_stateid { bool_t lrs_present; union { stateid4 lrs_stateid; } layoutreturn_stateid_u; }; typedef struct layoutreturn_stateid layoutreturn_stateid; struct LAYOUTRETURN4res { nfsstat4 lorr_status; union { layoutreturn_stateid lorr_stateid; } LAYOUTRETURN4res_u; }; typedef struct LAYOUTRETURN4res LAYOUTRETURN4res; enum secinfo_style4 { SECINFO_STYLE4_CURRENT_FH = 0, SECINFO_STYLE4_PARENT = 1 }; typedef enum secinfo_style4 secinfo_style4; typedef secinfo_style4 SECINFO_NO_NAME4args; typedef SECINFO4res SECINFO_NO_NAME4res; struct SEQUENCE4args { sessionid4 sa_sessionid; sequenceid4 sa_sequenceid; slotid4 sa_slotid; slotid4 sa_highest_slotid; bool_t sa_cachethis; }; typedef struct SEQUENCE4args SEQUENCE4args; #define SEQ4_STATUS_CB_PATH_DOWN 0x00000001 #define SEQ4_STATUS_CB_GSS_CONTEXTS_EXPIRING 0x00000002 #define SEQ4_STATUS_CB_GSS_CONTEXTS_EXPIRED 0x00000004 #define SEQ4_STATUS_EXPIRED_ALL_STATE_REVOKED 0x00000008 #define SEQ4_STATUS_EXPIRED_SOME_STATE_REVOKED 0x00000010 #define SEQ4_STATUS_ADMIN_STATE_REVOKED 0x00000020 #define SEQ4_STATUS_RECALLABLE_STATE_REVOKED 0x00000040 #define SEQ4_STATUS_LEASE_MOVED 0x00000080 #define SEQ4_STATUS_RESTART_RECLAIM_NEEDED 0x00000100 #define SEQ4_STATUS_CB_PATH_DOWN_SESSION 0x00000200 #define SEQ4_STATUS_BACKCHANNEL_FAULT 0x00000400 #define SEQ4_STATUS_DEVID_CHANGED 0x00000800 #define SEQ4_STATUS_DEVID_DELETED 0x00001000 struct SEQUENCE4resok { sessionid4 sr_sessionid; sequenceid4 sr_sequenceid; slotid4 sr_slotid; slotid4 sr_highest_slotid; slotid4 sr_target_highest_slotid; uint32_t sr_status_flags; }; typedef struct SEQUENCE4resok SEQUENCE4resok; struct SEQUENCE4res { nfsstat4 sr_status; union { SEQUENCE4resok sr_resok4; } SEQUENCE4res_u; }; typedef struct SEQUENCE4res SEQUENCE4res; struct ssa_digest_input4 { SEQUENCE4args sdi_seqargs; }; typedef struct ssa_digest_input4 ssa_digest_input4; struct SET_SSV4args { struct { u_int ssa_ssv_len; char *ssa_ssv_val; } ssa_ssv; struct { u_int ssa_digest_len; char *ssa_digest_val; } ssa_digest; }; typedef struct SET_SSV4args SET_SSV4args; struct ssr_digest_input4 { SEQUENCE4res sdi_seqres; }; typedef struct ssr_digest_input4 ssr_digest_input4; struct SET_SSV4resok { struct { u_int ssr_digest_len; char *ssr_digest_val; } ssr_digest; }; typedef struct SET_SSV4resok SET_SSV4resok; struct SET_SSV4res { nfsstat4 ssr_status; union { SET_SSV4resok ssr_resok4; } SET_SSV4res_u; }; typedef struct SET_SSV4res SET_SSV4res; struct TEST_STATEID4args { struct { u_int ts_stateids_len; stateid4 *ts_stateids_val; } ts_stateids; }; typedef struct TEST_STATEID4args TEST_STATEID4args; struct TEST_STATEID4resok { struct { u_int tsr_status_codes_len; nfsstat4 *tsr_status_codes_val; } tsr_status_codes; }; typedef struct TEST_STATEID4resok TEST_STATEID4resok; struct TEST_STATEID4res { nfsstat4 tsr_status; union { TEST_STATEID4resok tsr_resok4; } TEST_STATEID4res_u; }; typedef struct TEST_STATEID4res TEST_STATEID4res; struct deleg_claim4 { open_claim_type4 dc_claim; union { open_delegation_type4 dc_delegate_type; } deleg_claim4_u; }; typedef struct deleg_claim4 deleg_claim4; struct WANT_DELEGATION4args { uint32_t wda_want; deleg_claim4 wda_claim; }; typedef struct WANT_DELEGATION4args WANT_DELEGATION4args; struct WANT_DELEGATION4res { nfsstat4 wdr_status; union { open_delegation4 wdr_resok4; } WANT_DELEGATION4res_u; }; typedef struct WANT_DELEGATION4res WANT_DELEGATION4res; struct DESTROY_CLIENTID4args { clientid4 dca_clientid; }; typedef struct DESTROY_CLIENTID4args DESTROY_CLIENTID4args; struct DESTROY_CLIENTID4res { nfsstat4 dcr_status; }; typedef struct DESTROY_CLIENTID4res DESTROY_CLIENTID4res; struct RECLAIM_COMPLETE4args { bool_t rca_one_fs; }; typedef struct RECLAIM_COMPLETE4args RECLAIM_COMPLETE4args; struct RECLAIM_COMPLETE4res { nfsstat4 rcr_status; }; typedef struct RECLAIM_COMPLETE4res RECLAIM_COMPLETE4res; struct COPY4args { stateid4 ca_src_stateid; stateid4 ca_dst_stateid; offset4 ca_src_offset; offset4 ca_dst_offset; length4 ca_count; bool_t ca_consecutive; bool_t ca_synchronous; struct { u_int ca_source_server_len; netloc4 *ca_source_server_val; } ca_source_server; }; typedef struct COPY4args COPY4args; struct copy_requirements4 { bool_t cr_consecutive; bool_t cr_synchronous; }; typedef struct copy_requirements4 copy_requirements4; struct COPY4resok { write_response4 cr_response; copy_requirements4 cr_requirements; }; typedef struct COPY4resok COPY4resok; struct COPY4res { nfsstat4 cr_status; union { COPY4resok cr_resok4; copy_requirements4 cr_requirements; } COPY4res_u; }; typedef struct COPY4res COPY4res; struct COPY_NOTIFY4args { stateid4 cna_src_stateid; netloc4 cna_destination_server; }; typedef struct COPY_NOTIFY4args COPY_NOTIFY4args; struct COPY_NOTIFY4resok { nfstime4 cnr_lease_time; stateid4 cnr_stateid; struct { u_int cnr_source_server_len; netloc4 *cnr_source_server_val; } cnr_source_server; }; typedef struct COPY_NOTIFY4resok COPY_NOTIFY4resok; struct COPY_NOTIFY4res { nfsstat4 cnr_status; union { COPY_NOTIFY4resok resok4; } COPY_NOTIFY4res_u; }; typedef struct COPY_NOTIFY4res COPY_NOTIFY4res; struct OFFLOAD_CANCEL4args { stateid4 oca_stateid; }; typedef struct OFFLOAD_CANCEL4args OFFLOAD_CANCEL4args; struct OFFLOAD_CANCEL4res { nfsstat4 ocr_status; }; typedef struct OFFLOAD_CANCEL4res OFFLOAD_CANCEL4res; struct OFFLOAD_STATUS4args { stateid4 osa_stateid; }; typedef struct OFFLOAD_STATUS4args OFFLOAD_STATUS4args; struct OFFLOAD_STATUS4resok { length4 osr_count; struct { u_int osr_complete_len; nfsstat4 *osr_complete_val; } osr_complete; }; typedef struct OFFLOAD_STATUS4resok OFFLOAD_STATUS4resok; struct OFFLOAD_STATUS4res { nfsstat4 osr_status; union { OFFLOAD_STATUS4resok osr_resok4; } OFFLOAD_STATUS4res_u; }; typedef struct OFFLOAD_STATUS4res OFFLOAD_STATUS4res; struct ALLOCATE4args { stateid4 aa_stateid; offset4 aa_offset; length4 aa_length; }; typedef struct ALLOCATE4args ALLOCATE4args; struct ALLOCATE4res { nfsstat4 ar_status; }; typedef struct ALLOCATE4res ALLOCATE4res; struct DEALLOCATE4args { stateid4 da_stateid; offset4 da_offset; length4 da_length; }; typedef struct DEALLOCATE4args DEALLOCATE4args; struct DEALLOCATE4res { nfsstat4 dr_status; }; typedef struct DEALLOCATE4res DEALLOCATE4res; enum IO_ADVISE_type4 { IO_ADVISE4_NORMAL = 0, IO_ADVISE4_SEQUENTIAL = 1, IO_ADVISE4_SEQUENTIAL_BACKWARDS = 2, IO_ADVISE4_RANDOM = 3, IO_ADVISE4_WILLNEED = 4, IO_ADVISE4_WILLNEED_OPPORTUNISTIC = 5, IO_ADVISE4_DONTNEED = 6, IO_ADVISE4_NOREUSE = 7, IO_ADVISE4_READ = 8, IO_ADVISE4_WRITE = 9, IO_ADVISE4_INIT_PROXIMITY = 10 }; typedef enum IO_ADVISE_type4 IO_ADVISE_type4; struct IO_ADVISE4args { stateid4 iaa_stateid; offset4 iaa_offset; length4 iaa_count; bitmap4 iaa_hints; }; typedef struct IO_ADVISE4args IO_ADVISE4args; struct IO_ADVISE4resok { bitmap4 ior_hints; }; typedef struct IO_ADVISE4resok IO_ADVISE4resok; struct IO_ADVISE4res { nfsstat4 ior_status; union { IO_ADVISE4resok resok4; } IO_ADVISE4res_u; }; typedef struct IO_ADVISE4res IO_ADVISE4res; struct device_error4 { deviceid4 de_deviceid; nfsstat4 de_status; nfs_opnum4 de_opnum; }; typedef struct device_error4 device_error4; struct LAYOUTERROR4args { offset4 lea_offset; length4 lea_length; stateid4 lea_stateid; struct { u_int lea_errors_len; device_error4 *lea_errors_val; } lea_errors; }; typedef struct LAYOUTERROR4args LAYOUTERROR4args; struct LAYOUTERROR4res { nfsstat4 ler_status; }; typedef struct LAYOUTERROR4res LAYOUTERROR4res; struct io_info4 { uint64_t ii_count; uint64_t ii_bytes; }; typedef struct io_info4 io_info4; struct LAYOUTSTATS4args { offset4 lsa_offset; length4 lsa_length; stateid4 lsa_stateid; io_info4 lsa_read; io_info4 lsa_write; deviceid4 lsa_deviceid; layoutupdate4 lsa_layoutupdate; }; typedef struct LAYOUTSTATS4args LAYOUTSTATS4args; struct LAYOUTSTATS4res { nfsstat4 lsr_status; }; typedef struct LAYOUTSTATS4res LAYOUTSTATS4res; struct READ_PLUS4args { stateid4 rpa_stateid; offset4 rpa_offset; count4 rpa_count; }; typedef struct READ_PLUS4args READ_PLUS4args; struct read_plus_content { data_content4 rpc_content; union { data4 rpc_data; data_info4 rpc_hole; } read_plus_content_u; }; typedef struct read_plus_content read_plus_content; struct read_plus_res4 { bool_t rpr_eof; struct { u_int rpr_contents_len; read_plus_content *rpr_contents_val; } rpr_contents; }; typedef struct read_plus_res4 read_plus_res4; struct READ_PLUS4res { nfsstat4 rp_status; union { read_plus_res4 rp_resok4; } READ_PLUS4res_u; }; typedef struct READ_PLUS4res READ_PLUS4res; struct SEEK4args { stateid4 sa_stateid; offset4 sa_offset; data_content4 sa_what; }; typedef struct SEEK4args SEEK4args; struct seek_res4 { bool_t sr_eof; offset4 sr_offset; }; typedef struct seek_res4 seek_res4; struct SEEK4res { nfsstat4 sa_status; union { seek_res4 resok4; } SEEK4res_u; }; typedef struct SEEK4res SEEK4res; struct WRITE_SAME4args { stateid4 wsa_stateid; stable_how4 wsa_stable; app_data_block4 wsa_adb; }; typedef struct WRITE_SAME4args WRITE_SAME4args; struct WRITE_SAME4res { nfsstat4 wsr_status; union { write_response4 resok4; } WRITE_SAME4res_u; }; typedef struct WRITE_SAME4res WRITE_SAME4res; struct nfs_argop4 { nfs_opnum4 argop; union { ACCESS4args opaccess; CLOSE4args opclose; COMMIT4args opcommit; CREATE4args opcreate; DELEGPURGE4args opdelegpurge; DELEGRETURN4args opdelegreturn; GETATTR4args opgetattr; LINK4args oplink; LOCK4args oplock; LOCKT4args oplockt; LOCKU4args oplocku; LOOKUP4args oplookup; NVERIFY4args opnverify; OPEN4args opopen; OPENATTR4args opopenattr; OPEN_CONFIRM4args opopen_confirm; OPEN_DOWNGRADE4args opopen_downgrade; PUTFH4args opputfh; READ4args opread; READDIR4args opreaddir; REMOVE4args opremove; RENAME4args oprename; RENEW4args oprenew; SECINFO4args opsecinfo; SETATTR4args opsetattr; SETCLIENTID4args opsetclientid; SETCLIENTID_CONFIRM4args opsetclientid_confirm; VERIFY4args opverify; WRITE4args opwrite; RELEASE_LOCKOWNER4args oprelease_lockowner; BACKCHANNEL_CTL4args opbackchannel_ctl; BIND_CONN_TO_SESSION4args opbind_conn_to_session; EXCHANGE_ID4args opexchange_id; CREATE_SESSION4args opcreate_session; DESTROY_SESSION4args opdestroy_session; FREE_STATEID4args opfree_stateid; GET_DIR_DELEGATION4args opget_dir_delegation; GETDEVICEINFO4args opgetdeviceinfo; GETDEVICELIST4args opgetdevicelist; LAYOUTCOMMIT4args oplayoutcommit; LAYOUTGET4args oplayoutget; LAYOUTRETURN4args oplayoutreturn; SECINFO_NO_NAME4args opsecinfo_no_name; SEQUENCE4args opsequence; SET_SSV4args opset_ssv; TEST_STATEID4args optest_stateid; WANT_DELEGATION4args opwant_delegation; DESTROY_CLIENTID4args opdestroy_clientid; RECLAIM_COMPLETE4args opreclaim_complete; ALLOCATE4args opallocate; COPY4args opcopy; COPY_NOTIFY4args opoffload_notify; DEALLOCATE4args opdeallocate; IO_ADVISE4args opio_advise; LAYOUTERROR4args oplayouterror; LAYOUTSTATS4args oplayoutstats; OFFLOAD_CANCEL4args opoffload_cancel; OFFLOAD_STATUS4args opoffload_status; READ_PLUS4args opread_plus; SEEK4args opseek; WRITE_SAME4args opwrite_same; CLONE4args opclone; } nfs_argop4_u; }; typedef struct nfs_argop4 nfs_argop4; struct nfs_resop4 { nfs_opnum4 resop; union { ACCESS4res opaccess; CLOSE4res opclose; COMMIT4res opcommit; CREATE4res opcreate; DELEGPURGE4res opdelegpurge; DELEGRETURN4res opdelegreturn; GETATTR4res opgetattr; GETFH4res opgetfh; LINK4res oplink; LOCK4res oplock; LOCKT4res oplockt; LOCKU4res oplocku; LOOKUP4res oplookup; LOOKUPP4res oplookupp; NVERIFY4res opnverify; OPEN4res opopen; OPENATTR4res opopenattr; OPEN_CONFIRM4res opopen_confirm; OPEN_DOWNGRADE4res opopen_downgrade; PUTFH4res opputfh; PUTPUBFH4res opputpubfh; PUTROOTFH4res opputrootfh; READ4res opread; READDIR4res opreaddir; READLINK4res opreadlink; REMOVE4res opremove; RENAME4res oprename; RENEW4res oprenew; RESTOREFH4res oprestorefh; SAVEFH4res opsavefh; SECINFO4res opsecinfo; SETATTR4res opsetattr; SETCLIENTID4res opsetclientid; SETCLIENTID_CONFIRM4res opsetclientid_confirm; VERIFY4res opverify; WRITE4res opwrite; RELEASE_LOCKOWNER4res oprelease_lockowner; BACKCHANNEL_CTL4res opbackchannel_ctl; BIND_CONN_TO_SESSION4res opbind_conn_to_session; EXCHANGE_ID4res opexchange_id; CREATE_SESSION4res opcreate_session; DESTROY_SESSION4res opdestroy_session; FREE_STATEID4res opfree_stateid; GET_DIR_DELEGATION4res opget_dir_delegation; GETDEVICEINFO4res opgetdeviceinfo; GETDEVICELIST4res opgetdevicelist; LAYOUTCOMMIT4res oplayoutcommit; LAYOUTGET4res oplayoutget; LAYOUTRETURN4res oplayoutreturn; SECINFO_NO_NAME4res opsecinfo_no_name; SEQUENCE4res opsequence; SET_SSV4res opset_ssv; TEST_STATEID4res optest_stateid; WANT_DELEGATION4res opwant_delegation; DESTROY_CLIENTID4res opdestroy_clientid; RECLAIM_COMPLETE4res opreclaim_complete; ALLOCATE4res opallocate; COPY4res opcopy; COPY_NOTIFY4res opcopy_notify; DEALLOCATE4res opdeallocate; IO_ADVISE4res opio_advise; LAYOUTERROR4res oplayouterror; LAYOUTSTATS4res oplayoutstats; OFFLOAD_CANCEL4res opoffload_cancel; OFFLOAD_STATUS4res opoffload_status; READ_PLUS4res opread_plus; SEEK4res opseek; WRITE_SAME4res opwrite_same; CLONE4res opclone; ILLEGAL4res opillegal; } nfs_resop4_u; }; typedef struct nfs_resop4 nfs_resop4; struct COMPOUND4args { utf8str_cs tag; uint32_t minorversion; struct { u_int argarray_len; nfs_argop4 *argarray_val; } argarray; }; typedef struct COMPOUND4args COMPOUND4args; struct COMPOUND4res { nfsstat4 status; utf8str_cs tag; struct { u_int resarray_len; nfs_resop4 *resarray_val; } resarray; }; typedef struct COMPOUND4res COMPOUND4res; struct CB_GETATTR4args { nfs_fh4 fh; bitmap4 attr_request; }; typedef struct CB_GETATTR4args CB_GETATTR4args; struct CB_GETATTR4resok { fattr4 obj_attributes; }; typedef struct CB_GETATTR4resok CB_GETATTR4resok; struct CB_GETATTR4res { nfsstat4 status; union { CB_GETATTR4resok resok4; } CB_GETATTR4res_u; }; typedef struct CB_GETATTR4res CB_GETATTR4res; struct CB_RECALL4args { stateid4 stateid; bool_t truncate; nfs_fh4 fh; }; typedef struct CB_RECALL4args CB_RECALL4args; struct CB_RECALL4res { nfsstat4 status; }; typedef struct CB_RECALL4res CB_RECALL4res; struct CB_ILLEGAL4res { nfsstat4 status; }; typedef struct CB_ILLEGAL4res CB_ILLEGAL4res; enum layoutrecall_type4 { LAYOUTRECALL4_FILE = LAYOUT4_RET_REC_FILE, LAYOUTRECALL4_FSID = LAYOUT4_RET_REC_FSID, LAYOUTRECALL4_ALL = LAYOUT4_RET_REC_ALL }; typedef enum layoutrecall_type4 layoutrecall_type4; struct layoutrecall_file4 { nfs_fh4 lor_fh; offset4 lor_offset; length4 lor_length; stateid4 lor_stateid; }; typedef struct layoutrecall_file4 layoutrecall_file4; struct layoutrecall4 { layoutrecall_type4 lor_recalltype; union { layoutrecall_file4 lor_layout; fsid4 lor_fsid; } layoutrecall4_u; }; typedef struct layoutrecall4 layoutrecall4; struct CB_LAYOUTRECALL4args { layouttype4 clora_type; layoutiomode4 clora_iomode; bool_t clora_changed; layoutrecall4 clora_recall; }; typedef struct CB_LAYOUTRECALL4args CB_LAYOUTRECALL4args; struct CB_LAYOUTRECALL4res { nfsstat4 clorr_status; }; typedef struct CB_LAYOUTRECALL4res CB_LAYOUTRECALL4res; enum notify_type4 { NOTIFY4_CHANGE_CHILD_ATTRS = 0, NOTIFY4_CHANGE_DIR_ATTRS = 1, NOTIFY4_REMOVE_ENTRY = 2, NOTIFY4_ADD_ENTRY = 3, NOTIFY4_RENAME_ENTRY = 4, NOTIFY4_CHANGE_COOKIE_VERIFIER = 5 }; typedef enum notify_type4 notify_type4; struct notify_entry4 { component4 ne_file; fattr4 ne_attrs; }; typedef struct notify_entry4 notify_entry4; struct prev_entry4 { notify_entry4 pe_prev_entry; nfs_cookie4 pe_prev_entry_cookie; }; typedef struct prev_entry4 prev_entry4; struct notify_remove4 { notify_entry4 nrm_old_entry; nfs_cookie4 nrm_old_entry_cookie; }; typedef struct notify_remove4 notify_remove4; struct notify_add4 { struct { u_int nad_old_entry_len; notify_remove4 *nad_old_entry_val; } nad_old_entry; notify_entry4 nad_new_entry; struct { u_int nad_new_entry_cookie_len; nfs_cookie4 *nad_new_entry_cookie_val; } nad_new_entry_cookie; struct { u_int nad_prev_entry_len; prev_entry4 *nad_prev_entry_val; } nad_prev_entry; bool_t nad_last_entry; }; typedef struct notify_add4 notify_add4; struct notify_attr4 { notify_entry4 na_changed_entry; }; typedef struct notify_attr4 notify_attr4; struct notify_rename4 { notify_remove4 nrn_old_entry; notify_add4 nrn_new_entry; }; typedef struct notify_rename4 notify_rename4; struct notify_verifier4 { verifier4 nv_old_cookieverf; verifier4 nv_new_cookieverf; }; typedef struct notify_verifier4 notify_verifier4; typedef struct { u_int notifylist4_len; char *notifylist4_val; } notifylist4; struct notify4 { bitmap4 notify_mask; notifylist4 notify_vals; }; typedef struct notify4 notify4; struct CB_NOTIFY4args { stateid4 cna_stateid; nfs_fh4 cna_fh; struct { u_int cna_changes_len; notify4 *cna_changes_val; } cna_changes; }; typedef struct CB_NOTIFY4args CB_NOTIFY4args; struct CB_NOTIFY4res { nfsstat4 cnr_status; }; typedef struct CB_NOTIFY4res CB_NOTIFY4res; struct CB_PUSH_DELEG4args { nfs_fh4 cpda_fh; open_delegation4 cpda_delegation; }; typedef struct CB_PUSH_DELEG4args CB_PUSH_DELEG4args; struct CB_PUSH_DELEG4res { nfsstat4 cpdr_status; }; typedef struct CB_PUSH_DELEG4res CB_PUSH_DELEG4res; #define RCA4_TYPE_MASK_RDATA_DLG 0 #define RCA4_TYPE_MASK_WDATA_DLG 1 #define RCA4_TYPE_MASK_DIR_DLG 2 #define RCA4_TYPE_MASK_FILE_LAYOUT 3 #define RCA4_TYPE_MASK_BLK_LAYOUT 4 #define RCA4_TYPE_MASK_OBJ_LAYOUT_MIN 8 #define RCA4_TYPE_MASK_OBJ_LAYOUT_MAX 9 #define RCA4_TYPE_MASK_OTHER_LAYOUT_MIN 12 #define RCA4_TYPE_MASK_OTHER_LAYOUT_MAX 15 struct CB_RECALL_ANY4args { uint32_t craa_objects_to_keep; bitmap4 craa_type_mask; }; typedef struct CB_RECALL_ANY4args CB_RECALL_ANY4args; struct CB_RECALL_ANY4res { nfsstat4 crar_status; }; typedef struct CB_RECALL_ANY4res CB_RECALL_ANY4res; typedef CB_RECALL_ANY4args CB_RECALLABLE_OBJ_AVAIL4args; struct CB_RECALLABLE_OBJ_AVAIL4res { nfsstat4 croa_status; }; typedef struct CB_RECALLABLE_OBJ_AVAIL4res CB_RECALLABLE_OBJ_AVAIL4res; struct CB_RECALL_SLOT4args { slotid4 rsa_target_highest_slotid; }; typedef struct CB_RECALL_SLOT4args CB_RECALL_SLOT4args; struct CB_RECALL_SLOT4res { nfsstat4 rsr_status; }; typedef struct CB_RECALL_SLOT4res CB_RECALL_SLOT4res; struct referring_call4 { sequenceid4 rc_sequenceid; slotid4 rc_slotid; }; typedef struct referring_call4 referring_call4; struct referring_call_list4 { sessionid4 rcl_sessionid; struct { u_int rcl_referring_calls_len; referring_call4 *rcl_referring_calls_val; } rcl_referring_calls; }; typedef struct referring_call_list4 referring_call_list4; struct CB_SEQUENCE4args { sessionid4 csa_sessionid; sequenceid4 csa_sequenceid; slotid4 csa_slotid; slotid4 csa_highest_slotid; bool_t csa_cachethis; struct { u_int csa_referring_call_lists_len; referring_call_list4 *csa_referring_call_lists_val; } csa_referring_call_lists; }; typedef struct CB_SEQUENCE4args CB_SEQUENCE4args; struct CB_SEQUENCE4resok { sessionid4 csr_sessionid; sequenceid4 csr_sequenceid; slotid4 csr_slotid; slotid4 csr_highest_slotid; slotid4 csr_target_highest_slotid; }; typedef struct CB_SEQUENCE4resok CB_SEQUENCE4resok; struct CB_SEQUENCE4res { nfsstat4 csr_status; union { CB_SEQUENCE4resok csr_resok4; } CB_SEQUENCE4res_u; }; typedef struct CB_SEQUENCE4res CB_SEQUENCE4res; struct CB_WANTS_CANCELLED4args { bool_t cwca_contended_wants_cancelled; bool_t cwca_resourced_wants_cancelled; }; typedef struct CB_WANTS_CANCELLED4args CB_WANTS_CANCELLED4args; struct CB_WANTS_CANCELLED4res { nfsstat4 cwcr_status; }; typedef struct CB_WANTS_CANCELLED4res CB_WANTS_CANCELLED4res; struct CB_NOTIFY_LOCK4args { nfs_fh4 cnla_fh; lock_owner4 cnla_lock_owner; }; typedef struct CB_NOTIFY_LOCK4args CB_NOTIFY_LOCK4args; struct CB_NOTIFY_LOCK4res { nfsstat4 cnlr_status; }; typedef struct CB_NOTIFY_LOCK4res CB_NOTIFY_LOCK4res; enum notify_deviceid_type4 { NOTIFY_DEVICEID4_CHANGE = 1, NOTIFY_DEVICEID4_DELETE = 2 }; typedef enum notify_deviceid_type4 notify_deviceid_type4; struct notify_deviceid_delete4 { layouttype4 ndd_layouttype; deviceid4 ndd_deviceid; }; typedef struct notify_deviceid_delete4 notify_deviceid_delete4; struct notify_deviceid_change4 { layouttype4 ndc_layouttype; deviceid4 ndc_deviceid; bool_t ndc_immediate; }; typedef struct notify_deviceid_change4 notify_deviceid_change4; struct CB_NOTIFY_DEVICEID4args { struct { u_int cnda_changes_len; notify4 *cnda_changes_val; } cnda_changes; }; typedef struct CB_NOTIFY_DEVICEID4args CB_NOTIFY_DEVICEID4args; struct CB_NOTIFY_DEVICEID4res { nfsstat4 cndr_status; }; typedef struct CB_NOTIFY_DEVICEID4res CB_NOTIFY_DEVICEID4res; struct offload_info4 { nfsstat4 coa_status; union { write_response4 coa_resok4; length4 coa_bytes_copied; } offload_info4_u; }; typedef struct offload_info4 offload_info4; struct CB_OFFLOAD4args { nfs_fh4 coa_fh; stateid4 coa_stateid; offload_info4 coa_offload_info; }; typedef struct CB_OFFLOAD4args CB_OFFLOAD4args; struct CB_OFFLOAD4res { nfsstat4 cor_status; }; typedef struct CB_OFFLOAD4res CB_OFFLOAD4res; /* Callback operations new to NFSv4.1 */ /* Callback operations new to NFSv4.2 */ enum nfs_cb_opnum4 { OP_CB_GETATTR = 3, OP_CB_RECALL = 4, OP_CB_LAYOUTRECALL = 5, OP_CB_NOTIFY = 6, OP_CB_PUSH_DELEG = 7, OP_CB_RECALL_ANY = 8, OP_CB_RECALLABLE_OBJ_AVAIL = 9, OP_CB_RECALL_SLOT = 10, OP_CB_SEQUENCE = 11, OP_CB_WANTS_CANCELLED = 12, OP_CB_NOTIFY_LOCK = 13, OP_CB_NOTIFY_DEVICEID = 14, OP_CB_OFFLOAD = 15, OP_CB_ILLEGAL = 10044 }; typedef enum nfs_cb_opnum4 nfs_cb_opnum4; struct nfs_cb_argop4 { nfs_cb_opnum4 argop; union { CB_GETATTR4args opcbgetattr; CB_RECALL4args opcbrecall; CB_LAYOUTRECALL4args opcblayoutrecall; CB_NOTIFY4args opcbnotify; CB_PUSH_DELEG4args opcbpush_deleg; CB_RECALL_ANY4args opcbrecall_any; CB_RECALLABLE_OBJ_AVAIL4args opcbrecallable_obj_avail; CB_RECALL_SLOT4args opcbrecall_slot; CB_SEQUENCE4args opcbsequence; CB_WANTS_CANCELLED4args opcbwants_cancelled; CB_NOTIFY_LOCK4args opcbnotify_lock; CB_NOTIFY_DEVICEID4args opcbnotify_deviceid; CB_OFFLOAD4args opcboffload; } nfs_cb_argop4_u; }; typedef struct nfs_cb_argop4 nfs_cb_argop4; struct nfs_cb_resop4 { nfs_cb_opnum4 resop; union { CB_GETATTR4res opcbgetattr; CB_RECALL4res opcbrecall; CB_LAYOUTRECALL4res opcblayoutrecall; CB_NOTIFY4res opcbnotify; CB_PUSH_DELEG4res opcbpush_deleg; CB_RECALL_ANY4res opcbrecall_any; CB_RECALLABLE_OBJ_AVAIL4res opcbrecallable_obj_avail; CB_RECALL_SLOT4res opcbrecall_slot; CB_SEQUENCE4res opcbsequence; CB_WANTS_CANCELLED4res opcbwants_cancelled; CB_NOTIFY_LOCK4res opcbnotify_lock; CB_NOTIFY_DEVICEID4res opcbnotify_deviceid; CB_OFFLOAD4res opcboffload; CB_ILLEGAL4res opcbillegal; } nfs_cb_resop4_u; }; typedef struct nfs_cb_resop4 nfs_cb_resop4; struct CB_COMPOUND4args { utf8str_cs tag; uint32_t minorversion; uint32_t callback_ident; struct { u_int argarray_len; nfs_cb_argop4 *argarray_val; } argarray; }; typedef struct CB_COMPOUND4args CB_COMPOUND4args; struct CB_COMPOUND4res { nfsstat4 status; utf8str_cs tag; struct { u_int resarray_len; nfs_cb_resop4 *resarray_val; } resarray; }; typedef struct CB_COMPOUND4res CB_COMPOUND4res; #define NFS4_PROGRAM 100003 #define NFS_V4 4 #if defined(__STDC__) || defined(__cplusplus) #define NFSPROC4_NULL 0 extern void * nfsproc4_null_4(void *, CLIENT *); extern void * nfsproc4_null_4_svc(void *, struct svc_req *); #define NFSPROC4_COMPOUND 1 extern COMPOUND4res * nfsproc4_compound_4(COMPOUND4args *, CLIENT *); extern COMPOUND4res * nfsproc4_compound_4_svc(COMPOUND4args *, struct svc_req *); extern int nfs4_program_4_freeresult(SVCXPRT *, xdrproc_t, caddr_t); #else /* K&R C */ #define NFSPROC4_NULL 0 extern void * nfsproc4_null_4(); extern void * nfsproc4_null_4_svc(); #define NFSPROC4_COMPOUND 1 extern COMPOUND4res * nfsproc4_compound_4(); extern COMPOUND4res * nfsproc4_compound_4_svc(); extern int nfs4_program_4_freeresult(); #endif /* K&R C */ #define NFS4_CALLBACK 0x40000000 #define NFS_CB 1 #if defined(__STDC__) || defined(__cplusplus) #define CB_NULL 0 extern void * cb_null_1(void *, CLIENT *); extern void * cb_null_1_svc(void *, struct svc_req *); #define CB_COMPOUND 1 extern CB_COMPOUND4res * cb_compound_1(CB_COMPOUND4args *, CLIENT *); extern CB_COMPOUND4res * cb_compound_1_svc(CB_COMPOUND4args *, struct svc_req *); extern int nfs4_callback_1_freeresult(SVCXPRT *, xdrproc_t, caddr_t); #else /* K&R C */ #define CB_NULL 0 extern void * cb_null_1(); extern void * cb_null_1_svc(); #define CB_COMPOUND 1 extern CB_COMPOUND4res * cb_compound_1(); extern CB_COMPOUND4res * cb_compound_1_svc(); extern int nfs4_callback_1_freeresult(); #endif /* K&R C */ /* the xdr functions */ #if defined(__STDC__) || defined(__cplusplus) extern bool_t xdr_nfs_ftype4(XDR *, nfs_ftype4*); extern bool_t xdr_nfsstat4(XDR *, nfsstat4*); extern bool_t xdr_attrlist4(XDR *, attrlist4*); extern bool_t xdr_bitmap4(XDR *, bitmap4*); extern bool_t xdr_changeid4(XDR *, changeid4*); extern bool_t xdr_clientid4(XDR *, clientid4*); extern bool_t xdr_count4(XDR *, count4*); extern bool_t xdr_length4(XDR *, length4*); extern bool_t xdr_mode4(XDR *, mode4*); extern bool_t xdr_nfs_cookie4(XDR *, nfs_cookie4*); extern bool_t xdr_nfs_fh4(XDR *, nfs_fh4*); extern bool_t xdr_offset4(XDR *, offset4*); extern bool_t xdr_qop4(XDR *, qop4*); extern bool_t xdr_sec_oid4(XDR *, sec_oid4*); extern bool_t xdr_sequenceid4(XDR *, sequenceid4*); extern bool_t xdr_seqid4(XDR *, seqid4*); extern bool_t xdr_sessionid4(XDR *, sessionid4); extern bool_t xdr_slotid4(XDR *, slotid4*); extern bool_t xdr_utf8string(XDR *, utf8string*); extern bool_t xdr_utf8str_cis(XDR *, utf8str_cis*); extern bool_t xdr_utf8str_cs(XDR *, utf8str_cs*); extern bool_t xdr_utf8str_mixed(XDR *, utf8str_mixed*); extern bool_t xdr_component4(XDR *, component4*); extern bool_t xdr_linktext4(XDR *, linktext4*); extern bool_t xdr_ascii_REQUIRED4(XDR *, ascii_REQUIRED4*); extern bool_t xdr_pathname4(XDR *, pathname4*); extern bool_t xdr_verifier4(XDR *, verifier4); extern bool_t xdr_secret4(XDR *, secret4*); extern bool_t xdr_policy4(XDR *, policy4*); extern bool_t xdr_nfstime4(XDR *, nfstime4*); extern bool_t xdr_time_how4(XDR *, time_how4*); extern bool_t xdr_settime4(XDR *, settime4*); extern bool_t xdr_nfs_lease4(XDR *, nfs_lease4*); extern bool_t xdr_fsid4(XDR *, fsid4*); extern bool_t xdr_change_policy4(XDR *, change_policy4*); extern bool_t xdr_fs_location4(XDR *, fs_location4*); extern bool_t xdr_fs_locations4(XDR *, fs_locations4*); extern bool_t xdr_acetype4(XDR *, acetype4*); extern bool_t xdr_aceflag4(XDR *, aceflag4*); extern bool_t xdr_acemask4(XDR *, acemask4*); extern bool_t xdr_nfsace4(XDR *, nfsace4*); extern bool_t xdr_aclflag4(XDR *, aclflag4*); extern bool_t xdr_nfsacl41(XDR *, nfsacl41*); extern bool_t xdr_mode_masked4(XDR *, mode_masked4*); extern bool_t xdr_specdata4(XDR *, specdata4*); extern bool_t xdr_netaddr4(XDR *, netaddr4*); extern bool_t xdr_nfs_impl_id4(XDR *, nfs_impl_id4*); extern bool_t xdr_stateid4(XDR *, stateid4*); extern bool_t xdr_layouttype4(XDR *, layouttype4*); extern bool_t xdr_layout_content4(XDR *, layout_content4*); extern bool_t xdr_layouthint4(XDR *, layouthint4*); extern bool_t xdr_layoutiomode4(XDR *, layoutiomode4*); extern bool_t xdr_layout4(XDR *, layout4*); extern bool_t xdr_deviceid4(XDR *, deviceid4); extern bool_t xdr_device_addr4(XDR *, device_addr4*); extern bool_t xdr_layoutupdate4(XDR *, layoutupdate4*); extern bool_t xdr_layoutreturn_type4(XDR *, layoutreturn_type4*); extern bool_t xdr_layoutreturn_file4(XDR *, layoutreturn_file4*); extern bool_t xdr_layoutreturn4(XDR *, layoutreturn4*); extern bool_t xdr_fs4_status_type(XDR *, fs4_status_type*); extern bool_t xdr_fs4_status(XDR *, fs4_status*); extern bool_t xdr_threshold4_read_size(XDR *, threshold4_read_size*); extern bool_t xdr_threshold4_write_size(XDR *, threshold4_write_size*); extern bool_t xdr_threshold4_read_iosize(XDR *, threshold4_read_iosize*); extern bool_t xdr_threshold4_write_iosize(XDR *, threshold4_write_iosize*); extern bool_t xdr_threshold_item4(XDR *, threshold_item4*); extern bool_t xdr_mdsthreshold4(XDR *, mdsthreshold4*); extern bool_t xdr_retention_get4(XDR *, retention_get4*); extern bool_t xdr_retention_set4(XDR *, retention_set4*); extern bool_t xdr_fs_charset_cap4(XDR *, fs_charset_cap4*); extern bool_t xdr_netloc_type4(XDR *, netloc_type4*); extern bool_t xdr_netloc4(XDR *, netloc4*); extern bool_t xdr_change_attr_type4(XDR *, change_attr_type4*); extern bool_t xdr_labelformat_spec4(XDR *, labelformat_spec4*); extern bool_t xdr_sec_label4(XDR *, sec_label4*); extern bool_t xdr_copy_from_auth_priv(XDR *, copy_from_auth_priv*); extern bool_t xdr_copy_to_auth_priv(XDR *, copy_to_auth_priv*); extern bool_t xdr_copy_confirm_auth_priv(XDR *, copy_confirm_auth_priv*); extern bool_t xdr_app_data_block4(XDR *, app_data_block4*); extern bool_t xdr_data4(XDR *, data4*); extern bool_t xdr_data_info4(XDR *, data_info4*); extern bool_t xdr_data_content4(XDR *, data_content4*); extern bool_t xdr_stable_how4(XDR *, stable_how4*); extern bool_t xdr_write_response4(XDR *, write_response4*); extern bool_t xdr_fattr4_supported_attrs(XDR *, fattr4_supported_attrs*); extern bool_t xdr_fattr4_type(XDR *, fattr4_type*); extern bool_t xdr_fattr4_fh_expire_type(XDR *, fattr4_fh_expire_type*); extern bool_t xdr_fattr4_change(XDR *, fattr4_change*); extern bool_t xdr_fattr4_size(XDR *, fattr4_size*); extern bool_t xdr_fattr4_link_support(XDR *, fattr4_link_support*); extern bool_t xdr_fattr4_symlink_support(XDR *, fattr4_symlink_support*); extern bool_t xdr_fattr4_named_attr(XDR *, fattr4_named_attr*); extern bool_t xdr_fattr4_fsid(XDR *, fattr4_fsid*); extern bool_t xdr_fattr4_unique_handles(XDR *, fattr4_unique_handles*); extern bool_t xdr_fattr4_lease_time(XDR *, fattr4_lease_time*); extern bool_t xdr_fattr4_rdattr_error(XDR *, fattr4_rdattr_error*); extern bool_t xdr_fattr4_acl(XDR *, fattr4_acl*); extern bool_t xdr_fattr4_aclsupport(XDR *, fattr4_aclsupport*); extern bool_t xdr_fattr4_archive(XDR *, fattr4_archive*); extern bool_t xdr_fattr4_cansettime(XDR *, fattr4_cansettime*); extern bool_t xdr_fattr4_case_insensitive(XDR *, fattr4_case_insensitive*); extern bool_t xdr_fattr4_case_preserving(XDR *, fattr4_case_preserving*); extern bool_t xdr_fattr4_chown_restricted(XDR *, fattr4_chown_restricted*); extern bool_t xdr_fattr4_fileid(XDR *, fattr4_fileid*); extern bool_t xdr_fattr4_files_avail(XDR *, fattr4_files_avail*); extern bool_t xdr_fattr4_filehandle(XDR *, fattr4_filehandle*); extern bool_t xdr_fattr4_files_free(XDR *, fattr4_files_free*); extern bool_t xdr_fattr4_files_total(XDR *, fattr4_files_total*); extern bool_t xdr_fattr4_fs_locations(XDR *, fattr4_fs_locations*); extern bool_t xdr_fattr4_hidden(XDR *, fattr4_hidden*); extern bool_t xdr_fattr4_homogeneous(XDR *, fattr4_homogeneous*); extern bool_t xdr_fattr4_maxfilesize(XDR *, fattr4_maxfilesize*); extern bool_t xdr_fattr4_maxlink(XDR *, fattr4_maxlink*); extern bool_t xdr_fattr4_maxname(XDR *, fattr4_maxname*); extern bool_t xdr_fattr4_maxread(XDR *, fattr4_maxread*); extern bool_t xdr_fattr4_maxwrite(XDR *, fattr4_maxwrite*); extern bool_t xdr_fattr4_mimetype(XDR *, fattr4_mimetype*); extern bool_t xdr_fattr4_mode(XDR *, fattr4_mode*); extern bool_t xdr_fattr4_mode_set_masked(XDR *, fattr4_mode_set_masked*); extern bool_t xdr_fattr4_mounted_on_fileid(XDR *, fattr4_mounted_on_fileid*); extern bool_t xdr_fattr4_no_trunc(XDR *, fattr4_no_trunc*); extern bool_t xdr_fattr4_numlinks(XDR *, fattr4_numlinks*); extern bool_t xdr_fattr4_owner(XDR *, fattr4_owner*); extern bool_t xdr_fattr4_owner_group(XDR *, fattr4_owner_group*); extern bool_t xdr_fattr4_quota_avail_hard(XDR *, fattr4_quota_avail_hard*); extern bool_t xdr_fattr4_quota_avail_soft(XDR *, fattr4_quota_avail_soft*); extern bool_t xdr_fattr4_quota_used(XDR *, fattr4_quota_used*); extern bool_t xdr_fattr4_rawdev(XDR *, fattr4_rawdev*); extern bool_t xdr_fattr4_space_avail(XDR *, fattr4_space_avail*); extern bool_t xdr_fattr4_space_free(XDR *, fattr4_space_free*); extern bool_t xdr_fattr4_space_total(XDR *, fattr4_space_total*); extern bool_t xdr_fattr4_space_used(XDR *, fattr4_space_used*); extern bool_t xdr_fattr4_system(XDR *, fattr4_system*); extern bool_t xdr_fattr4_time_access(XDR *, fattr4_time_access*); extern bool_t xdr_fattr4_time_access_set(XDR *, fattr4_time_access_set*); extern bool_t xdr_fattr4_time_backup(XDR *, fattr4_time_backup*); extern bool_t xdr_fattr4_time_create(XDR *, fattr4_time_create*); extern bool_t xdr_fattr4_time_delta(XDR *, fattr4_time_delta*); extern bool_t xdr_fattr4_time_metadata(XDR *, fattr4_time_metadata*); extern bool_t xdr_fattr4_time_modify(XDR *, fattr4_time_modify*); extern bool_t xdr_fattr4_time_modify_set(XDR *, fattr4_time_modify_set*); extern bool_t xdr_fattr4_suppattr_exclcreat(XDR *, fattr4_suppattr_exclcreat*); extern bool_t xdr_fattr4_dir_notif_delay(XDR *, fattr4_dir_notif_delay*); extern bool_t xdr_fattr4_dirent_notif_delay(XDR *, fattr4_dirent_notif_delay*); extern bool_t xdr_fattr4_fs_layout_types(XDR *, fattr4_fs_layout_types*); extern bool_t xdr_fattr4_fs_status(XDR *, fattr4_fs_status*); extern bool_t xdr_fattr4_fs_charset_cap(XDR *, fattr4_fs_charset_cap*); extern bool_t xdr_fattr4_layout_alignment(XDR *, fattr4_layout_alignment*); extern bool_t xdr_fattr4_layout_blksize(XDR *, fattr4_layout_blksize*); extern bool_t xdr_fattr4_layout_hint(XDR *, fattr4_layout_hint*); extern bool_t xdr_fattr4_layout_types(XDR *, fattr4_layout_types*); extern bool_t xdr_fattr4_mdsthreshold(XDR *, fattr4_mdsthreshold*); extern bool_t xdr_fattr4_retention_get(XDR *, fattr4_retention_get*); extern bool_t xdr_fattr4_retention_set(XDR *, fattr4_retention_set*); extern bool_t xdr_fattr4_retentevt_get(XDR *, fattr4_retentevt_get*); extern bool_t xdr_fattr4_retentevt_set(XDR *, fattr4_retentevt_set*); extern bool_t xdr_fattr4_retention_hold(XDR *, fattr4_retention_hold*); extern bool_t xdr_fattr4_dacl(XDR *, fattr4_dacl*); extern bool_t xdr_fattr4_sacl(XDR *, fattr4_sacl*); extern bool_t xdr_fattr4_change_policy(XDR *, fattr4_change_policy*); extern bool_t xdr_fattr4_space_freed(XDR *, fattr4_space_freed*); extern bool_t xdr_fattr4_change_attr_type(XDR *, fattr4_change_attr_type*); extern bool_t xdr_fattr4_sec_label(XDR *, fattr4_sec_label*); extern bool_t xdr_fattr4_clone_blksize(XDR *, fattr4_clone_blksize*); extern bool_t xdr_fattr4(XDR *, fattr4*); extern bool_t xdr_change_info4(XDR *, change_info4*); extern bool_t xdr_clientaddr4(XDR *, clientaddr4*); extern bool_t xdr_cb_client4(XDR *, cb_client4*); extern bool_t xdr_nfs_client_id4(XDR *, nfs_client_id4*); extern bool_t xdr_client_owner4(XDR *, client_owner4*); extern bool_t xdr_server_owner4(XDR *, server_owner4*); extern bool_t xdr_state_owner4(XDR *, state_owner4*); extern bool_t xdr_open_owner4(XDR *, open_owner4*); extern bool_t xdr_lock_owner4(XDR *, lock_owner4*); extern bool_t xdr_nfs_lock_type4(XDR *, nfs_lock_type4*); extern bool_t xdr_ssv_subkey4(XDR *, ssv_subkey4*); extern bool_t xdr_ssv_mic_plain_tkn4(XDR *, ssv_mic_plain_tkn4*); extern bool_t xdr_ssv_mic_tkn4(XDR *, ssv_mic_tkn4*); extern bool_t xdr_ssv_seal_plain_tkn4(XDR *, ssv_seal_plain_tkn4*); extern bool_t xdr_ssv_seal_cipher_tkn4(XDR *, ssv_seal_cipher_tkn4*); extern bool_t xdr_fs_locations_server4(XDR *, fs_locations_server4*); extern bool_t xdr_fs_locations_item4(XDR *, fs_locations_item4*); extern bool_t xdr_fs_locations_info4(XDR *, fs_locations_info4*); extern bool_t xdr_fattr4_fs_locations_info(XDR *, fattr4_fs_locations_info*); extern bool_t xdr_nfl_util4(XDR *, nfl_util4*); extern bool_t xdr_filelayout_hint_care4(XDR *, filelayout_hint_care4*); extern bool_t xdr_nfsv4_1_file_layouthint4(XDR *, nfsv4_1_file_layouthint4*); extern bool_t xdr_multipath_list4(XDR *, multipath_list4*); extern bool_t xdr_nfsv4_1_file_layout_ds_addr4(XDR *, nfsv4_1_file_layout_ds_addr4*); extern bool_t xdr_nfsv4_1_file_layout4(XDR *, nfsv4_1_file_layout4*); extern bool_t xdr_nfs_opnum4(XDR *, nfs_opnum4*); extern bool_t xdr_ACCESS4args(XDR *, ACCESS4args*); extern bool_t xdr_ACCESS4resok(XDR *, ACCESS4resok*); extern bool_t xdr_ACCESS4res(XDR *, ACCESS4res*); extern bool_t xdr_CLONE4args(XDR *, CLONE4args*); extern bool_t xdr_CLONE4res(XDR *, CLONE4res*); extern bool_t xdr_CLOSE4args(XDR *, CLOSE4args*); extern bool_t xdr_CLOSE4res(XDR *, CLOSE4res*); extern bool_t xdr_COMMIT4args(XDR *, COMMIT4args*); extern bool_t xdr_COMMIT4resok(XDR *, COMMIT4resok*); extern bool_t xdr_COMMIT4res(XDR *, COMMIT4res*); extern bool_t xdr_createtype4(XDR *, createtype4*); extern bool_t xdr_CREATE4args(XDR *, CREATE4args*); extern bool_t xdr_CREATE4resok(XDR *, CREATE4resok*); extern bool_t xdr_CREATE4res(XDR *, CREATE4res*); extern bool_t xdr_DELEGPURGE4args(XDR *, DELEGPURGE4args*); extern bool_t xdr_DELEGPURGE4res(XDR *, DELEGPURGE4res*); extern bool_t xdr_DELEGRETURN4args(XDR *, DELEGRETURN4args*); extern bool_t xdr_DELEGRETURN4res(XDR *, DELEGRETURN4res*); extern bool_t xdr_GETATTR4args(XDR *, GETATTR4args*); extern bool_t xdr_GETATTR4resok(XDR *, GETATTR4resok*); extern bool_t xdr_GETATTR4res(XDR *, GETATTR4res*); extern bool_t xdr_GETFH4resok(XDR *, GETFH4resok*); extern bool_t xdr_GETFH4res(XDR *, GETFH4res*); extern bool_t xdr_LINK4args(XDR *, LINK4args*); extern bool_t xdr_LINK4resok(XDR *, LINK4resok*); extern bool_t xdr_LINK4res(XDR *, LINK4res*); extern bool_t xdr_open_to_lock_owner4(XDR *, open_to_lock_owner4*); extern bool_t xdr_exist_lock_owner4(XDR *, exist_lock_owner4*); extern bool_t xdr_locker4(XDR *, locker4*); extern bool_t xdr_LOCK4args(XDR *, LOCK4args*); extern bool_t xdr_LOCK4denied(XDR *, LOCK4denied*); extern bool_t xdr_LOCK4resok(XDR *, LOCK4resok*); extern bool_t xdr_LOCK4res(XDR *, LOCK4res*); extern bool_t xdr_LOCKT4args(XDR *, LOCKT4args*); extern bool_t xdr_LOCKT4res(XDR *, LOCKT4res*); extern bool_t xdr_LOCKU4args(XDR *, LOCKU4args*); extern bool_t xdr_LOCKU4res(XDR *, LOCKU4res*); extern bool_t xdr_LOOKUP4args(XDR *, LOOKUP4args*); extern bool_t xdr_LOOKUP4res(XDR *, LOOKUP4res*); extern bool_t xdr_LOOKUPP4res(XDR *, LOOKUPP4res*); extern bool_t xdr_NVERIFY4args(XDR *, NVERIFY4args*); extern bool_t xdr_NVERIFY4res(XDR *, NVERIFY4res*); extern bool_t xdr_createmode4(XDR *, createmode4*); extern bool_t xdr_creatverfattr(XDR *, creatverfattr*); extern bool_t xdr_createhow4(XDR *, createhow4*); extern bool_t xdr_opentype4(XDR *, opentype4*); extern bool_t xdr_openflag4(XDR *, openflag4*); extern bool_t xdr_limit_by4(XDR *, limit_by4*); extern bool_t xdr_nfs_modified_limit4(XDR *, nfs_modified_limit4*); extern bool_t xdr_nfs_space_limit4(XDR *, nfs_space_limit4*); extern bool_t xdr_open_delegation_type4(XDR *, open_delegation_type4*); extern bool_t xdr_open_claim_type4(XDR *, open_claim_type4*); extern bool_t xdr_open_claim_delegate_cur4(XDR *, open_claim_delegate_cur4*); extern bool_t xdr_open_claim4(XDR *, open_claim4*); extern bool_t xdr_OPEN4args(XDR *, OPEN4args*); extern bool_t xdr_open_read_delegation4(XDR *, open_read_delegation4*); extern bool_t xdr_open_write_delegation4(XDR *, open_write_delegation4*); extern bool_t xdr_why_no_delegation4(XDR *, why_no_delegation4*); extern bool_t xdr_open_none_delegation4(XDR *, open_none_delegation4*); extern bool_t xdr_open_delegation4(XDR *, open_delegation4*); extern bool_t xdr_OPEN4resok(XDR *, OPEN4resok*); extern bool_t xdr_OPEN4res(XDR *, OPEN4res*); extern bool_t xdr_OPENATTR4args(XDR *, OPENATTR4args*); extern bool_t xdr_OPENATTR4res(XDR *, OPENATTR4res*); extern bool_t xdr_OPEN_CONFIRM4args(XDR *, OPEN_CONFIRM4args*); extern bool_t xdr_OPEN_CONFIRM4resok(XDR *, OPEN_CONFIRM4resok*); extern bool_t xdr_OPEN_CONFIRM4res(XDR *, OPEN_CONFIRM4res*); extern bool_t xdr_OPEN_DOWNGRADE4args(XDR *, OPEN_DOWNGRADE4args*); extern bool_t xdr_OPEN_DOWNGRADE4resok(XDR *, OPEN_DOWNGRADE4resok*); extern bool_t xdr_OPEN_DOWNGRADE4res(XDR *, OPEN_DOWNGRADE4res*); extern bool_t xdr_PUTFH4args(XDR *, PUTFH4args*); extern bool_t xdr_PUTFH4res(XDR *, PUTFH4res*); extern bool_t xdr_PUTPUBFH4res(XDR *, PUTPUBFH4res*); extern bool_t xdr_PUTROOTFH4res(XDR *, PUTROOTFH4res*); extern bool_t xdr_READ4args(XDR *, READ4args*); extern bool_t xdr_READ4resok(XDR *, READ4resok*); extern bool_t xdr_READ4res(XDR *, READ4res*); extern bool_t xdr_READDIR4args(XDR *, READDIR4args*); extern bool_t xdr_entry4(XDR *, entry4*); extern bool_t xdr_dirlist4(XDR *, dirlist4*); extern bool_t xdr_READDIR4resok(XDR *, READDIR4resok*); extern bool_t xdr_READDIR4res(XDR *, READDIR4res*); extern bool_t xdr_READLINK4resok(XDR *, READLINK4resok*); extern bool_t xdr_READLINK4res(XDR *, READLINK4res*); extern bool_t xdr_REMOVE4args(XDR *, REMOVE4args*); extern bool_t xdr_REMOVE4resok(XDR *, REMOVE4resok*); extern bool_t xdr_REMOVE4res(XDR *, REMOVE4res*); extern bool_t xdr_RENAME4args(XDR *, RENAME4args*); extern bool_t xdr_RENAME4resok(XDR *, RENAME4resok*); extern bool_t xdr_RENAME4res(XDR *, RENAME4res*); extern bool_t xdr_RENEW4args(XDR *, RENEW4args*); extern bool_t xdr_RENEW4res(XDR *, RENEW4res*); extern bool_t xdr_RESTOREFH4res(XDR *, RESTOREFH4res*); extern bool_t xdr_SAVEFH4res(XDR *, SAVEFH4res*); extern bool_t xdr_SECINFO4args(XDR *, SECINFO4args*); extern bool_t xdr_rpc_gss_svc_t(XDR *, rpc_gss_svc_t*); extern bool_t xdr_rpcsec_gss_info(XDR *, rpcsec_gss_info*); extern bool_t xdr_secinfo4(XDR *, secinfo4*); extern bool_t xdr_SECINFO4resok(XDR *, SECINFO4resok*); extern bool_t xdr_SECINFO4res(XDR *, SECINFO4res*); extern bool_t xdr_SETATTR4args(XDR *, SETATTR4args*); extern bool_t xdr_SETATTR4res(XDR *, SETATTR4res*); extern bool_t xdr_SETCLIENTID4args(XDR *, SETCLIENTID4args*); extern bool_t xdr_SETCLIENTID4resok(XDR *, SETCLIENTID4resok*); extern bool_t xdr_SETCLIENTID4res(XDR *, SETCLIENTID4res*); extern bool_t xdr_SETCLIENTID_CONFIRM4args(XDR *, SETCLIENTID_CONFIRM4args*); extern bool_t xdr_SETCLIENTID_CONFIRM4res(XDR *, SETCLIENTID_CONFIRM4res*); extern bool_t xdr_VERIFY4args(XDR *, VERIFY4args*); extern bool_t xdr_VERIFY4res(XDR *, VERIFY4res*); extern bool_t xdr_WRITE4args(XDR *, WRITE4args*); extern bool_t xdr_WRITE4resok(XDR *, WRITE4resok*); extern bool_t xdr_WRITE4res(XDR *, WRITE4res*); extern bool_t xdr_RELEASE_LOCKOWNER4args(XDR *, RELEASE_LOCKOWNER4args*); extern bool_t xdr_RELEASE_LOCKOWNER4res(XDR *, RELEASE_LOCKOWNER4res*); extern bool_t xdr_ILLEGAL4res(XDR *, ILLEGAL4res*); extern bool_t xdr_gsshandle4_t(XDR *, gsshandle4_t*); extern bool_t xdr_gss_cb_handles4(XDR *, gss_cb_handles4*); extern bool_t xdr_callback_sec_parms4(XDR *, callback_sec_parms4*); extern bool_t xdr_BACKCHANNEL_CTL4args(XDR *, BACKCHANNEL_CTL4args*); extern bool_t xdr_BACKCHANNEL_CTL4res(XDR *, BACKCHANNEL_CTL4res*); extern bool_t xdr_channel_dir_from_client4(XDR *, channel_dir_from_client4*); extern bool_t xdr_BIND_CONN_TO_SESSION4args(XDR *, BIND_CONN_TO_SESSION4args*); extern bool_t xdr_channel_dir_from_server4(XDR *, channel_dir_from_server4*); extern bool_t xdr_BIND_CONN_TO_SESSION4resok(XDR *, BIND_CONN_TO_SESSION4resok*); extern bool_t xdr_BIND_CONN_TO_SESSION4res(XDR *, BIND_CONN_TO_SESSION4res*); extern bool_t xdr_state_protect_ops4(XDR *, state_protect_ops4*); extern bool_t xdr_ssv_sp_parms4(XDR *, ssv_sp_parms4*); extern bool_t xdr_state_protect_how4(XDR *, state_protect_how4*); extern bool_t xdr_state_protect4_a(XDR *, state_protect4_a*); extern bool_t xdr_EXCHANGE_ID4args(XDR *, EXCHANGE_ID4args*); extern bool_t xdr_ssv_prot_info4(XDR *, ssv_prot_info4*); extern bool_t xdr_state_protect4_r(XDR *, state_protect4_r*); extern bool_t xdr_EXCHANGE_ID4resok(XDR *, EXCHANGE_ID4resok*); extern bool_t xdr_EXCHANGE_ID4res(XDR *, EXCHANGE_ID4res*); extern bool_t xdr_channel_attrs4(XDR *, channel_attrs4*); extern bool_t xdr_CREATE_SESSION4args(XDR *, CREATE_SESSION4args*); extern bool_t xdr_CREATE_SESSION4resok(XDR *, CREATE_SESSION4resok*); extern bool_t xdr_CREATE_SESSION4res(XDR *, CREATE_SESSION4res*); extern bool_t xdr_DESTROY_SESSION4args(XDR *, DESTROY_SESSION4args*); extern bool_t xdr_DESTROY_SESSION4res(XDR *, DESTROY_SESSION4res*); extern bool_t xdr_FREE_STATEID4args(XDR *, FREE_STATEID4args*); extern bool_t xdr_FREE_STATEID4res(XDR *, FREE_STATEID4res*); extern bool_t xdr_attr_notice4(XDR *, attr_notice4*); extern bool_t xdr_GET_DIR_DELEGATION4args(XDR *, GET_DIR_DELEGATION4args*); extern bool_t xdr_GET_DIR_DELEGATION4resok(XDR *, GET_DIR_DELEGATION4resok*); extern bool_t xdr_gddrnf4_status(XDR *, gddrnf4_status*); extern bool_t xdr_GET_DIR_DELEGATION4res_non_fatal(XDR *, GET_DIR_DELEGATION4res_non_fatal*); extern bool_t xdr_GET_DIR_DELEGATION4res(XDR *, GET_DIR_DELEGATION4res*); extern bool_t xdr_GETDEVICEINFO4args(XDR *, GETDEVICEINFO4args*); extern bool_t xdr_GETDEVICEINFO4resok(XDR *, GETDEVICEINFO4resok*); extern bool_t xdr_GETDEVICEINFO4res(XDR *, GETDEVICEINFO4res*); extern bool_t xdr_GETDEVICELIST4args(XDR *, GETDEVICELIST4args*); extern bool_t xdr_GETDEVICELIST4resok(XDR *, GETDEVICELIST4resok*); extern bool_t xdr_GETDEVICELIST4res(XDR *, GETDEVICELIST4res*); extern bool_t xdr_newtime4(XDR *, newtime4*); extern bool_t xdr_newoffset4(XDR *, newoffset4*); extern bool_t xdr_LAYOUTCOMMIT4args(XDR *, LAYOUTCOMMIT4args*); extern bool_t xdr_newsize4(XDR *, newsize4*); extern bool_t xdr_LAYOUTCOMMIT4resok(XDR *, LAYOUTCOMMIT4resok*); extern bool_t xdr_LAYOUTCOMMIT4res(XDR *, LAYOUTCOMMIT4res*); extern bool_t xdr_LAYOUTGET4args(XDR *, LAYOUTGET4args*); extern bool_t xdr_LAYOUTGET4resok(XDR *, LAYOUTGET4resok*); extern bool_t xdr_LAYOUTGET4res(XDR *, LAYOUTGET4res*); extern bool_t xdr_LAYOUTRETURN4args(XDR *, LAYOUTRETURN4args*); extern bool_t xdr_layoutreturn_stateid(XDR *, layoutreturn_stateid*); extern bool_t xdr_LAYOUTRETURN4res(XDR *, LAYOUTRETURN4res*); extern bool_t xdr_secinfo_style4(XDR *, secinfo_style4*); extern bool_t xdr_SECINFO_NO_NAME4args(XDR *, SECINFO_NO_NAME4args*); extern bool_t xdr_SECINFO_NO_NAME4res(XDR *, SECINFO_NO_NAME4res*); extern bool_t xdr_SEQUENCE4args(XDR *, SEQUENCE4args*); extern bool_t xdr_SEQUENCE4resok(XDR *, SEQUENCE4resok*); extern bool_t xdr_SEQUENCE4res(XDR *, SEQUENCE4res*); extern bool_t xdr_ssa_digest_input4(XDR *, ssa_digest_input4*); extern bool_t xdr_SET_SSV4args(XDR *, SET_SSV4args*); extern bool_t xdr_ssr_digest_input4(XDR *, ssr_digest_input4*); extern bool_t xdr_SET_SSV4resok(XDR *, SET_SSV4resok*); extern bool_t xdr_SET_SSV4res(XDR *, SET_SSV4res*); extern bool_t xdr_TEST_STATEID4args(XDR *, TEST_STATEID4args*); extern bool_t xdr_TEST_STATEID4resok(XDR *, TEST_STATEID4resok*); extern bool_t xdr_TEST_STATEID4res(XDR *, TEST_STATEID4res*); extern bool_t xdr_deleg_claim4(XDR *, deleg_claim4*); extern bool_t xdr_WANT_DELEGATION4args(XDR *, WANT_DELEGATION4args*); extern bool_t xdr_WANT_DELEGATION4res(XDR *, WANT_DELEGATION4res*); extern bool_t xdr_DESTROY_CLIENTID4args(XDR *, DESTROY_CLIENTID4args*); extern bool_t xdr_DESTROY_CLIENTID4res(XDR *, DESTROY_CLIENTID4res*); extern bool_t xdr_RECLAIM_COMPLETE4args(XDR *, RECLAIM_COMPLETE4args*); extern bool_t xdr_RECLAIM_COMPLETE4res(XDR *, RECLAIM_COMPLETE4res*); extern bool_t xdr_COPY4args(XDR *, COPY4args*); extern bool_t xdr_copy_requirements4(XDR *, copy_requirements4*); extern bool_t xdr_COPY4resok(XDR *, COPY4resok*); extern bool_t xdr_COPY4res(XDR *, COPY4res*); extern bool_t xdr_COPY_NOTIFY4args(XDR *, COPY_NOTIFY4args*); extern bool_t xdr_COPY_NOTIFY4resok(XDR *, COPY_NOTIFY4resok*); extern bool_t xdr_COPY_NOTIFY4res(XDR *, COPY_NOTIFY4res*); extern bool_t xdr_OFFLOAD_CANCEL4args(XDR *, OFFLOAD_CANCEL4args*); extern bool_t xdr_OFFLOAD_CANCEL4res(XDR *, OFFLOAD_CANCEL4res*); extern bool_t xdr_OFFLOAD_STATUS4args(XDR *, OFFLOAD_STATUS4args*); extern bool_t xdr_OFFLOAD_STATUS4resok(XDR *, OFFLOAD_STATUS4resok*); extern bool_t xdr_OFFLOAD_STATUS4res(XDR *, OFFLOAD_STATUS4res*); extern bool_t xdr_ALLOCATE4args(XDR *, ALLOCATE4args*); extern bool_t xdr_ALLOCATE4res(XDR *, ALLOCATE4res*); extern bool_t xdr_DEALLOCATE4args(XDR *, DEALLOCATE4args*); extern bool_t xdr_DEALLOCATE4res(XDR *, DEALLOCATE4res*); extern bool_t xdr_IO_ADVISE_type4(XDR *, IO_ADVISE_type4*); extern bool_t xdr_IO_ADVISE4args(XDR *, IO_ADVISE4args*); extern bool_t xdr_IO_ADVISE4resok(XDR *, IO_ADVISE4resok*); extern bool_t xdr_IO_ADVISE4res(XDR *, IO_ADVISE4res*); extern bool_t xdr_device_error4(XDR *, device_error4*); extern bool_t xdr_LAYOUTERROR4args(XDR *, LAYOUTERROR4args*); extern bool_t xdr_LAYOUTERROR4res(XDR *, LAYOUTERROR4res*); extern bool_t xdr_io_info4(XDR *, io_info4*); extern bool_t xdr_LAYOUTSTATS4args(XDR *, LAYOUTSTATS4args*); extern bool_t xdr_LAYOUTSTATS4res(XDR *, LAYOUTSTATS4res*); extern bool_t xdr_READ_PLUS4args(XDR *, READ_PLUS4args*); extern bool_t xdr_read_plus_content(XDR *, read_plus_content*); extern bool_t xdr_read_plus_res4(XDR *, read_plus_res4*); extern bool_t xdr_READ_PLUS4res(XDR *, READ_PLUS4res*); extern bool_t xdr_SEEK4args(XDR *, SEEK4args*); extern bool_t xdr_seek_res4(XDR *, seek_res4*); extern bool_t xdr_SEEK4res(XDR *, SEEK4res*); extern bool_t xdr_WRITE_SAME4args(XDR *, WRITE_SAME4args*); extern bool_t xdr_WRITE_SAME4res(XDR *, WRITE_SAME4res*); extern bool_t xdr_nfs_argop4(XDR *, nfs_argop4*); extern bool_t xdr_nfs_resop4(XDR *, nfs_resop4*); extern bool_t xdr_COMPOUND4args(XDR *, COMPOUND4args*); extern bool_t xdr_COMPOUND4res(XDR *, COMPOUND4res*); extern bool_t xdr_CB_GETATTR4args(XDR *, CB_GETATTR4args*); extern bool_t xdr_CB_GETATTR4resok(XDR *, CB_GETATTR4resok*); extern bool_t xdr_CB_GETATTR4res(XDR *, CB_GETATTR4res*); extern bool_t xdr_CB_RECALL4args(XDR *, CB_RECALL4args*); extern bool_t xdr_CB_RECALL4res(XDR *, CB_RECALL4res*); extern bool_t xdr_CB_ILLEGAL4res(XDR *, CB_ILLEGAL4res*); extern bool_t xdr_layoutrecall_type4(XDR *, layoutrecall_type4*); extern bool_t xdr_layoutrecall_file4(XDR *, layoutrecall_file4*); extern bool_t xdr_layoutrecall4(XDR *, layoutrecall4*); extern bool_t xdr_CB_LAYOUTRECALL4args(XDR *, CB_LAYOUTRECALL4args*); extern bool_t xdr_CB_LAYOUTRECALL4res(XDR *, CB_LAYOUTRECALL4res*); extern bool_t xdr_notify_type4(XDR *, notify_type4*); extern bool_t xdr_notify_entry4(XDR *, notify_entry4*); extern bool_t xdr_prev_entry4(XDR *, prev_entry4*); extern bool_t xdr_notify_remove4(XDR *, notify_remove4*); extern bool_t xdr_notify_add4(XDR *, notify_add4*); extern bool_t xdr_notify_attr4(XDR *, notify_attr4*); extern bool_t xdr_notify_rename4(XDR *, notify_rename4*); extern bool_t xdr_notify_verifier4(XDR *, notify_verifier4*); extern bool_t xdr_notifylist4(XDR *, notifylist4*); extern bool_t xdr_notify4(XDR *, notify4*); extern bool_t xdr_CB_NOTIFY4args(XDR *, CB_NOTIFY4args*); extern bool_t xdr_CB_NOTIFY4res(XDR *, CB_NOTIFY4res*); extern bool_t xdr_CB_PUSH_DELEG4args(XDR *, CB_PUSH_DELEG4args*); extern bool_t xdr_CB_PUSH_DELEG4res(XDR *, CB_PUSH_DELEG4res*); extern bool_t xdr_CB_RECALL_ANY4args(XDR *, CB_RECALL_ANY4args*); extern bool_t xdr_CB_RECALL_ANY4res(XDR *, CB_RECALL_ANY4res*); extern bool_t xdr_CB_RECALLABLE_OBJ_AVAIL4args(XDR *, CB_RECALLABLE_OBJ_AVAIL4args*); extern bool_t xdr_CB_RECALLABLE_OBJ_AVAIL4res(XDR *, CB_RECALLABLE_OBJ_AVAIL4res*); extern bool_t xdr_CB_RECALL_SLOT4args(XDR *, CB_RECALL_SLOT4args*); extern bool_t xdr_CB_RECALL_SLOT4res(XDR *, CB_RECALL_SLOT4res*); extern bool_t xdr_referring_call4(XDR *, referring_call4*); extern bool_t xdr_referring_call_list4(XDR *, referring_call_list4*); extern bool_t xdr_CB_SEQUENCE4args(XDR *, CB_SEQUENCE4args*); extern bool_t xdr_CB_SEQUENCE4resok(XDR *, CB_SEQUENCE4resok*); extern bool_t xdr_CB_SEQUENCE4res(XDR *, CB_SEQUENCE4res*); extern bool_t xdr_CB_WANTS_CANCELLED4args(XDR *, CB_WANTS_CANCELLED4args*); extern bool_t xdr_CB_WANTS_CANCELLED4res(XDR *, CB_WANTS_CANCELLED4res*); extern bool_t xdr_CB_NOTIFY_LOCK4args(XDR *, CB_NOTIFY_LOCK4args*); extern bool_t xdr_CB_NOTIFY_LOCK4res(XDR *, CB_NOTIFY_LOCK4res*); extern bool_t xdr_notify_deviceid_type4(XDR *, notify_deviceid_type4*); extern bool_t xdr_notify_deviceid_delete4(XDR *, notify_deviceid_delete4*); extern bool_t xdr_notify_deviceid_change4(XDR *, notify_deviceid_change4*); extern bool_t xdr_CB_NOTIFY_DEVICEID4args(XDR *, CB_NOTIFY_DEVICEID4args*); extern bool_t xdr_CB_NOTIFY_DEVICEID4res(XDR *, CB_NOTIFY_DEVICEID4res*); extern bool_t xdr_offload_info4(XDR *, offload_info4*); extern bool_t xdr_CB_OFFLOAD4args(XDR *, CB_OFFLOAD4args*); extern bool_t xdr_CB_OFFLOAD4res(XDR *, CB_OFFLOAD4res*); extern bool_t xdr_nfs_cb_opnum4(XDR *, nfs_cb_opnum4*); extern bool_t xdr_nfs_cb_argop4(XDR *, nfs_cb_argop4*); extern bool_t xdr_nfs_cb_resop4(XDR *, nfs_cb_resop4*); extern bool_t xdr_CB_COMPOUND4args(XDR *, CB_COMPOUND4args*); extern bool_t xdr_CB_COMPOUND4res(XDR *, CB_COMPOUND4res*); #else /* K&R C */ extern bool_t xdr_nfs_ftype4(); extern bool_t xdr_nfsstat4(); extern bool_t xdr_attrlist4(); extern bool_t xdr_bitmap4(); extern bool_t xdr_changeid4(); extern bool_t xdr_clientid4(); extern bool_t xdr_count4(); extern bool_t xdr_length4(); extern bool_t xdr_mode4(); extern bool_t xdr_nfs_cookie4(); extern bool_t xdr_nfs_fh4(); extern bool_t xdr_offset4(); extern bool_t xdr_qop4(); extern bool_t xdr_sec_oid4(); extern bool_t xdr_sequenceid4(); extern bool_t xdr_seqid4(); extern bool_t xdr_sessionid4(); extern bool_t xdr_slotid4(); extern bool_t xdr_utf8string(); extern bool_t xdr_utf8str_cis(); extern bool_t xdr_utf8str_cs(); extern bool_t xdr_utf8str_mixed(); extern bool_t xdr_component4(); extern bool_t xdr_linktext4(); extern bool_t xdr_ascii_REQUIRED4(); extern bool_t xdr_pathname4(); extern bool_t xdr_verifier4(); extern bool_t xdr_secret4(); extern bool_t xdr_policy4(); extern bool_t xdr_nfstime4(); extern bool_t xdr_time_how4(); extern bool_t xdr_settime4(); extern bool_t xdr_nfs_lease4(); extern bool_t xdr_fsid4(); extern bool_t xdr_change_policy4(); extern bool_t xdr_fs_location4(); extern bool_t xdr_fs_locations4(); extern bool_t xdr_acetype4(); extern bool_t xdr_aceflag4(); extern bool_t xdr_acemask4(); extern bool_t xdr_nfsace4(); extern bool_t xdr_aclflag4(); extern bool_t xdr_nfsacl41(); extern bool_t xdr_mode_masked4(); extern bool_t xdr_specdata4(); extern bool_t xdr_netaddr4(); extern bool_t xdr_nfs_impl_id4(); extern bool_t xdr_stateid4(); extern bool_t xdr_layouttype4(); extern bool_t xdr_layout_content4(); extern bool_t xdr_layouthint4(); extern bool_t xdr_layoutiomode4(); extern bool_t xdr_layout4(); extern bool_t xdr_deviceid4(); extern bool_t xdr_device_addr4(); extern bool_t xdr_layoutupdate4(); extern bool_t xdr_layoutreturn_type4(); extern bool_t xdr_layoutreturn_file4(); extern bool_t xdr_layoutreturn4(); extern bool_t xdr_fs4_status_type(); extern bool_t xdr_fs4_status(); extern bool_t xdr_threshold4_read_size(); extern bool_t xdr_threshold4_write_size(); extern bool_t xdr_threshold4_read_iosize(); extern bool_t xdr_threshold4_write_iosize(); extern bool_t xdr_threshold_item4(); extern bool_t xdr_mdsthreshold4(); extern bool_t xdr_retention_get4(); extern bool_t xdr_retention_set4(); extern bool_t xdr_fs_charset_cap4(); extern bool_t xdr_netloc_type4(); extern bool_t xdr_netloc4(); extern bool_t xdr_change_attr_type4(); extern bool_t xdr_labelformat_spec4(); extern bool_t xdr_sec_label4(); extern bool_t xdr_copy_from_auth_priv(); extern bool_t xdr_copy_to_auth_priv(); extern bool_t xdr_copy_confirm_auth_priv(); extern bool_t xdr_app_data_block4(); extern bool_t xdr_data4(); extern bool_t xdr_data_info4(); extern bool_t xdr_data_content4(); extern bool_t xdr_stable_how4(); extern bool_t xdr_write_response4(); extern bool_t xdr_fattr4_supported_attrs(); extern bool_t xdr_fattr4_type(); extern bool_t xdr_fattr4_fh_expire_type(); extern bool_t xdr_fattr4_change(); extern bool_t xdr_fattr4_size(); extern bool_t xdr_fattr4_link_support(); extern bool_t xdr_fattr4_symlink_support(); extern bool_t xdr_fattr4_named_attr(); extern bool_t xdr_fattr4_fsid(); extern bool_t xdr_fattr4_unique_handles(); extern bool_t xdr_fattr4_lease_time(); extern bool_t xdr_fattr4_rdattr_error(); extern bool_t xdr_fattr4_acl(); extern bool_t xdr_fattr4_aclsupport(); extern bool_t xdr_fattr4_archive(); extern bool_t xdr_fattr4_cansettime(); extern bool_t xdr_fattr4_case_insensitive(); extern bool_t xdr_fattr4_case_preserving(); extern bool_t xdr_fattr4_chown_restricted(); extern bool_t xdr_fattr4_fileid(); extern bool_t xdr_fattr4_files_avail(); extern bool_t xdr_fattr4_filehandle(); extern bool_t xdr_fattr4_files_free(); extern bool_t xdr_fattr4_files_total(); extern bool_t xdr_fattr4_fs_locations(); extern bool_t xdr_fattr4_hidden(); extern bool_t xdr_fattr4_homogeneous(); extern bool_t xdr_fattr4_maxfilesize(); extern bool_t xdr_fattr4_maxlink(); extern bool_t xdr_fattr4_maxname(); extern bool_t xdr_fattr4_maxread(); extern bool_t xdr_fattr4_maxwrite(); extern bool_t xdr_fattr4_mimetype(); extern bool_t xdr_fattr4_mode(); extern bool_t xdr_fattr4_mode_set_masked(); extern bool_t xdr_fattr4_mounted_on_fileid(); extern bool_t xdr_fattr4_no_trunc(); extern bool_t xdr_fattr4_numlinks(); extern bool_t xdr_fattr4_owner(); extern bool_t xdr_fattr4_owner_group(); extern bool_t xdr_fattr4_quota_avail_hard(); extern bool_t xdr_fattr4_quota_avail_soft(); extern bool_t xdr_fattr4_quota_used(); extern bool_t xdr_fattr4_rawdev(); extern bool_t xdr_fattr4_space_avail(); extern bool_t xdr_fattr4_space_free(); extern bool_t xdr_fattr4_space_total(); extern bool_t xdr_fattr4_space_used(); extern bool_t xdr_fattr4_system(); extern bool_t xdr_fattr4_time_access(); extern bool_t xdr_fattr4_time_access_set(); extern bool_t xdr_fattr4_time_backup(); extern bool_t xdr_fattr4_time_create(); extern bool_t xdr_fattr4_time_delta(); extern bool_t xdr_fattr4_time_metadata(); extern bool_t xdr_fattr4_time_modify(); extern bool_t xdr_fattr4_time_modify_set(); extern bool_t xdr_fattr4_suppattr_exclcreat(); extern bool_t xdr_fattr4_dir_notif_delay(); extern bool_t xdr_fattr4_dirent_notif_delay(); extern bool_t xdr_fattr4_fs_layout_types(); extern bool_t xdr_fattr4_fs_status(); extern bool_t xdr_fattr4_fs_charset_cap(); extern bool_t xdr_fattr4_layout_alignment(); extern bool_t xdr_fattr4_layout_blksize(); extern bool_t xdr_fattr4_layout_hint(); extern bool_t xdr_fattr4_layout_types(); extern bool_t xdr_fattr4_mdsthreshold(); extern bool_t xdr_fattr4_retention_get(); extern bool_t xdr_fattr4_retention_set(); extern bool_t xdr_fattr4_retentevt_get(); extern bool_t xdr_fattr4_retentevt_set(); extern bool_t xdr_fattr4_retention_hold(); extern bool_t xdr_fattr4_dacl(); extern bool_t xdr_fattr4_sacl(); extern bool_t xdr_fattr4_change_policy(); extern bool_t xdr_fattr4_space_freed(); extern bool_t xdr_fattr4_change_attr_type(); extern bool_t xdr_fattr4_sec_label(); extern bool_t xdr_fattr4_clone_blksize(); extern bool_t xdr_fattr4(); extern bool_t xdr_change_info4(); extern bool_t xdr_clientaddr4(); extern bool_t xdr_cb_client4(); extern bool_t xdr_nfs_client_id4(); extern bool_t xdr_client_owner4(); extern bool_t xdr_server_owner4(); extern bool_t xdr_state_owner4(); extern bool_t xdr_open_owner4(); extern bool_t xdr_lock_owner4(); extern bool_t xdr_nfs_lock_type4(); extern bool_t xdr_ssv_subkey4(); extern bool_t xdr_ssv_mic_plain_tkn4(); extern bool_t xdr_ssv_mic_tkn4(); extern bool_t xdr_ssv_seal_plain_tkn4(); extern bool_t xdr_ssv_seal_cipher_tkn4(); extern bool_t xdr_fs_locations_server4(); extern bool_t xdr_fs_locations_item4(); extern bool_t xdr_fs_locations_info4(); extern bool_t xdr_fattr4_fs_locations_info(); extern bool_t xdr_nfl_util4(); extern bool_t xdr_filelayout_hint_care4(); extern bool_t xdr_nfsv4_1_file_layouthint4(); extern bool_t xdr_multipath_list4(); extern bool_t xdr_nfsv4_1_file_layout_ds_addr4(); extern bool_t xdr_nfsv4_1_file_layout4(); extern bool_t xdr_nfs_opnum4(); extern bool_t xdr_ACCESS4args(); extern bool_t xdr_ACCESS4resok(); extern bool_t xdr_ACCESS4res(); extern bool_t xdr_CLONE4args(); extern bool_t xdr_CLONE4res(); extern bool_t xdr_CLOSE4args(); extern bool_t xdr_CLOSE4res(); extern bool_t xdr_COMMIT4args(); extern bool_t xdr_COMMIT4resok(); extern bool_t xdr_COMMIT4res(); extern bool_t xdr_createtype4(); extern bool_t xdr_CREATE4args(); extern bool_t xdr_CREATE4resok(); extern bool_t xdr_CREATE4res(); extern bool_t xdr_DELEGPURGE4args(); extern bool_t xdr_DELEGPURGE4res(); extern bool_t xdr_DELEGRETURN4args(); extern bool_t xdr_DELEGRETURN4res(); extern bool_t xdr_GETATTR4args(); extern bool_t xdr_GETATTR4resok(); extern bool_t xdr_GETATTR4res(); extern bool_t xdr_GETFH4resok(); extern bool_t xdr_GETFH4res(); extern bool_t xdr_LINK4args(); extern bool_t xdr_LINK4resok(); extern bool_t xdr_LINK4res(); extern bool_t xdr_open_to_lock_owner4(); extern bool_t xdr_exist_lock_owner4(); extern bool_t xdr_locker4(); extern bool_t xdr_LOCK4args(); extern bool_t xdr_LOCK4denied(); extern bool_t xdr_LOCK4resok(); extern bool_t xdr_LOCK4res(); extern bool_t xdr_LOCKT4args(); extern bool_t xdr_LOCKT4res(); extern bool_t xdr_LOCKU4args(); extern bool_t xdr_LOCKU4res(); extern bool_t xdr_LOOKUP4args(); extern bool_t xdr_LOOKUP4res(); extern bool_t xdr_LOOKUPP4res(); extern bool_t xdr_NVERIFY4args(); extern bool_t xdr_NVERIFY4res(); extern bool_t xdr_createmode4(); extern bool_t xdr_creatverfattr(); extern bool_t xdr_createhow4(); extern bool_t xdr_opentype4(); extern bool_t xdr_openflag4(); extern bool_t xdr_limit_by4(); extern bool_t xdr_nfs_modified_limit4(); extern bool_t xdr_nfs_space_limit4(); extern bool_t xdr_open_delegation_type4(); extern bool_t xdr_open_claim_type4(); extern bool_t xdr_open_claim_delegate_cur4(); extern bool_t xdr_open_claim4(); extern bool_t xdr_OPEN4args(); extern bool_t xdr_open_read_delegation4(); extern bool_t xdr_open_write_delegation4(); extern bool_t xdr_why_no_delegation4(); extern bool_t xdr_open_none_delegation4(); extern bool_t xdr_open_delegation4(); extern bool_t xdr_OPEN4resok(); extern bool_t xdr_OPEN4res(); extern bool_t xdr_OPENATTR4args(); extern bool_t xdr_OPENATTR4res(); extern bool_t xdr_OPEN_CONFIRM4args(); extern bool_t xdr_OPEN_CONFIRM4resok(); extern bool_t xdr_OPEN_CONFIRM4res(); extern bool_t xdr_OPEN_DOWNGRADE4args(); extern bool_t xdr_OPEN_DOWNGRADE4resok(); extern bool_t xdr_OPEN_DOWNGRADE4res(); extern bool_t xdr_PUTFH4args(); extern bool_t xdr_PUTFH4res(); extern bool_t xdr_PUTPUBFH4res(); extern bool_t xdr_PUTROOTFH4res(); extern bool_t xdr_READ4args(); extern bool_t xdr_READ4resok(); extern bool_t xdr_READ4res(); extern bool_t xdr_READDIR4args(); extern bool_t xdr_entry4(); extern bool_t xdr_dirlist4(); extern bool_t xdr_READDIR4resok(); extern bool_t xdr_READDIR4res(); extern bool_t xdr_READLINK4resok(); extern bool_t xdr_READLINK4res(); extern bool_t xdr_REMOVE4args(); extern bool_t xdr_REMOVE4resok(); extern bool_t xdr_REMOVE4res(); extern bool_t xdr_RENAME4args(); extern bool_t xdr_RENAME4resok(); extern bool_t xdr_RENAME4res(); extern bool_t xdr_RENEW4args(); extern bool_t xdr_RENEW4res(); extern bool_t xdr_RESTOREFH4res(); extern bool_t xdr_SAVEFH4res(); extern bool_t xdr_SECINFO4args(); extern bool_t xdr_rpc_gss_svc_t(); extern bool_t xdr_rpcsec_gss_info(); extern bool_t xdr_secinfo4(); extern bool_t xdr_SECINFO4resok(); extern bool_t xdr_SECINFO4res(); extern bool_t xdr_SETATTR4args(); extern bool_t xdr_SETATTR4res(); extern bool_t xdr_SETCLIENTID4args(); extern bool_t xdr_SETCLIENTID4resok(); extern bool_t xdr_SETCLIENTID4res(); extern bool_t xdr_SETCLIENTID_CONFIRM4args(); extern bool_t xdr_SETCLIENTID_CONFIRM4res(); extern bool_t xdr_VERIFY4args(); extern bool_t xdr_VERIFY4res(); extern bool_t xdr_WRITE4args(); extern bool_t xdr_WRITE4resok(); extern bool_t xdr_WRITE4res(); extern bool_t xdr_RELEASE_LOCKOWNER4args(); extern bool_t xdr_RELEASE_LOCKOWNER4res(); extern bool_t xdr_ILLEGAL4res(); extern bool_t xdr_gsshandle4_t(); extern bool_t xdr_gss_cb_handles4(); extern bool_t xdr_callback_sec_parms4(); extern bool_t xdr_BACKCHANNEL_CTL4args(); extern bool_t xdr_BACKCHANNEL_CTL4res(); extern bool_t xdr_channel_dir_from_client4(); extern bool_t xdr_BIND_CONN_TO_SESSION4args(); extern bool_t xdr_channel_dir_from_server4(); extern bool_t xdr_BIND_CONN_TO_SESSION4resok(); extern bool_t xdr_BIND_CONN_TO_SESSION4res(); extern bool_t xdr_state_protect_ops4(); extern bool_t xdr_ssv_sp_parms4(); extern bool_t xdr_state_protect_how4(); extern bool_t xdr_state_protect4_a(); extern bool_t xdr_EXCHANGE_ID4args(); extern bool_t xdr_ssv_prot_info4(); extern bool_t xdr_state_protect4_r(); extern bool_t xdr_EXCHANGE_ID4resok(); extern bool_t xdr_EXCHANGE_ID4res(); extern bool_t xdr_channel_attrs4(); extern bool_t xdr_CREATE_SESSION4args(); extern bool_t xdr_CREATE_SESSION4resok(); extern bool_t xdr_CREATE_SESSION4res(); extern bool_t xdr_DESTROY_SESSION4args(); extern bool_t xdr_DESTROY_SESSION4res(); extern bool_t xdr_FREE_STATEID4args(); extern bool_t xdr_FREE_STATEID4res(); extern bool_t xdr_attr_notice4(); extern bool_t xdr_GET_DIR_DELEGATION4args(); extern bool_t xdr_GET_DIR_DELEGATION4resok(); extern bool_t xdr_gddrnf4_status(); extern bool_t xdr_GET_DIR_DELEGATION4res_non_fatal(); extern bool_t xdr_GET_DIR_DELEGATION4res(); extern bool_t xdr_GETDEVICEINFO4args(); extern bool_t xdr_GETDEVICEINFO4resok(); extern bool_t xdr_GETDEVICEINFO4res(); extern bool_t xdr_GETDEVICELIST4args(); extern bool_t xdr_GETDEVICELIST4resok(); extern bool_t xdr_GETDEVICELIST4res(); extern bool_t xdr_newtime4(); extern bool_t xdr_newoffset4(); extern bool_t xdr_LAYOUTCOMMIT4args(); extern bool_t xdr_newsize4(); extern bool_t xdr_LAYOUTCOMMIT4resok(); extern bool_t xdr_LAYOUTCOMMIT4res(); extern bool_t xdr_LAYOUTGET4args(); extern bool_t xdr_LAYOUTGET4resok(); extern bool_t xdr_LAYOUTGET4res(); extern bool_t xdr_LAYOUTRETURN4args(); extern bool_t xdr_layoutreturn_stateid(); extern bool_t xdr_LAYOUTRETURN4res(); extern bool_t xdr_secinfo_style4(); extern bool_t xdr_SECINFO_NO_NAME4args(); extern bool_t xdr_SECINFO_NO_NAME4res(); extern bool_t xdr_SEQUENCE4args(); extern bool_t xdr_SEQUENCE4resok(); extern bool_t xdr_SEQUENCE4res(); extern bool_t xdr_ssa_digest_input4(); extern bool_t xdr_SET_SSV4args(); extern bool_t xdr_ssr_digest_input4(); extern bool_t xdr_SET_SSV4resok(); extern bool_t xdr_SET_SSV4res(); extern bool_t xdr_TEST_STATEID4args(); extern bool_t xdr_TEST_STATEID4resok(); extern bool_t xdr_TEST_STATEID4res(); extern bool_t xdr_deleg_claim4(); extern bool_t xdr_WANT_DELEGATION4args(); extern bool_t xdr_WANT_DELEGATION4res(); extern bool_t xdr_DESTROY_CLIENTID4args(); extern bool_t xdr_DESTROY_CLIENTID4res(); extern bool_t xdr_RECLAIM_COMPLETE4args(); extern bool_t xdr_RECLAIM_COMPLETE4res(); extern bool_t xdr_COPY4args(); extern bool_t xdr_copy_requirements4(); extern bool_t xdr_COPY4resok(); extern bool_t xdr_COPY4res(); extern bool_t xdr_COPY_NOTIFY4args(); extern bool_t xdr_COPY_NOTIFY4resok(); extern bool_t xdr_COPY_NOTIFY4res(); extern bool_t xdr_OFFLOAD_CANCEL4args(); extern bool_t xdr_OFFLOAD_CANCEL4res(); extern bool_t xdr_OFFLOAD_STATUS4args(); extern bool_t xdr_OFFLOAD_STATUS4resok(); extern bool_t xdr_OFFLOAD_STATUS4res(); extern bool_t xdr_ALLOCATE4args(); extern bool_t xdr_ALLOCATE4res(); extern bool_t xdr_DEALLOCATE4args(); extern bool_t xdr_DEALLOCATE4res(); extern bool_t xdr_IO_ADVISE_type4(); extern bool_t xdr_IO_ADVISE4args(); extern bool_t xdr_IO_ADVISE4resok(); extern bool_t xdr_IO_ADVISE4res(); extern bool_t xdr_device_error4(); extern bool_t xdr_LAYOUTERROR4args(); extern bool_t xdr_LAYOUTERROR4res(); extern bool_t xdr_io_info4(); extern bool_t xdr_LAYOUTSTATS4args(); extern bool_t xdr_LAYOUTSTATS4res(); extern bool_t xdr_READ_PLUS4args(); extern bool_t xdr_read_plus_content(); extern bool_t xdr_read_plus_res4(); extern bool_t xdr_READ_PLUS4res(); extern bool_t xdr_SEEK4args(); extern bool_t xdr_seek_res4(); extern bool_t xdr_SEEK4res(); extern bool_t xdr_WRITE_SAME4args(); extern bool_t xdr_WRITE_SAME4res(); extern bool_t xdr_nfs_argop4(); extern bool_t xdr_nfs_resop4(); extern bool_t xdr_COMPOUND4args(); extern bool_t xdr_COMPOUND4res(); extern bool_t xdr_CB_GETATTR4args(); extern bool_t xdr_CB_GETATTR4resok(); extern bool_t xdr_CB_GETATTR4res(); extern bool_t xdr_CB_RECALL4args(); extern bool_t xdr_CB_RECALL4res(); extern bool_t xdr_CB_ILLEGAL4res(); extern bool_t xdr_layoutrecall_type4(); extern bool_t xdr_layoutrecall_file4(); extern bool_t xdr_layoutrecall4(); extern bool_t xdr_CB_LAYOUTRECALL4args(); extern bool_t xdr_CB_LAYOUTRECALL4res(); extern bool_t xdr_notify_type4(); extern bool_t xdr_notify_entry4(); extern bool_t xdr_prev_entry4(); extern bool_t xdr_notify_remove4(); extern bool_t xdr_notify_add4(); extern bool_t xdr_notify_attr4(); extern bool_t xdr_notify_rename4(); extern bool_t xdr_notify_verifier4(); extern bool_t xdr_notifylist4(); extern bool_t xdr_notify4(); extern bool_t xdr_CB_NOTIFY4args(); extern bool_t xdr_CB_NOTIFY4res(); extern bool_t xdr_CB_PUSH_DELEG4args(); extern bool_t xdr_CB_PUSH_DELEG4res(); extern bool_t xdr_CB_RECALL_ANY4args(); extern bool_t xdr_CB_RECALL_ANY4res(); extern bool_t xdr_CB_RECALLABLE_OBJ_AVAIL4args(); extern bool_t xdr_CB_RECALLABLE_OBJ_AVAIL4res(); extern bool_t xdr_CB_RECALL_SLOT4args(); extern bool_t xdr_CB_RECALL_SLOT4res(); extern bool_t xdr_referring_call4(); extern bool_t xdr_referring_call_list4(); extern bool_t xdr_CB_SEQUENCE4args(); extern bool_t xdr_CB_SEQUENCE4resok(); extern bool_t xdr_CB_SEQUENCE4res(); extern bool_t xdr_CB_WANTS_CANCELLED4args(); extern bool_t xdr_CB_WANTS_CANCELLED4res(); extern bool_t xdr_CB_NOTIFY_LOCK4args(); extern bool_t xdr_CB_NOTIFY_LOCK4res(); extern bool_t xdr_notify_deviceid_type4(); extern bool_t xdr_notify_deviceid_delete4(); extern bool_t xdr_notify_deviceid_change4(); extern bool_t xdr_CB_NOTIFY_DEVICEID4args(); extern bool_t xdr_CB_NOTIFY_DEVICEID4res(); extern bool_t xdr_offload_info4(); extern bool_t xdr_CB_OFFLOAD4args(); extern bool_t xdr_CB_OFFLOAD4res(); extern bool_t xdr_nfs_cb_opnum4(); extern bool_t xdr_nfs_cb_argop4(); extern bool_t xdr_nfs_cb_resop4(); extern bool_t xdr_CB_COMPOUND4args(); extern bool_t xdr_CB_COMPOUND4res(); #endif /* K&R C */ #ifdef __cplusplus } #endif #endif /* !_NFS4_PROT_H_RPCGEN */ /* * This file was machine generated for [RFC7862]. * * Last updated Sun Mar 13 10:58:40 PDT 2016 */ /* * Copyright (c) 2016 IETF Trust and the persons identified * as the authors. All rights reserved. * * Redistribution and use in source and binary forms, with * or without modification, are permitted provided that the * following conditions are met: * * - Redistributions of source code must retain the above * copyright notice, this list of conditions and the * following disclaimer. * * - 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. * * - Neither the name of Internet Society, IETF or IETF * Trust, nor the names of specific contributors, may be * used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * 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 COPYRIGHT OWNER 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. */ /* * This code was derived from RFC 7863. */ /* * nfsv42.x */ %#ifndef _AUTH_SYS_DEFINE_FOR_NFSv42 %#define _AUTH_SYS_DEFINE_FOR_NFSv42 %#include %typedef struct authsys_parms authsys_parms; %#endif /* _AUTH_SYS_DEFINE_FOR_NFSv42 */ /* * Basic typedefs for RFC 1832 data type definitions */ /* * typedef int int32_t; * typedef unsigned int uint32_t; * typedef hyper int64_t; * typedef unsigned hyper uint64_t; */ /* * Sizes */ const NFS4_FHSIZE = 128; const NFS4_VERIFIER_SIZE = 8; const NFS4_OTHER_SIZE = 12; const NFS4_OPAQUE_LIMIT = 1024; const NFS4_SESSIONID_SIZE = 16; const NFS4_INT64_MAX = 0x7fffffffffffffff; const NFS4_UINT64_MAX = 0xffffffffffffffff; const NFS4_INT32_MAX = 0x7fffffff; const NFS4_UINT32_MAX = 0xffffffff; const NFS4_MAXFILELEN = 0xffffffffffffffff; const NFS4_MAXFILEOFF = 0xfffffffffffffffe; /* * File types */ enum nfs_ftype4 { NF4REG = 1, /* Regular File */ NF4DIR = 2, /* Directory */ NF4BLK = 3, /* Special File -- block device */ NF4CHR = 4, /* Special File -- character device */ NF4LNK = 5, /* Symbolic Link */ NF4SOCK = 6, /* Special File -- socket */ NF4FIFO = 7, /* Special File -- fifo */ NF4ATTRDIR = 8, /* Attribute Directory */ NF4NAMEDATTR = 9 /* Named Attribute */ }; /* * Error status */ enum nfsstat4 { NFS4_OK = 0, /* everything is okay */ NFS4ERR_PERM = 1, /* caller not privileged */ NFS4ERR_NOENT = 2, /* no such file/directory */ NFS4ERR_IO = 5, /* hard I/O error */ NFS4ERR_NXIO = 6, /* no such device */ NFS4ERR_ACCESS = 13, /* access denied */ NFS4ERR_EXIST = 17, /* file already exists */ NFS4ERR_XDEV = 18, /* different file systems */ /* * Please do not allocate value 19; it was used in NFSv3, * and we do not want a value in NFSv3 to have a different * meaning in NFSv4.x. */ NFS4ERR_NOTDIR = 20, /* should be a directory */ NFS4ERR_ISDIR = 21, /* should not be a directory */ NFS4ERR_INVAL = 22, /* invalid argument */ NFS4ERR_FBIG = 27, /* file exceeds server max */ NFS4ERR_NOSPC = 28, /* no space on file system */ NFS4ERR_ROFS = 30, /* read-only file system */ NFS4ERR_MLINK = 31, /* too many hard links */ NFS4ERR_NAMETOOLONG = 63, /* name exceeds server max */ NFS4ERR_NOTEMPTY = 66, /* directory not empty */ NFS4ERR_DQUOT = 69, /* hard quota limit reached */ NFS4ERR_STALE = 70, /* file no longer exists */ NFS4ERR_BADHANDLE = 10001, /* illegal filehandle */ NFS4ERR_BAD_COOKIE = 10003, /* READDIR cookie is stale */ NFS4ERR_NOTSUPP = 10004, /* operation not supported */ NFS4ERR_TOOSMALL = 10005, /* response limit exceeded */ NFS4ERR_SERVERFAULT = 10006, /* undefined server error */ NFS4ERR_BADTYPE = 10007, /* type invalid for CREATE */ NFS4ERR_DELAY = 10008, /* file "busy" -- retry */ NFS4ERR_SAME = 10009, /* nverify says attrs same */ NFS4ERR_DENIED = 10010, /* lock unavailable */ NFS4ERR_EXPIRED = 10011, /* lock lease expired */ NFS4ERR_LOCKED = 10012, /* I/O failed due to lock */ NFS4ERR_GRACE = 10013, /* in grace period */ NFS4ERR_FHEXPIRED = 10014, /* filehandle expired */ NFS4ERR_SHARE_DENIED = 10015, /* share reserve denied */ NFS4ERR_WRONGSEC = 10016, /* wrong security flavor */ NFS4ERR_CLID_INUSE = 10017, /* client ID in use */ /* NFS4ERR_RESOURCE is not a valid error in NFSv4.1. */ NFS4ERR_RESOURCE = 10018, /* resource exhaustion */ NFS4ERR_MOVED = 10019, /* file system relocated */ NFS4ERR_NOFILEHANDLE = 10020, /* current FH is not set */ NFS4ERR_MINOR_VERS_MISMATCH= 10021, /* minor vers not supp */ NFS4ERR_STALE_CLIENTID = 10022, /* server has rebooted */ NFS4ERR_STALE_STATEID = 10023, /* server has rebooted */ NFS4ERR_OLD_STATEID = 10024, /* state is out of sync */ NFS4ERR_BAD_STATEID = 10025, /* incorrect stateid */ NFS4ERR_BAD_SEQID = 10026, /* request is out of seq. */ NFS4ERR_NOT_SAME = 10027, /* verify -- attrs not same */ NFS4ERR_LOCK_RANGE = 10028, /* overlapping lock range */ NFS4ERR_SYMLINK = 10029, /* should be file/directory */ NFS4ERR_RESTOREFH = 10030, /* no saved filehandle */ NFS4ERR_LEASE_MOVED = 10031, /* some file system moved */ NFS4ERR_ATTRNOTSUPP = 10032, /* recommended attr not supp */ NFS4ERR_NO_GRACE = 10033, /* reclaim outside of grace */ NFS4ERR_RECLAIM_BAD = 10034, /* reclaim error at server */ NFS4ERR_RECLAIM_CONFLICT= 10035, /* conflict on reclaim */ NFS4ERR_BADXDR = 10036, /* XDR decode failed */ NFS4ERR_LOCKS_HELD = 10037, /* file locks held at CLOSE */ NFS4ERR_OPENMODE = 10038, /* conflict in OPEN and I/O */ NFS4ERR_BADOWNER = 10039, /* owner translation bad */ NFS4ERR_BADCHAR = 10040, /* UTF-8 char not supported */ NFS4ERR_BADNAME = 10041, /* name not supported */ NFS4ERR_BAD_RANGE = 10042, /* lock range not supported */ NFS4ERR_LOCK_NOTSUPP = 10043, /* no atomic up/downgrade */ NFS4ERR_OP_ILLEGAL = 10044, /* undefined operation */ NFS4ERR_DEADLOCK = 10045, /* file-locking deadlock */ NFS4ERR_FILE_OPEN = 10046, /* open file blocks op */ NFS4ERR_ADMIN_REVOKED = 10047, /* lock-owner state revoked */ NFS4ERR_CB_PATH_DOWN = 10048, /* callback path down */ /* NFSv4.1 errors start here. */ NFS4ERR_BADIOMODE = 10049, NFS4ERR_BADLAYOUT = 10050, NFS4ERR_BAD_SESSION_DIGEST = 10051, NFS4ERR_BADSESSION = 10052, NFS4ERR_BADSLOT = 10053, NFS4ERR_COMPLETE_ALREADY = 10054, NFS4ERR_CONN_NOT_BOUND_TO_SESSION = 10055, NFS4ERR_DELEG_ALREADY_WANTED = 10056, NFS4ERR_BACK_CHAN_BUSY = 10057, /* backchan reqs outstanding */ NFS4ERR_LAYOUTTRYLATER = 10058, NFS4ERR_LAYOUTUNAVAILABLE = 10059, NFS4ERR_NOMATCHING_LAYOUT = 10060, NFS4ERR_RECALLCONFLICT = 10061, NFS4ERR_UNKNOWN_LAYOUTTYPE = 10062, NFS4ERR_SEQ_MISORDERED = 10063, /* unexpected seq. ID in req */ NFS4ERR_SEQUENCE_POS = 10064, /* [CB_]SEQ. op not 1st op */ NFS4ERR_REQ_TOO_BIG = 10065, /* request too big */ NFS4ERR_REP_TOO_BIG = 10066, /* reply too big */ NFS4ERR_REP_TOO_BIG_TO_CACHE =10067, /* rep. not all cached */ NFS4ERR_RETRY_UNCACHED_REP =10068, /* retry + rep. uncached */ NFS4ERR_UNSAFE_COMPOUND =10069, /* retry/recovery too hard */ NFS4ERR_TOO_MANY_OPS = 10070, /* too many ops in [CB_]COMP */ NFS4ERR_OP_NOT_IN_SESSION =10071, /* op needs [CB_]SEQ. op */ NFS4ERR_HASH_ALG_UNSUPP = 10072, /* hash alg. not supp */ /* Error 10073 is unused. */ NFS4ERR_CLIENTID_BUSY = 10074, /* client ID has state */ NFS4ERR_PNFS_IO_HOLE = 10075, /* IO to _SPARSE file hole */ NFS4ERR_SEQ_FALSE_RETRY= 10076, /* retry != original req */ NFS4ERR_BAD_HIGH_SLOT = 10077, /* req has bad highest_slot */ NFS4ERR_DEADSESSION = 10078, /* new req sent to dead sess */ NFS4ERR_ENCR_ALG_UNSUPP= 10079, /* encr alg. not supp */ NFS4ERR_PNFS_NO_LAYOUT = 10080, /* I/O without a layout */ NFS4ERR_NOT_ONLY_OP = 10081, /* addl ops not allowed */ NFS4ERR_WRONG_CRED = 10082, /* op done by wrong cred */ NFS4ERR_WRONG_TYPE = 10083, /* op on wrong type object */ NFS4ERR_DIRDELEG_UNAVAIL=10084, /* delegation not avail. */ NFS4ERR_REJECT_DELEG = 10085, /* cb rejected delegation */ NFS4ERR_RETURNCONFLICT = 10086, /* layout get before return */ NFS4ERR_DELEG_REVOKED = 10087, /* deleg./layout revoked */ /* NFSv4.2 errors start here. */ NFS4ERR_PARTNER_NOTSUPP= 10088, /* s2s not supported */ NFS4ERR_PARTNER_NO_AUTH= 10089, /* s2s not authorized */ NFS4ERR_UNION_NOTSUPP = 10090, /* arm of union not supp */ NFS4ERR_OFFLOAD_DENIED = 10091, /* dest not allowing copy */ NFS4ERR_WRONG_LFS = 10092, /* LFS not supported */ NFS4ERR_BADLABEL = 10093, /* incorrect label */ NFS4ERR_OFFLOAD_NO_REQS= 10094 /* dest not meeting reqs */ }; /* * Basic data types */ typedef opaque attrlist4<>; typedef uint32_t bitmap4<>; typedef uint64_t changeid4; typedef uint64_t clientid4; typedef uint32_t count4; typedef uint64_t length4; typedef uint32_t mode4; typedef uint64_t nfs_cookie4; typedef opaque nfs_fh4; typedef uint64_t offset4; typedef uint32_t qop4; typedef opaque sec_oid4<>; typedef uint32_t sequenceid4; typedef uint32_t seqid4; typedef opaque sessionid4[NFS4_SESSIONID_SIZE]; typedef uint32_t slotid4; typedef opaque utf8string<>; typedef utf8string utf8str_cis; typedef utf8string utf8str_cs; typedef utf8string utf8str_mixed; typedef utf8str_cs component4; typedef opaque linktext4<>; typedef utf8string ascii_REQUIRED4; typedef component4 pathname4<>; typedef opaque verifier4[NFS4_VERIFIER_SIZE]; typedef string secret4<>; typedef uint32_t policy4; /* * Timeval */ struct nfstime4 { int64_t seconds; uint32_t nseconds; }; enum time_how4 { SET_TO_SERVER_TIME4 = 0, SET_TO_CLIENT_TIME4 = 1 }; union settime4 switch (time_how4 set_it) { case SET_TO_CLIENT_TIME4: nfstime4 time; default: void; }; typedef uint32_t nfs_lease4; /* * File attribute definitions */ /* * File System ID (FSID) structure for major/minor */ struct fsid4 { uint64_t major; uint64_t minor; }; /* * File system locations attribute * for relocation/migration and * related attributes */ struct change_policy4 { uint64_t cp_major; uint64_t cp_minor; }; struct fs_location4 { utf8str_cis server<>; pathname4 rootpath; }; struct fs_locations4 { pathname4 fs_root; fs_location4 locations<>; }; /* * Various Access Control Entry (ACE) definitions */ /* * Mask that indicates which ACEs are supported. * Values for the fattr4_aclsupport attribute. */ const ACL4_SUPPORT_ALLOW_ACL = 0x00000001; const ACL4_SUPPORT_DENY_ACL = 0x00000002; const ACL4_SUPPORT_AUDIT_ACL = 0x00000004; const ACL4_SUPPORT_ALARM_ACL = 0x00000008; typedef uint32_t acetype4; /* * acetype4 values. Others can be added as needed. */ const ACE4_ACCESS_ALLOWED_ACE_TYPE = 0x00000000; const ACE4_ACCESS_DENIED_ACE_TYPE = 0x00000001; const ACE4_SYSTEM_AUDIT_ACE_TYPE = 0x00000002; const ACE4_SYSTEM_ALARM_ACE_TYPE = 0x00000003; /* * ACE flag */ typedef uint32_t aceflag4; /* * ACE flag values */ const ACE4_FILE_INHERIT_ACE = 0x00000001; const ACE4_DIRECTORY_INHERIT_ACE = 0x00000002; const ACE4_NO_PROPAGATE_INHERIT_ACE = 0x00000004; const ACE4_INHERIT_ONLY_ACE = 0x00000008; const ACE4_SUCCESSFUL_ACCESS_ACE_FLAG = 0x00000010; const ACE4_FAILED_ACCESS_ACE_FLAG = 0x00000020; const ACE4_IDENTIFIER_GROUP = 0x00000040; const ACE4_INHERITED_ACE = 0x00000080; /* * ACE mask */ typedef uint32_t acemask4; /* * ACE mask values */ const ACE4_READ_DATA = 0x00000001; const ACE4_LIST_DIRECTORY = 0x00000001; const ACE4_WRITE_DATA = 0x00000002; const ACE4_ADD_FILE = 0x00000002; const ACE4_APPEND_DATA = 0x00000004; const ACE4_ADD_SUBDIRECTORY = 0x00000004; const ACE4_READ_NAMED_ATTRS = 0x00000008; const ACE4_WRITE_NAMED_ATTRS = 0x00000010; const ACE4_EXECUTE = 0x00000020; const ACE4_DELETE_CHILD = 0x00000040; const ACE4_READ_ATTRIBUTES = 0x00000080; const ACE4_WRITE_ATTRIBUTES = 0x00000100; const ACE4_WRITE_RETENTION = 0x00000200; const ACE4_WRITE_RETENTION_HOLD = 0x00000400; const ACE4_DELETE = 0x00010000; const ACE4_READ_ACL = 0x00020000; const ACE4_WRITE_ACL = 0x00040000; const ACE4_WRITE_OWNER = 0x00080000; const ACE4_SYNCHRONIZE = 0x00100000; /* * ACE4_GENERIC_READ -- defined as a combination of * ACE4_READ_ACL | * ACE4_READ_DATA | * ACE4_READ_ATTRIBUTES | * ACE4_SYNCHRONIZE */ const ACE4_GENERIC_READ = 0x00120081; /* * ACE4_GENERIC_WRITE -- defined as a combination of * ACE4_READ_ACL | * ACE4_WRITE_DATA | * ACE4_WRITE_ATTRIBUTES | * ACE4_WRITE_ACL | * ACE4_APPEND_DATA | * ACE4_SYNCHRONIZE */ const ACE4_GENERIC_WRITE = 0x00160106; /* * ACE4_GENERIC_EXECUTE -- defined as a combination of * ACE4_READ_ACL | * ACE4_READ_ATTRIBUTES | * ACE4_EXECUTE | * ACE4_SYNCHRONIZE */ const ACE4_GENERIC_EXECUTE = 0x001200A0; /* * ACE definition */ struct nfsace4 { acetype4 type; aceflag4 flag; acemask4 access_mask; utf8str_mixed who; }; /* * Access Control List (ACL) flag */ typedef uint32_t aclflag4; /* * ACL flag values */ const ACL4_AUTO_INHERIT = 0x00000001; const ACL4_PROTECTED = 0x00000002; const ACL4_DEFAULTED = 0x00000004; /* * Version 4.1 ACL definition */ struct nfsacl41 { aclflag4 na41_flag; nfsace4 na41_aces<>; }; /* * Field definitions for the fattr4_mode * and fattr4_mode_set_masked attributes */ const MODE4_SUID = 0x800; /* set user id on execution */ const MODE4_SGID = 0x400; /* set group id on execution */ const MODE4_SVTX = 0x200; /* save text even after use */ const MODE4_RUSR = 0x100; /* read permission: owner */ const MODE4_WUSR = 0x080; /* write permission: owner */ const MODE4_XUSR = 0x040; /* execute permission: owner */ const MODE4_RGRP = 0x020; /* read permission: group */ const MODE4_WGRP = 0x010; /* write permission: group */ const MODE4_XGRP = 0x008; /* execute permission: group */ const MODE4_ROTH = 0x004; /* read permission: other */ const MODE4_WOTH = 0x002; /* write permission: other */ const MODE4_XOTH = 0x001; /* execute permission: other */ /* * Masked mode for the mode_set_masked attribute */ struct mode_masked4 { mode4 mm_value_to_set; /* Values of bits to set or reset in mode */ mode4 mm_mask_bits; /* Mask of bits to set or reset in mode */ }; /* * Special data/attribute associated with * file types NF4BLK and NF4CHR */ struct specdata4 { uint32_t specdata1; /* Major device number */ uint32_t specdata2; /* Minor device number */ }; /* * Values for fattr4_fh_expire_type */ const FH4_PERSISTENT = 0x00000000; const FH4_NOEXPIRE_WITH_OPEN = 0x00000001; const FH4_VOLATILE_ANY = 0x00000002; const FH4_VOL_MIGRATION = 0x00000004; const FH4_VOL_RENAME = 0x00000008; struct netaddr4 { /* See struct rpcb in RFC 1833. */ string na_r_netid<>; /* Network id */ string na_r_addr<>; /* Universal address */ }; /* * Data structures new to NFSv4.1 */ struct nfs_impl_id4 { utf8str_cis nii_domain; utf8str_cs nii_name; nfstime4 nii_date; }; /* * Stateid */ struct stateid4 { uint32_t seqid; opaque other[NFS4_OTHER_SIZE]; }; enum layouttype4 { LAYOUT4_NFSV4_1_FILES = 0x1, LAYOUT4_OSD2_OBJECTS = 0x2, LAYOUT4_BLOCK_VOLUME = 0x3 }; struct layout_content4 { layouttype4 loc_type; opaque loc_body<>; }; %/* % * LAYOUT4_OSD2_OBJECTS loc_body description % * is in a separate .x file. % */ % %/* % * LAYOUT4_BLOCK_VOLUME loc_body description % * is in a separate .x file. % */ struct layouthint4 { layouttype4 loh_type; opaque loh_body<>; }; enum layoutiomode4 { LAYOUTIOMODE4_READ = 1, LAYOUTIOMODE4_RW = 2, LAYOUTIOMODE4_ANY = 3 }; struct layout4 { offset4 lo_offset; length4 lo_length; layoutiomode4 lo_iomode; layout_content4 lo_content; }; const NFS4_DEVICEID4_SIZE = 16; typedef opaque deviceid4[NFS4_DEVICEID4_SIZE]; struct device_addr4 { layouttype4 da_layout_type; opaque da_addr_body<>; }; struct layoutupdate4 { layouttype4 lou_type; opaque lou_body<>; }; % /* Constants used for LAYOUTRETURN and CB_LAYOUTRECALL */ const LAYOUT4_RET_REC_FILE = 1; const LAYOUT4_RET_REC_FSID = 2; const LAYOUT4_RET_REC_ALL = 3; % enum layoutreturn_type4 { LAYOUTRETURN4_FILE = LAYOUT4_RET_REC_FILE, LAYOUTRETURN4_FSID = LAYOUT4_RET_REC_FSID, LAYOUTRETURN4_ALL = LAYOUT4_RET_REC_ALL }; struct layoutreturn_file4 { offset4 lrf_offset; length4 lrf_length; stateid4 lrf_stateid; % /* layouttype4 specific data */ opaque lrf_body<>; }; union layoutreturn4 switch (layoutreturn_type4 lr_returntype) { case LAYOUTRETURN4_FILE: layoutreturn_file4 lr_layout; default: void; }; % enum fs4_status_type { STATUS4_FIXED = 1, STATUS4_UPDATED = 2, STATUS4_VERSIONED = 3, STATUS4_WRITABLE = 4, STATUS4_REFERRAL = 5 }; struct fs4_status { bool fss_absent; fs4_status_type fss_type; utf8str_cs fss_source; utf8str_cs fss_current; int32_t fss_age; nfstime4 fss_version; }; const TH4_READ_SIZE = 0; const TH4_WRITE_SIZE = 1; const TH4_READ_IOSIZE = 2; const TH4_WRITE_IOSIZE = 3; typedef length4 threshold4_read_size; typedef length4 threshold4_write_size; typedef length4 threshold4_read_iosize; typedef length4 threshold4_write_iosize; struct threshold_item4 { layouttype4 thi_layout_type; bitmap4 thi_hintset; opaque thi_hintlist<>; }; struct mdsthreshold4 { threshold_item4 mth_hints<>; }; const RET4_DURATION_INFINITE = 0xffffffffffffffff; struct retention_get4 { uint64_t rg_duration; nfstime4 rg_begin_time<1>; }; struct retention_set4 { bool rs_enable; uint64_t rs_duration<1>; }; const FSCHARSET_CAP4_CONTAINS_NON_UTF8 = 0x1; const FSCHARSET_CAP4_ALLOWS_ONLY_UTF8 = 0x2; typedef uint32_t fs_charset_cap4; /* * Data structures new to NFSv4.2 */ enum netloc_type4 { NL4_NAME = 1, NL4_URL = 2, NL4_NETADDR = 3 }; union netloc4 switch (netloc_type4 nl_type) { case NL4_NAME: utf8str_cis nl_name; case NL4_URL: utf8str_cis nl_url; case NL4_NETADDR: netaddr4 nl_addr; }; enum change_attr_type4 { NFS4_CHANGE_TYPE_IS_MONOTONIC_INCR = 0, NFS4_CHANGE_TYPE_IS_VERSION_COUNTER = 1, NFS4_CHANGE_TYPE_IS_VERSION_COUNTER_NOPNFS = 2, NFS4_CHANGE_TYPE_IS_TIME_METADATA = 3, NFS4_CHANGE_TYPE_IS_UNDEFINED = 4 }; struct labelformat_spec4 { policy4 lfs_lfs; policy4 lfs_pi; }; struct sec_label4 { labelformat_spec4 slai_lfs; opaque slai_data<>; }; struct copy_from_auth_priv { secret4 cfap_shared_secret; netloc4 cfap_destination; /* The NFSv4 user name that the user principal maps to */ utf8str_mixed cfap_username; }; struct copy_to_auth_priv { /* Equal to cfap_shared_secret */ secret4 ctap_shared_secret; netloc4 ctap_source<>; /* The NFSv4 user name that the user principal maps to */ utf8str_mixed ctap_username; }; struct copy_confirm_auth_priv { /* Equal to GSS_GetMIC() of cfap_shared_secret */ opaque ccap_shared_secret_mic<>; /* The NFSv4 user name that the user principal maps to */ utf8str_mixed ccap_username; }; struct app_data_block4 { offset4 adb_offset; length4 adb_block_size; length4 adb_block_count; length4 adb_reloff_blocknum; count4 adb_block_num; length4 adb_reloff_pattern; opaque adb_pattern<>; }; struct data4 { offset4 d_offset; opaque d_data<>; }; struct data_info4 { offset4 di_offset; length4 di_length; }; enum data_content4 { NFS4_CONTENT_DATA = 0, NFS4_CONTENT_HOLE = 1 }; enum stable_how4 { UNSTABLE4 = 0, DATA_SYNC4 = 1, FILE_SYNC4 = 2 }; struct write_response4 { stateid4 wr_callback_id<1>; length4 wr_count; stable_how4 wr_committed; verifier4 wr_writeverf; }; /* * NFSv4.1 attributes */ typedef bitmap4 fattr4_supported_attrs; typedef nfs_ftype4 fattr4_type; typedef uint32_t fattr4_fh_expire_type; typedef changeid4 fattr4_change; typedef uint64_t fattr4_size; typedef bool fattr4_link_support; typedef bool fattr4_symlink_support; typedef bool fattr4_named_attr; typedef fsid4 fattr4_fsid; typedef bool fattr4_unique_handles; typedef nfs_lease4 fattr4_lease_time; typedef nfsstat4 fattr4_rdattr_error; typedef nfsace4 fattr4_acl<>; typedef uint32_t fattr4_aclsupport; typedef bool fattr4_archive; typedef bool fattr4_cansettime; typedef bool fattr4_case_insensitive; typedef bool fattr4_case_preserving; typedef bool fattr4_chown_restricted; typedef uint64_t fattr4_fileid; typedef uint64_t fattr4_files_avail; typedef nfs_fh4 fattr4_filehandle; typedef uint64_t fattr4_files_free; typedef uint64_t fattr4_files_total; typedef fs_locations4 fattr4_fs_locations; typedef bool fattr4_hidden; typedef bool fattr4_homogeneous; typedef uint64_t fattr4_maxfilesize; typedef uint32_t fattr4_maxlink; typedef uint32_t fattr4_maxname; typedef uint64_t fattr4_maxread; typedef uint64_t fattr4_maxwrite; typedef ascii_REQUIRED4 fattr4_mimetype; typedef mode4 fattr4_mode; typedef mode_masked4 fattr4_mode_set_masked; typedef uint64_t fattr4_mounted_on_fileid; typedef bool fattr4_no_trunc; typedef uint32_t fattr4_numlinks; typedef utf8str_mixed fattr4_owner; typedef utf8str_mixed fattr4_owner_group; typedef uint64_t fattr4_quota_avail_hard; typedef uint64_t fattr4_quota_avail_soft; typedef uint64_t fattr4_quota_used; typedef specdata4 fattr4_rawdev; typedef uint64_t fattr4_space_avail; typedef length4 fattr4_space_free; typedef uint64_t fattr4_space_total; typedef uint64_t fattr4_space_used; typedef bool fattr4_system; typedef nfstime4 fattr4_time_access; typedef settime4 fattr4_time_access_set; typedef nfstime4 fattr4_time_backup; typedef nfstime4 fattr4_time_create; typedef nfstime4 fattr4_time_delta; typedef nfstime4 fattr4_time_metadata; typedef nfstime4 fattr4_time_modify; typedef settime4 fattr4_time_modify_set; /* * Attributes new to NFSv4.1 */ typedef bitmap4 fattr4_suppattr_exclcreat; typedef nfstime4 fattr4_dir_notif_delay; typedef nfstime4 fattr4_dirent_notif_delay; typedef layouttype4 fattr4_fs_layout_types<>; typedef fs4_status fattr4_fs_status; typedef fs_charset_cap4 fattr4_fs_charset_cap; typedef uint32_t fattr4_layout_alignment; typedef uint32_t fattr4_layout_blksize; typedef layouthint4 fattr4_layout_hint; typedef layouttype4 fattr4_layout_types<>; typedef mdsthreshold4 fattr4_mdsthreshold; typedef retention_get4 fattr4_retention_get; typedef retention_set4 fattr4_retention_set; typedef retention_get4 fattr4_retentevt_get; typedef retention_set4 fattr4_retentevt_set; typedef uint64_t fattr4_retention_hold; typedef nfsacl41 fattr4_dacl; typedef nfsacl41 fattr4_sacl; typedef change_policy4 fattr4_change_policy; /* * Attributes new to NFSv4.2 */ typedef uint64_t fattr4_space_freed; typedef change_attr_type4 fattr4_change_attr_type; typedef sec_label4 fattr4_sec_label; typedef uint32_t fattr4_clone_blksize; %/* % * REQUIRED attributes % */ const FATTR4_SUPPORTED_ATTRS = 0; const FATTR4_TYPE = 1; const FATTR4_FH_EXPIRE_TYPE = 2; const FATTR4_CHANGE = 3; const FATTR4_SIZE = 4; const FATTR4_LINK_SUPPORT = 5; const FATTR4_SYMLINK_SUPPORT = 6; const FATTR4_NAMED_ATTR = 7; const FATTR4_FSID = 8; const FATTR4_UNIQUE_HANDLES = 9; const FATTR4_LEASE_TIME = 10; const FATTR4_RDATTR_ERROR = 11; const FATTR4_FILEHANDLE = 19; %/* % * New to NFSv4.1 % */ const FATTR4_SUPPATTR_EXCLCREAT = 75; %/* % * RECOMMENDED attributes % */ const FATTR4_ACL = 12; const FATTR4_ACLSUPPORT = 13; const FATTR4_ARCHIVE = 14; const FATTR4_CANSETTIME = 15; const FATTR4_CASE_INSENSITIVE = 16; const FATTR4_CASE_PRESERVING = 17; const FATTR4_CHOWN_RESTRICTED = 18; const FATTR4_FILEID = 20; const FATTR4_FILES_AVAIL = 21; const FATTR4_FILES_FREE = 22; const FATTR4_FILES_TOTAL = 23; const FATTR4_FS_LOCATIONS = 24; const FATTR4_HIDDEN = 25; const FATTR4_HOMOGENEOUS = 26; const FATTR4_MAXFILESIZE = 27; const FATTR4_MAXLINK = 28; const FATTR4_MAXNAME = 29; const FATTR4_MAXREAD = 30; const FATTR4_MAXWRITE = 31; const FATTR4_MIMETYPE = 32; const FATTR4_MODE = 33; const FATTR4_NO_TRUNC = 34; const FATTR4_NUMLINKS = 35; const FATTR4_OWNER = 36; const FATTR4_OWNER_GROUP = 37; const FATTR4_QUOTA_AVAIL_HARD = 38; const FATTR4_QUOTA_AVAIL_SOFT = 39; const FATTR4_QUOTA_USED = 40; const FATTR4_RAWDEV = 41; const FATTR4_SPACE_AVAIL = 42; const FATTR4_SPACE_FREE = 43; const FATTR4_SPACE_TOTAL = 44; const FATTR4_SPACE_USED = 45; const FATTR4_SYSTEM = 46; const FATTR4_TIME_ACCESS = 47; const FATTR4_TIME_ACCESS_SET = 48; const FATTR4_TIME_BACKUP = 49; const FATTR4_TIME_CREATE = 50; const FATTR4_TIME_DELTA = 51; const FATTR4_TIME_METADATA = 52; const FATTR4_TIME_MODIFY = 53; const FATTR4_TIME_MODIFY_SET = 54; const FATTR4_MOUNTED_ON_FILEID = 55; %/* % * New to NFSv4.1 % */ const FATTR4_DIR_NOTIF_DELAY = 56; const FATTR4_DIRENT_NOTIF_DELAY = 57; const FATTR4_DACL = 58; const FATTR4_SACL = 59; const FATTR4_CHANGE_POLICY = 60; const FATTR4_FS_STATUS = 61; const FATTR4_FS_LAYOUT_TYPES = 62; const FATTR4_LAYOUT_HINT = 63; const FATTR4_LAYOUT_TYPES = 64; const FATTR4_LAYOUT_BLKSIZE = 65; const FATTR4_LAYOUT_ALIGNMENT = 66; const FATTR4_FS_LOCATIONS_INFO = 67; const FATTR4_MDSTHRESHOLD = 68; const FATTR4_RETENTION_GET = 69; const FATTR4_RETENTION_SET = 70; const FATTR4_RETENTEVT_GET = 71; const FATTR4_RETENTEVT_SET = 72; const FATTR4_RETENTION_HOLD = 73; const FATTR4_MODE_SET_MASKED = 74; const FATTR4_FS_CHARSET_CAP = 76; %/* % * New to NFSv4.2 % */ const FATTR4_CLONE_BLKSIZE = 77; const FATTR4_SPACE_FREED = 78; const FATTR4_CHANGE_ATTR_TYPE = 79; const FATTR4_SEC_LABEL = 80; /* * File attribute container */ struct fattr4 { bitmap4 attrmask; attrlist4 attr_vals; }; /* * Change info for the client */ struct change_info4 { bool atomic; changeid4 before; changeid4 after; }; typedef netaddr4 clientaddr4; /* * Callback program info as provided by the client */ struct cb_client4 { uint32_t cb_program; netaddr4 cb_location; }; /* * NFSv4.0 long-hand client ID */ struct nfs_client_id4 { verifier4 verifier; opaque id; }; /* * NFSv4.1 client owner (aka long-hand client ID) */ struct client_owner4 { verifier4 co_verifier; opaque co_ownerid; }; /* * NFSv4.1 server owner */ struct server_owner4 { uint64_t so_minor_id; opaque so_major_id; }; struct state_owner4 { clientid4 clientid; opaque owner; }; typedef state_owner4 open_owner4; typedef state_owner4 lock_owner4; enum nfs_lock_type4 { READ_LT = 1, WRITE_LT = 2, READW_LT = 3, /* Blocking read */ WRITEW_LT = 4 /* Blocking write */ }; % %/* Input for computing subkeys */ enum ssv_subkey4 { SSV4_SUBKEY_MIC_I2T = 1, SSV4_SUBKEY_MIC_T2I = 2, SSV4_SUBKEY_SEAL_I2T = 3, SSV4_SUBKEY_SEAL_T2I = 4 }; % % %/* Input for computing smt_hmac */ struct ssv_mic_plain_tkn4 { uint32_t smpt_ssv_seq; opaque smpt_orig_plain<>; }; % % %/* % * Secret State Verifier Generic Security Service (SSV GSS) % * PerMsgToken token % */ struct ssv_mic_tkn4 { uint32_t smt_ssv_seq; opaque smt_hmac<>; }; % % %/* Input for computing ssct_encr_data and ssct_hmac */ struct ssv_seal_plain_tkn4 { opaque sspt_confounder<>; uint32_t sspt_ssv_seq; opaque sspt_orig_plain<>; opaque sspt_pad<>; }; % % %/* SSV GSS SealedMessage token */ struct ssv_seal_cipher_tkn4 { uint32_t ssct_ssv_seq; opaque ssct_iv<>; opaque ssct_encr_data<>; opaque ssct_hmac<>; }; % /* * Defines an individual server replica */ struct fs_locations_server4 { int32_t fls_currency; opaque fls_info<>; utf8str_cis fls_server; }; /* * Byte indices of items within * fls_info: flag fields, class numbers, * bytes indicating ranks and orders */ const FSLI4BX_GFLAGS = 0; const FSLI4BX_TFLAGS = 1; const FSLI4BX_CLSIMUL = 2; const FSLI4BX_CLHANDLE = 3; const FSLI4BX_CLFILEID = 4; const FSLI4BX_CLWRITEVER = 5; const FSLI4BX_CLCHANGE = 6; const FSLI4BX_CLREADDIR = 7; const FSLI4BX_READRANK = 8; const FSLI4BX_WRITERANK = 9; const FSLI4BX_READORDER = 10; const FSLI4BX_WRITEORDER = 11; /* * Bits defined within the general flag byte */ const FSLI4GF_WRITABLE = 0x01; const FSLI4GF_CUR_REQ = 0x02; const FSLI4GF_ABSENT = 0x04; const FSLI4GF_GOING = 0x08; const FSLI4GF_SPLIT = 0x10; /* * Bits defined within the transport flag byte */ const FSLI4TF_RDMA = 0x01; /* * Defines a set of replicas sharing * a common value of the root path * within the corresponding * single-server namespaces */ struct fs_locations_item4 { fs_locations_server4 fli_entries<>; pathname4 fli_rootpath; }; /* * Defines the overall structure of * the fs_locations_info attribute */ struct fs_locations_info4 { uint32_t fli_flags; int32_t fli_valid_for; pathname4 fli_fs_root; fs_locations_item4 fli_items<>; }; /* * Flag bits in fli_flags */ const FSLI4IF_VAR_SUB = 0x00000001; typedef fs_locations_info4 fattr4_fs_locations_info; const NFL4_UFLG_MASK = 0x0000003F; const NFL4_UFLG_DENSE = 0x00000001; const NFL4_UFLG_COMMIT_THRU_MDS = 0x00000002; const NFL42_UFLG_IO_ADVISE_THRU_MDS = 0x00000004; const NFL4_UFLG_STRIPE_UNIT_SIZE_MASK = 0xFFFFFFC0; typedef uint32_t nfl_util4; % enum filelayout_hint_care4 { NFLH4_CARE_DENSE = NFL4_UFLG_DENSE, NFLH4_CARE_COMMIT_THRU_MDS = NFL4_UFLG_COMMIT_THRU_MDS, NFL42_CARE_IO_ADVISE_THRU_MDS = NFL42_UFLG_IO_ADVISE_THRU_MDS, NFLH4_CARE_STRIPE_UNIT_SIZE = 0x00000040, NFLH4_CARE_STRIPE_COUNT = 0x00000080 }; % %/* % * Encoded in the loh_body field of data type layouthint4: % */ % struct nfsv4_1_file_layouthint4 { uint32_t nflh_care; nfl_util4 nflh_util; count4 nflh_stripe_count; }; % % typedef netaddr4 multipath_list4<>; % %/* % * Encoded in the da_addr_body field of data type device_addr4: % */ struct nfsv4_1_file_layout_ds_addr4 { uint32_t nflda_stripe_indices<>; multipath_list4 nflda_multipath_ds_list<>; }; % % %/* % * Encoded in the loc_body field of data type layout_content4: % */ struct nfsv4_1_file_layout4 { deviceid4 nfl_deviceid; nfl_util4 nfl_util; uint32_t nfl_first_stripe_index; offset4 nfl_pattern_offset; nfs_fh4 nfl_fh_list<>; }; % /* * Operation arrays (the opnum first) */ enum nfs_opnum4 { OP_ACCESS = 3, OP_CLOSE = 4, OP_COMMIT = 5, OP_CREATE = 6, OP_DELEGPURGE = 7, OP_DELEGRETURN = 8, OP_GETATTR = 9, OP_GETFH = 10, OP_LINK = 11, OP_LOCK = 12, OP_LOCKT = 13, OP_LOCKU = 14, OP_LOOKUP = 15, OP_LOOKUPP = 16, OP_NVERIFY = 17, OP_OPEN = 18, OP_OPENATTR = 19, OP_OPEN_CONFIRM = 20, /* Mandatory not-to-implement */ OP_OPEN_DOWNGRADE = 21, OP_PUTFH = 22, OP_PUTPUBFH = 23, OP_PUTROOTFH = 24, OP_READ = 25, OP_READDIR = 26, OP_READLINK = 27, OP_REMOVE = 28, OP_RENAME = 29, OP_RENEW = 30, /* Mandatory not-to-implement */ OP_RESTOREFH = 31, OP_SAVEFH = 32, OP_SECINFO = 33, OP_SETATTR = 34, OP_SETCLIENTID = 35, /* Mandatory not-to-implement */ OP_SETCLIENTID_CONFIRM = 36, /* Mandatory not-to-implement */ OP_VERIFY = 37, OP_WRITE = 38, OP_RELEASE_LOCKOWNER = 39, /* Mandatory not-to-implement */ % %/* New operations for NFSv4.1 */ % OP_BACKCHANNEL_CTL = 40, OP_BIND_CONN_TO_SESSION = 41, OP_EXCHANGE_ID = 42, OP_CREATE_SESSION = 43, OP_DESTROY_SESSION = 44, OP_FREE_STATEID = 45, OP_GET_DIR_DELEGATION = 46, OP_GETDEVICEINFO = 47, OP_GETDEVICELIST = 48, OP_LAYOUTCOMMIT = 49, OP_LAYOUTGET = 50, OP_LAYOUTRETURN = 51, OP_SECINFO_NO_NAME = 52, OP_SEQUENCE = 53, OP_SET_SSV = 54, OP_TEST_STATEID = 55, OP_WANT_DELEGATION = 56, OP_DESTROY_CLIENTID = 57, OP_RECLAIM_COMPLETE = 58, % %/* New operations for NFSv4.2 */ % OP_ALLOCATE = 59, OP_COPY = 60, OP_COPY_NOTIFY = 61, OP_DEALLOCATE = 62, OP_IO_ADVISE = 63, OP_LAYOUTERROR = 64, OP_LAYOUTSTATS = 65, OP_OFFLOAD_CANCEL = 66, OP_OFFLOAD_STATUS = 67, OP_READ_PLUS = 68, OP_SEEK = 69, OP_WRITE_SAME = 70, OP_CLONE = 71, OP_ILLEGAL = 10044 }; const ACCESS4_READ = 0x00000001; const ACCESS4_LOOKUP = 0x00000002; const ACCESS4_MODIFY = 0x00000004; const ACCESS4_EXTEND = 0x00000008; const ACCESS4_DELETE = 0x00000010; const ACCESS4_EXECUTE = 0x00000020; struct ACCESS4args { /* CURRENT_FH: object */ uint32_t access; }; struct ACCESS4resok { uint32_t supported; uint32_t access; }; union ACCESS4res switch (nfsstat4 status) { case NFS4_OK: ACCESS4resok resok4; default: void; }; struct CLONE4args { /* SAVED_FH: source file */ /* CURRENT_FH: destination file */ stateid4 cl_src_stateid; stateid4 cl_dst_stateid; offset4 cl_src_offset; offset4 cl_dst_offset; length4 cl_count; }; struct CLONE4res { nfsstat4 cl_status; }; struct CLOSE4args { /* CURRENT_FH: object */ seqid4 seqid; stateid4 open_stateid; }; union CLOSE4res switch (nfsstat4 status) { case NFS4_OK: stateid4 open_stateid; default: void; }; struct COMMIT4args { /* CURRENT_FH: file */ offset4 offset; count4 count; }; struct COMMIT4resok { verifier4 writeverf; }; union COMMIT4res switch (nfsstat4 status) { case NFS4_OK: COMMIT4resok resok4; default: void; }; union createtype4 switch (nfs_ftype4 type) { case NF4LNK: linktext4 linkdata; case NF4BLK: case NF4CHR: specdata4 devdata; case NF4SOCK: case NF4FIFO: case NF4DIR: void; default: void; /* Server should return NFS4ERR_BADTYPE. */ }; struct CREATE4args { /* CURRENT_FH: directory for creation */ createtype4 objtype; component4 objname; fattr4 createattrs; }; struct CREATE4resok { change_info4 cinfo; bitmap4 attrset; /* Attributes set */ }; union CREATE4res switch (nfsstat4 status) { case NFS4_OK: /* New CURRENTFH: created object */ CREATE4resok resok4; default: void; }; struct DELEGPURGE4args { clientid4 clientid; }; struct DELEGPURGE4res { nfsstat4 status; }; struct DELEGRETURN4args { /* CURRENT_FH: delegated object */ stateid4 deleg_stateid; }; struct DELEGRETURN4res { nfsstat4 status; }; struct GETATTR4args { /* CURRENT_FH: object */ bitmap4 attr_request; }; struct GETATTR4resok { fattr4 obj_attributes; }; union GETATTR4res switch (nfsstat4 status) { case NFS4_OK: GETATTR4resok resok4; default: void; }; struct GETFH4resok { nfs_fh4 object; }; union GETFH4res switch (nfsstat4 status) { case NFS4_OK: GETFH4resok resok4; default: void; }; struct LINK4args { /* SAVED_FH: source object */ /* CURRENT_FH: target directory */ component4 newname; }; struct LINK4resok { change_info4 cinfo; }; union LINK4res switch (nfsstat4 status) { case NFS4_OK: LINK4resok resok4; default: void; }; /* * For LOCK, transition from open_stateid and lock_owner * to a lock stateid. */ struct open_to_lock_owner4 { seqid4 open_seqid; stateid4 open_stateid; seqid4 lock_seqid; lock_owner4 lock_owner; }; /* * For LOCK, existing lock stateid continues to request new * file lock for the same lock_owner and open_stateid. */ struct exist_lock_owner4 { stateid4 lock_stateid; seqid4 lock_seqid; }; union locker4 switch (bool new_lock_owner) { case TRUE: open_to_lock_owner4 open_owner; case FALSE: exist_lock_owner4 lock_owner; }; /* * LOCK/LOCKT/LOCKU: Record lock management */ struct LOCK4args { /* CURRENT_FH: file */ nfs_lock_type4 locktype; bool reclaim; offset4 offset; length4 length; locker4 locker; }; struct LOCK4denied { offset4 offset; length4 length; nfs_lock_type4 locktype; lock_owner4 owner; }; struct LOCK4resok { stateid4 lock_stateid; }; union LOCK4res switch (nfsstat4 status) { case NFS4_OK: LOCK4resok resok4; case NFS4ERR_DENIED: LOCK4denied denied; default: void; }; struct LOCKT4args { /* CURRENT_FH: file */ nfs_lock_type4 locktype; offset4 offset; length4 length; lock_owner4 owner; }; union LOCKT4res switch (nfsstat4 status) { case NFS4ERR_DENIED: LOCK4denied denied; case NFS4_OK: void; default: void; }; struct LOCKU4args { /* CURRENT_FH: file */ nfs_lock_type4 locktype; seqid4 seqid; stateid4 lock_stateid; offset4 offset; length4 length; }; union LOCKU4res switch (nfsstat4 status) { case NFS4_OK: stateid4 lock_stateid; default: void; }; struct LOOKUP4args { /* CURRENT_FH: directory */ component4 objname; }; struct LOOKUP4res { /* New CURRENT_FH: object */ nfsstat4 status; }; struct LOOKUPP4res { /* New CURRENT_FH: parent directory */ nfsstat4 status; }; struct NVERIFY4args { /* CURRENT_FH: object */ fattr4 obj_attributes; }; struct NVERIFY4res { nfsstat4 status; }; /* * Various definitions for OPEN */ enum createmode4 { UNCHECKED4 = 0, GUARDED4 = 1, /* Deprecated in NFSv4.1 */ EXCLUSIVE4 = 2, /* * New to NFSv4.1. If session is persistent, * GUARDED4 MUST be used. Otherwise, use * EXCLUSIVE4_1 instead of EXCLUSIVE4. */ EXCLUSIVE4_1 = 3 }; struct creatverfattr { verifier4 cva_verf; fattr4 cva_attrs; }; union createhow4 switch (createmode4 mode) { case UNCHECKED4: case GUARDED4: fattr4 createattrs; case EXCLUSIVE4: verifier4 createverf; case EXCLUSIVE4_1: creatverfattr ch_createboth; }; enum opentype4 { OPEN4_NOCREATE = 0, OPEN4_CREATE = 1 }; union openflag4 switch (opentype4 opentype) { case OPEN4_CREATE: createhow4 how; default: void; }; /* Next definitions used for OPEN delegation */ enum limit_by4 { NFS_LIMIT_SIZE = 1, NFS_LIMIT_BLOCKS = 2 /* Others as needed */ }; struct nfs_modified_limit4 { uint32_t num_blocks; uint32_t bytes_per_block; }; union nfs_space_limit4 switch (limit_by4 limitby) { /* Limit specified as file size */ case NFS_LIMIT_SIZE: uint64_t filesize; /* Limit specified by number of blocks */ case NFS_LIMIT_BLOCKS: nfs_modified_limit4 mod_blocks; }; /* * Share Access and Deny constants for open argument */ const OPEN4_SHARE_ACCESS_READ = 0x00000001; const OPEN4_SHARE_ACCESS_WRITE = 0x00000002; const OPEN4_SHARE_ACCESS_BOTH = 0x00000003; const OPEN4_SHARE_DENY_NONE = 0x00000000; const OPEN4_SHARE_DENY_READ = 0x00000001; const OPEN4_SHARE_DENY_WRITE = 0x00000002; const OPEN4_SHARE_DENY_BOTH = 0x00000003; /* New flags for share_access field of OPEN4args */ const OPEN4_SHARE_ACCESS_WANT_DELEG_MASK = 0xFF00; const OPEN4_SHARE_ACCESS_WANT_NO_PREFERENCE = 0x0000; const OPEN4_SHARE_ACCESS_WANT_READ_DELEG = 0x0100; const OPEN4_SHARE_ACCESS_WANT_WRITE_DELEG = 0x0200; const OPEN4_SHARE_ACCESS_WANT_ANY_DELEG = 0x0300; const OPEN4_SHARE_ACCESS_WANT_NO_DELEG = 0x0400; const OPEN4_SHARE_ACCESS_WANT_CANCEL = 0x0500; const OPEN4_SHARE_ACCESS_WANT_SIGNAL_DELEG_WHEN_RESRC_AVAIL = 0x10000; const OPEN4_SHARE_ACCESS_WANT_PUSH_DELEG_WHEN_UNCONTENDED = 0x20000; enum open_delegation_type4 { OPEN_DELEGATE_NONE = 0, OPEN_DELEGATE_READ = 1, OPEN_DELEGATE_WRITE = 2, OPEN_DELEGATE_NONE_EXT = 3 /* New to NFSv4.1 */ }; enum open_claim_type4 { /* * Not a reclaim */ CLAIM_NULL = 0, CLAIM_PREVIOUS = 1, CLAIM_DELEGATE_CUR = 2, CLAIM_DELEGATE_PREV = 3, /* * Not a reclaim * * Like CLAIM_NULL, but object identified * by the current filehandle */ CLAIM_FH = 4, /* New to NFSv4.1 */ /* * Like CLAIM_DELEGATE_CUR, but object identified * by current filehandle */ CLAIM_DELEG_CUR_FH = 5, /* New to NFSv4.1 */ /* * Like CLAIM_DELEGATE_PREV, but object identified * by current filehandle */ CLAIM_DELEG_PREV_FH = 6 /* New to NFSv4.1 */ }; struct open_claim_delegate_cur4 { stateid4 delegate_stateid; component4 file; }; union open_claim4 switch (open_claim_type4 claim) { /* * No special rights to file. * Ordinary OPEN of the specified file. */ case CLAIM_NULL: /* CURRENT_FH: directory */ component4 file; /* * Right to the file established by an * open previous to server reboot. File * identified by filehandle obtained at * that time rather than by name. */ case CLAIM_PREVIOUS: /* CURRENT_FH: file being reclaimed */ open_delegation_type4 delegate_type; /* * Right to file based on a delegation * granted by the server. File is * specified by name. */ case CLAIM_DELEGATE_CUR: /* CURRENT_FH: directory */ open_claim_delegate_cur4 delegate_cur_info; /* * Right to file based on a delegation * granted to a previous boot instance * of the client. File is specified by name. */ case CLAIM_DELEGATE_PREV: /* CURRENT_FH: directory */ component4 file_delegate_prev; /* * Like CLAIM_NULL. No special rights * to file. Ordinary OPEN of the * specified file by current filehandle. */ case CLAIM_FH: /* New to NFSv4.1 */ /* CURRENT_FH: regular file to open */ void; /* * Like CLAIM_DELEGATE_PREV. Right to file based on a * delegation granted to a previous boot * instance of the client. File is identified * by filehandle. */ case CLAIM_DELEG_PREV_FH: /* New to NFSv4.1 */ /* CURRENT_FH: file being opened */ void; /* * Like CLAIM_DELEGATE_CUR. Right to file based on * a delegation granted by the server. * File is identified by filehandle. */ case CLAIM_DELEG_CUR_FH: /* New to NFSv4.1 */ /* CURRENT_FH: file being opened */ stateid4 oc_delegate_stateid; }; /* * OPEN: Open a file, potentially receiving an open delegation. */ struct OPEN4args { seqid4 seqid; uint32_t share_access; uint32_t share_deny; open_owner4 owner; openflag4 openhow; open_claim4 claim; }; struct open_read_delegation4 { stateid4 stateid; /* Stateid for delegation */ bool recall; /* Pre-recalled flag for delegations obtained by reclaim (CLAIM_PREVIOUS) */ nfsace4 permissions; /* Defines users who don't need an ACCESS call to open for read */ }; struct open_write_delegation4 { stateid4 stateid; /* Stateid for delegation */ bool recall; /* Pre-recalled flag for delegations obtained by reclaim (CLAIM_PREVIOUS) */ nfs_space_limit4 space_limit; /* Defines condition that the client must check to determine whether the file needs to be flushed to the server on close */ nfsace4 permissions; /* Defines users who don't need an ACCESS call as part of a delegated open */ }; enum why_no_delegation4 { /* New to NFSv4.1 */ WND4_NOT_WANTED = 0, WND4_CONTENTION = 1, WND4_RESOURCE = 2, WND4_NOT_SUPP_FTYPE = 3, WND4_WRITE_DELEG_NOT_SUPP_FTYPE = 4, WND4_NOT_SUPP_UPGRADE = 5, WND4_NOT_SUPP_DOWNGRADE = 6, WND4_CANCELLED = 7, WND4_IS_DIR = 8 }; union open_none_delegation4 /* New to NFSv4.1 */ switch (why_no_delegation4 ond_why) { case WND4_CONTENTION: bool ond_server_will_push_deleg; case WND4_RESOURCE: bool ond_server_will_signal_avail; default: void; }; union open_delegation4 switch (open_delegation_type4 delegation_type) { case OPEN_DELEGATE_NONE: void; case OPEN_DELEGATE_READ: open_read_delegation4 read; case OPEN_DELEGATE_WRITE: open_write_delegation4 write; case OPEN_DELEGATE_NONE_EXT: /* New to NFSv4.1 */ open_none_delegation4 od_whynone; }; /* * Result flags */ /* Client must confirm open. */ const OPEN4_RESULT_CONFIRM = 0x00000002; /* Type of file-locking behavior at the server */ const OPEN4_RESULT_LOCKTYPE_POSIX = 0x00000004; /* Server will preserve file if removed while open. */ const OPEN4_RESULT_PRESERVE_UNLINKED = 0x00000008; /* * Server may use CB_NOTIFY_LOCK on locks * derived from this open. */ const OPEN4_RESULT_MAY_NOTIFY_LOCK = 0x00000020; struct OPEN4resok { stateid4 stateid; /* Stateid for open */ change_info4 cinfo; /* Directory change info */ uint32_t rflags; /* Result flags */ bitmap4 attrset; /* Attribute set for create */ open_delegation4 delegation; /* Info on any open delegation */ }; union OPEN4res switch (nfsstat4 status) { case NFS4_OK: /* New CURRENT_FH: opened file */ OPEN4resok resok4; default: void; }; struct OPENATTR4args { /* CURRENT_FH: object */ bool createdir; }; struct OPENATTR4res { /* * If status is NFS4_OK, * New CURRENT_FH: named attribute * directory */ nfsstat4 status; }; /* Obsolete in NFSv4.1 */ struct OPEN_CONFIRM4args { /* CURRENT_FH: opened file */ stateid4 open_stateid; seqid4 seqid; }; struct OPEN_CONFIRM4resok { stateid4 open_stateid; }; union OPEN_CONFIRM4res switch (nfsstat4 status) { case NFS4_OK: OPEN_CONFIRM4resok resok4; default: void; }; struct OPEN_DOWNGRADE4args { /* CURRENT_FH: opened file */ stateid4 open_stateid; seqid4 seqid; uint32_t share_access; uint32_t share_deny; }; struct OPEN_DOWNGRADE4resok { stateid4 open_stateid; }; union OPEN_DOWNGRADE4res switch (nfsstat4 status) { case NFS4_OK: OPEN_DOWNGRADE4resok resok4; default: void; }; struct PUTFH4args { nfs_fh4 object; }; struct PUTFH4res { /* * If status is NFS4_OK, * New CURRENT_FH: argument to PUTFH */ nfsstat4 status; }; struct PUTPUBFH4res { /* * If status is NFS4_OK, * New CURRENT_FH: public fh */ nfsstat4 status; }; struct PUTROOTFH4res { /* * If status is NFS4_OK, * New CURRENT_FH: root fh */ nfsstat4 status; }; struct READ4args { /* CURRENT_FH: file */ stateid4 stateid; offset4 offset; count4 count; }; struct READ4resok { bool eof; opaque data<>; }; union READ4res switch (nfsstat4 status) { case NFS4_OK: READ4resok resok4; default: void; }; struct READDIR4args { /* CURRENT_FH: directory */ nfs_cookie4 cookie; verifier4 cookieverf; count4 dircount; count4 maxcount; bitmap4 attr_request; }; struct entry4 { nfs_cookie4 cookie; component4 name; fattr4 attrs; entry4 *nextentry; }; struct dirlist4 { entry4 *entries; bool eof; }; struct READDIR4resok { verifier4 cookieverf; dirlist4 reply; }; union READDIR4res switch (nfsstat4 status) { case NFS4_OK: READDIR4resok resok4; default: void; }; struct READLINK4resok { linktext4 link; }; union READLINK4res switch (nfsstat4 status) { case NFS4_OK: READLINK4resok resok4; default: void; }; struct REMOVE4args { /* CURRENT_FH: directory */ component4 target; }; struct REMOVE4resok { change_info4 cinfo; }; union REMOVE4res switch (nfsstat4 status) { case NFS4_OK: REMOVE4resok resok4; default: void; }; struct RENAME4args { /* SAVED_FH: source directory */ component4 oldname; /* CURRENT_FH: target directory */ component4 newname; }; struct RENAME4resok { change_info4 source_cinfo; change_info4 target_cinfo; }; union RENAME4res switch (nfsstat4 status) { case NFS4_OK: RENAME4resok resok4; default: void; }; /* Obsolete in NFSv4.1 */ struct RENEW4args { clientid4 clientid; }; struct RENEW4res { nfsstat4 status; }; struct RESTOREFH4res { /* * If status is NFS4_OK, * New CURRENT_FH: value of saved fh */ nfsstat4 status; }; struct SAVEFH4res { /* * If status is NFS4_OK, * New SAVED_FH: value of current fh */ nfsstat4 status; }; struct SECINFO4args { /* CURRENT_FH: directory */ component4 name; }; /* * From RFC 2203 */ enum rpc_gss_svc_t { RPC_GSS_SVC_NONE = 1, RPC_GSS_SVC_INTEGRITY = 2, RPC_GSS_SVC_PRIVACY = 3 }; struct rpcsec_gss_info { sec_oid4 oid; qop4 qop; rpc_gss_svc_t service; }; /* RPCSEC_GSS has a value of "6". See RFC 2203. */ union secinfo4 switch (uint32_t flavor) { case RPCSEC_GSS: rpcsec_gss_info flavor_info; default: void; }; typedef secinfo4 SECINFO4resok<>; union SECINFO4res switch (nfsstat4 status) { case NFS4_OK: /* CURRENTFH: consumed */ SECINFO4resok resok4; default: void; }; struct SETATTR4args { /* CURRENT_FH: target object */ stateid4 stateid; fattr4 obj_attributes; }; struct SETATTR4res { nfsstat4 status; bitmap4 attrsset; }; /* Obsolete in NFSv4.1 */ struct SETCLIENTID4args { nfs_client_id4 client; cb_client4 callback; uint32_t callback_ident; }; struct SETCLIENTID4resok { clientid4 clientid; verifier4 setclientid_confirm; }; union SETCLIENTID4res switch (nfsstat4 status) { case NFS4_OK: SETCLIENTID4resok resok4; case NFS4ERR_CLID_INUSE: clientaddr4 client_using; default: void; }; /* Obsolete in NFSv4.1 */ struct SETCLIENTID_CONFIRM4args { clientid4 clientid; verifier4 setclientid_confirm; }; struct SETCLIENTID_CONFIRM4res { nfsstat4 status; }; struct VERIFY4args { /* CURRENT_FH: object */ fattr4 obj_attributes; }; struct VERIFY4res { nfsstat4 status; }; struct WRITE4args { /* CURRENT_FH: file */ stateid4 stateid; offset4 offset; stable_how4 stable; opaque data<>; }; struct WRITE4resok { count4 count; stable_how4 committed; verifier4 writeverf; }; union WRITE4res switch (nfsstat4 status) { case NFS4_OK: WRITE4resok resok4; default: void; }; /* Obsolete in NFSv4.1 */ struct RELEASE_LOCKOWNER4args { lock_owner4 lock_owner; }; struct RELEASE_LOCKOWNER4res { nfsstat4 status; }; struct ILLEGAL4res { nfsstat4 status; }; typedef opaque gsshandle4_t<>; struct gss_cb_handles4 { rpc_gss_svc_t gcbp_service; /* RFC 2203 */ gsshandle4_t gcbp_handle_from_server; gsshandle4_t gcbp_handle_from_client; }; union callback_sec_parms4 switch (uint32_t cb_secflavor) { case AUTH_NONE: void; case AUTH_SYS: authsys_parms cbsp_sys_cred; /* RFC 5531 */ case RPCSEC_GSS: gss_cb_handles4 cbsp_gss_handles; }; struct BACKCHANNEL_CTL4args { uint32_t bca_cb_program; callback_sec_parms4 bca_sec_parms<>; }; struct BACKCHANNEL_CTL4res { nfsstat4 bcr_status; }; enum channel_dir_from_client4 { CDFC4_FORE = 0x1, CDFC4_BACK = 0x2, CDFC4_FORE_OR_BOTH = 0x3, CDFC4_BACK_OR_BOTH = 0x7 }; struct BIND_CONN_TO_SESSION4args { sessionid4 bctsa_sessid; channel_dir_from_client4 bctsa_dir; bool bctsa_use_conn_in_rdma_mode; }; enum channel_dir_from_server4 { CDFS4_FORE = 0x1, CDFS4_BACK = 0x2, CDFS4_BOTH = 0x3 }; struct BIND_CONN_TO_SESSION4resok { sessionid4 bctsr_sessid; channel_dir_from_server4 bctsr_dir; bool bctsr_use_conn_in_rdma_mode; }; union BIND_CONN_TO_SESSION4res switch (nfsstat4 bctsr_status) { case NFS4_OK: BIND_CONN_TO_SESSION4resok bctsr_resok4; default: void; }; const EXCHGID4_FLAG_SUPP_MOVED_REFER = 0x00000001; const EXCHGID4_FLAG_SUPP_MOVED_MIGR = 0x00000002; const EXCHGID4_FLAG_SUPP_FENCE_OPS = 0x00000004; const EXCHGID4_FLAG_BIND_PRINC_STATEID = 0x00000100; const EXCHGID4_FLAG_USE_NON_PNFS = 0x00010000; const EXCHGID4_FLAG_USE_PNFS_MDS = 0x00020000; const EXCHGID4_FLAG_USE_PNFS_DS = 0x00040000; const EXCHGID4_FLAG_MASK_PNFS = 0x00070000; const EXCHGID4_FLAG_UPD_CONFIRMED_REC_A = 0x40000000; const EXCHGID4_FLAG_CONFIRMED_R = 0x80000000; struct state_protect_ops4 { bitmap4 spo_must_enforce; bitmap4 spo_must_allow; }; struct ssv_sp_parms4 { state_protect_ops4 ssp_ops; sec_oid4 ssp_hash_algs<>; sec_oid4 ssp_encr_algs<>; uint32_t ssp_window; uint32_t ssp_num_gss_handles; }; enum state_protect_how4 { SP4_NONE = 0, SP4_MACH_CRED = 1, SP4_SSV = 2 }; union state_protect4_a switch (state_protect_how4 spa_how) { case SP4_NONE: void; case SP4_MACH_CRED: state_protect_ops4 spa_mach_ops; case SP4_SSV: ssv_sp_parms4 spa_ssv_parms; }; struct EXCHANGE_ID4args { client_owner4 eia_clientowner; uint32_t eia_flags; state_protect4_a eia_state_protect; nfs_impl_id4 eia_client_impl_id<1>; }; struct ssv_prot_info4 { state_protect_ops4 spi_ops; uint32_t spi_hash_alg; uint32_t spi_encr_alg; uint32_t spi_ssv_len; uint32_t spi_window; gsshandle4_t spi_handles<>; }; union state_protect4_r switch (state_protect_how4 spr_how) { case SP4_NONE: void; case SP4_MACH_CRED: state_protect_ops4 spr_mach_ops; case SP4_SSV: ssv_prot_info4 spr_ssv_info; }; struct EXCHANGE_ID4resok { clientid4 eir_clientid; sequenceid4 eir_sequenceid; uint32_t eir_flags; state_protect4_r eir_state_protect; server_owner4 eir_server_owner; opaque eir_server_scope; nfs_impl_id4 eir_server_impl_id<1>; }; union EXCHANGE_ID4res switch (nfsstat4 eir_status) { case NFS4_OK: EXCHANGE_ID4resok eir_resok4; default: void; }; struct channel_attrs4 { count4 ca_headerpadsize; count4 ca_maxrequestsize; count4 ca_maxresponsesize; count4 ca_maxresponsesize_cached; count4 ca_maxoperations; count4 ca_maxrequests; uint32_t ca_rdma_ird<1>; }; const CREATE_SESSION4_FLAG_PERSIST = 0x00000001; const CREATE_SESSION4_FLAG_CONN_BACK_CHAN = 0x00000002; const CREATE_SESSION4_FLAG_CONN_RDMA = 0x00000004; struct CREATE_SESSION4args { clientid4 csa_clientid; sequenceid4 csa_sequence; uint32_t csa_flags; channel_attrs4 csa_fore_chan_attrs; channel_attrs4 csa_back_chan_attrs; uint32_t csa_cb_program; callback_sec_parms4 csa_sec_parms<>; }; struct CREATE_SESSION4resok { sessionid4 csr_sessionid; sequenceid4 csr_sequence; uint32_t csr_flags; channel_attrs4 csr_fore_chan_attrs; channel_attrs4 csr_back_chan_attrs; }; union CREATE_SESSION4res switch (nfsstat4 csr_status) { case NFS4_OK: CREATE_SESSION4resok csr_resok4; default: void; }; struct DESTROY_SESSION4args { sessionid4 dsa_sessionid; }; struct DESTROY_SESSION4res { nfsstat4 dsr_status; }; struct FREE_STATEID4args { stateid4 fsa_stateid; }; struct FREE_STATEID4res { nfsstat4 fsr_status; }; typedef nfstime4 attr_notice4; struct GET_DIR_DELEGATION4args { /* CURRENT_FH: delegated directory */ bool gdda_signal_deleg_avail; bitmap4 gdda_notification_types; attr_notice4 gdda_child_attr_delay; attr_notice4 gdda_dir_attr_delay; bitmap4 gdda_child_attributes; bitmap4 gdda_dir_attributes; }; struct GET_DIR_DELEGATION4resok { verifier4 gddr_cookieverf; /* Stateid for get_dir_delegation */ stateid4 gddr_stateid; /* Which notifications can the server support? */ bitmap4 gddr_notification; bitmap4 gddr_child_attributes; bitmap4 gddr_dir_attributes; }; enum gddrnf4_status { GDD4_OK = 0, GDD4_UNAVAIL = 1 }; union GET_DIR_DELEGATION4res_non_fatal switch (gddrnf4_status gddrnf_status) { case GDD4_OK: GET_DIR_DELEGATION4resok gddrnf_resok4; case GDD4_UNAVAIL: bool gddrnf_will_signal_deleg_avail; }; union GET_DIR_DELEGATION4res switch (nfsstat4 gddr_status) { case NFS4_OK: GET_DIR_DELEGATION4res_non_fatal gddr_res_non_fatal4; default: void; }; struct GETDEVICEINFO4args { deviceid4 gdia_device_id; layouttype4 gdia_layout_type; count4 gdia_maxcount; bitmap4 gdia_notify_types; }; struct GETDEVICEINFO4resok { device_addr4 gdir_device_addr; bitmap4 gdir_notification; }; union GETDEVICEINFO4res switch (nfsstat4 gdir_status) { case NFS4_OK: GETDEVICEINFO4resok gdir_resok4; case NFS4ERR_TOOSMALL: count4 gdir_mincount; default: void; }; struct GETDEVICELIST4args { /* CURRENT_FH: object belonging to the file system */ layouttype4 gdla_layout_type; /* Number of device IDs to return */ count4 gdla_maxdevices; nfs_cookie4 gdla_cookie; verifier4 gdla_cookieverf; }; struct GETDEVICELIST4resok { nfs_cookie4 gdlr_cookie; verifier4 gdlr_cookieverf; deviceid4 gdlr_deviceid_list<>; bool gdlr_eof; }; union GETDEVICELIST4res switch (nfsstat4 gdlr_status) { case NFS4_OK: GETDEVICELIST4resok gdlr_resok4; default: void; }; union newtime4 switch (bool nt_timechanged) { case TRUE: nfstime4 nt_time; case FALSE: void; }; union newoffset4 switch (bool no_newoffset) { case TRUE: offset4 no_offset; case FALSE: void; }; struct LAYOUTCOMMIT4args { /* CURRENT_FH: file */ offset4 loca_offset; length4 loca_length; bool loca_reclaim; stateid4 loca_stateid; newoffset4 loca_last_write_offset; newtime4 loca_time_modify; layoutupdate4 loca_layoutupdate; }; union newsize4 switch (bool ns_sizechanged) { case TRUE: length4 ns_size; case FALSE: void; }; struct LAYOUTCOMMIT4resok { newsize4 locr_newsize; }; union LAYOUTCOMMIT4res switch (nfsstat4 locr_status) { case NFS4_OK: LAYOUTCOMMIT4resok locr_resok4; default: void; }; struct LAYOUTGET4args { /* CURRENT_FH: file */ bool loga_signal_layout_avail; layouttype4 loga_layout_type; layoutiomode4 loga_iomode; offset4 loga_offset; length4 loga_length; length4 loga_minlength; stateid4 loga_stateid; count4 loga_maxcount; }; struct LAYOUTGET4resok { bool logr_return_on_close; stateid4 logr_stateid; layout4 logr_layout<>; }; union LAYOUTGET4res switch (nfsstat4 logr_status) { case NFS4_OK: LAYOUTGET4resok logr_resok4; case NFS4ERR_LAYOUTTRYLATER: bool logr_will_signal_layout_avail; default: void; }; struct LAYOUTRETURN4args { /* CURRENT_FH: file */ bool lora_reclaim; layouttype4 lora_layout_type; layoutiomode4 lora_iomode; layoutreturn4 lora_layoutreturn; }; union layoutreturn_stateid switch (bool lrs_present) { case TRUE: stateid4 lrs_stateid; case FALSE: void; }; union LAYOUTRETURN4res switch (nfsstat4 lorr_status) { case NFS4_OK: layoutreturn_stateid lorr_stateid; default: void; }; enum secinfo_style4 { SECINFO_STYLE4_CURRENT_FH = 0, SECINFO_STYLE4_PARENT = 1 }; /* CURRENT_FH: object or child directory */ typedef secinfo_style4 SECINFO_NO_NAME4args; /* CURRENTFH: consumed if status is NFS4_OK */ typedef SECINFO4res SECINFO_NO_NAME4res; struct SEQUENCE4args { sessionid4 sa_sessionid; sequenceid4 sa_sequenceid; slotid4 sa_slotid; slotid4 sa_highest_slotid; bool sa_cachethis; }; const SEQ4_STATUS_CB_PATH_DOWN = 0x00000001; const SEQ4_STATUS_CB_GSS_CONTEXTS_EXPIRING = 0x00000002; const SEQ4_STATUS_CB_GSS_CONTEXTS_EXPIRED = 0x00000004; const SEQ4_STATUS_EXPIRED_ALL_STATE_REVOKED = 0x00000008; const SEQ4_STATUS_EXPIRED_SOME_STATE_REVOKED = 0x00000010; const SEQ4_STATUS_ADMIN_STATE_REVOKED = 0x00000020; const SEQ4_STATUS_RECALLABLE_STATE_REVOKED = 0x00000040; const SEQ4_STATUS_LEASE_MOVED = 0x00000080; const SEQ4_STATUS_RESTART_RECLAIM_NEEDED = 0x00000100; const SEQ4_STATUS_CB_PATH_DOWN_SESSION = 0x00000200; const SEQ4_STATUS_BACKCHANNEL_FAULT = 0x00000400; const SEQ4_STATUS_DEVID_CHANGED = 0x00000800; const SEQ4_STATUS_DEVID_DELETED = 0x00001000; struct SEQUENCE4resok { sessionid4 sr_sessionid; sequenceid4 sr_sequenceid; slotid4 sr_slotid; slotid4 sr_highest_slotid; slotid4 sr_target_highest_slotid; uint32_t sr_status_flags; }; union SEQUENCE4res switch (nfsstat4 sr_status) { case NFS4_OK: SEQUENCE4resok sr_resok4; default: void; }; struct ssa_digest_input4 { SEQUENCE4args sdi_seqargs; }; struct SET_SSV4args { opaque ssa_ssv<>; opaque ssa_digest<>; }; struct ssr_digest_input4 { SEQUENCE4res sdi_seqres; }; struct SET_SSV4resok { opaque ssr_digest<>; }; union SET_SSV4res switch (nfsstat4 ssr_status) { case NFS4_OK: SET_SSV4resok ssr_resok4; default: void; }; struct TEST_STATEID4args { stateid4 ts_stateids<>; }; struct TEST_STATEID4resok { nfsstat4 tsr_status_codes<>; }; union TEST_STATEID4res switch (nfsstat4 tsr_status) { case NFS4_OK: TEST_STATEID4resok tsr_resok4; default: void; }; union deleg_claim4 switch (open_claim_type4 dc_claim) { /* * No special rights to object. Ordinary delegation * request of the specified object. Object identified * by filehandle. */ case CLAIM_FH: /* New to NFSv4.1 */ /* CURRENT_FH: object being delegated */ void; /* * Right to file based on a delegation granted * to a previous boot instance of the client. * File is specified by filehandle. */ case CLAIM_DELEG_PREV_FH: /* New to NFSv4.1 */ /* CURRENT_FH: object being delegated */ void; /* * Right to the file established by an open previous * to server reboot. File identified by filehandle. * Used during server reclaim grace period. */ case CLAIM_PREVIOUS: /* CURRENT_FH: object being reclaimed */ open_delegation_type4 dc_delegate_type; }; struct WANT_DELEGATION4args { uint32_t wda_want; deleg_claim4 wda_claim; }; union WANT_DELEGATION4res switch (nfsstat4 wdr_status) { case NFS4_OK: open_delegation4 wdr_resok4; default: void; }; struct DESTROY_CLIENTID4args { clientid4 dca_clientid; }; struct DESTROY_CLIENTID4res { nfsstat4 dcr_status; }; struct RECLAIM_COMPLETE4args { /* * If rca_one_fs TRUE, * * CURRENT_FH: object in * file system for which the * reclaim is complete. */ bool rca_one_fs; }; struct RECLAIM_COMPLETE4res { nfsstat4 rcr_status; }; struct COPY4args { /* SAVED_FH: source file */ /* CURRENT_FH: destination file */ stateid4 ca_src_stateid; stateid4 ca_dst_stateid; offset4 ca_src_offset; offset4 ca_dst_offset; length4 ca_count; bool ca_consecutive; bool ca_synchronous; netloc4 ca_source_server<>; }; struct copy_requirements4 { bool cr_consecutive; bool cr_synchronous; }; struct COPY4resok { write_response4 cr_response; copy_requirements4 cr_requirements; }; union COPY4res switch (nfsstat4 cr_status) { case NFS4_OK: COPY4resok cr_resok4; case NFS4ERR_OFFLOAD_NO_REQS: copy_requirements4 cr_requirements; default: void; }; struct COPY_NOTIFY4args { /* CURRENT_FH: source file */ stateid4 cna_src_stateid; netloc4 cna_destination_server; }; struct COPY_NOTIFY4resok { nfstime4 cnr_lease_time; stateid4 cnr_stateid; netloc4 cnr_source_server<>; }; union COPY_NOTIFY4res switch (nfsstat4 cnr_status) { case NFS4_OK: COPY_NOTIFY4resok resok4; default: void; }; struct OFFLOAD_CANCEL4args { /* CURRENT_FH: file to cancel */ stateid4 oca_stateid; }; struct OFFLOAD_CANCEL4res { nfsstat4 ocr_status; }; struct OFFLOAD_STATUS4args { /* CURRENT_FH: destination file */ stateid4 osa_stateid; }; struct OFFLOAD_STATUS4resok { length4 osr_count; nfsstat4 osr_complete<1>; }; union OFFLOAD_STATUS4res switch (nfsstat4 osr_status) { case NFS4_OK: OFFLOAD_STATUS4resok osr_resok4; default: void; }; struct ALLOCATE4args { /* CURRENT_FH: file */ stateid4 aa_stateid; offset4 aa_offset; length4 aa_length; }; struct ALLOCATE4res { nfsstat4 ar_status; }; struct DEALLOCATE4args { /* CURRENT_FH: file */ stateid4 da_stateid; offset4 da_offset; length4 da_length; }; struct DEALLOCATE4res { nfsstat4 dr_status; }; enum IO_ADVISE_type4 { IO_ADVISE4_NORMAL = 0, IO_ADVISE4_SEQUENTIAL = 1, IO_ADVISE4_SEQUENTIAL_BACKWARDS = 2, IO_ADVISE4_RANDOM = 3, IO_ADVISE4_WILLNEED = 4, IO_ADVISE4_WILLNEED_OPPORTUNISTIC = 5, IO_ADVISE4_DONTNEED = 6, IO_ADVISE4_NOREUSE = 7, IO_ADVISE4_READ = 8, IO_ADVISE4_WRITE = 9, IO_ADVISE4_INIT_PROXIMITY = 10 }; struct IO_ADVISE4args { /* CURRENT_FH: file */ stateid4 iaa_stateid; offset4 iaa_offset; length4 iaa_count; bitmap4 iaa_hints; }; struct IO_ADVISE4resok { bitmap4 ior_hints; }; union IO_ADVISE4res switch (nfsstat4 ior_status) { case NFS4_OK: IO_ADVISE4resok resok4; default: void; }; struct device_error4 { deviceid4 de_deviceid; nfsstat4 de_status; nfs_opnum4 de_opnum; }; struct LAYOUTERROR4args { /* CURRENT_FH: file */ offset4 lea_offset; length4 lea_length; stateid4 lea_stateid; device_error4 lea_errors<>; }; struct LAYOUTERROR4res { nfsstat4 ler_status; }; struct io_info4 { uint64_t ii_count; uint64_t ii_bytes; }; struct LAYOUTSTATS4args { /* CURRENT_FH: file */ offset4 lsa_offset; length4 lsa_length; stateid4 lsa_stateid; io_info4 lsa_read; io_info4 lsa_write; deviceid4 lsa_deviceid; layoutupdate4 lsa_layoutupdate; }; struct LAYOUTSTATS4res { nfsstat4 lsr_status; }; struct READ_PLUS4args { /* CURRENT_FH: file */ stateid4 rpa_stateid; offset4 rpa_offset; count4 rpa_count; }; union read_plus_content switch (data_content4 rpc_content) { case NFS4_CONTENT_DATA: data4 rpc_data; case NFS4_CONTENT_HOLE: data_info4 rpc_hole; default: void; }; /* * Allow a return of an array of contents. */ struct read_plus_res4 { bool rpr_eof; read_plus_content rpr_contents<>; }; union READ_PLUS4res switch (nfsstat4 rp_status) { case NFS4_OK: read_plus_res4 rp_resok4; default: void; }; struct SEEK4args { /* CURRENT_FH: file */ stateid4 sa_stateid; offset4 sa_offset; data_content4 sa_what; }; struct seek_res4 { bool sr_eof; offset4 sr_offset; }; union SEEK4res switch (nfsstat4 sa_status) { case NFS4_OK: seek_res4 resok4; default: void; }; struct WRITE_SAME4args { /* CURRENT_FH: file */ stateid4 wsa_stateid; stable_how4 wsa_stable; app_data_block4 wsa_adb; }; union WRITE_SAME4res switch (nfsstat4 wsr_status) { case NFS4_OK: write_response4 resok4; default: void; }; /* * Operation arrays (the rest) */ union nfs_argop4 switch (nfs_opnum4 argop) { case OP_ACCESS: ACCESS4args opaccess; case OP_CLOSE: CLOSE4args opclose; case OP_COMMIT: COMMIT4args opcommit; case OP_CREATE: CREATE4args opcreate; case OP_DELEGPURGE: DELEGPURGE4args opdelegpurge; case OP_DELEGRETURN: DELEGRETURN4args opdelegreturn; case OP_GETATTR: GETATTR4args opgetattr; case OP_GETFH: void; case OP_LINK: LINK4args oplink; case OP_LOCK: LOCK4args oplock; case OP_LOCKT: LOCKT4args oplockt; case OP_LOCKU: LOCKU4args oplocku; case OP_LOOKUP: LOOKUP4args oplookup; case OP_LOOKUPP: void; case OP_NVERIFY: NVERIFY4args opnverify; case OP_OPEN: OPEN4args opopen; case OP_OPENATTR: OPENATTR4args opopenattr; /* Not for NFSv4.1 */ case OP_OPEN_CONFIRM: OPEN_CONFIRM4args opopen_confirm; case OP_OPEN_DOWNGRADE: OPEN_DOWNGRADE4args opopen_downgrade; case OP_PUTFH: PUTFH4args opputfh; case OP_PUTPUBFH: void; case OP_PUTROOTFH: void; case OP_READ: READ4args opread; case OP_READDIR: READDIR4args opreaddir; case OP_READLINK: void; case OP_REMOVE: REMOVE4args opremove; case OP_RENAME: RENAME4args oprename; /* Not for NFSv4.1 */ case OP_RENEW: RENEW4args oprenew; case OP_RESTOREFH: void; case OP_SAVEFH: void; case OP_SECINFO: SECINFO4args opsecinfo; case OP_SETATTR: SETATTR4args opsetattr; /* Not for NFSv4.1 */ case OP_SETCLIENTID: SETCLIENTID4args opsetclientid; /* Not for NFSv4.1 */ case OP_SETCLIENTID_CONFIRM: SETCLIENTID_CONFIRM4args opsetclientid_confirm; case OP_VERIFY: VERIFY4args opverify; case OP_WRITE: WRITE4args opwrite; /* Not for NFSv4.1 */ case OP_RELEASE_LOCKOWNER: RELEASE_LOCKOWNER4args oprelease_lockowner; /* Operations new to NFSv4.1 */ case OP_BACKCHANNEL_CTL: BACKCHANNEL_CTL4args opbackchannel_ctl; case OP_BIND_CONN_TO_SESSION: BIND_CONN_TO_SESSION4args opbind_conn_to_session; case OP_EXCHANGE_ID: EXCHANGE_ID4args opexchange_id; case OP_CREATE_SESSION: CREATE_SESSION4args opcreate_session; case OP_DESTROY_SESSION: DESTROY_SESSION4args opdestroy_session; case OP_FREE_STATEID: FREE_STATEID4args opfree_stateid; case OP_GET_DIR_DELEGATION: GET_DIR_DELEGATION4args opget_dir_delegation; case OP_GETDEVICEINFO: GETDEVICEINFO4args opgetdeviceinfo; case OP_GETDEVICELIST: GETDEVICELIST4args opgetdevicelist; case OP_LAYOUTCOMMIT: LAYOUTCOMMIT4args oplayoutcommit; case OP_LAYOUTGET: LAYOUTGET4args oplayoutget; case OP_LAYOUTRETURN: LAYOUTRETURN4args oplayoutreturn; case OP_SECINFO_NO_NAME: SECINFO_NO_NAME4args opsecinfo_no_name; case OP_SEQUENCE: SEQUENCE4args opsequence; case OP_SET_SSV: SET_SSV4args opset_ssv; case OP_TEST_STATEID: TEST_STATEID4args optest_stateid; case OP_WANT_DELEGATION: WANT_DELEGATION4args opwant_delegation; case OP_DESTROY_CLIENTID: DESTROY_CLIENTID4args opdestroy_clientid; case OP_RECLAIM_COMPLETE: RECLAIM_COMPLETE4args opreclaim_complete; /* Operations new to NFSv4.2 */ case OP_ALLOCATE: ALLOCATE4args opallocate; case OP_COPY: COPY4args opcopy; case OP_COPY_NOTIFY: COPY_NOTIFY4args opoffload_notify; case OP_DEALLOCATE: DEALLOCATE4args opdeallocate; case OP_IO_ADVISE: IO_ADVISE4args opio_advise; case OP_LAYOUTERROR: LAYOUTERROR4args oplayouterror; case OP_LAYOUTSTATS: LAYOUTSTATS4args oplayoutstats; case OP_OFFLOAD_CANCEL: OFFLOAD_CANCEL4args opoffload_cancel; case OP_OFFLOAD_STATUS: OFFLOAD_STATUS4args opoffload_status; case OP_READ_PLUS: READ_PLUS4args opread_plus; case OP_SEEK: SEEK4args opseek; case OP_WRITE_SAME: WRITE_SAME4args opwrite_same; case OP_CLONE: CLONE4args opclone; /* Operations not new to NFSv4.1 */ case OP_ILLEGAL: void; }; union nfs_resop4 switch (nfs_opnum4 resop) { case OP_ACCESS: ACCESS4res opaccess; case OP_CLOSE: CLOSE4res opclose; case OP_COMMIT: COMMIT4res opcommit; case OP_CREATE: CREATE4res opcreate; case OP_DELEGPURGE: DELEGPURGE4res opdelegpurge; case OP_DELEGRETURN: DELEGRETURN4res opdelegreturn; case OP_GETATTR: GETATTR4res opgetattr; case OP_GETFH: GETFH4res opgetfh; case OP_LINK: LINK4res oplink; case OP_LOCK: LOCK4res oplock; case OP_LOCKT: LOCKT4res oplockt; case OP_LOCKU: LOCKU4res oplocku; case OP_LOOKUP: LOOKUP4res oplookup; case OP_LOOKUPP: LOOKUPP4res oplookupp; case OP_NVERIFY: NVERIFY4res opnverify; case OP_OPEN: OPEN4res opopen; case OP_OPENATTR: OPENATTR4res opopenattr; /* Not for NFSv4.1 */ case OP_OPEN_CONFIRM: OPEN_CONFIRM4res opopen_confirm; case OP_OPEN_DOWNGRADE: OPEN_DOWNGRADE4res opopen_downgrade; case OP_PUTFH: PUTFH4res opputfh; case OP_PUTPUBFH: PUTPUBFH4res opputpubfh; case OP_PUTROOTFH: PUTROOTFH4res opputrootfh; case OP_READ: READ4res opread; case OP_READDIR: READDIR4res opreaddir; case OP_READLINK: READLINK4res opreadlink; case OP_REMOVE: REMOVE4res opremove; case OP_RENAME: RENAME4res oprename; /* Not for NFSv4.1 */ case OP_RENEW: RENEW4res oprenew; case OP_RESTOREFH: RESTOREFH4res oprestorefh; case OP_SAVEFH: SAVEFH4res opsavefh; case OP_SECINFO: SECINFO4res opsecinfo; case OP_SETATTR: SETATTR4res opsetattr; /* Not for NFSv4.1 */ case OP_SETCLIENTID: SETCLIENTID4res opsetclientid; /* Not for NFSv4.1 */ case OP_SETCLIENTID_CONFIRM: SETCLIENTID_CONFIRM4res opsetclientid_confirm; case OP_VERIFY: VERIFY4res opverify; case OP_WRITE: WRITE4res opwrite; /* Not for NFSv4.1 */ case OP_RELEASE_LOCKOWNER: RELEASE_LOCKOWNER4res oprelease_lockowner; /* Operations new to NFSv4.1 */ case OP_BACKCHANNEL_CTL: BACKCHANNEL_CTL4res opbackchannel_ctl; case OP_BIND_CONN_TO_SESSION: BIND_CONN_TO_SESSION4res opbind_conn_to_session; case OP_EXCHANGE_ID: EXCHANGE_ID4res opexchange_id; case OP_CREATE_SESSION: CREATE_SESSION4res opcreate_session; case OP_DESTROY_SESSION: DESTROY_SESSION4res opdestroy_session; case OP_FREE_STATEID: FREE_STATEID4res opfree_stateid; case OP_GET_DIR_DELEGATION: GET_DIR_DELEGATION4res opget_dir_delegation; case OP_GETDEVICEINFO: GETDEVICEINFO4res opgetdeviceinfo; case OP_GETDEVICELIST: GETDEVICELIST4res opgetdevicelist; case OP_LAYOUTCOMMIT: LAYOUTCOMMIT4res oplayoutcommit; case OP_LAYOUTGET: LAYOUTGET4res oplayoutget; case OP_LAYOUTRETURN: LAYOUTRETURN4res oplayoutreturn; case OP_SECINFO_NO_NAME: SECINFO_NO_NAME4res opsecinfo_no_name; case OP_SEQUENCE: SEQUENCE4res opsequence; case OP_SET_SSV: SET_SSV4res opset_ssv; case OP_TEST_STATEID: TEST_STATEID4res optest_stateid; case OP_WANT_DELEGATION: WANT_DELEGATION4res opwant_delegation; case OP_DESTROY_CLIENTID: DESTROY_CLIENTID4res opdestroy_clientid; case OP_RECLAIM_COMPLETE: RECLAIM_COMPLETE4res opreclaim_complete; /* Operations new to NFSv4.2 */ case OP_ALLOCATE: ALLOCATE4res opallocate; case OP_COPY: COPY4res opcopy; case OP_COPY_NOTIFY: COPY_NOTIFY4res opcopy_notify; case OP_DEALLOCATE: DEALLOCATE4res opdeallocate; case OP_IO_ADVISE: IO_ADVISE4res opio_advise; case OP_LAYOUTERROR: LAYOUTERROR4res oplayouterror; case OP_LAYOUTSTATS: LAYOUTSTATS4res oplayoutstats; case OP_OFFLOAD_CANCEL: OFFLOAD_CANCEL4res opoffload_cancel; case OP_OFFLOAD_STATUS: OFFLOAD_STATUS4res opoffload_status; case OP_READ_PLUS: READ_PLUS4res opread_plus; case OP_SEEK: SEEK4res opseek; case OP_WRITE_SAME: WRITE_SAME4res opwrite_same; case OP_CLONE: CLONE4res opclone; /* Operations not new to NFSv4.1 */ case OP_ILLEGAL: ILLEGAL4res opillegal; }; struct COMPOUND4args { utf8str_cs tag; uint32_t minorversion; nfs_argop4 argarray<>; }; struct COMPOUND4res { nfsstat4 status; utf8str_cs tag; nfs_resop4 resarray<>; }; /* * Remote file service routines */ program NFS4_PROGRAM { version NFS_V4 { void NFSPROC4_NULL(void) = 0; COMPOUND4res NFSPROC4_COMPOUND(COMPOUND4args) = 1; } = 4; } = 100003; /* * NFS4 callback procedure definitions and program */ struct CB_GETATTR4args { nfs_fh4 fh; bitmap4 attr_request; }; struct CB_GETATTR4resok { fattr4 obj_attributes; }; union CB_GETATTR4res switch (nfsstat4 status) { case NFS4_OK: CB_GETATTR4resok resok4; default: void; }; struct CB_RECALL4args { stateid4 stateid; bool truncate; nfs_fh4 fh; }; struct CB_RECALL4res { nfsstat4 status; }; /* * CB_ILLEGAL: Response for illegal operation numbers */ struct CB_ILLEGAL4res { nfsstat4 status; }; /* * NFSv4.1 callback arguments and results */ enum layoutrecall_type4 { LAYOUTRECALL4_FILE = LAYOUT4_RET_REC_FILE, LAYOUTRECALL4_FSID = LAYOUT4_RET_REC_FSID, LAYOUTRECALL4_ALL = LAYOUT4_RET_REC_ALL }; struct layoutrecall_file4 { nfs_fh4 lor_fh; offset4 lor_offset; length4 lor_length; stateid4 lor_stateid; }; union layoutrecall4 switch (layoutrecall_type4 lor_recalltype) { case LAYOUTRECALL4_FILE: layoutrecall_file4 lor_layout; case LAYOUTRECALL4_FSID: fsid4 lor_fsid; case LAYOUTRECALL4_ALL: void; }; struct CB_LAYOUTRECALL4args { layouttype4 clora_type; layoutiomode4 clora_iomode; bool clora_changed; layoutrecall4 clora_recall; }; struct CB_LAYOUTRECALL4res { nfsstat4 clorr_status; }; /* * Directory notification types */ enum notify_type4 { NOTIFY4_CHANGE_CHILD_ATTRS = 0, NOTIFY4_CHANGE_DIR_ATTRS = 1, NOTIFY4_REMOVE_ENTRY = 2, NOTIFY4_ADD_ENTRY = 3, NOTIFY4_RENAME_ENTRY = 4, NOTIFY4_CHANGE_COOKIE_VERIFIER = 5 }; /* Changed entry information */ struct notify_entry4 { component4 ne_file; fattr4 ne_attrs; }; /* Previous entry information */ struct prev_entry4 { notify_entry4 pe_prev_entry; /* What READDIR returned for this entry */ nfs_cookie4 pe_prev_entry_cookie; }; struct notify_remove4 { notify_entry4 nrm_old_entry; nfs_cookie4 nrm_old_entry_cookie; }; struct notify_add4 { /* * During a rename, contains * the object that was deleted. */ notify_remove4 nad_old_entry<1>; notify_entry4 nad_new_entry; /* What READDIR would have returned for this entry */ nfs_cookie4 nad_new_entry_cookie<1>; prev_entry4 nad_prev_entry<1>; bool nad_last_entry; }; struct notify_attr4 { notify_entry4 na_changed_entry; }; struct notify_rename4 { notify_remove4 nrn_old_entry; notify_add4 nrn_new_entry; }; struct notify_verifier4 { verifier4 nv_old_cookieverf; verifier4 nv_new_cookieverf; }; /* * Objects of type notify_<>4 and * notify_device_<>4 are encoded in this. */ typedef opaque notifylist4<>; struct notify4 { /* Composed from notify_type4 or notify_deviceid_type4 */ bitmap4 notify_mask; notifylist4 notify_vals; }; struct CB_NOTIFY4args { stateid4 cna_stateid; nfs_fh4 cna_fh; notify4 cna_changes<>; }; struct CB_NOTIFY4res { nfsstat4 cnr_status; }; struct CB_PUSH_DELEG4args { nfs_fh4 cpda_fh; open_delegation4 cpda_delegation; }; struct CB_PUSH_DELEG4res { nfsstat4 cpdr_status; }; const RCA4_TYPE_MASK_RDATA_DLG = 0; const RCA4_TYPE_MASK_WDATA_DLG = 1; const RCA4_TYPE_MASK_DIR_DLG = 2; const RCA4_TYPE_MASK_FILE_LAYOUT = 3; const RCA4_TYPE_MASK_BLK_LAYOUT = 4; const RCA4_TYPE_MASK_OBJ_LAYOUT_MIN = 8; const RCA4_TYPE_MASK_OBJ_LAYOUT_MAX = 9; const RCA4_TYPE_MASK_OTHER_LAYOUT_MIN = 12; const RCA4_TYPE_MASK_OTHER_LAYOUT_MAX = 15; struct CB_RECALL_ANY4args { uint32_t craa_objects_to_keep; bitmap4 craa_type_mask; }; struct CB_RECALL_ANY4res { nfsstat4 crar_status; }; typedef CB_RECALL_ANY4args CB_RECALLABLE_OBJ_AVAIL4args; struct CB_RECALLABLE_OBJ_AVAIL4res { nfsstat4 croa_status; }; struct CB_RECALL_SLOT4args { slotid4 rsa_target_highest_slotid; }; struct CB_RECALL_SLOT4res { nfsstat4 rsr_status; }; struct referring_call4 { sequenceid4 rc_sequenceid; slotid4 rc_slotid; }; struct referring_call_list4 { sessionid4 rcl_sessionid; referring_call4 rcl_referring_calls<>; }; struct CB_SEQUENCE4args { sessionid4 csa_sessionid; sequenceid4 csa_sequenceid; slotid4 csa_slotid; slotid4 csa_highest_slotid; bool csa_cachethis; referring_call_list4 csa_referring_call_lists<>; }; struct CB_SEQUENCE4resok { sessionid4 csr_sessionid; sequenceid4 csr_sequenceid; slotid4 csr_slotid; slotid4 csr_highest_slotid; slotid4 csr_target_highest_slotid; }; union CB_SEQUENCE4res switch (nfsstat4 csr_status) { case NFS4_OK: CB_SEQUENCE4resok csr_resok4; default: void; }; struct CB_WANTS_CANCELLED4args { bool cwca_contended_wants_cancelled; bool cwca_resourced_wants_cancelled; }; struct CB_WANTS_CANCELLED4res { nfsstat4 cwcr_status; }; struct CB_NOTIFY_LOCK4args { nfs_fh4 cnla_fh; lock_owner4 cnla_lock_owner; }; struct CB_NOTIFY_LOCK4res { nfsstat4 cnlr_status; }; /* * Device notification types */ enum notify_deviceid_type4 { NOTIFY_DEVICEID4_CHANGE = 1, NOTIFY_DEVICEID4_DELETE = 2 }; /* For NOTIFY4_DEVICEID4_DELETE */ struct notify_deviceid_delete4 { layouttype4 ndd_layouttype; deviceid4 ndd_deviceid; }; /* For NOTIFY4_DEVICEID4_CHANGE */ struct notify_deviceid_change4 { layouttype4 ndc_layouttype; deviceid4 ndc_deviceid; bool ndc_immediate; }; struct CB_NOTIFY_DEVICEID4args { notify4 cnda_changes<>; }; struct CB_NOTIFY_DEVICEID4res { nfsstat4 cndr_status; }; union offload_info4 switch (nfsstat4 coa_status) { case NFS4_OK: write_response4 coa_resok4; default: length4 coa_bytes_copied; }; struct CB_OFFLOAD4args { nfs_fh4 coa_fh; stateid4 coa_stateid; offload_info4 coa_offload_info; }; struct CB_OFFLOAD4res { nfsstat4 cor_status; }; /* * Various definitions for CB_COMPOUND */ % enum nfs_cb_opnum4 { OP_CB_GETATTR = 3, OP_CB_RECALL = 4, %/* Callback operations new to NFSv4.1 */ OP_CB_LAYOUTRECALL = 5, OP_CB_NOTIFY = 6, OP_CB_PUSH_DELEG = 7, OP_CB_RECALL_ANY = 8, OP_CB_RECALLABLE_OBJ_AVAIL = 9, OP_CB_RECALL_SLOT = 10, OP_CB_SEQUENCE = 11, OP_CB_WANTS_CANCELLED = 12, OP_CB_NOTIFY_LOCK = 13, OP_CB_NOTIFY_DEVICEID = 14, %/* Callback operations new to NFSv4.2 */ OP_CB_OFFLOAD = 15, OP_CB_ILLEGAL = 10044 }; union nfs_cb_argop4 switch (nfs_cb_opnum4 argop) { case OP_CB_GETATTR: CB_GETATTR4args opcbgetattr; /* New NFSv4.1 operations */ case OP_CB_RECALL: CB_RECALL4args opcbrecall; case OP_CB_LAYOUTRECALL: CB_LAYOUTRECALL4args opcblayoutrecall; case OP_CB_NOTIFY: CB_NOTIFY4args opcbnotify; case OP_CB_PUSH_DELEG: CB_PUSH_DELEG4args opcbpush_deleg; case OP_CB_RECALL_ANY: CB_RECALL_ANY4args opcbrecall_any; case OP_CB_RECALLABLE_OBJ_AVAIL: CB_RECALLABLE_OBJ_AVAIL4args opcbrecallable_obj_avail; case OP_CB_RECALL_SLOT: CB_RECALL_SLOT4args opcbrecall_slot; case OP_CB_SEQUENCE: CB_SEQUENCE4args opcbsequence; case OP_CB_WANTS_CANCELLED: CB_WANTS_CANCELLED4args opcbwants_cancelled; case OP_CB_NOTIFY_LOCK: CB_NOTIFY_LOCK4args opcbnotify_lock; case OP_CB_NOTIFY_DEVICEID: CB_NOTIFY_DEVICEID4args opcbnotify_deviceid; /* New NFSv4.2 operations */ case OP_CB_OFFLOAD: CB_OFFLOAD4args opcboffload; case OP_CB_ILLEGAL: void; }; union nfs_cb_resop4 switch (nfs_cb_opnum4 resop) { case OP_CB_GETATTR: CB_GETATTR4res opcbgetattr; case OP_CB_RECALL: CB_RECALL4res opcbrecall; /* New NFSv4.1 operations */ case OP_CB_LAYOUTRECALL: CB_LAYOUTRECALL4res opcblayoutrecall; case OP_CB_NOTIFY: CB_NOTIFY4res opcbnotify; case OP_CB_PUSH_DELEG: CB_PUSH_DELEG4res opcbpush_deleg; case OP_CB_RECALL_ANY: CB_RECALL_ANY4res opcbrecall_any; case OP_CB_RECALLABLE_OBJ_AVAIL: CB_RECALLABLE_OBJ_AVAIL4res opcbrecallable_obj_avail; case OP_CB_RECALL_SLOT: CB_RECALL_SLOT4res opcbrecall_slot; case OP_CB_SEQUENCE: CB_SEQUENCE4res opcbsequence; case OP_CB_WANTS_CANCELLED: CB_WANTS_CANCELLED4res opcbwants_cancelled; case OP_CB_NOTIFY_LOCK: CB_NOTIFY_LOCK4res opcbnotify_lock; case OP_CB_NOTIFY_DEVICEID: CB_NOTIFY_DEVICEID4res opcbnotify_deviceid; /* New NFSv4.2 operations */ case OP_CB_OFFLOAD: CB_OFFLOAD4res opcboffload; /* Not new operation */ case OP_CB_ILLEGAL: CB_ILLEGAL4res opcbillegal; }; struct CB_COMPOUND4args { utf8str_cs tag; uint32_t minorversion; uint32_t callback_ident; nfs_cb_argop4 argarray<>; }; struct CB_COMPOUND4res { nfsstat4 status; utf8str_cs tag; nfs_cb_resop4 resarray<>; }; /* * Program number is in the transient range, since the client * will assign the exact transient program number and provide * that to the server via the CREATE_SESSION or * BACKCHANNEL_CTL operations. */ program NFS4_CALLBACK { version NFS_CB { void CB_NULL(void) = 0; CB_COMPOUND4res CB_COMPOUND(CB_COMPOUND4args) = 1; } = 1; } = 0x40000000; /* * Please do not edit this file. * It was generated using rpcgen. */ #ifndef _NFS_ACL_H_RPCGEN #define _NFS_ACL_H_RPCGEN #include #ifdef __cplusplus extern "C" { #endif #define NFS_ACL_MAX_ENTRIES 1024 typedef int uid; typedef u_short o_mode; struct aclent { int type; uid id; o_mode perm; }; typedef struct aclent aclent; #define NA_USER_OBJ 0x1 #define NA_USER 0x2 #define NA_GROUP_OBJ 0x4 #define NA_GROUP 0x8 #define NA_CLASS_OBJ 0x10 #define NA_OTHER_OBJ 0x20 #define NA_ACL_DEFAULT 0x1000 #define NA_READ 0x4 #define NA_WRITE 0x2 #define NA_EXEC 0x1 struct secattr { u_int mask; int aclcnt; struct { u_int aclent_len; aclent *aclent_val; } aclent; int dfaclcnt; struct { u_int dfaclent_len; aclent *dfaclent_val; } dfaclent; }; typedef struct secattr secattr; #define NA_ACL 0x1 #define NA_ACLCNT 0x2 #define NA_DFACL 0x4 #define NA_DFACLCNT 0x8 struct GETACL2args { fhandle_t fh; u_int mask; }; typedef struct GETACL2args GETACL2args; struct GETACL2resok { struct nfsfattr attr; secattr acl; }; typedef struct GETACL2resok GETACL2resok; struct GETACL2res { nfsstat status; union { GETACL2resok resok; } GETACL2res_u; }; typedef struct GETACL2res GETACL2res; struct SETACL2args { fhandle_t fh; secattr acl; }; typedef struct SETACL2args SETACL2args; struct SETACL2resok { struct nfsfattr attr; }; typedef struct SETACL2resok SETACL2resok; struct SETACL2res { nfsstat status; union { SETACL2resok resok; } SETACL2res_u; }; typedef struct SETACL2res SETACL2res; struct GETATTR2args { fhandle_t fh; }; typedef struct GETATTR2args GETATTR2args; struct GETATTR2resok { struct nfsfattr attr; }; typedef struct GETATTR2resok GETATTR2resok; struct GETATTR2res { nfsstat status; union { GETATTR2resok resok; } GETATTR2res_u; }; typedef struct GETATTR2res GETATTR2res; struct ACCESS2args { fhandle_t fh; uint32 access; }; typedef struct ACCESS2args ACCESS2args; #define ACCESS2_READ 0x1 #define ACCESS2_LOOKUP 0x2 #define ACCESS2_MODIFY 0x4 #define ACCESS2_EXTEND 0x8 #define ACCESS2_DELETE 0x10 #define ACCESS2_EXECUTE 0x20 struct ACCESS2resok { struct nfsfattr attr; uint32 access; }; typedef struct ACCESS2resok ACCESS2resok; struct ACCESS2res { nfsstat status; union { ACCESS2resok resok; } ACCESS2res_u; }; typedef struct ACCESS2res ACCESS2res; struct GETXATTRDIR2args { fhandle_t fh; bool_t create; }; typedef struct GETXATTRDIR2args GETXATTRDIR2args; struct GETXATTRDIR2resok { fhandle_t fh; struct nfsfattr attr; }; typedef struct GETXATTRDIR2resok GETXATTRDIR2resok; struct GETXATTRDIR2res { nfsstat status; union { GETXATTRDIR2resok resok; } GETXATTRDIR2res_u; }; typedef struct GETXATTRDIR2res GETXATTRDIR2res; struct GETACL3args { nfs_fh3 fh; u_int mask; }; typedef struct GETACL3args GETACL3args; struct GETACL3resok { post_op_attr attr; secattr acl; }; typedef struct GETACL3resok GETACL3resok; struct GETACL3resfail { post_op_attr attr; }; typedef struct GETACL3resfail GETACL3resfail; struct GETACL3res { nfsstat3 status; union { GETACL3resok resok; GETACL3resfail resfail; } GETACL3res_u; }; typedef struct GETACL3res GETACL3res; struct SETACL3args { nfs_fh3 fh; secattr acl; }; typedef struct SETACL3args SETACL3args; struct SETACL3resok { post_op_attr attr; }; typedef struct SETACL3resok SETACL3resok; struct SETACL3resfail { post_op_attr attr; }; typedef struct SETACL3resfail SETACL3resfail; struct SETACL3res { nfsstat3 status; union { SETACL3resok resok; SETACL3resfail resfail; } SETACL3res_u; }; typedef struct SETACL3res SETACL3res; struct GETXATTRDIR3args { nfs_fh3 fh; bool_t create; }; typedef struct GETXATTRDIR3args GETXATTRDIR3args; struct GETXATTRDIR3resok { nfs_fh3 fh; post_op_attr attr; }; typedef struct GETXATTRDIR3resok GETXATTRDIR3resok; struct GETXATTRDIR3res { nfsstat3 status; union { GETXATTRDIR3resok resok; } GETXATTRDIR3res_u; }; typedef struct GETXATTRDIR3res GETXATTRDIR3res; struct GETACL4args { nfs_fh4 fh; u_int mask; }; typedef struct GETACL4args GETACL4args; struct GETACL4resok { post_op_attr attr; secattr acl; }; typedef struct GETACL4resok GETACL4resok; struct GETACL4resfail { post_op_attr attr; }; typedef struct GETACL4resfail GETACL4resfail; struct GETACL4res { nfsstat3 status; union { GETACL4resok resok; GETACL4resfail resfail; } GETACL4res_u; }; typedef struct GETACL4res GETACL4res; struct SETACL4args { nfs_fh4 fh; secattr acl; }; typedef struct SETACL4args SETACL4args; struct SETACL4resok { post_op_attr attr; }; typedef struct SETACL4resok SETACL4resok; struct SETACL4resfail { post_op_attr attr; }; typedef struct SETACL4resfail SETACL4resfail; struct SETACL4res { nfsstat3 status; union { SETACL4resok resok; SETACL4resfail resfail; } SETACL4res_u; }; typedef struct SETACL4res SETACL4res; #define NFS_ACL_PORT 2049 #define NFS_ACL_PROGRAM 100227 #define NFS_ACL_V2 2 #if defined(__STDC__) || defined(__cplusplus) #define ACLPROC2_NULL 0 extern void * aclproc2_null_2(void *, CLIENT *); extern void * aclproc2_null_2_svc(void *, struct svc_req *); #define ACLPROC2_GETACL 1 extern GETACL2res * aclproc2_getacl_2(GETACL2args *, CLIENT *); extern GETACL2res * aclproc2_getacl_2_svc(GETACL2args *, struct svc_req *); #define ACLPROC2_SETACL 2 extern SETACL2res * aclproc2_setacl_2(SETACL2args *, CLIENT *); extern SETACL2res * aclproc2_setacl_2_svc(SETACL2args *, struct svc_req *); #define ACLPROC2_GETATTR 3 extern GETATTR2res * aclproc2_getattr_2(GETATTR2args *, CLIENT *); extern GETATTR2res * aclproc2_getattr_2_svc(GETATTR2args *, struct svc_req *); #define ACLPROC2_ACCESS 4 extern ACCESS2res * aclproc2_access_2(ACCESS2args *, CLIENT *); extern ACCESS2res * aclproc2_access_2_svc(ACCESS2args *, struct svc_req *); #define ACLPROC2_GETXATTRDIR 5 extern GETXATTRDIR2res * aclproc2_getxattrdir_2(GETXATTRDIR2args *, CLIENT *); extern GETXATTRDIR2res * aclproc2_getxattrdir_2_svc(GETXATTRDIR2args *, struct svc_req *); extern int nfs_acl_program_2_freeresult(SVCXPRT *, xdrproc_t, caddr_t); #else /* K&R C */ #define ACLPROC2_NULL 0 extern void * aclproc2_null_2(); extern void * aclproc2_null_2_svc(); #define ACLPROC2_GETACL 1 extern GETACL2res * aclproc2_getacl_2(); extern GETACL2res * aclproc2_getacl_2_svc(); #define ACLPROC2_SETACL 2 extern SETACL2res * aclproc2_setacl_2(); extern SETACL2res * aclproc2_setacl_2_svc(); #define ACLPROC2_GETATTR 3 extern GETATTR2res * aclproc2_getattr_2(); extern GETATTR2res * aclproc2_getattr_2_svc(); #define ACLPROC2_ACCESS 4 extern ACCESS2res * aclproc2_access_2(); extern ACCESS2res * aclproc2_access_2_svc(); #define ACLPROC2_GETXATTRDIR 5 extern GETXATTRDIR2res * aclproc2_getxattrdir_2(); extern GETXATTRDIR2res * aclproc2_getxattrdir_2_svc(); extern int nfs_acl_program_2_freeresult(); #endif /* K&R C */ #define NFS_ACL_V3 3 #if defined(__STDC__) || defined(__cplusplus) #define ACLPROC3_NULL 0 extern void * aclproc3_null_3(void *, CLIENT *); extern void * aclproc3_null_3_svc(void *, struct svc_req *); #define ACLPROC3_GETACL 1 extern GETACL3res * aclproc3_getacl_3(GETACL3args *, CLIENT *); extern GETACL3res * aclproc3_getacl_3_svc(GETACL3args *, struct svc_req *); #define ACLPROC3_SETACL 2 extern SETACL3res * aclproc3_setacl_3(SETACL3args *, CLIENT *); extern SETACL3res * aclproc3_setacl_3_svc(SETACL3args *, struct svc_req *); #define ACLPROC3_GETXATTRDIR 3 extern GETXATTRDIR3res * aclproc3_getxattrdir_3(GETXATTRDIR3args *, CLIENT *); extern GETXATTRDIR3res * aclproc3_getxattrdir_3_svc(GETXATTRDIR3args *, struct svc_req *); extern int nfs_acl_program_3_freeresult(SVCXPRT *, xdrproc_t, caddr_t); #else /* K&R C */ #define ACLPROC3_NULL 0 extern void * aclproc3_null_3(); extern void * aclproc3_null_3_svc(); #define ACLPROC3_GETACL 1 extern GETACL3res * aclproc3_getacl_3(); extern GETACL3res * aclproc3_getacl_3_svc(); #define ACLPROC3_SETACL 2 extern SETACL3res * aclproc3_setacl_3(); extern SETACL3res * aclproc3_setacl_3_svc(); #define ACLPROC3_GETXATTRDIR 3 extern GETXATTRDIR3res * aclproc3_getxattrdir_3(); extern GETXATTRDIR3res * aclproc3_getxattrdir_3_svc(); extern int nfs_acl_program_3_freeresult(); #endif /* K&R C */ #define NFS_ACL_V4 4 #if defined(__STDC__) || defined(__cplusplus) #define ACLPROC4_NULL 0 extern void * aclproc4_null_4(void *, CLIENT *); extern void * aclproc4_null_4_svc(void *, struct svc_req *); #define ACLPROC4_GETACL 1 extern GETACL4res * aclproc4_getacl_4(GETACL4args *, CLIENT *); extern GETACL4res * aclproc4_getacl_4_svc(GETACL4args *, struct svc_req *); #define ACLPROC4_SETACL 2 extern SETACL4res * aclproc4_setacl_4(SETACL4args *, CLIENT *); extern SETACL4res * aclproc4_setacl_4_svc(SETACL4args *, struct svc_req *); extern int nfs_acl_program_4_freeresult(SVCXPRT *, xdrproc_t, caddr_t); #else /* K&R C */ #define ACLPROC4_NULL 0 extern void * aclproc4_null_4(); extern void * aclproc4_null_4_svc(); #define ACLPROC4_GETACL 1 extern GETACL4res * aclproc4_getacl_4(); extern GETACL4res * aclproc4_getacl_4_svc(); #define ACLPROC4_SETACL 2 extern SETACL4res * aclproc4_setacl_4(); extern SETACL4res * aclproc4_setacl_4_svc(); extern int nfs_acl_program_4_freeresult(); #endif /* K&R C */ /* the xdr functions */ #if defined(__STDC__) || defined(__cplusplus) extern bool_t xdr_uid(XDR *, uid*); extern bool_t xdr_o_mode(XDR *, o_mode*); extern bool_t xdr_aclent(XDR *, aclent*); extern bool_t xdr_secattr(XDR *, secattr*); extern bool_t xdr_GETACL2args(XDR *, GETACL2args*); extern bool_t xdr_GETACL2resok(XDR *, GETACL2resok*); extern bool_t xdr_GETACL2res(XDR *, GETACL2res*); extern bool_t xdr_SETACL2args(XDR *, SETACL2args*); extern bool_t xdr_SETACL2resok(XDR *, SETACL2resok*); extern bool_t xdr_SETACL2res(XDR *, SETACL2res*); extern bool_t xdr_GETATTR2args(XDR *, GETATTR2args*); extern bool_t xdr_GETATTR2resok(XDR *, GETATTR2resok*); extern bool_t xdr_GETATTR2res(XDR *, GETATTR2res*); extern bool_t xdr_ACCESS2args(XDR *, ACCESS2args*); extern bool_t xdr_ACCESS2resok(XDR *, ACCESS2resok*); extern bool_t xdr_ACCESS2res(XDR *, ACCESS2res*); extern bool_t xdr_GETXATTRDIR2args(XDR *, GETXATTRDIR2args*); extern bool_t xdr_GETXATTRDIR2resok(XDR *, GETXATTRDIR2resok*); extern bool_t xdr_GETXATTRDIR2res(XDR *, GETXATTRDIR2res*); extern bool_t xdr_GETACL3args(XDR *, GETACL3args*); extern bool_t xdr_GETACL3resok(XDR *, GETACL3resok*); extern bool_t xdr_GETACL3resfail(XDR *, GETACL3resfail*); extern bool_t xdr_GETACL3res(XDR *, GETACL3res*); extern bool_t xdr_SETACL3args(XDR *, SETACL3args*); extern bool_t xdr_SETACL3resok(XDR *, SETACL3resok*); extern bool_t xdr_SETACL3resfail(XDR *, SETACL3resfail*); extern bool_t xdr_SETACL3res(XDR *, SETACL3res*); extern bool_t xdr_GETXATTRDIR3args(XDR *, GETXATTRDIR3args*); extern bool_t xdr_GETXATTRDIR3resok(XDR *, GETXATTRDIR3resok*); extern bool_t xdr_GETXATTRDIR3res(XDR *, GETXATTRDIR3res*); extern bool_t xdr_GETACL4args(XDR *, GETACL4args*); extern bool_t xdr_GETACL4resok(XDR *, GETACL4resok*); extern bool_t xdr_GETACL4resfail(XDR *, GETACL4resfail*); extern bool_t xdr_GETACL4res(XDR *, GETACL4res*); extern bool_t xdr_SETACL4args(XDR *, SETACL4args*); extern bool_t xdr_SETACL4resok(XDR *, SETACL4resok*); extern bool_t xdr_SETACL4resfail(XDR *, SETACL4resfail*); extern bool_t xdr_SETACL4res(XDR *, SETACL4res*); #else /* K&R C */ extern bool_t xdr_uid(); extern bool_t xdr_o_mode(); extern bool_t xdr_aclent(); extern bool_t xdr_secattr(); extern bool_t xdr_GETACL2args(); extern bool_t xdr_GETACL2resok(); extern bool_t xdr_GETACL2res(); extern bool_t xdr_SETACL2args(); extern bool_t xdr_SETACL2resok(); extern bool_t xdr_SETACL2res(); extern bool_t xdr_GETATTR2args(); extern bool_t xdr_GETATTR2resok(); extern bool_t xdr_GETATTR2res(); extern bool_t xdr_ACCESS2args(); extern bool_t xdr_ACCESS2resok(); extern bool_t xdr_ACCESS2res(); extern bool_t xdr_GETXATTRDIR2args(); extern bool_t xdr_GETXATTRDIR2resok(); extern bool_t xdr_GETXATTRDIR2res(); extern bool_t xdr_GETACL3args(); extern bool_t xdr_GETACL3resok(); extern bool_t xdr_GETACL3resfail(); extern bool_t xdr_GETACL3res(); extern bool_t xdr_SETACL3args(); extern bool_t xdr_SETACL3resok(); extern bool_t xdr_SETACL3resfail(); extern bool_t xdr_SETACL3res(); extern bool_t xdr_GETXATTRDIR3args(); extern bool_t xdr_GETXATTRDIR3resok(); extern bool_t xdr_GETXATTRDIR3res(); extern bool_t xdr_GETACL4args(); extern bool_t xdr_GETACL4resok(); extern bool_t xdr_GETACL4resfail(); extern bool_t xdr_GETACL4res(); extern bool_t xdr_SETACL4args(); extern bool_t xdr_SETACL4resok(); extern bool_t xdr_SETACL4resfail(); extern bool_t xdr_SETACL4res(); #endif /* K&R C */ #ifdef __cplusplus } #endif #endif /* !_NFS_ACL_H_RPCGEN */ /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License, Version 1.0 only * (the "License"). You may not use this file except in compliance * with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright 1994,2001-2003 Sun Microsystems, Inc. * All rights reserved. * Use is subject to license terms. */ const NFS_ACL_MAX_ENTRIES = 1024; typedef int uid; typedef unsigned short o_mode; /* * This is the format of an ACL which is passed over the network. */ struct aclent { int type; uid id; o_mode perm; }; /* * The values for the type element of the aclent structure. */ const NA_USER_OBJ = 0x1; /* object owner */ const NA_USER = 0x2; /* additional users */ const NA_GROUP_OBJ = 0x4; /* owning group of the object */ const NA_GROUP = 0x8; /* additional groups */ const NA_CLASS_OBJ = 0x10; /* file group class and mask entry */ const NA_OTHER_OBJ = 0x20; /* other entry for the object */ const NA_ACL_DEFAULT = 0x1000; /* default flag */ /* * The bit field values for the perm element of the aclent * structure. The three values can be combined to form any * of the 8 combinations. */ const NA_READ = 0x4; /* read permission */ const NA_WRITE = 0x2; /* write permission */ const NA_EXEC = 0x1; /* exec permission */ /* * This is the structure which contains the ACL entries for a * particular entity. It contains the ACL entries which apply * to this object plus any default ACL entries which are * inherited by its children. * * The values for the mask field are defined below. */ struct secattr { u_int mask; int aclcnt; aclent aclent; int dfaclcnt; aclent dfaclent; }; /* * The values for the mask element of the secattr struct as well * as for the mask element in the arguments in the GETACL2 and * GETACL3 procedures. */ const NA_ACL = 0x1; /* aclent contains a valid list */ const NA_ACLCNT = 0x2; /* the number of entries in the aclent list */ const NA_DFACL = 0x4; /* dfaclent contains a valid list */ const NA_DFACLCNT = 0x8; /* the number of entries in the dfaclent list */ /* * This the definition for the GETACL procedure which applies to * NFS Version 2. */ struct GETACL2args { fhandle_t fh; u_int mask; }; struct GETACL2resok { struct nfsfattr attr; secattr acl; }; union GETACL2res switch (enum nfsstat status) { case ACL2_OK: GETACL2resok resok; default: void; }; /* * This is the definition for the SETACL procedure which applies * NFS Version 2. */ struct SETACL2args { fhandle_t fh; secattr acl; }; struct SETACL2resok { struct nfsfattr attr; }; union SETACL2res switch (enum nfsstat status) { case ACL2_OK: SETACL2resok resok; default: void; }; /* * This is the definition for the GETATTR procedure which can be * used as an alternative to the GETATTR in NFS Version 2. The * main difference between this GETATTR and the NFS GETATTR is * that this GETATTR returns the mode of the file without it being * changed to match the min/max permissions mapping that the NFS * Version 2 server does. */ struct GETATTR2args { fhandle_t fh; }; struct GETATTR2resok { struct nfsfattr attr; }; union GETATTR2res switch (enum nfsstat status) { case ACL2_OK: GETATTR2resok resok; default: void; }; /* * This is the definition for the ACCESS procedure which applies * to NFS Version 2. */ struct ACCESS2args { fhandle_t fh; uint32 access; }; /* * The following access permissions may be requested: */ const ACCESS2_READ = 0x1; /* read data or readdir a directory */ const ACCESS2_LOOKUP = 0x2; /* lookup a name in a directory */ const ACCESS2_MODIFY = 0x4; /* rewrite existing file data or */ /* modify existing directory entries */ const ACCESS2_EXTEND = 0x8; /* write new data or add directory entries */ const ACCESS2_DELETE = 0x10; /* delete existing directory entry */ const ACCESS2_EXECUTE = 0x20; /* execute file (no meaning for a directory) */ struct ACCESS2resok { struct nfsfattr attr; uint32 access; }; union ACCESS2res switch (enum nfsstat status) { case ACL2_OK: ACCESS2resok resok; default: void; }; /* * This is the definition for the GETXATTRDIR procedure which applies * to NFS Version 2 files. */ struct GETXATTRDIR2args { fhandle_t fh; bool create; }; struct GETXATTRDIR2resok { fhandle_t fh; struct nfsfattr attr; }; union GETXATTRDIR2res switch (enum nfsstat status) { case ACL2_OK: GETXATTRDIR2resok resok; default: void; }; /* * This is the definition for the GETACL procedure which applies * to NFS Version 3 files. */ struct GETACL3args { nfs_fh3 fh; u_int mask; }; struct GETACL3resok { post_op_attr attr; secattr acl; }; struct GETACL3resfail { post_op_attr attr; }; union GETACL3res switch (nfsstat3 status) { case ACL3_OK: GETACL3resok resok; default: GETACL3resfail resfail; }; /* * This is the definition for the SETACL procedure which applies * to NFS Version 3 files. */ struct SETACL3args { nfs_fh3 fh; secattr acl; }; struct SETACL3resok { post_op_attr attr; }; struct SETACL3resfail { post_op_attr attr; }; union SETACL3res switch (nfsstat3 status) { case ACL3_OK: SETACL3resok resok; default: SETACL3resfail resfail; }; /* * This is the definition for the GETXATTRDIR procedure which applies * to NFS Version 3 files. */ struct GETXATTRDIR3args { nfs_fh3 fh; bool create; }; struct GETXATTRDIR3resok { nfs_fh3 fh; post_op_attr attr; }; union GETXATTRDIR3res switch (nfsstat3 status) { case ACL3_OK: GETXATTRDIR3resok resok; default: void; }; /* * XXX { * This is a transitional interface to enable Solaris NFSv4 * clients to manipulate ACLs on Solaris servers until the * spec is complete enough to implement this inside the * NFSv4 protocol itself. NFSv4 does handle extended * attributes in-band. */ /* * This is the definition for the GETACL procedure which applies * to NFS Version 4 files. */ struct GETACL4args { nfs_fh4 fh; u_int mask; }; struct GETACL4resok { post_op_attr attr; secattr acl; }; struct GETACL4resfail { post_op_attr attr; }; union GETACL4res switch (nfsstat3 status) { case ACL4_OK: GETACL4resok resok; default: GETACL4resfail resfail; }; /* * This is the definition for the SETACL procedure which applies * to NFS Version 4 files. */ struct SETACL4args { nfs_fh4 fh; secattr acl; }; struct SETACL4resok { post_op_attr attr; }; struct SETACL4resfail { post_op_attr attr; }; union SETACL4res switch (nfsstat3 status) { case ACL4_OK: SETACL4resok resok; default: SETACL4resfail resfail; }; /* XXX } */ /* * Share the port with the NFS service. NFS has to be running * in order for this service to be useful anyway. */ const NFS_ACL_PORT = 2049; /* * This is the definition for the ACL network protocol which is used * to provide support for Solaris ACLs for files which are accessed * via NFS Version 2 and NFS Version 3. */ program NFS_ACL_PROGRAM { version NFS_ACL_V2 { void ACLPROC2_NULL(void) = 0; GETACL2res ACLPROC2_GETACL(GETACL2args) = 1; SETACL2res ACLPROC2_SETACL(SETACL2args) = 2; GETATTR2res ACLPROC2_GETATTR(GETATTR2args) = 3; ACCESS2res ACLPROC2_ACCESS(ACCESS2args) = 4; GETXATTRDIR2res ACLPROC2_GETXATTRDIR(GETXATTRDIR2args) = 5; } = 2; version NFS_ACL_V3 { void ACLPROC3_NULL(void) = 0; GETACL3res ACLPROC3_GETACL(GETACL3args) = 1; SETACL3res ACLPROC3_SETACL(SETACL3args) = 2; GETXATTRDIR3res ACLPROC3_GETXATTRDIR(GETXATTRDIR3args) = 3; } = 3; version NFS_ACL_V4 { void ACLPROC4_NULL(void) = 0; GETACL4res ACLPROC4_GETACL(GETACL4args) = 1; SETACL4res ACLPROC4_SETACL(SETACL4args) = 2; } = 4; } = 100227; /* * Please do not edit this file. * It was generated using rpcgen. */ #ifndef _NFS_PROT_H_RPCGEN #define _NFS_PROT_H_RPCGEN #include #ifdef __cplusplus extern "C" { #endif /* * Definitions for uint64, int64, uint32, and int32 */ #include #define NFS_PORT 2049 #define NFS_MAXDATA 8192 #define NFS_MAXPATHLEN 1024 #define NFS_MAXNAMLEN 255 #define NFS_FHSIZE 32 #define NFS_COOKIESIZE 4 #define NFS_FIFO_DEV -1 #define NFSMODE_FMT 0170000 #define NFSMODE_DIR 0040000 #define NFSMODE_CHR 0020000 #define NFSMODE_BLK 0060000 #define NFSMODE_REG 0100000 #define NFSMODE_LNK 0120000 #define NFSMODE_SOCK 0140000 #define NFSMODE_FIFO 0010000 enum nfsstat { NFS_OK = 0, NFSERR_PERM = 1, NFSERR_NOENT = 2, NFSERR_IO = 5, NFSERR_NXIO = 6, NFSERR_ACCES = 13, NFSERR_EXIST = 17, NFSERR_XDEV = 18, NFSERR_NODEV = 19, NFSERR_NOTDIR = 20, NFSERR_ISDIR = 21, NFSERR_INVAL = 22, NFSERR_FBIG = 27, NFSERR_NOSPC = 28, NFSERR_ROFS = 30, NFSERR_OPNOTSUPP = 45, NFSERR_NAMETOOLONG = 63, NFSERR_NOTEMPTY = 66, NFSERR_DQUOT = 69, NFSERR_STALE = 70, NFSERR_REMOTE = 71, NFSERR_WFLUSH = 72 }; typedef enum nfsstat nfsstat; enum ftype { NFNON = 0, NFREG = 1, NFDIR = 2, NFBLK = 3, NFCHR = 4, NFLNK = 5, NFSOCK = 6, NFBAD = 7, NFFIFO = 8 }; typedef enum ftype ftype; struct nfs_fh { char data[NFS_FHSIZE]; }; typedef struct nfs_fh nfs_fh; struct nfstime { u_int seconds; u_int useconds; }; typedef struct nfstime nfstime; struct fattr { ftype type; u_int mode; u_int nlink; u_int uid; u_int gid; u_int size; u_int blocksize; u_int rdev; u_int blocks; u_int fsid; u_int fileid; nfstime atime; nfstime mtime; nfstime ctime; }; typedef struct fattr fattr; struct sattr { u_int mode; u_int uid; u_int gid; u_int size; nfstime atime; nfstime mtime; }; typedef struct sattr sattr; typedef char *filename; typedef char *nfspath; struct attrstat { nfsstat status; union { fattr attributes; } attrstat_u; }; typedef struct attrstat attrstat; struct sattrargs { nfs_fh file; sattr attributes; }; typedef struct sattrargs sattrargs; struct diropargs { nfs_fh dir; filename name; }; typedef struct diropargs diropargs; struct diropokres { nfs_fh file; fattr attributes; }; typedef struct diropokres diropokres; struct diropres { nfsstat status; union { diropokres diropres; } diropres_u; }; typedef struct diropres diropres; struct readlinkres { nfsstat status; union { nfspath data; } readlinkres_u; }; typedef struct readlinkres readlinkres; struct readargs { nfs_fh file; u_int offset; u_int count; u_int totalcount; }; typedef struct readargs readargs; struct readokres { fattr attributes; struct { u_int data_len; char *data_val; } data; }; typedef struct readokres readokres; struct readres { nfsstat status; union { readokres reply; } readres_u; }; typedef struct readres readres; struct writeargs { nfs_fh file; u_int beginoffset; u_int offset; u_int totalcount; struct { u_int data_len; char *data_val; } data; }; typedef struct writeargs writeargs; struct createargs { diropargs where; sattr attributes; }; typedef struct createargs createargs; struct renameargs { diropargs from; diropargs to; }; typedef struct renameargs renameargs; struct linkargs { nfs_fh from; diropargs to; }; typedef struct linkargs linkargs; struct symlinkargs { diropargs from; nfspath to; sattr attributes; }; typedef struct symlinkargs symlinkargs; typedef char nfscookie[NFS_COOKIESIZE]; struct readdirargs { nfs_fh dir; nfscookie cookie; u_int count; }; typedef struct readdirargs readdirargs; struct entry { u_int fileid; filename name; nfscookie cookie; struct entry *nextentry; }; typedef struct entry entry; struct dirlist { entry *entries; bool_t eof; }; typedef struct dirlist dirlist; struct readdirres { nfsstat status; union { dirlist reply; } readdirres_u; }; typedef struct readdirres readdirres; struct statfsokres { u_int tsize; u_int bsize; u_int blocks; u_int bfree; u_int bavail; }; typedef struct statfsokres statfsokres; struct statfsres { nfsstat status; union { statfsokres reply; } statfsres_u; }; typedef struct statfsres statfsres; #define NFS3_FHSIZE 64 #define NFS3_COOKIEVERFSIZE 8 #define NFS3_CREATEVERFSIZE 8 #define NFS3_WRITEVERFSIZE 8 typedef char *filename3; typedef char *nfspath3; typedef uint64 fileid3; typedef uint64 cookie3; typedef char cookieverf3[NFS3_COOKIEVERFSIZE]; typedef char createverf3[NFS3_CREATEVERFSIZE]; typedef char writeverf3[NFS3_WRITEVERFSIZE]; typedef uint32 uid3; typedef uint32 gid3; typedef uint64 size3; typedef uint64 offset3; typedef uint32 mode3; typedef uint32 count3; enum nfsstat3 { NFS3_OK = 0, NFS3ERR_PERM = 1, NFS3ERR_NOENT = 2, NFS3ERR_IO = 5, NFS3ERR_NXIO = 6, NFS3ERR_ACCES = 13, NFS3ERR_EXIST = 17, NFS3ERR_XDEV = 18, NFS3ERR_NODEV = 19, NFS3ERR_NOTDIR = 20, NFS3ERR_ISDIR = 21, NFS3ERR_INVAL = 22, NFS3ERR_FBIG = 27, NFS3ERR_NOSPC = 28, NFS3ERR_ROFS = 30, NFS3ERR_MLINK = 31, NFS3ERR_NAMETOOLONG = 63, NFS3ERR_NOTEMPTY = 66, NFS3ERR_DQUOT = 69, NFS3ERR_STALE = 70, NFS3ERR_REMOTE = 71, NFS3ERR_BADHANDLE = 10001, NFS3ERR_NOT_SYNC = 10002, NFS3ERR_BAD_COOKIE = 10003, NFS3ERR_NOTSUPP = 10004, NFS3ERR_TOOSMALL = 10005, NFS3ERR_SERVERFAULT = 10006, NFS3ERR_BADTYPE = 10007, NFS3ERR_JUKEBOX = 10008 }; typedef enum nfsstat3 nfsstat3; enum ftype3 { NF3REG = 1, NF3DIR = 2, NF3BLK = 3, NF3CHR = 4, NF3LNK = 5, NF3SOCK = 6, NF3FIFO = 7 }; typedef enum ftype3 ftype3; struct specdata3 { uint32 specdata1; uint32 specdata2; }; typedef struct specdata3 specdata3; struct nfs_fh3 { struct { u_int data_len; char *data_val; } data; }; typedef struct nfs_fh3 nfs_fh3; struct nfstime3 { uint32 seconds; uint32 nseconds; }; typedef struct nfstime3 nfstime3; struct fattr3 { ftype3 type; mode3 mode; uint32 nlink; uid3 uid; gid3 gid; size3 size; size3 used; specdata3 rdev; uint64 fsid; fileid3 fileid; nfstime3 atime; nfstime3 mtime; nfstime3 ctime; }; typedef struct fattr3 fattr3; struct post_op_attr { bool_t attributes_follow; union { fattr3 attributes; } post_op_attr_u; }; typedef struct post_op_attr post_op_attr; struct wcc_attr { size3 size; nfstime3 mtime; nfstime3 ctime; }; typedef struct wcc_attr wcc_attr; struct pre_op_attr { bool_t attributes_follow; union { wcc_attr attributes; } pre_op_attr_u; }; typedef struct pre_op_attr pre_op_attr; struct wcc_data { pre_op_attr before; post_op_attr after; }; typedef struct wcc_data wcc_data; struct post_op_fh3 { bool_t handle_follows; union { nfs_fh3 handle; } post_op_fh3_u; }; typedef struct post_op_fh3 post_op_fh3; enum time_how { DONT_CHANGE = 0, SET_TO_SERVER_TIME = 1, SET_TO_CLIENT_TIME = 2 }; typedef enum time_how time_how; struct set_mode3 { bool_t set_it; union { mode3 mode; } set_mode3_u; }; typedef struct set_mode3 set_mode3; struct set_uid3 { bool_t set_it; union { uid3 uid; } set_uid3_u; }; typedef struct set_uid3 set_uid3; struct set_gid3 { bool_t set_it; union { gid3 gid; } set_gid3_u; }; typedef struct set_gid3 set_gid3; struct set_size3 { bool_t set_it; union { size3 size; } set_size3_u; }; typedef struct set_size3 set_size3; struct set_atime { time_how set_it; union { nfstime3 atime; } set_atime_u; }; typedef struct set_atime set_atime; struct set_mtime { time_how set_it; union { nfstime3 mtime; } set_mtime_u; }; typedef struct set_mtime set_mtime; struct sattr3 { set_mode3 mode; set_uid3 uid; set_gid3 gid; set_size3 size; set_atime atime; set_mtime mtime; }; typedef struct sattr3 sattr3; struct diropargs3 { nfs_fh3 dir; filename3 name; }; typedef struct diropargs3 diropargs3; struct GETATTR3args { nfs_fh3 object; }; typedef struct GETATTR3args GETATTR3args; struct GETATTR3resok { fattr3 obj_attributes; }; typedef struct GETATTR3resok GETATTR3resok; struct GETATTR3res { nfsstat3 status; union { GETATTR3resok resok; } GETATTR3res_u; }; typedef struct GETATTR3res GETATTR3res; struct sattrguard3 { bool_t check; union { nfstime3 obj_ctime; } sattrguard3_u; }; typedef struct sattrguard3 sattrguard3; struct SETATTR3args { nfs_fh3 object; sattr3 new_attributes; sattrguard3 guard; }; typedef struct SETATTR3args SETATTR3args; struct SETATTR3resok { wcc_data obj_wcc; }; typedef struct SETATTR3resok SETATTR3resok; struct SETATTR3resfail { wcc_data obj_wcc; }; typedef struct SETATTR3resfail SETATTR3resfail; struct SETATTR3res { nfsstat3 status; union { SETATTR3resok resok; SETATTR3resfail resfail; } SETATTR3res_u; }; typedef struct SETATTR3res SETATTR3res; struct LOOKUP3args { diropargs3 what; }; typedef struct LOOKUP3args LOOKUP3args; struct LOOKUP3resok { nfs_fh3 object; post_op_attr obj_attributes; post_op_attr dir_attributes; }; typedef struct LOOKUP3resok LOOKUP3resok; struct LOOKUP3resfail { post_op_attr dir_attributes; }; typedef struct LOOKUP3resfail LOOKUP3resfail; struct LOOKUP3res { nfsstat3 status; union { LOOKUP3resok resok; LOOKUP3resfail resfail; } LOOKUP3res_u; }; typedef struct LOOKUP3res LOOKUP3res; #define ACCESS3_READ 0x0001 #define ACCESS3_LOOKUP 0x0002 #define ACCESS3_MODIFY 0x0004 #define ACCESS3_EXTEND 0x0008 #define ACCESS3_DELETE 0x0010 #define ACCESS3_EXECUTE 0x0020 struct ACCESS3args { nfs_fh3 object; uint32 access; }; typedef struct ACCESS3args ACCESS3args; struct ACCESS3resok { post_op_attr obj_attributes; uint32 access; }; typedef struct ACCESS3resok ACCESS3resok; struct ACCESS3resfail { post_op_attr obj_attributes; }; typedef struct ACCESS3resfail ACCESS3resfail; struct ACCESS3res { nfsstat3 status; union { ACCESS3resok resok; ACCESS3resfail resfail; } ACCESS3res_u; }; typedef struct ACCESS3res ACCESS3res; struct READLINK3args { nfs_fh3 symlink; }; typedef struct READLINK3args READLINK3args; struct READLINK3resok { post_op_attr symlink_attributes; nfspath3 data; }; typedef struct READLINK3resok READLINK3resok; struct READLINK3resfail { post_op_attr symlink_attributes; }; typedef struct READLINK3resfail READLINK3resfail; struct READLINK3res { nfsstat3 status; union { READLINK3resok resok; READLINK3resfail resfail; } READLINK3res_u; }; typedef struct READLINK3res READLINK3res; struct READ3args { nfs_fh3 file; offset3 offset; count3 count; }; typedef struct READ3args READ3args; struct READ3resok { post_op_attr file_attributes; count3 count; bool_t eof; struct { u_int data_len; char *data_val; } data; }; typedef struct READ3resok READ3resok; struct READ3resfail { post_op_attr file_attributes; }; typedef struct READ3resfail READ3resfail; struct READ3res { nfsstat3 status; union { READ3resok resok; READ3resfail resfail; } READ3res_u; }; typedef struct READ3res READ3res; enum stable_how { UNSTABLE = 0, DATA_SYNC = 1, FILE_SYNC = 2 }; typedef enum stable_how stable_how; struct WRITE3args { nfs_fh3 file; offset3 offset; count3 count; stable_how stable; struct { u_int data_len; char *data_val; } data; }; typedef struct WRITE3args WRITE3args; struct WRITE3resok { wcc_data file_wcc; count3 count; stable_how committed; writeverf3 verf; }; typedef struct WRITE3resok WRITE3resok; struct WRITE3resfail { wcc_data file_wcc; }; typedef struct WRITE3resfail WRITE3resfail; struct WRITE3res { nfsstat3 status; union { WRITE3resok resok; WRITE3resfail resfail; } WRITE3res_u; }; typedef struct WRITE3res WRITE3res; enum createmode3 { UNCHECKED = 0, GUARDED = 1, EXCLUSIVE = 2 }; typedef enum createmode3 createmode3; struct createhow3 { createmode3 mode; union { sattr3 obj_attributes; createverf3 verf; } createhow3_u; }; typedef struct createhow3 createhow3; struct CREATE3args { diropargs3 where; createhow3 how; }; typedef struct CREATE3args CREATE3args; struct CREATE3resok { post_op_fh3 obj; post_op_attr obj_attributes; wcc_data dir_wcc; }; typedef struct CREATE3resok CREATE3resok; struct CREATE3resfail { wcc_data dir_wcc; }; typedef struct CREATE3resfail CREATE3resfail; struct CREATE3res { nfsstat3 status; union { CREATE3resok resok; CREATE3resfail resfail; } CREATE3res_u; }; typedef struct CREATE3res CREATE3res; struct MKDIR3args { diropargs3 where; sattr3 attributes; }; typedef struct MKDIR3args MKDIR3args; struct MKDIR3resok { post_op_fh3 obj; post_op_attr obj_attributes; wcc_data dir_wcc; }; typedef struct MKDIR3resok MKDIR3resok; struct MKDIR3resfail { wcc_data dir_wcc; }; typedef struct MKDIR3resfail MKDIR3resfail; struct MKDIR3res { nfsstat3 status; union { MKDIR3resok resok; MKDIR3resfail resfail; } MKDIR3res_u; }; typedef struct MKDIR3res MKDIR3res; struct symlinkdata3 { sattr3 symlink_attributes; nfspath3 symlink_data; }; typedef struct symlinkdata3 symlinkdata3; struct SYMLINK3args { diropargs3 where; symlinkdata3 symlink; }; typedef struct SYMLINK3args SYMLINK3args; struct SYMLINK3resok { post_op_fh3 obj; post_op_attr obj_attributes; wcc_data dir_wcc; }; typedef struct SYMLINK3resok SYMLINK3resok; struct SYMLINK3resfail { wcc_data dir_wcc; }; typedef struct SYMLINK3resfail SYMLINK3resfail; struct SYMLINK3res { nfsstat3 status; union { SYMLINK3resok resok; SYMLINK3resfail resfail; } SYMLINK3res_u; }; typedef struct SYMLINK3res SYMLINK3res; struct devicedata3 { sattr3 dev_attributes; specdata3 spec; }; typedef struct devicedata3 devicedata3; struct mknoddata3 { ftype3 type; union { devicedata3 device; sattr3 pipe_attributes; } mknoddata3_u; }; typedef struct mknoddata3 mknoddata3; struct MKNOD3args { diropargs3 where; mknoddata3 what; }; typedef struct MKNOD3args MKNOD3args; struct MKNOD3resok { post_op_fh3 obj; post_op_attr obj_attributes; wcc_data dir_wcc; }; typedef struct MKNOD3resok MKNOD3resok; struct MKNOD3resfail { wcc_data dir_wcc; }; typedef struct MKNOD3resfail MKNOD3resfail; struct MKNOD3res { nfsstat3 status; union { MKNOD3resok resok; MKNOD3resfail resfail; } MKNOD3res_u; }; typedef struct MKNOD3res MKNOD3res; struct REMOVE3args { diropargs3 object; }; typedef struct REMOVE3args REMOVE3args; struct REMOVE3resok { wcc_data dir_wcc; }; typedef struct REMOVE3resok REMOVE3resok; struct REMOVE3resfail { wcc_data dir_wcc; }; typedef struct REMOVE3resfail REMOVE3resfail; struct REMOVE3res { nfsstat3 status; union { REMOVE3resok resok; REMOVE3resfail resfail; } REMOVE3res_u; }; typedef struct REMOVE3res REMOVE3res; struct RMDIR3args { diropargs3 object; }; typedef struct RMDIR3args RMDIR3args; struct RMDIR3resok { wcc_data dir_wcc; }; typedef struct RMDIR3resok RMDIR3resok; struct RMDIR3resfail { wcc_data dir_wcc; }; typedef struct RMDIR3resfail RMDIR3resfail; struct RMDIR3res { nfsstat3 status; union { RMDIR3resok resok; RMDIR3resfail resfail; } RMDIR3res_u; }; typedef struct RMDIR3res RMDIR3res; struct RENAME3args { diropargs3 from; diropargs3 to; }; typedef struct RENAME3args RENAME3args; struct RENAME3resok { wcc_data fromdir_wcc; wcc_data todir_wcc; }; typedef struct RENAME3resok RENAME3resok; struct RENAME3resfail { wcc_data fromdir_wcc; wcc_data todir_wcc; }; typedef struct RENAME3resfail RENAME3resfail; struct RENAME3res { nfsstat3 status; union { RENAME3resok resok; RENAME3resfail resfail; } RENAME3res_u; }; typedef struct RENAME3res RENAME3res; struct LINK3args { nfs_fh3 file; diropargs3 link; }; typedef struct LINK3args LINK3args; struct LINK3resok { post_op_attr file_attributes; wcc_data linkdir_wcc; }; typedef struct LINK3resok LINK3resok; struct LINK3resfail { post_op_attr file_attributes; wcc_data linkdir_wcc; }; typedef struct LINK3resfail LINK3resfail; struct LINK3res { nfsstat3 status; union { LINK3resok resok; LINK3resfail resfail; } LINK3res_u; }; typedef struct LINK3res LINK3res; struct READDIR3args { nfs_fh3 dir; cookie3 cookie; cookieverf3 cookieverf; count3 count; }; typedef struct READDIR3args READDIR3args; struct entry3 { fileid3 fileid; filename3 name; cookie3 cookie; struct entry3 *nextentry; }; typedef struct entry3 entry3; struct dirlist3 { entry3 *entries; bool_t eof; }; typedef struct dirlist3 dirlist3; struct READDIR3resok { post_op_attr dir_attributes; cookieverf3 cookieverf; dirlist3 reply; }; typedef struct READDIR3resok READDIR3resok; struct READDIR3resfail { post_op_attr dir_attributes; }; typedef struct READDIR3resfail READDIR3resfail; struct READDIR3res { nfsstat3 status; union { READDIR3resok resok; READDIR3resfail resfail; } READDIR3res_u; }; typedef struct READDIR3res READDIR3res; struct READDIRPLUS3args { nfs_fh3 dir; cookie3 cookie; cookieverf3 cookieverf; count3 dircount; count3 maxcount; }; typedef struct READDIRPLUS3args READDIRPLUS3args; struct entryplus3 { fileid3 fileid; filename3 name; cookie3 cookie; post_op_attr name_attributes; post_op_fh3 name_handle; struct entryplus3 *nextentry; }; typedef struct entryplus3 entryplus3; struct dirlistplus3 { entryplus3 *entries; bool_t eof; }; typedef struct dirlistplus3 dirlistplus3; struct READDIRPLUS3resok { post_op_attr dir_attributes; cookieverf3 cookieverf; dirlistplus3 reply; }; typedef struct READDIRPLUS3resok READDIRPLUS3resok; struct READDIRPLUS3resfail { post_op_attr dir_attributes; }; typedef struct READDIRPLUS3resfail READDIRPLUS3resfail; struct READDIRPLUS3res { nfsstat3 status; union { READDIRPLUS3resok resok; READDIRPLUS3resfail resfail; } READDIRPLUS3res_u; }; typedef struct READDIRPLUS3res READDIRPLUS3res; struct FSSTAT3args { nfs_fh3 fsroot; }; typedef struct FSSTAT3args FSSTAT3args; struct FSSTAT3resok { post_op_attr obj_attributes; size3 tbytes; size3 fbytes; size3 abytes; size3 tfiles; size3 ffiles; size3 afiles; uint32 invarsec; }; typedef struct FSSTAT3resok FSSTAT3resok; struct FSSTAT3resfail { post_op_attr obj_attributes; }; typedef struct FSSTAT3resfail FSSTAT3resfail; struct FSSTAT3res { nfsstat3 status; union { FSSTAT3resok resok; FSSTAT3resfail resfail; } FSSTAT3res_u; }; typedef struct FSSTAT3res FSSTAT3res; #define FSF3_LINK 0x0001 #define FSF3_SYMLINK 0x0002 #define FSF3_HOMOGENEOUS 0x0008 #define FSF3_CANSETTIME 0x0010 struct FSINFO3args { nfs_fh3 fsroot; }; typedef struct FSINFO3args FSINFO3args; struct FSINFO3resok { post_op_attr obj_attributes; uint32 rtmax; uint32 rtpref; uint32 rtmult; uint32 wtmax; uint32 wtpref; uint32 wtmult; uint32 dtpref; size3 maxfilesize; nfstime3 time_delta; uint32 properties; }; typedef struct FSINFO3resok FSINFO3resok; struct FSINFO3resfail { post_op_attr obj_attributes; }; typedef struct FSINFO3resfail FSINFO3resfail; struct FSINFO3res { nfsstat3 status; union { FSINFO3resok resok; FSINFO3resfail resfail; } FSINFO3res_u; }; typedef struct FSINFO3res FSINFO3res; struct PATHCONF3args { nfs_fh3 object; }; typedef struct PATHCONF3args PATHCONF3args; struct PATHCONF3resok { post_op_attr obj_attributes; uint32 linkmax; uint32 name_max; bool_t no_trunc; bool_t chown_restricted; bool_t case_insensitive; bool_t case_preserving; }; typedef struct PATHCONF3resok PATHCONF3resok; struct PATHCONF3resfail { post_op_attr obj_attributes; }; typedef struct PATHCONF3resfail PATHCONF3resfail; struct PATHCONF3res { nfsstat3 status; union { PATHCONF3resok resok; PATHCONF3resfail resfail; } PATHCONF3res_u; }; typedef struct PATHCONF3res PATHCONF3res; struct COMMIT3args { nfs_fh3 file; offset3 offset; count3 count; }; typedef struct COMMIT3args COMMIT3args; struct COMMIT3resok { wcc_data file_wcc; writeverf3 verf; }; typedef struct COMMIT3resok COMMIT3resok; struct COMMIT3resfail { wcc_data file_wcc; }; typedef struct COMMIT3resfail COMMIT3resfail; struct COMMIT3res { nfsstat3 status; union { COMMIT3resok resok; COMMIT3resfail resfail; } COMMIT3res_u; }; typedef struct COMMIT3res COMMIT3res; #define NFS_PROGRAM 100003 #define NFS_VERSION 2 #if defined(__STDC__) || defined(__cplusplus) #define NFSPROC_NULL 0 extern void * nfsproc_null_2(void *, CLIENT *); extern void * nfsproc_null_2_svc(void *, struct svc_req *); #define NFSPROC_GETATTR 1 extern attrstat * nfsproc_getattr_2(nfs_fh *, CLIENT *); extern attrstat * nfsproc_getattr_2_svc(nfs_fh *, struct svc_req *); #define NFSPROC_SETATTR 2 extern attrstat * nfsproc_setattr_2(sattrargs *, CLIENT *); extern attrstat * nfsproc_setattr_2_svc(sattrargs *, struct svc_req *); #define NFSPROC_ROOT 3 extern void * nfsproc_root_2(void *, CLIENT *); extern void * nfsproc_root_2_svc(void *, struct svc_req *); #define NFSPROC_LOOKUP 4 extern diropres * nfsproc_lookup_2(diropargs *, CLIENT *); extern diropres * nfsproc_lookup_2_svc(diropargs *, struct svc_req *); #define NFSPROC_READLINK 5 extern readlinkres * nfsproc_readlink_2(nfs_fh *, CLIENT *); extern readlinkres * nfsproc_readlink_2_svc(nfs_fh *, struct svc_req *); #define NFSPROC_READ 6 extern readres * nfsproc_read_2(readargs *, CLIENT *); extern readres * nfsproc_read_2_svc(readargs *, struct svc_req *); #define NFSPROC_WRITECACHE 7 extern void * nfsproc_writecache_2(void *, CLIENT *); extern void * nfsproc_writecache_2_svc(void *, struct svc_req *); #define NFSPROC_WRITE 8 extern attrstat * nfsproc_write_2(writeargs *, CLIENT *); extern attrstat * nfsproc_write_2_svc(writeargs *, struct svc_req *); #define NFSPROC_CREATE 9 extern diropres * nfsproc_create_2(createargs *, CLIENT *); extern diropres * nfsproc_create_2_svc(createargs *, struct svc_req *); #define NFSPROC_REMOVE 10 extern nfsstat * nfsproc_remove_2(diropargs *, CLIENT *); extern nfsstat * nfsproc_remove_2_svc(diropargs *, struct svc_req *); #define NFSPROC_RENAME 11 extern nfsstat * nfsproc_rename_2(renameargs *, CLIENT *); extern nfsstat * nfsproc_rename_2_svc(renameargs *, struct svc_req *); #define NFSPROC_LINK 12 extern nfsstat * nfsproc_link_2(linkargs *, CLIENT *); extern nfsstat * nfsproc_link_2_svc(linkargs *, struct svc_req *); #define NFSPROC_SYMLINK 13 extern nfsstat * nfsproc_symlink_2(symlinkargs *, CLIENT *); extern nfsstat * nfsproc_symlink_2_svc(symlinkargs *, struct svc_req *); #define NFSPROC_MKDIR 14 extern diropres * nfsproc_mkdir_2(createargs *, CLIENT *); extern diropres * nfsproc_mkdir_2_svc(createargs *, struct svc_req *); #define NFSPROC_RMDIR 15 extern nfsstat * nfsproc_rmdir_2(diropargs *, CLIENT *); extern nfsstat * nfsproc_rmdir_2_svc(diropargs *, struct svc_req *); #define NFSPROC_READDIR 16 extern readdirres * nfsproc_readdir_2(readdirargs *, CLIENT *); extern readdirres * nfsproc_readdir_2_svc(readdirargs *, struct svc_req *); #define NFSPROC_STATFS 17 extern statfsres * nfsproc_statfs_2(nfs_fh *, CLIENT *); extern statfsres * nfsproc_statfs_2_svc(nfs_fh *, struct svc_req *); extern int nfs_program_2_freeresult(SVCXPRT *, xdrproc_t, caddr_t); #else /* K&R C */ #define NFSPROC_NULL 0 extern void * nfsproc_null_2(); extern void * nfsproc_null_2_svc(); #define NFSPROC_GETATTR 1 extern attrstat * nfsproc_getattr_2(); extern attrstat * nfsproc_getattr_2_svc(); #define NFSPROC_SETATTR 2 extern attrstat * nfsproc_setattr_2(); extern attrstat * nfsproc_setattr_2_svc(); #define NFSPROC_ROOT 3 extern void * nfsproc_root_2(); extern void * nfsproc_root_2_svc(); #define NFSPROC_LOOKUP 4 extern diropres * nfsproc_lookup_2(); extern diropres * nfsproc_lookup_2_svc(); #define NFSPROC_READLINK 5 extern readlinkres * nfsproc_readlink_2(); extern readlinkres * nfsproc_readlink_2_svc(); #define NFSPROC_READ 6 extern readres * nfsproc_read_2(); extern readres * nfsproc_read_2_svc(); #define NFSPROC_WRITECACHE 7 extern void * nfsproc_writecache_2(); extern void * nfsproc_writecache_2_svc(); #define NFSPROC_WRITE 8 extern attrstat * nfsproc_write_2(); extern attrstat * nfsproc_write_2_svc(); #define NFSPROC_CREATE 9 extern diropres * nfsproc_create_2(); extern diropres * nfsproc_create_2_svc(); #define NFSPROC_REMOVE 10 extern nfsstat * nfsproc_remove_2(); extern nfsstat * nfsproc_remove_2_svc(); #define NFSPROC_RENAME 11 extern nfsstat * nfsproc_rename_2(); extern nfsstat * nfsproc_rename_2_svc(); #define NFSPROC_LINK 12 extern nfsstat * nfsproc_link_2(); extern nfsstat * nfsproc_link_2_svc(); #define NFSPROC_SYMLINK 13 extern nfsstat * nfsproc_symlink_2(); extern nfsstat * nfsproc_symlink_2_svc(); #define NFSPROC_MKDIR 14 extern diropres * nfsproc_mkdir_2(); extern diropres * nfsproc_mkdir_2_svc(); #define NFSPROC_RMDIR 15 extern nfsstat * nfsproc_rmdir_2(); extern nfsstat * nfsproc_rmdir_2_svc(); #define NFSPROC_READDIR 16 extern readdirres * nfsproc_readdir_2(); extern readdirres * nfsproc_readdir_2_svc(); #define NFSPROC_STATFS 17 extern statfsres * nfsproc_statfs_2(); extern statfsres * nfsproc_statfs_2_svc(); extern int nfs_program_2_freeresult(); #endif /* K&R C */ #define NFS3_PROGRAM 100003 #define NFS_V3 3 #if defined(__STDC__) || defined(__cplusplus) #define NFSPROC3_NULL 0 extern void * nfsproc3_null_3(void *, CLIENT *); extern void * nfsproc3_null_3_svc(void *, struct svc_req *); #define NFSPROC3_GETATTR 1 extern GETATTR3res * nfsproc3_getattr_3(GETATTR3args *, CLIENT *); extern GETATTR3res * nfsproc3_getattr_3_svc(GETATTR3args *, struct svc_req *); #define NFSPROC3_SETATTR 2 extern SETATTR3res * nfsproc3_setattr_3(SETATTR3args *, CLIENT *); extern SETATTR3res * nfsproc3_setattr_3_svc(SETATTR3args *, struct svc_req *); #define NFSPROC3_LOOKUP 3 extern LOOKUP3res * nfsproc3_lookup_3(LOOKUP3args *, CLIENT *); extern LOOKUP3res * nfsproc3_lookup_3_svc(LOOKUP3args *, struct svc_req *); #define NFSPROC3_ACCESS 4 extern ACCESS3res * nfsproc3_access_3(ACCESS3args *, CLIENT *); extern ACCESS3res * nfsproc3_access_3_svc(ACCESS3args *, struct svc_req *); #define NFSPROC3_READLINK 5 extern READLINK3res * nfsproc3_readlink_3(READLINK3args *, CLIENT *); extern READLINK3res * nfsproc3_readlink_3_svc(READLINK3args *, struct svc_req *); #define NFSPROC3_READ 6 extern READ3res * nfsproc3_read_3(READ3args *, CLIENT *); extern READ3res * nfsproc3_read_3_svc(READ3args *, struct svc_req *); #define NFSPROC3_WRITE 7 extern WRITE3res * nfsproc3_write_3(WRITE3args *, CLIENT *); extern WRITE3res * nfsproc3_write_3_svc(WRITE3args *, struct svc_req *); #define NFSPROC3_CREATE 8 extern CREATE3res * nfsproc3_create_3(CREATE3args *, CLIENT *); extern CREATE3res * nfsproc3_create_3_svc(CREATE3args *, struct svc_req *); #define NFSPROC3_MKDIR 9 extern MKDIR3res * nfsproc3_mkdir_3(MKDIR3args *, CLIENT *); extern MKDIR3res * nfsproc3_mkdir_3_svc(MKDIR3args *, struct svc_req *); #define NFSPROC3_SYMLINK 10 extern SYMLINK3res * nfsproc3_symlink_3(SYMLINK3args *, CLIENT *); extern SYMLINK3res * nfsproc3_symlink_3_svc(SYMLINK3args *, struct svc_req *); #define NFSPROC3_MKNOD 11 extern MKNOD3res * nfsproc3_mknod_3(MKNOD3args *, CLIENT *); extern MKNOD3res * nfsproc3_mknod_3_svc(MKNOD3args *, struct svc_req *); #define NFSPROC3_REMOVE 12 extern REMOVE3res * nfsproc3_remove_3(REMOVE3args *, CLIENT *); extern REMOVE3res * nfsproc3_remove_3_svc(REMOVE3args *, struct svc_req *); #define NFSPROC3_RMDIR 13 extern RMDIR3res * nfsproc3_rmdir_3(RMDIR3args *, CLIENT *); extern RMDIR3res * nfsproc3_rmdir_3_svc(RMDIR3args *, struct svc_req *); #define NFSPROC3_RENAME 14 extern RENAME3res * nfsproc3_rename_3(RENAME3args *, CLIENT *); extern RENAME3res * nfsproc3_rename_3_svc(RENAME3args *, struct svc_req *); #define NFSPROC3_LINK 15 extern LINK3res * nfsproc3_link_3(LINK3args *, CLIENT *); extern LINK3res * nfsproc3_link_3_svc(LINK3args *, struct svc_req *); #define NFSPROC3_READDIR 16 extern READDIR3res * nfsproc3_readdir_3(READDIR3args *, CLIENT *); extern READDIR3res * nfsproc3_readdir_3_svc(READDIR3args *, struct svc_req *); #define NFSPROC3_READDIRPLUS 17 extern READDIRPLUS3res * nfsproc3_readdirplus_3(READDIRPLUS3args *, CLIENT *); extern READDIRPLUS3res * nfsproc3_readdirplus_3_svc(READDIRPLUS3args *, struct svc_req *); #define NFSPROC3_FSSTAT 18 extern FSSTAT3res * nfsproc3_fsstat_3(FSSTAT3args *, CLIENT *); extern FSSTAT3res * nfsproc3_fsstat_3_svc(FSSTAT3args *, struct svc_req *); #define NFSPROC3_FSINFO 19 extern FSINFO3res * nfsproc3_fsinfo_3(FSINFO3args *, CLIENT *); extern FSINFO3res * nfsproc3_fsinfo_3_svc(FSINFO3args *, struct svc_req *); #define NFSPROC3_PATHCONF 20 extern PATHCONF3res * nfsproc3_pathconf_3(PATHCONF3args *, CLIENT *); extern PATHCONF3res * nfsproc3_pathconf_3_svc(PATHCONF3args *, struct svc_req *); #define NFSPROC3_COMMIT 21 extern COMMIT3res * nfsproc3_commit_3(COMMIT3args *, CLIENT *); extern COMMIT3res * nfsproc3_commit_3_svc(COMMIT3args *, struct svc_req *); extern int nfs3_program_3_freeresult(SVCXPRT *, xdrproc_t, caddr_t); #else /* K&R C */ #define NFSPROC3_NULL 0 extern void * nfsproc3_null_3(); extern void * nfsproc3_null_3_svc(); #define NFSPROC3_GETATTR 1 extern GETATTR3res * nfsproc3_getattr_3(); extern GETATTR3res * nfsproc3_getattr_3_svc(); #define NFSPROC3_SETATTR 2 extern SETATTR3res * nfsproc3_setattr_3(); extern SETATTR3res * nfsproc3_setattr_3_svc(); #define NFSPROC3_LOOKUP 3 extern LOOKUP3res * nfsproc3_lookup_3(); extern LOOKUP3res * nfsproc3_lookup_3_svc(); #define NFSPROC3_ACCESS 4 extern ACCESS3res * nfsproc3_access_3(); extern ACCESS3res * nfsproc3_access_3_svc(); #define NFSPROC3_READLINK 5 extern READLINK3res * nfsproc3_readlink_3(); extern READLINK3res * nfsproc3_readlink_3_svc(); #define NFSPROC3_READ 6 extern READ3res * nfsproc3_read_3(); extern READ3res * nfsproc3_read_3_svc(); #define NFSPROC3_WRITE 7 extern WRITE3res * nfsproc3_write_3(); extern WRITE3res * nfsproc3_write_3_svc(); #define NFSPROC3_CREATE 8 extern CREATE3res * nfsproc3_create_3(); extern CREATE3res * nfsproc3_create_3_svc(); #define NFSPROC3_MKDIR 9 extern MKDIR3res * nfsproc3_mkdir_3(); extern MKDIR3res * nfsproc3_mkdir_3_svc(); #define NFSPROC3_SYMLINK 10 extern SYMLINK3res * nfsproc3_symlink_3(); extern SYMLINK3res * nfsproc3_symlink_3_svc(); #define NFSPROC3_MKNOD 11 extern MKNOD3res * nfsproc3_mknod_3(); extern MKNOD3res * nfsproc3_mknod_3_svc(); #define NFSPROC3_REMOVE 12 extern REMOVE3res * nfsproc3_remove_3(); extern REMOVE3res * nfsproc3_remove_3_svc(); #define NFSPROC3_RMDIR 13 extern RMDIR3res * nfsproc3_rmdir_3(); extern RMDIR3res * nfsproc3_rmdir_3_svc(); #define NFSPROC3_RENAME 14 extern RENAME3res * nfsproc3_rename_3(); extern RENAME3res * nfsproc3_rename_3_svc(); #define NFSPROC3_LINK 15 extern LINK3res * nfsproc3_link_3(); extern LINK3res * nfsproc3_link_3_svc(); #define NFSPROC3_READDIR 16 extern READDIR3res * nfsproc3_readdir_3(); extern READDIR3res * nfsproc3_readdir_3_svc(); #define NFSPROC3_READDIRPLUS 17 extern READDIRPLUS3res * nfsproc3_readdirplus_3(); extern READDIRPLUS3res * nfsproc3_readdirplus_3_svc(); #define NFSPROC3_FSSTAT 18 extern FSSTAT3res * nfsproc3_fsstat_3(); extern FSSTAT3res * nfsproc3_fsstat_3_svc(); #define NFSPROC3_FSINFO 19 extern FSINFO3res * nfsproc3_fsinfo_3(); extern FSINFO3res * nfsproc3_fsinfo_3_svc(); #define NFSPROC3_PATHCONF 20 extern PATHCONF3res * nfsproc3_pathconf_3(); extern PATHCONF3res * nfsproc3_pathconf_3_svc(); #define NFSPROC3_COMMIT 21 extern COMMIT3res * nfsproc3_commit_3(); extern COMMIT3res * nfsproc3_commit_3_svc(); extern int nfs3_program_3_freeresult(); #endif /* K&R C */ /* the xdr functions */ #if defined(__STDC__) || defined(__cplusplus) extern bool_t xdr_nfsstat(XDR *, nfsstat*); extern bool_t xdr_ftype(XDR *, ftype*); extern bool_t xdr_nfs_fh(XDR *, nfs_fh*); extern bool_t xdr_nfstime(XDR *, nfstime*); extern bool_t xdr_fattr(XDR *, fattr*); extern bool_t xdr_sattr(XDR *, sattr*); extern bool_t xdr_filename(XDR *, filename*); extern bool_t xdr_nfspath(XDR *, nfspath*); extern bool_t xdr_attrstat(XDR *, attrstat*); extern bool_t xdr_sattrargs(XDR *, sattrargs*); extern bool_t xdr_diropargs(XDR *, diropargs*); extern bool_t xdr_diropokres(XDR *, diropokres*); extern bool_t xdr_diropres(XDR *, diropres*); extern bool_t xdr_readlinkres(XDR *, readlinkres*); extern bool_t xdr_readargs(XDR *, readargs*); extern bool_t xdr_readokres(XDR *, readokres*); extern bool_t xdr_readres(XDR *, readres*); extern bool_t xdr_writeargs(XDR *, writeargs*); extern bool_t xdr_createargs(XDR *, createargs*); extern bool_t xdr_renameargs(XDR *, renameargs*); extern bool_t xdr_linkargs(XDR *, linkargs*); extern bool_t xdr_symlinkargs(XDR *, symlinkargs*); extern bool_t xdr_nfscookie(XDR *, nfscookie); extern bool_t xdr_readdirargs(XDR *, readdirargs*); extern bool_t xdr_entry(XDR *, entry*); extern bool_t xdr_dirlist(XDR *, dirlist*); extern bool_t xdr_readdirres(XDR *, readdirres*); extern bool_t xdr_statfsokres(XDR *, statfsokres*); extern bool_t xdr_statfsres(XDR *, statfsres*); extern bool_t xdr_filename3(XDR *, filename3*); extern bool_t xdr_nfspath3(XDR *, nfspath3*); extern bool_t xdr_fileid3(XDR *, fileid3*); extern bool_t xdr_cookie3(XDR *, cookie3*); extern bool_t xdr_cookieverf3(XDR *, cookieverf3); extern bool_t xdr_createverf3(XDR *, createverf3); extern bool_t xdr_writeverf3(XDR *, writeverf3); extern bool_t xdr_uid3(XDR *, uid3*); extern bool_t xdr_gid3(XDR *, gid3*); extern bool_t xdr_size3(XDR *, size3*); extern bool_t xdr_offset3(XDR *, offset3*); extern bool_t xdr_mode3(XDR *, mode3*); extern bool_t xdr_count3(XDR *, count3*); extern bool_t xdr_nfsstat3(XDR *, nfsstat3*); extern bool_t xdr_ftype3(XDR *, ftype3*); extern bool_t xdr_specdata3(XDR *, specdata3*); extern bool_t xdr_nfs_fh3(XDR *, nfs_fh3*); extern bool_t xdr_nfstime3(XDR *, nfstime3*); extern bool_t xdr_fattr3(XDR *, fattr3*); extern bool_t xdr_post_op_attr(XDR *, post_op_attr*); extern bool_t xdr_wcc_attr(XDR *, wcc_attr*); extern bool_t xdr_pre_op_attr(XDR *, pre_op_attr*); extern bool_t xdr_wcc_data(XDR *, wcc_data*); extern bool_t xdr_post_op_fh3(XDR *, post_op_fh3*); extern bool_t xdr_time_how(XDR *, time_how*); extern bool_t xdr_set_mode3(XDR *, set_mode3*); extern bool_t xdr_set_uid3(XDR *, set_uid3*); extern bool_t xdr_set_gid3(XDR *, set_gid3*); extern bool_t xdr_set_size3(XDR *, set_size3*); extern bool_t xdr_set_atime(XDR *, set_atime*); extern bool_t xdr_set_mtime(XDR *, set_mtime*); extern bool_t xdr_sattr3(XDR *, sattr3*); extern bool_t xdr_diropargs3(XDR *, diropargs3*); extern bool_t xdr_GETATTR3args(XDR *, GETATTR3args*); extern bool_t xdr_GETATTR3resok(XDR *, GETATTR3resok*); extern bool_t xdr_GETATTR3res(XDR *, GETATTR3res*); extern bool_t xdr_sattrguard3(XDR *, sattrguard3*); extern bool_t xdr_SETATTR3args(XDR *, SETATTR3args*); extern bool_t xdr_SETATTR3resok(XDR *, SETATTR3resok*); extern bool_t xdr_SETATTR3resfail(XDR *, SETATTR3resfail*); extern bool_t xdr_SETATTR3res(XDR *, SETATTR3res*); extern bool_t xdr_LOOKUP3args(XDR *, LOOKUP3args*); extern bool_t xdr_LOOKUP3resok(XDR *, LOOKUP3resok*); extern bool_t xdr_LOOKUP3resfail(XDR *, LOOKUP3resfail*); extern bool_t xdr_LOOKUP3res(XDR *, LOOKUP3res*); extern bool_t xdr_ACCESS3args(XDR *, ACCESS3args*); extern bool_t xdr_ACCESS3resok(XDR *, ACCESS3resok*); extern bool_t xdr_ACCESS3resfail(XDR *, ACCESS3resfail*); extern bool_t xdr_ACCESS3res(XDR *, ACCESS3res*); extern bool_t xdr_READLINK3args(XDR *, READLINK3args*); extern bool_t xdr_READLINK3resok(XDR *, READLINK3resok*); extern bool_t xdr_READLINK3resfail(XDR *, READLINK3resfail*); extern bool_t xdr_READLINK3res(XDR *, READLINK3res*); extern bool_t xdr_READ3args(XDR *, READ3args*); extern bool_t xdr_READ3resok(XDR *, READ3resok*); extern bool_t xdr_READ3resfail(XDR *, READ3resfail*); extern bool_t xdr_READ3res(XDR *, READ3res*); extern bool_t xdr_stable_how(XDR *, stable_how*); extern bool_t xdr_WRITE3args(XDR *, WRITE3args*); extern bool_t xdr_WRITE3resok(XDR *, WRITE3resok*); extern bool_t xdr_WRITE3resfail(XDR *, WRITE3resfail*); extern bool_t xdr_WRITE3res(XDR *, WRITE3res*); extern bool_t xdr_createmode3(XDR *, createmode3*); extern bool_t xdr_createhow3(XDR *, createhow3*); extern bool_t xdr_CREATE3args(XDR *, CREATE3args*); extern bool_t xdr_CREATE3resok(XDR *, CREATE3resok*); extern bool_t xdr_CREATE3resfail(XDR *, CREATE3resfail*); extern bool_t xdr_CREATE3res(XDR *, CREATE3res*); extern bool_t xdr_MKDIR3args(XDR *, MKDIR3args*); extern bool_t xdr_MKDIR3resok(XDR *, MKDIR3resok*); extern bool_t xdr_MKDIR3resfail(XDR *, MKDIR3resfail*); extern bool_t xdr_MKDIR3res(XDR *, MKDIR3res*); extern bool_t xdr_symlinkdata3(XDR *, symlinkdata3*); extern bool_t xdr_SYMLINK3args(XDR *, SYMLINK3args*); extern bool_t xdr_SYMLINK3resok(XDR *, SYMLINK3resok*); extern bool_t xdr_SYMLINK3resfail(XDR *, SYMLINK3resfail*); extern bool_t xdr_SYMLINK3res(XDR *, SYMLINK3res*); extern bool_t xdr_devicedata3(XDR *, devicedata3*); extern bool_t xdr_mknoddata3(XDR *, mknoddata3*); extern bool_t xdr_MKNOD3args(XDR *, MKNOD3args*); extern bool_t xdr_MKNOD3resok(XDR *, MKNOD3resok*); extern bool_t xdr_MKNOD3resfail(XDR *, MKNOD3resfail*); extern bool_t xdr_MKNOD3res(XDR *, MKNOD3res*); extern bool_t xdr_REMOVE3args(XDR *, REMOVE3args*); extern bool_t xdr_REMOVE3resok(XDR *, REMOVE3resok*); extern bool_t xdr_REMOVE3resfail(XDR *, REMOVE3resfail*); extern bool_t xdr_REMOVE3res(XDR *, REMOVE3res*); extern bool_t xdr_RMDIR3args(XDR *, RMDIR3args*); extern bool_t xdr_RMDIR3resok(XDR *, RMDIR3resok*); extern bool_t xdr_RMDIR3resfail(XDR *, RMDIR3resfail*); extern bool_t xdr_RMDIR3res(XDR *, RMDIR3res*); extern bool_t xdr_RENAME3args(XDR *, RENAME3args*); extern bool_t xdr_RENAME3resok(XDR *, RENAME3resok*); extern bool_t xdr_RENAME3resfail(XDR *, RENAME3resfail*); extern bool_t xdr_RENAME3res(XDR *, RENAME3res*); extern bool_t xdr_LINK3args(XDR *, LINK3args*); extern bool_t xdr_LINK3resok(XDR *, LINK3resok*); extern bool_t xdr_LINK3resfail(XDR *, LINK3resfail*); extern bool_t xdr_LINK3res(XDR *, LINK3res*); extern bool_t xdr_READDIR3args(XDR *, READDIR3args*); extern bool_t xdr_entry3(XDR *, entry3*); extern bool_t xdr_dirlist3(XDR *, dirlist3*); extern bool_t xdr_READDIR3resok(XDR *, READDIR3resok*); extern bool_t xdr_READDIR3resfail(XDR *, READDIR3resfail*); extern bool_t xdr_READDIR3res(XDR *, READDIR3res*); extern bool_t xdr_READDIRPLUS3args(XDR *, READDIRPLUS3args*); extern bool_t xdr_entryplus3(XDR *, entryplus3*); extern bool_t xdr_dirlistplus3(XDR *, dirlistplus3*); extern bool_t xdr_READDIRPLUS3resok(XDR *, READDIRPLUS3resok*); extern bool_t xdr_READDIRPLUS3resfail(XDR *, READDIRPLUS3resfail*); extern bool_t xdr_READDIRPLUS3res(XDR *, READDIRPLUS3res*); extern bool_t xdr_FSSTAT3args(XDR *, FSSTAT3args*); extern bool_t xdr_FSSTAT3resok(XDR *, FSSTAT3resok*); extern bool_t xdr_FSSTAT3resfail(XDR *, FSSTAT3resfail*); extern bool_t xdr_FSSTAT3res(XDR *, FSSTAT3res*); extern bool_t xdr_FSINFO3args(XDR *, FSINFO3args*); extern bool_t xdr_FSINFO3resok(XDR *, FSINFO3resok*); extern bool_t xdr_FSINFO3resfail(XDR *, FSINFO3resfail*); extern bool_t xdr_FSINFO3res(XDR *, FSINFO3res*); extern bool_t xdr_PATHCONF3args(XDR *, PATHCONF3args*); extern bool_t xdr_PATHCONF3resok(XDR *, PATHCONF3resok*); extern bool_t xdr_PATHCONF3resfail(XDR *, PATHCONF3resfail*); extern bool_t xdr_PATHCONF3res(XDR *, PATHCONF3res*); extern bool_t xdr_COMMIT3args(XDR *, COMMIT3args*); extern bool_t xdr_COMMIT3resok(XDR *, COMMIT3resok*); extern bool_t xdr_COMMIT3resfail(XDR *, COMMIT3resfail*); extern bool_t xdr_COMMIT3res(XDR *, COMMIT3res*); #else /* K&R C */ extern bool_t xdr_nfsstat(); extern bool_t xdr_ftype(); extern bool_t xdr_nfs_fh(); extern bool_t xdr_nfstime(); extern bool_t xdr_fattr(); extern bool_t xdr_sattr(); extern bool_t xdr_filename(); extern bool_t xdr_nfspath(); extern bool_t xdr_attrstat(); extern bool_t xdr_sattrargs(); extern bool_t xdr_diropargs(); extern bool_t xdr_diropokres(); extern bool_t xdr_diropres(); extern bool_t xdr_readlinkres(); extern bool_t xdr_readargs(); extern bool_t xdr_readokres(); extern bool_t xdr_readres(); extern bool_t xdr_writeargs(); extern bool_t xdr_createargs(); extern bool_t xdr_renameargs(); extern bool_t xdr_linkargs(); extern bool_t xdr_symlinkargs(); extern bool_t xdr_nfscookie(); extern bool_t xdr_readdirargs(); extern bool_t xdr_entry(); extern bool_t xdr_dirlist(); extern bool_t xdr_readdirres(); extern bool_t xdr_statfsokres(); extern bool_t xdr_statfsres(); extern bool_t xdr_filename3(); extern bool_t xdr_nfspath3(); extern bool_t xdr_fileid3(); extern bool_t xdr_cookie3(); extern bool_t xdr_cookieverf3(); extern bool_t xdr_createverf3(); extern bool_t xdr_writeverf3(); extern bool_t xdr_uid3(); extern bool_t xdr_gid3(); extern bool_t xdr_size3(); extern bool_t xdr_offset3(); extern bool_t xdr_mode3(); extern bool_t xdr_count3(); extern bool_t xdr_nfsstat3(); extern bool_t xdr_ftype3(); extern bool_t xdr_specdata3(); extern bool_t xdr_nfs_fh3(); extern bool_t xdr_nfstime3(); extern bool_t xdr_fattr3(); extern bool_t xdr_post_op_attr(); extern bool_t xdr_wcc_attr(); extern bool_t xdr_pre_op_attr(); extern bool_t xdr_wcc_data(); extern bool_t xdr_post_op_fh3(); extern bool_t xdr_time_how(); extern bool_t xdr_set_mode3(); extern bool_t xdr_set_uid3(); extern bool_t xdr_set_gid3(); extern bool_t xdr_set_size3(); extern bool_t xdr_set_atime(); extern bool_t xdr_set_mtime(); extern bool_t xdr_sattr3(); extern bool_t xdr_diropargs3(); extern bool_t xdr_GETATTR3args(); extern bool_t xdr_GETATTR3resok(); extern bool_t xdr_GETATTR3res(); extern bool_t xdr_sattrguard3(); extern bool_t xdr_SETATTR3args(); extern bool_t xdr_SETATTR3resok(); extern bool_t xdr_SETATTR3resfail(); extern bool_t xdr_SETATTR3res(); extern bool_t xdr_LOOKUP3args(); extern bool_t xdr_LOOKUP3resok(); extern bool_t xdr_LOOKUP3resfail(); extern bool_t xdr_LOOKUP3res(); extern bool_t xdr_ACCESS3args(); extern bool_t xdr_ACCESS3resok(); extern bool_t xdr_ACCESS3resfail(); extern bool_t xdr_ACCESS3res(); extern bool_t xdr_READLINK3args(); extern bool_t xdr_READLINK3resok(); extern bool_t xdr_READLINK3resfail(); extern bool_t xdr_READLINK3res(); extern bool_t xdr_READ3args(); extern bool_t xdr_READ3resok(); extern bool_t xdr_READ3resfail(); extern bool_t xdr_READ3res(); extern bool_t xdr_stable_how(); extern bool_t xdr_WRITE3args(); extern bool_t xdr_WRITE3resok(); extern bool_t xdr_WRITE3resfail(); extern bool_t xdr_WRITE3res(); extern bool_t xdr_createmode3(); extern bool_t xdr_createhow3(); extern bool_t xdr_CREATE3args(); extern bool_t xdr_CREATE3resok(); extern bool_t xdr_CREATE3resfail(); extern bool_t xdr_CREATE3res(); extern bool_t xdr_MKDIR3args(); extern bool_t xdr_MKDIR3resok(); extern bool_t xdr_MKDIR3resfail(); extern bool_t xdr_MKDIR3res(); extern bool_t xdr_symlinkdata3(); extern bool_t xdr_SYMLINK3args(); extern bool_t xdr_SYMLINK3resok(); extern bool_t xdr_SYMLINK3resfail(); extern bool_t xdr_SYMLINK3res(); extern bool_t xdr_devicedata3(); extern bool_t xdr_mknoddata3(); extern bool_t xdr_MKNOD3args(); extern bool_t xdr_MKNOD3resok(); extern bool_t xdr_MKNOD3resfail(); extern bool_t xdr_MKNOD3res(); extern bool_t xdr_REMOVE3args(); extern bool_t xdr_REMOVE3resok(); extern bool_t xdr_REMOVE3resfail(); extern bool_t xdr_REMOVE3res(); extern bool_t xdr_RMDIR3args(); extern bool_t xdr_RMDIR3resok(); extern bool_t xdr_RMDIR3resfail(); extern bool_t xdr_RMDIR3res(); extern bool_t xdr_RENAME3args(); extern bool_t xdr_RENAME3resok(); extern bool_t xdr_RENAME3resfail(); extern bool_t xdr_RENAME3res(); extern bool_t xdr_LINK3args(); extern bool_t xdr_LINK3resok(); extern bool_t xdr_LINK3resfail(); extern bool_t xdr_LINK3res(); extern bool_t xdr_READDIR3args(); extern bool_t xdr_entry3(); extern bool_t xdr_dirlist3(); extern bool_t xdr_READDIR3resok(); extern bool_t xdr_READDIR3resfail(); extern bool_t xdr_READDIR3res(); extern bool_t xdr_READDIRPLUS3args(); extern bool_t xdr_entryplus3(); extern bool_t xdr_dirlistplus3(); extern bool_t xdr_READDIRPLUS3resok(); extern bool_t xdr_READDIRPLUS3resfail(); extern bool_t xdr_READDIRPLUS3res(); extern bool_t xdr_FSSTAT3args(); extern bool_t xdr_FSSTAT3resok(); extern bool_t xdr_FSSTAT3resfail(); extern bool_t xdr_FSSTAT3res(); extern bool_t xdr_FSINFO3args(); extern bool_t xdr_FSINFO3resok(); extern bool_t xdr_FSINFO3resfail(); extern bool_t xdr_FSINFO3res(); extern bool_t xdr_PATHCONF3args(); extern bool_t xdr_PATHCONF3resok(); extern bool_t xdr_PATHCONF3resfail(); extern bool_t xdr_PATHCONF3res(); extern bool_t xdr_COMMIT3args(); extern bool_t xdr_COMMIT3resok(); extern bool_t xdr_COMMIT3resfail(); extern bool_t xdr_COMMIT3res(); #endif /* K&R C */ #ifdef __cplusplus } #endif #endif /* !_NFS_PROT_H_RPCGEN */ /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License, Version 1.0 only * (the "License"). You may not use this file except in compliance * with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ #ifdef RPC_HDR %/* % * Definitions for uint64, int64, uint32, and int32 % */ %#include % #endif const NFS_PORT = 2049; const NFS_MAXDATA = 8192; const NFS_MAXPATHLEN = 1024; const NFS_MAXNAMLEN = 255; const NFS_FHSIZE = 32; const NFS_COOKIESIZE = 4; const NFS_FIFO_DEV = -1; /* size kludge for named pipes */ /* * File types */ const NFSMODE_FMT = 0170000; /* type of file */ const NFSMODE_DIR = 0040000; /* directory */ const NFSMODE_CHR = 0020000; /* character special */ const NFSMODE_BLK = 0060000; /* block special */ const NFSMODE_REG = 0100000; /* regular */ const NFSMODE_LNK = 0120000; /* symbolic link */ const NFSMODE_SOCK = 0140000; /* socket */ const NFSMODE_FIFO = 0010000; /* fifo */ /* * Error status */ enum nfsstat { NFS_OK= 0, /* no error */ NFSERR_PERM=1, /* Not owner */ NFSERR_NOENT=2, /* No such file or directory */ NFSERR_IO=5, /* I/O error */ NFSERR_NXIO=6, /* No such device or address */ NFSERR_ACCES=13, /* Permission denied */ NFSERR_EXIST=17, /* File exists */ NFSERR_XDEV=18, /* Cross-device link */ NFSERR_NODEV=19, /* No such device */ NFSERR_NOTDIR=20, /* Not a directory*/ NFSERR_ISDIR=21, /* Is a directory */ NFSERR_INVAL=22, /* Invalid argument */ NFSERR_FBIG=27, /* File too large */ NFSERR_NOSPC=28, /* No space left on device */ NFSERR_ROFS=30, /* Read-only file system */ NFSERR_OPNOTSUPP=45, /* Operation not supported */ NFSERR_NAMETOOLONG=63, /* File name too long */ NFSERR_NOTEMPTY=66, /* Directory not empty */ NFSERR_DQUOT=69, /* Disc quota exceeded */ NFSERR_STALE=70, /* Stale NFS file handle */ NFSERR_REMOTE=71, /* Object is remote */ NFSERR_WFLUSH=72 /* write cache flushed */ }; /* * File types */ enum ftype { NFNON = 0, /* non-file */ NFREG = 1, /* regular file */ NFDIR = 2, /* directory */ NFBLK = 3, /* block special */ NFCHR = 4, /* character special */ NFLNK = 5, /* symbolic link */ NFSOCK = 6, /* unix domain sockets */ NFBAD = 7, /* unused */ NFFIFO = 8 /* named pipe */ }; /* * File access handle */ struct nfs_fh { opaque data[NFS_FHSIZE]; }; /* * Timeval */ struct nfstime { unsigned seconds; unsigned useconds; }; /* * File attributes */ struct fattr { ftype type; /* file type */ unsigned mode; /* protection mode bits */ unsigned nlink; /* # hard links */ unsigned uid; /* owner user id */ unsigned gid; /* owner group id */ unsigned size; /* file size in bytes */ unsigned blocksize; /* prefered block size */ unsigned rdev; /* special device # */ unsigned blocks; /* Kb of disk used by file */ unsigned fsid; /* device # */ unsigned fileid; /* inode # */ nfstime atime; /* time of last access */ nfstime mtime; /* time of last modification */ nfstime ctime; /* time of last change */ }; /* * File attributes which can be set */ struct sattr { unsigned mode; /* protection mode bits */ unsigned uid; /* owner user id */ unsigned gid; /* owner group id */ unsigned size; /* file size in bytes */ nfstime atime; /* time of last access */ nfstime mtime; /* time of last modification */ }; typedef string filename; typedef string nfspath; /* * Reply status with file attributes */ union attrstat switch (nfsstat status) { case NFS_OK: fattr attributes; default: void; }; struct sattrargs { nfs_fh file; sattr attributes; }; /* * Arguments for directory operations */ struct diropargs { nfs_fh dir; /* directory file handle */ filename name; /* name (up to NFS_MAXNAMLEN bytes) */ }; struct diropokres { nfs_fh file; fattr attributes; }; /* * Results from directory operation */ union diropres switch (nfsstat status) { case NFS_OK: diropokres diropres; default: void; }; union readlinkres switch (nfsstat status) { case NFS_OK: nfspath data; default: void; }; /* * Arguments to remote read */ struct readargs { nfs_fh file; /* handle for file */ unsigned offset; /* byte offset in file */ unsigned count; /* immediate read count */ unsigned totalcount; /* total read count (from this offset)*/ }; /* * Status OK portion of remote read reply */ struct readokres { fattr attributes; /* attributes, need for pagin*/ opaque data; }; union readres switch (nfsstat status) { case NFS_OK: readokres reply; default: void; }; /* * Arguments to remote write */ struct writeargs { nfs_fh file; /* handle for file */ unsigned beginoffset; /* beginning byte offset in file */ unsigned offset; /* current byte offset in file */ unsigned totalcount; /* total write count (to this offset)*/ opaque data; }; struct createargs { diropargs where; sattr attributes; }; struct renameargs { diropargs from; diropargs to; }; struct linkargs { nfs_fh from; diropargs to; }; struct symlinkargs { diropargs from; nfspath to; sattr attributes; }; typedef opaque nfscookie[NFS_COOKIESIZE]; /* * Arguments to readdir */ struct readdirargs { nfs_fh dir; /* directory handle */ nfscookie cookie; unsigned count; /* number of directory bytes to read */ }; struct entry { unsigned fileid; filename name; nfscookie cookie; entry *nextentry; }; struct dirlist { entry *entries; bool eof; }; union readdirres switch (nfsstat status) { case NFS_OK: dirlist reply; default: void; }; struct statfsokres { unsigned tsize; /* preferred transfer size in bytes */ unsigned bsize; /* fundamental file system block size */ unsigned blocks; /* total blocks in file system */ unsigned bfree; /* free blocks in fs */ unsigned bavail; /* free blocks avail to non-superuser */ }; union statfsres switch (nfsstat status) { case NFS_OK: statfsokres reply; default: void; }; /* * Remote file service routines */ program NFS_PROGRAM { version NFS_VERSION { void NFSPROC_NULL(void) = 0; attrstat NFSPROC_GETATTR(nfs_fh) = 1; attrstat NFSPROC_SETATTR(sattrargs) = 2; void NFSPROC_ROOT(void) = 3; diropres NFSPROC_LOOKUP(diropargs) = 4; readlinkres NFSPROC_READLINK(nfs_fh) = 5; readres NFSPROC_READ(readargs) = 6; void NFSPROC_WRITECACHE(void) = 7; attrstat NFSPROC_WRITE(writeargs) = 8; diropres NFSPROC_CREATE(createargs) = 9; nfsstat NFSPROC_REMOVE(diropargs) = 10; nfsstat NFSPROC_RENAME(renameargs) = 11; nfsstat NFSPROC_LINK(linkargs) = 12; nfsstat NFSPROC_SYMLINK(symlinkargs) = 13; diropres NFSPROC_MKDIR(createargs) = 14; nfsstat NFSPROC_RMDIR(diropargs) = 15; readdirres NFSPROC_READDIR(readdirargs) = 16; statfsres NFSPROC_STATFS(nfs_fh) = 17; } = 2; } = 100003; /* * Version 3 declarations and definitions. */ /* * Sizes */ const NFS3_FHSIZE = 64; const NFS3_COOKIEVERFSIZE = 8; const NFS3_CREATEVERFSIZE = 8; const NFS3_WRITEVERFSIZE = 8; /* * Basic data types */ typedef string filename3<>; typedef string nfspath3<>; typedef uint64 fileid3; typedef uint64 cookie3; typedef opaque cookieverf3[NFS3_COOKIEVERFSIZE]; typedef opaque createverf3[NFS3_CREATEVERFSIZE]; typedef opaque writeverf3[NFS3_WRITEVERFSIZE]; typedef uint32 uid3; typedef uint32 gid3; typedef uint64 size3; typedef uint64 offset3; typedef uint32 mode3; typedef uint32 count3; /* * Error status */ enum nfsstat3 { NFS3_OK = 0, NFS3ERR_PERM = 1, NFS3ERR_NOENT = 2, NFS3ERR_IO = 5, NFS3ERR_NXIO = 6, NFS3ERR_ACCES = 13, NFS3ERR_EXIST = 17, NFS3ERR_XDEV = 18, NFS3ERR_NODEV = 19, NFS3ERR_NOTDIR = 20, NFS3ERR_ISDIR = 21, NFS3ERR_INVAL = 22, NFS3ERR_FBIG = 27, NFS3ERR_NOSPC = 28, NFS3ERR_ROFS = 30, NFS3ERR_MLINK = 31, NFS3ERR_NAMETOOLONG = 63, NFS3ERR_NOTEMPTY = 66, NFS3ERR_DQUOT = 69, NFS3ERR_STALE = 70, NFS3ERR_REMOTE = 71, NFS3ERR_BADHANDLE = 10001, NFS3ERR_NOT_SYNC = 10002, NFS3ERR_BAD_COOKIE = 10003, NFS3ERR_NOTSUPP = 10004, NFS3ERR_TOOSMALL = 10005, NFS3ERR_SERVERFAULT = 10006, NFS3ERR_BADTYPE = 10007, NFS3ERR_JUKEBOX = 10008 }; /* * File types */ enum ftype3 { NF3REG = 1, NF3DIR = 2, NF3BLK = 3, NF3CHR = 4, NF3LNK = 5, NF3SOCK = 6, NF3FIFO = 7 }; struct specdata3 { uint32 specdata1; uint32 specdata2; }; /* * File access handle */ struct nfs_fh3 { opaque data; }; /* * Timeval */ struct nfstime3 { uint32 seconds; uint32 nseconds; }; /* * File attributes */ struct fattr3 { ftype3 type; mode3 mode; uint32 nlink; uid3 uid; gid3 gid; size3 size; size3 used; specdata3 rdev; uint64 fsid; fileid3 fileid; nfstime3 atime; nfstime3 mtime; nfstime3 ctime; }; /* * File attributes */ union post_op_attr switch (bool attributes_follow) { case TRUE: fattr3 attributes; case FALSE: void; }; struct wcc_attr { size3 size; nfstime3 mtime; nfstime3 ctime; }; union pre_op_attr switch (bool attributes_follow) { case TRUE: wcc_attr attributes; case FALSE: void; }; struct wcc_data { pre_op_attr before; post_op_attr after; }; union post_op_fh3 switch (bool handle_follows) { case TRUE: nfs_fh3 handle; case FALSE: void; }; enum time_how { DONT_CHANGE = 0, SET_TO_SERVER_TIME = 1, SET_TO_CLIENT_TIME = 2 }; union set_mode3 switch (bool set_it) { case TRUE: mode3 mode; default: void; }; union set_uid3 switch (bool set_it) { case TRUE: uid3 uid; default: void; }; union set_gid3 switch (bool set_it) { case TRUE: gid3 gid; default: void; }; union set_size3 switch (bool set_it) { case TRUE: size3 size; default: void; }; union set_atime switch (time_how set_it) { case SET_TO_CLIENT_TIME: nfstime3 atime; default: void; }; union set_mtime switch (time_how set_it) { case SET_TO_CLIENT_TIME: nfstime3 mtime; default: void; }; struct sattr3 { set_mode3 mode; set_uid3 uid; set_gid3 gid; set_size3 size; set_atime atime; set_mtime mtime; }; struct diropargs3 { nfs_fh3 dir; filename3 name; }; /* * GETATTR: Get file attributes */ struct GETATTR3args { nfs_fh3 object; }; struct GETATTR3resok { fattr3 obj_attributes; }; union GETATTR3res switch (nfsstat3 status) { case NFS3_OK: GETATTR3resok resok; default: void; }; /* * SETATTR: Set file attributes */ union sattrguard3 switch (bool check) { case TRUE: nfstime3 obj_ctime; case FALSE: void; }; struct SETATTR3args { nfs_fh3 object; sattr3 new_attributes; sattrguard3 guard; }; struct SETATTR3resok { wcc_data obj_wcc; }; struct SETATTR3resfail { wcc_data obj_wcc; }; union SETATTR3res switch (nfsstat3 status) { case NFS3_OK: SETATTR3resok resok; default: SETATTR3resfail resfail; }; /* * LOOKUP: Lookup filename */ struct LOOKUP3args { diropargs3 what; }; struct LOOKUP3resok { nfs_fh3 object; post_op_attr obj_attributes; post_op_attr dir_attributes; }; struct LOOKUP3resfail { post_op_attr dir_attributes; }; union LOOKUP3res switch (nfsstat3 status) { case NFS3_OK: LOOKUP3resok resok; default: LOOKUP3resfail resfail; }; /* * ACCESS: Check access permission */ const ACCESS3_READ = 0x0001; const ACCESS3_LOOKUP = 0x0002; const ACCESS3_MODIFY = 0x0004; const ACCESS3_EXTEND = 0x0008; const ACCESS3_DELETE = 0x0010; const ACCESS3_EXECUTE = 0x0020; struct ACCESS3args { nfs_fh3 object; uint32 access; }; struct ACCESS3resok { post_op_attr obj_attributes; uint32 access; }; struct ACCESS3resfail { post_op_attr obj_attributes; }; union ACCESS3res switch (nfsstat3 status) { case NFS3_OK: ACCESS3resok resok; default: ACCESS3resfail resfail; }; /* * READLINK: Read from symbolic link */ struct READLINK3args { nfs_fh3 symlink; }; struct READLINK3resok { post_op_attr symlink_attributes; nfspath3 data; }; struct READLINK3resfail { post_op_attr symlink_attributes; }; union READLINK3res switch (nfsstat3 status) { case NFS3_OK: READLINK3resok resok; default: READLINK3resfail resfail; }; /* * READ: Read from file */ struct READ3args { nfs_fh3 file; offset3 offset; count3 count; }; struct READ3resok { post_op_attr file_attributes; count3 count; bool eof; opaque data<>; }; struct READ3resfail { post_op_attr file_attributes; }; union READ3res switch (nfsstat3 status) { case NFS3_OK: READ3resok resok; default: READ3resfail resfail; }; /* * WRITE: Write to file */ enum stable_how { UNSTABLE = 0, DATA_SYNC = 1, FILE_SYNC = 2 }; struct WRITE3args { nfs_fh3 file; offset3 offset; count3 count; stable_how stable; opaque data<>; }; struct WRITE3resok { wcc_data file_wcc; count3 count; stable_how committed; writeverf3 verf; }; struct WRITE3resfail { wcc_data file_wcc; }; union WRITE3res switch (nfsstat3 status) { case NFS3_OK: WRITE3resok resok; default: WRITE3resfail resfail; }; /* * CREATE: Create a file */ enum createmode3 { UNCHECKED = 0, GUARDED = 1, EXCLUSIVE = 2 }; union createhow3 switch (createmode3 mode) { case UNCHECKED: case GUARDED: sattr3 obj_attributes; case EXCLUSIVE: createverf3 verf; }; struct CREATE3args { diropargs3 where; createhow3 how; }; struct CREATE3resok { post_op_fh3 obj; post_op_attr obj_attributes; wcc_data dir_wcc; }; struct CREATE3resfail { wcc_data dir_wcc; }; union CREATE3res switch (nfsstat3 status) { case NFS3_OK: CREATE3resok resok; default: CREATE3resfail resfail; }; /* * MKDIR: Create a directory */ struct MKDIR3args { diropargs3 where; sattr3 attributes; }; struct MKDIR3resok { post_op_fh3 obj; post_op_attr obj_attributes; wcc_data dir_wcc; }; struct MKDIR3resfail { wcc_data dir_wcc; }; union MKDIR3res switch (nfsstat3 status) { case NFS3_OK: MKDIR3resok resok; default: MKDIR3resfail resfail; }; /* * SYMLINK: Create a symbolic link */ struct symlinkdata3 { sattr3 symlink_attributes; nfspath3 symlink_data; }; struct SYMLINK3args { diropargs3 where; symlinkdata3 symlink; }; struct SYMLINK3resok { post_op_fh3 obj; post_op_attr obj_attributes; wcc_data dir_wcc; }; struct SYMLINK3resfail { wcc_data dir_wcc; }; union SYMLINK3res switch (nfsstat3 status) { case NFS3_OK: SYMLINK3resok resok; default: SYMLINK3resfail resfail; }; /* * MKNOD: Create a special file */ struct devicedata3 { sattr3 dev_attributes; specdata3 spec; }; union mknoddata3 switch (ftype3 type) { case NF3CHR: case NF3BLK: devicedata3 device; case NF3SOCK: case NF3FIFO: sattr3 pipe_attributes; default: void; }; struct MKNOD3args { diropargs3 where; mknoddata3 what; }; struct MKNOD3resok { post_op_fh3 obj; post_op_attr obj_attributes; wcc_data dir_wcc; }; struct MKNOD3resfail { wcc_data dir_wcc; }; union MKNOD3res switch (nfsstat3 status) { case NFS3_OK: MKNOD3resok resok; default: MKNOD3resfail resfail; }; /* * REMOVE: Remove a file */ struct REMOVE3args { diropargs3 object; }; struct REMOVE3resok { wcc_data dir_wcc; }; struct REMOVE3resfail { wcc_data dir_wcc; }; union REMOVE3res switch (nfsstat3 status) { case NFS3_OK: REMOVE3resok resok; default: REMOVE3resfail resfail; }; /* * RMDIR: Remove a directory */ struct RMDIR3args { diropargs3 object; }; struct RMDIR3resok { wcc_data dir_wcc; }; struct RMDIR3resfail { wcc_data dir_wcc; }; union RMDIR3res switch (nfsstat3 status) { case NFS3_OK: RMDIR3resok resok; default: RMDIR3resfail resfail; }; /* * RENAME: Rename a file or directory */ struct RENAME3args { diropargs3 from; diropargs3 to; }; struct RENAME3resok { wcc_data fromdir_wcc; wcc_data todir_wcc; }; struct RENAME3resfail { wcc_data fromdir_wcc; wcc_data todir_wcc; }; union RENAME3res switch (nfsstat3 status) { case NFS3_OK: RENAME3resok resok; default: RENAME3resfail resfail; }; /* * LINK: Create link to an object */ struct LINK3args { nfs_fh3 file; diropargs3 link; }; struct LINK3resok { post_op_attr file_attributes; wcc_data linkdir_wcc; }; struct LINK3resfail { post_op_attr file_attributes; wcc_data linkdir_wcc; }; union LINK3res switch (nfsstat3 status) { case NFS3_OK: LINK3resok resok; default: LINK3resfail resfail; }; /* * READDIR: Read from directory */ struct READDIR3args { nfs_fh3 dir; cookie3 cookie; cookieverf3 cookieverf; count3 count; }; struct entry3 { fileid3 fileid; filename3 name; cookie3 cookie; entry3 *nextentry; }; struct dirlist3 { entry3 *entries; bool eof; }; struct READDIR3resok { post_op_attr dir_attributes; cookieverf3 cookieverf; dirlist3 reply; }; struct READDIR3resfail { post_op_attr dir_attributes; }; union READDIR3res switch (nfsstat3 status) { case NFS3_OK: READDIR3resok resok; default: READDIR3resfail resfail; }; /* * READDIRPLUS: Extended read from a directory */ struct READDIRPLUS3args { nfs_fh3 dir; cookie3 cookie; cookieverf3 cookieverf; count3 dircount; count3 maxcount; }; struct entryplus3 { fileid3 fileid; filename3 name; cookie3 cookie; post_op_attr name_attributes; post_op_fh3 name_handle; entryplus3 *nextentry; }; struct dirlistplus3 { entryplus3 *entries; bool eof; }; struct READDIRPLUS3resok { post_op_attr dir_attributes; cookieverf3 cookieverf; dirlistplus3 reply; }; struct READDIRPLUS3resfail { post_op_attr dir_attributes; }; union READDIRPLUS3res switch (nfsstat3 status) { case NFS3_OK: READDIRPLUS3resok resok; default: READDIRPLUS3resfail resfail; }; /* * FSSTAT: Get dynamic file system information */ struct FSSTAT3args { nfs_fh3 fsroot; }; struct FSSTAT3resok { post_op_attr obj_attributes; size3 tbytes; size3 fbytes; size3 abytes; size3 tfiles; size3 ffiles; size3 afiles; uint32 invarsec; }; struct FSSTAT3resfail { post_op_attr obj_attributes; }; union FSSTAT3res switch (nfsstat3 status) { case NFS3_OK: FSSTAT3resok resok; default: FSSTAT3resfail resfail; }; /* * FSINFO: Get static file system information */ const FSF3_LINK = 0x0001; const FSF3_SYMLINK = 0x0002; const FSF3_HOMOGENEOUS = 0x0008; const FSF3_CANSETTIME = 0x0010; struct FSINFO3args { nfs_fh3 fsroot; }; struct FSINFO3resok { post_op_attr obj_attributes; uint32 rtmax; uint32 rtpref; uint32 rtmult; uint32 wtmax; uint32 wtpref; uint32 wtmult; uint32 dtpref; size3 maxfilesize; nfstime3 time_delta; uint32 properties; }; struct FSINFO3resfail { post_op_attr obj_attributes; }; union FSINFO3res switch (nfsstat3 status) { case NFS3_OK: FSINFO3resok resok; default: FSINFO3resfail resfail; }; /* * PATHCONF: Retrieve POSIX information */ struct PATHCONF3args { nfs_fh3 object; }; struct PATHCONF3resok { post_op_attr obj_attributes; uint32 linkmax; uint32 name_max; bool no_trunc; bool chown_restricted; bool case_insensitive; bool case_preserving; }; struct PATHCONF3resfail { post_op_attr obj_attributes; }; union PATHCONF3res switch (nfsstat3 status) { case NFS3_OK: PATHCONF3resok resok; default: PATHCONF3resfail resfail; }; /* * COMMIT: Commit cached data on a server to stable storage */ struct COMMIT3args { nfs_fh3 file; offset3 offset; count3 count; }; struct COMMIT3resok { wcc_data file_wcc; writeverf3 verf; }; struct COMMIT3resfail { wcc_data file_wcc; }; union COMMIT3res switch (nfsstat3 status) { case NFS3_OK: COMMIT3resok resok; default: COMMIT3resfail resfail; }; /* * Remote file service routines */ program NFS3_PROGRAM { version NFS_V3 { void NFSPROC3_NULL(void) = 0; GETATTR3res NFSPROC3_GETATTR(GETATTR3args) = 1; SETATTR3res NFSPROC3_SETATTR(SETATTR3args) = 2; LOOKUP3res NFSPROC3_LOOKUP(LOOKUP3args) = 3; ACCESS3res NFSPROC3_ACCESS(ACCESS3args) = 4; READLINK3res NFSPROC3_READLINK(READLINK3args) = 5; READ3res NFSPROC3_READ(READ3args) = 6; WRITE3res NFSPROC3_WRITE(WRITE3args) = 7; CREATE3res NFSPROC3_CREATE(CREATE3args) = 8; MKDIR3res NFSPROC3_MKDIR(MKDIR3args) = 9; SYMLINK3res NFSPROC3_SYMLINK(SYMLINK3args) = 10; MKNOD3res NFSPROC3_MKNOD(MKNOD3args) = 11; REMOVE3res NFSPROC3_REMOVE(REMOVE3args) = 12; RMDIR3res NFSPROC3_RMDIR(RMDIR3args) = 13; RENAME3res NFSPROC3_RENAME(RENAME3args) = 14; LINK3res NFSPROC3_LINK(LINK3args) = 15; READDIR3res NFSPROC3_READDIR(READDIR3args) = 16; READDIRPLUS3res NFSPROC3_READDIRPLUS(READDIRPLUS3args) = 17; FSSTAT3res NFSPROC3_FSSTAT(FSSTAT3args) = 18; FSINFO3res NFSPROC3_FSINFO(FSINFO3args) = 19; PATHCONF3res NFSPROC3_PATHCONF(PATHCONF3args) = 20; COMMIT3res NFSPROC3_COMMIT(COMMIT3args) = 21; } = 3; } = 100003; /* * Please do not edit this file. * It was generated using rpcgen. */ #ifndef _NIS_H_RPCGEN #define _NIS_H_RPCGEN #include #ifdef __cplusplus extern "C" { #endif #include #ifndef __nis_object_h #define __nis_object_h #define NIS_MAXSTRINGLEN 255 #define NIS_MAXNAMELEN 1024 #define NIS_MAXATTRNAME 32 #define NIS_MAXATTRVAL 2048 #define NIS_MAXCOLUMNS 64 #define NIS_MAXATTR 16 #define NIS_MAXPATH 1024 #define NIS_MAXREPLICAS 128 #define NIS_MAXLINKS 16 #define NIS_PK_NONE 0 #define NIS_PK_DH 1 #define NIS_PK_RSA 2 #define NIS_PK_KERB 3 #define NIS_PK_DHEXT 4 struct nis_attr { char *zattr_ndx; struct { u_int zattr_val_len; char *zattr_val_val; } zattr_val; }; typedef struct nis_attr nis_attr; typedef char *nis_name; enum zotypes { BOGUS_OBJ = 0, NO_OBJ = 1, DIRECTORY_OBJ = 2, GROUP_OBJ = 3, TABLE_OBJ = 4, ENTRY_OBJ = 5, LINK_OBJ = 6, PRIVATE_OBJ = 7, NIS_BOGUS_OBJ = 0, NIS_NO_OBJ = 1, NIS_DIRECTORY_OBJ = 2, NIS_GROUP_OBJ = 3, NIS_TABLE_OBJ = 4, NIS_ENTRY_OBJ = 5, NIS_LINK_OBJ = 6, NIS_PRIVATE_OBJ = 7 }; typedef enum zotypes zotypes; enum nstype { UNKNOWN = 0, NIS = 1, SUNYP = 2, IVY = 3, DNS = 4, X500 = 5, DNANS = 6, XCHS = 7, CDS = 8 }; typedef enum nstype nstype; struct oar_mask { uint_t oa_rights; zotypes oa_otype; }; typedef struct oar_mask oar_mask; struct endpoint { char *uaddr; char *family; char *proto; }; typedef struct endpoint endpoint; struct nis_server { nis_name name; struct { u_int ep_len; endpoint *ep_val; } ep; uint_t key_type; netobj pkey; }; typedef struct nis_server nis_server; struct directory_obj { nis_name do_name; nstype do_type; struct { u_int do_servers_len; nis_server *do_servers_val; } do_servers; uint32_t do_ttl; struct { u_int do_armask_len; oar_mask *do_armask_val; } do_armask; }; typedef struct directory_obj directory_obj; #define EN_BINARY 1 #define EN_CRYPT 2 #define EN_XDR 4 #define EN_MODIFIED 8 #define EN_ASN1 64 struct entry_col { uint_t ec_flags; struct { u_int ec_value_len; char *ec_value_val; } ec_value; }; typedef struct entry_col entry_col; struct entry_obj { char *en_type; struct { u_int en_cols_len; entry_col *en_cols_val; } en_cols; }; typedef struct entry_obj entry_obj; struct group_obj { uint_t gr_flags; struct { u_int gr_members_len; nis_name *gr_members_val; } gr_members; }; typedef struct group_obj group_obj; struct link_obj { zotypes li_rtype; struct { u_int li_attrs_len; nis_attr *li_attrs_val; } li_attrs; nis_name li_name; }; typedef struct link_obj link_obj; #define TA_BINARY 1 #define TA_CRYPT 2 #define TA_XDR 4 #define TA_SEARCHABLE 8 #define TA_CASE 16 #define TA_MODIFIED 32 #define TA_ASN1 64 struct table_col { char *tc_name; uint_t tc_flags; uint_t tc_rights; }; typedef struct table_col table_col; struct table_obj { char *ta_type; int ta_maxcol; u_char ta_sep; struct { u_int ta_cols_len; table_col *ta_cols_val; } ta_cols; char *ta_path; }; typedef struct table_obj table_obj; struct objdata { zotypes zo_type; union { struct directory_obj di_data; struct group_obj gr_data; struct table_obj ta_data; struct entry_obj en_data; struct link_obj li_data; struct { u_int po_data_len; char *po_data_val; } po_data; } objdata_u; }; typedef struct objdata objdata; struct nis_oid { uint32_t ctime; uint32_t mtime; }; typedef struct nis_oid nis_oid; struct nis_object { nis_oid zo_oid; nis_name zo_name; nis_name zo_owner; nis_name zo_group; nis_name zo_domain; uint_t zo_access; uint32_t zo_ttl; objdata zo_data; }; typedef struct nis_object nis_object; #endif /* if __nis_object_h */ enum log_entry_t { LOG_NOP = 0, ADD_NAME = 1, REM_NAME = 2, MOD_NAME_OLD = 3, MOD_NAME_NEW = 4, ADD_IBASE = 5, REM_IBASE = 6, MOD_IBASE = 7, UPD_STAMP = 8 }; typedef enum log_entry_t log_entry_t; struct log_entry { uint32_t le_time; log_entry_t le_type; nis_name le_princp; nis_name le_name; struct { u_int le_attrs_len; nis_attr *le_attrs_val; } le_attrs; nis_object le_object; }; typedef struct log_entry log_entry; struct nis_tag { u_int tag_type; char *tag_val; }; typedef struct nis_tag nis_tag; /* * Structures used for server binding. */ struct nis_bound_endpoint { endpoint ep; int generation; int rank; u_int flags; int hostnum; int epnum; nis_name uaddr; endpoint cbep; }; typedef struct nis_bound_endpoint nis_bound_endpoint; struct nis_bound_directory { int generation; int min_rank; int optimal_rank; directory_obj dobj; struct { u_int BEP_len; nis_bound_endpoint *BEP_val; } BEP; }; typedef struct nis_bound_directory nis_bound_directory; #define bep_len BEP.BEP_len #define bep_val BEP.BEP_val struct nis_active_endpoint { endpoint ep; nis_name hostname; int rank; int uaddr_generation; nis_name uaddr; int cbep_generation; endpoint cbep; }; typedef struct nis_active_endpoint nis_active_endpoint; /* defines for nis_bound_endpoint.flags */ #define NIS_BOUND 0x1 #define NIS_TRANSIENT_ERRORS 0x2 /* * Generic "hash" datastructures, used by all types of hashed data. */ struct nis_hash_data { nis_name name; /* NIS name of hashed item */ int keychain; /* It's hash key (for pop) */ struct nis_hash_data *next; /* Hash collision pointer */ struct nis_hash_data *prv_item; /* A serial, doubly linked list */ struct nis_hash_data *nxt_item; /* of items in the hash table */ }; typedef struct nis_hash_data NIS_HASH_ITEM; struct nis_hash_table { NIS_HASH_ITEM *keys[64]; /* A hash table of items */ NIS_HASH_ITEM *first; /* The first "item" in serial list */ }; typedef struct nis_hash_table NIS_HASH_TABLE; /* Structure for storing dynamically allocated static data */ struct nis_sdata { void *buf; /* Memory allocation pointer */ u_int size; /* Buffer size */ }; /* Generic client creating flags */ #define ZMH_VC 1 #define ZMH_DG 2 #define ZMH_AUTH 4 #define ZMH_NOFALLBACK 8 /* Testing Access rights for objects */ #define NIS_READ_ACC 1 #define NIS_MODIFY_ACC 2 #define NIS_CREATE_ACC 4 #define NIS_DESTROY_ACC 8 /* Test macros. a == access rights, m == desired rights. */ #define NIS_WORLD(a, m) (((a) & (m)) != 0) #define NIS_GROUP(a, m) (((a) & ((m) << 8)) != 0) #define NIS_OWNER(a, m) (((a) & ((m) << 16)) != 0) #define NIS_NOBODY(a, m) (((a) & ((m) << 24)) != 0) /* * EOL Alert - The following non-prefixed test macros are * here for backward compatability, and will be not be present * in future releases - use the NIS_*() macros above. */ #define WORLD(a, m) (((a) & (m)) != 0) #define GROUP(a, m) (((a) & ((m) << 8)) != 0) #define OWNER(a, m) (((a) & ((m) << 16)) != 0) #define NOBODY(a, m) (((a) & ((m) << 24)) != 0) #define OATYPE(d, n) (((d)->do_armask.do_armask_val+n)->oa_otype) #define OARIGHTS(d, n) (((d)->do_armask.do_armask_val+n)->oa_rights) #define WORLD_DEFAULT (NIS_READ_ACC) #define GROUP_DEFAULT (NIS_READ_ACC << 8) #define OWNER_DEFAULT ((NIS_READ_ACC +\ NIS_MODIFY_ACC +\ NIS_CREATE_ACC +\ NIS_DESTROY_ACC) << 16) #define DEFAULT_RIGHTS (WORLD_DEFAULT | GROUP_DEFAULT | OWNER_DEFAULT) /* Result manipulation defines ... */ #define NIS_RES_NUMOBJ(x) ((x)->objects.objects_len) #define NIS_RES_OBJECT(x) ((x)->objects.objects_val) #define NIS_RES_COOKIE(x) ((x)->cookie) #define NIS_RES_STATUS(x) ((x)->status) /* These defines make getting at the variant part of the object easier. */ #define TA_data zo_data.objdata_u.ta_data #define EN_data zo_data.objdata_u.en_data #define DI_data zo_data.objdata_u.di_data #define LI_data zo_data.objdata_u.li_data #define GR_data zo_data.objdata_u.gr_data #define __type_of(o) ((o)->zo_data.zo_type) /* Declarations for the internal subroutines in nislib.c */ enum name_pos {SAME_NAME, HIGHER_NAME, LOWER_NAME, NOT_SEQUENTIAL, BAD_NAME}; typedef enum name_pos name_pos; /* * Defines for getting at column data in entry objects. Because RPCGEN * generates some rather wordy structures, we create some defines that * collapse the needed keystrokes to access a particular value using * these definitions they take an nis_object *, and an int and return * a u_char * for Value, and an int for length. */ #define ENTRY_VAL(obj, col) \ (obj)->EN_data.en_cols.en_cols_val[col].ec_value.ec_value_val #define ENTRY_LEN(obj, col) \ (obj)->EN_data.en_cols.en_cols_val[col].ec_value.ec_value_len /* XDR function declarations (normally rpcgen-generated, pre-generated here * because rpcgen cannot handle %#define line continuations in nis.x) */ extern bool_t xdr_nis_attr(XDR *, nis_attr*); extern bool_t xdr_nis_name(XDR *, nis_name*); extern bool_t xdr_zotypes(XDR *, zotypes*); extern bool_t xdr_nstype(XDR *, nstype*); extern bool_t xdr_oar_mask(XDR *, oar_mask*); extern bool_t xdr_endpoint(XDR *, endpoint*); extern bool_t xdr_nis_server(XDR *, nis_server*); extern bool_t xdr_directory_obj(XDR *, directory_obj*); extern bool_t xdr_entry_col(XDR *, entry_col*); extern bool_t xdr_entry_obj(XDR *, entry_obj*); extern bool_t xdr_group_obj(XDR *, group_obj*); extern bool_t xdr_link_obj(XDR *, link_obj*); extern bool_t xdr_table_col(XDR *, table_col*); extern bool_t xdr_table_obj(XDR *, table_obj*); extern bool_t xdr_objdata(XDR *, objdata*); extern bool_t xdr_nis_oid(XDR *, nis_oid*); extern bool_t xdr_nis_object(XDR *, nis_object*); extern bool_t xdr_log_entry_t(XDR *, log_entry_t*); extern bool_t xdr_log_entry(XDR *, log_entry*); extern bool_t xdr_nis_tag(XDR *, nis_tag*); extern bool_t xdr_nis_bound_endpoint(XDR *, nis_bound_endpoint*); extern bool_t xdr_nis_bound_directory(XDR *, nis_bound_directory*); extern bool_t xdr_nis_active_endpoint(XDR *, nis_active_endpoint*); #ifdef __cplusplus } #endif /* Prototypes, and extern declarations for the NIS library functions. */ #include #endif /* __NIS_RPCGEN_H */ /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License (the "License"). * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * RPC Language Protocol description file for NIS Plus * * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. * * * From 4.1 : @(#)nis.x 1.61 Copyright 1989 Sun Microsystems */ /* This gets stuffed into the source files. */ #if RPC_HDR %#include #endif #if defined(RPC_XDR) || defined(RPC_CLNT) || defined(RPC_SVC) %#ifndef xdr_uint32_t %#define xdr_uint32_t xdr_u_int %#endif %#ifndef xdr_uint_t %#define xdr_uint_t xdr_u_int %#endif #endif #if RPC_SVC %#include "nis_svc.h" #endif /* Include the RPC Language description of NIS objects */ #include "nis_object.x" /* * These are the type of entries that are stored in the transaction log, * note that modifications will appear as two entries, for names, they have * a "OLD" entry followed by a "NEW" entry. For entries in tables, there * is a remove followed by an add. It is done this way so that we can read * the log backwards to back out transactions and forwards to propogate * updated. */ enum log_entry_t { LOG_NOP = 0, ADD_NAME = 1, /* Name Added to name space */ REM_NAME = 2, /* Name removed from name space */ MOD_NAME_OLD = 3, /* Name was modified in the name space */ MOD_NAME_NEW = 4, /* Name was modified in the name space */ ADD_IBASE = 5, /* Entry added to information base */ REM_IBASE = 6, /* Entry removed from information base */ MOD_IBASE = 7, /* Entry was modified in information base */ UPD_STAMP = 8 /* Update timestamp (used as fenceposts) */ }; /* * This result is returned from the name service when it is requested to * dump logged entries from its transaction log. Information base updates * will have the name of the information base in the le_name field and * a canonical set of attribute/value pairs to fully specify the entry's * 'name'. */ struct log_entry { uint32_t le_time; /* Time in seconds */ log_entry_t le_type; /* Type of log entry */ nis_name le_princp; /* Principal making the change */ nis_name le_name; /* Name of table/dir involved */ nis_attr le_attrs<>; /* List of AV pairs. */ nis_object le_object; /* Actual object value */ }; /* * This structure defines a generic NIS tag list. The taglist contains * zero or tags, each of which is a type and a value. (u_int). * These are used to report statistics (see tag definitions below) * and to set or reset state variables. */ struct nis_tag { u_int tag_type; /* Statistic tag (may vary) */ string tag_val<>; /* Statistic value may also vary */ }; %/* % * Structures used for server binding. % */ struct nis_bound_endpoint { endpoint ep; int generation; int rank; u_int flags; int hostnum; int epnum; nis_name uaddr; endpoint cbep; }; typedef struct nis_bound_endpoint nis_bound_endpoint; struct nis_bound_directory { int generation; int min_rank; /* minimum rank of bound endpoints */ int optimal_rank; /* best possible rank of all endpoints */ directory_obj dobj; nis_bound_endpoint BEP<>; }; typedef struct nis_bound_directory nis_bound_directory; %#define bep_len BEP.BEP_len %#define bep_val BEP.BEP_val struct nis_active_endpoint { endpoint ep; nis_name hostname; int rank; int uaddr_generation; nis_name uaddr; int cbep_generation; endpoint cbep; }; typedef struct nis_active_endpoint nis_active_endpoint; %/* defines for nis_bound_endpoint.flags */ %#define NIS_BOUND 0x1 %#define NIS_TRANSIENT_ERRORS 0x2 /* * What's going on here? Well, it's like this. When the service * is being compiled it wants to have the service definition specific * info included, and when the client is being compiled it wants that * info. This includes the appropriate file which was generated by * make in the protocols directory (probably /usr/include/rpcsvc). */ #ifdef RPC_SVC %#include "nis_svc.h" #endif #ifdef RPC_CLNT %#include "nis_clnt.h" #endif /* * Included below are the defines that become part of nis.h, * they are technically not part of the protocol, but do define * key aspects of the implementation and are therefore useful * in building a conforming server or client. */ #if RPC_HDR %/* % * Generic "hash" datastructures, used by all types of hashed data. % */ %struct nis_hash_data { % nis_name name; /* NIS name of hashed item */ % int keychain; /* It's hash key (for pop) */ % struct nis_hash_data *next; /* Hash collision pointer */ % struct nis_hash_data *prv_item; /* A serial, doubly linked list */ % struct nis_hash_data *nxt_item; /* of items in the hash table */ %}; %typedef struct nis_hash_data NIS_HASH_ITEM; % %struct nis_hash_table { % NIS_HASH_ITEM *keys[64]; /* A hash table of items */ % NIS_HASH_ITEM *first; /* The first "item" in serial list */ %}; %typedef struct nis_hash_table NIS_HASH_TABLE; % %/* Structure for storing dynamically allocated static data */ %struct nis_sdata { % void *buf; /* Memory allocation pointer */ % u_int size; /* Buffer size */ %}; % %/* Generic client creating flags */ %#define ZMH_VC 1 %#define ZMH_DG 2 %#define ZMH_AUTH 4 %#define ZMH_NOFALLBACK 8 % %/* Testing Access rights for objects */ % %#define NIS_READ_ACC 1 %#define NIS_MODIFY_ACC 2 %#define NIS_CREATE_ACC 4 %#define NIS_DESTROY_ACC 8 %/* Test macros. a == access rights, m == desired rights. */ %#define NIS_WORLD(a, m) (((a) & (m)) != 0) %#define NIS_GROUP(a, m) (((a) & ((m) << 8)) != 0) %#define NIS_OWNER(a, m) (((a) & ((m) << 16)) != 0) %#define NIS_NOBODY(a, m) (((a) & ((m) << 24)) != 0) %/* % * EOL Alert - The following non-prefixed test macros are % * here for backward compatability, and will be not be present % * in future releases - use the NIS_*() macros above. % */ %#define WORLD(a, m) (((a) & (m)) != 0) %#define GROUP(a, m) (((a) & ((m) << 8)) != 0) %#define OWNER(a, m) (((a) & ((m) << 16)) != 0) %#define NOBODY(a, m) (((a) & ((m) << 24)) != 0) % %#define OATYPE(d, n) (((d)->do_armask.do_armask_val+n)->oa_otype) %#define OARIGHTS(d, n) (((d)->do_armask.do_armask_val+n)->oa_rights) %#define WORLD_DEFAULT (NIS_READ_ACC) %#define GROUP_DEFAULT (NIS_READ_ACC << 8) %#define OWNER_DEFAULT ((NIS_READ_ACC +\ % NIS_MODIFY_ACC +\ % NIS_CREATE_ACC +\ % NIS_DESTROY_ACC) << 16) %#define DEFAULT_RIGHTS (WORLD_DEFAULT | GROUP_DEFAULT | OWNER_DEFAULT) % %/* Result manipulation defines ... */ %#define NIS_RES_NUMOBJ(x) ((x)->objects.objects_len) %#define NIS_RES_OBJECT(x) ((x)->objects.objects_val) %#define NIS_RES_COOKIE(x) ((x)->cookie) %#define NIS_RES_STATUS(x) ((x)->status) % %/* These defines make getting at the variant part of the object easier. */ %#define TA_data zo_data.objdata_u.ta_data %#define EN_data zo_data.objdata_u.en_data %#define DI_data zo_data.objdata_u.di_data %#define LI_data zo_data.objdata_u.li_data %#define GR_data zo_data.objdata_u.gr_data % %#define __type_of(o) ((o)->zo_data.zo_type) % %/* Declarations for the internal subroutines in nislib.c */ %enum name_pos {SAME_NAME, HIGHER_NAME, LOWER_NAME, NOT_SEQUENTIAL, BAD_NAME}; %typedef enum name_pos name_pos; % %/* % * Defines for getting at column data in entry objects. Because RPCGEN % * generates some rather wordy structures, we create some defines that % * collapse the needed keystrokes to access a particular value using % * these definitions they take an nis_object *, and an int and return % * a u_char * for Value, and an int for length. % */ %#define ENTRY_VAL(obj, col) \ % (obj)->EN_data.en_cols.en_cols_val[col].ec_value.ec_value_val %#define ENTRY_LEN(obj, col) \ % (obj)->EN_data.en_cols.en_cols_val[col].ec_value.ec_value_len % % % %#ifdef __cplusplus %} %#endif % %/* Prototypes, and extern declarations for the NIS library functions. */ %#include %#endif /* __NIS_RPCGEN_H */ %/* EDIT_START */ % %/* % * nis_3.h % * % * This file contains definitions that are only of interest to the actual % * service daemon and client stubs. Normal users of NIS will not include % * this file. % * % * NOTE : This include file is automatically created by a combination % * of rpcgen and sed. DO NOT EDIT IT, change the nis.x file instead % * and then remake this file. % */ %#ifndef __nis_3_h %#define __nis_3_h %#ifdef __cplusplus %extern "C" { %#endif #endif /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License, Version 1.0 only * (the "License"). You may not use this file except in compliance * with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright 2014 Garrett D'Amore * * Copyright (c) 1991,1997-1998 by Sun Microsystems, Inc. * All rights reserved. */ /* * This header file defines the interface to the NIS database. All * implementations of the database must export at least these routines. * They must also follow the conventions set herein. See the implementors * guide for specific semantics that are required. */ #ifndef _RPCSVC_NIS_DB_H #define _RPCSVC_NIS_DB_H #include #include #ifdef __cplusplus extern "C" { #endif enum db_status { DB_SUCCESS = 0, DB_NOTFOUND = 1, DB_NOTUNIQUE = 2, DB_BADTABLE = 3, DB_BADQUERY = 4, DB_BADOBJECT = 5, DB_MEMORY_LIMIT = 6, DB_STORAGE_LIMIT = 7, DB_INTERNAL_ERROR = 8 }; typedef enum db_status db_status; enum db_action { DB_LOOKUP = 0, DB_REMOVE = 1, DB_ADD = 2, DB_FIRST = 3, DB_NEXT = 4, DB_ALL = 5, DB_RESET_NEXT = 6 }; typedef enum db_action db_action; typedef entry_obj *entry_object_p; typedef struct { uint_t db_next_desc_len; char *db_next_desc_val; } db_next_desc; struct db_result { db_status status; db_next_desc nextinfo; struct { uint_t objects_len; entry_object_p *objects_val; } objects; long ticks; }; typedef struct db_result db_result; /* * Prototypes for the database functions. */ extern bool_t db_initialize(char *); extern db_status db_create_table(char *, table_obj *); extern db_status db_destroy_table(char *); extern db_result *db_first_entry(char *, int, nis_attr *); extern db_result *db_next_entry(char *, db_next_desc *); extern db_result *db_reset_next_entry(char *, db_next_desc *); extern db_result *db_list_entries(char *, int, nis_attr *); extern db_result *db_add_entry(char *, int, nis_attr *, entry_obj *); extern db_result *db_remove_entry(char *, int, nis_attr *); extern db_status db_checkpoint(char *); extern db_status db_standby(char *); extern db_status db_table_exists(char *); extern db_status db_unload_table(char *); extern void db_free_result(db_result *); #ifdef __cplusplus } #endif #endif /* _RPCSVC_NIS_DB_H */ /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License (the "License"). * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * nis_object.x * * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ #if RPC_HDR % %#ifndef __nis_object_h %#define __nis_object_h % #endif /* * This file defines the format for a NIS object in RPC language. * It is included by the main .x file and the database access protocol * file. It is common because both of them need to deal with the same * type of object. Generating the actual code though is a bit messy because * the nis.x file and the nis_dba.x file will generate xdr routines to * encode/decode objects when only one set is needed. Such is life when * one is using rpcgen. * * Note, the protocol doesn't specify any limits on such things as * maximum name length, number of attributes, etc. These are enforced * by the database backend. When you hit them you will no. Also see * the db_getlimits() function for fetching the limit values. * */ #if defined(RPC_XDR) || defined(RPC_SVC) || defined(RPC_CLNT) %#ifndef xdr_uint32_t %#define xdr_uint32_t xdr_u_int %#endif %#ifndef xdr_uint_t %#define xdr_uint_t xdr_u_int %#endif #endif /* Some manifest constants, chosen to maximize flexibility without * plugging the wire full of data. */ const NIS_MAXSTRINGLEN = 255; const NIS_MAXNAMELEN = 1024; const NIS_MAXATTRNAME = 32; const NIS_MAXATTRVAL = 2048; const NIS_MAXCOLUMNS = 64; const NIS_MAXATTR = 16; const NIS_MAXPATH = 1024; const NIS_MAXREPLICAS = 128; const NIS_MAXLINKS = 16; const NIS_PK_NONE = 0; /* no public key (unix/sys auth) */ const NIS_PK_DH = 1; /* Public key is Diffie-Hellman type */ const NIS_PK_RSA = 2; /* Public key if RSA type */ const NIS_PK_KERB = 3; /* Use kerberos style authentication */ const NIS_PK_DHEXT = 4; /* Extended Diffie-Hellman for RPC-GSS */ /* * The fundamental name type of NIS. The name may consist of two parts, * the first being the fully qualified name, and the second being an * optional set of attribute/value pairs. */ struct nis_attr { string zattr_ndx<>; /* name of the index */ opaque zattr_val<>; /* Value for the attribute. */ }; typedef string nis_name<>; /* The NIS name itself. */ /* NIS object types are defined by the following enumeration. The numbers * they use are based on the following scheme : * 0 - 1023 are reserved for Sun, * 1024 - 2047 are defined to be private to a particular tree. * 2048 - 4095 are defined to be user defined. * 4096 - ... are reserved for future use. * * EOL Alert - The non-prefixed names are present for backward * compatability only, and will not exist in future releases. Use * the NIS_* names for future compatability. */ enum zotypes { BOGUS_OBJ = 0, /* Uninitialized object structure */ NO_OBJ = 1, /* NULL object (no data) */ DIRECTORY_OBJ = 2, /* Directory object describing domain */ GROUP_OBJ = 3, /* Group object (a list of names) */ TABLE_OBJ = 4, /* Table object (a database schema) */ ENTRY_OBJ = 5, /* Entry object (a database record) */ LINK_OBJ = 6, /* A name link. */ PRIVATE_OBJ = 7, /* Private object (all opaque data) */ NIS_BOGUS_OBJ = 0, /* Uninitialized object structure */ NIS_NO_OBJ = 1, /* NULL object (no data) */ NIS_DIRECTORY_OBJ = 2, /* Directory object describing domain */ NIS_GROUP_OBJ = 3, /* Group object (a list of names) */ NIS_TABLE_OBJ = 4, /* Table object (a database schema) */ NIS_ENTRY_OBJ = 5, /* Entry object (a database record) */ NIS_LINK_OBJ = 6, /* A name link. */ NIS_PRIVATE_OBJ = 7 /* Private object (all opaque data) */ }; /* * The types of Name services NIS knows about. They are enumerated * here. The Binder code will use this type to determine if it has * a set of library routines that will access the indicated name service. */ enum nstype { UNKNOWN = 0, NIS = 1, /* Nis Plus Service */ SUNYP = 2, /* Old NIS Service */ IVY = 3, /* Nis Plus Plus Service */ DNS = 4, /* Domain Name Service */ X500 = 5, /* ISO/CCCIT X.500 Service */ DNANS = 6, /* Digital DECNet Name Service */ XCHS = 7, /* Xerox ClearingHouse Service */ CDS= 8 }; /* * DIRECTORY - The name service object. These objects identify other name * servers that are serving some portion of the name space. Each has a * type associated with it. The resolver library will note whether or not * is has the needed routines to access that type of service. * The oarmask structure defines an access rights mask on a per object * type basis for the name spaces. The only bits currently used are * create and destroy. By enabling or disabling these access rights for * a specific object type for a one of the accessor entities (owner, * group, world) the administrator can control what types of objects * may be freely added to the name space and which require the * administrator's approval. */ struct oar_mask { uint_t oa_rights; /* Access rights mask */ zotypes oa_otype; /* Object type */ }; struct endpoint { string uaddr<>; string family<>; /* Transport family (INET, OSI, etc) */ string proto<>; /* Protocol (TCP, UDP, CLNP, etc) */ }; /* * Note: pkey is a netobj which is limited to 1024 bytes which limits the * keysize to 8192 bits. This is consider to be a reasonable limit for * the expected lifetime of this service. */ struct nis_server { nis_name name; /* Principal name of the server */ endpoint ep<>; /* Universal addr(s) for server */ uint_t key_type; /* Public key type */ netobj pkey; /* server's public key */ }; struct directory_obj { nis_name do_name; /* Name of the directory being served */ nstype do_type; /* one of NIS, DNS, IVY, YP, or X.500 */ nis_server do_servers<>; /* <0> == Primary name server */ uint32_t do_ttl; /* Time To Live (for caches) */ oar_mask do_armask<>; /* Create/Destroy rights by object type */ }; /* * ENTRY - This is one row of data from an information base. * The type value is used by the client library to convert the entry to * it's internal structure representation. The Table name is a back pointer * to the table where the entry is stored. This allows the client library * to determine where to send a request if the client wishes to change this * entry but got to it through a LINK rather than directly. * If the entry is a "standalone" entry then this field is void. */ const EN_BINARY = 1; /* Indicates value is binary data */ const EN_CRYPT = 2; /* Indicates the value is encrypted */ const EN_XDR = 4; /* Indicates the value is XDR encoded */ const EN_MODIFIED = 8; /* Indicates entry is modified. */ const EN_ASN1 = 64; /* Means contents use ASN.1 encoding */ struct entry_col { uint_t ec_flags; /* Flags for this value */ opaque ec_value<>; /* It's textual value */ }; struct entry_obj { string en_type<>; /* Type of entry such as "passwd" */ entry_col en_cols<>; /* Value for the entry */ }; /* * GROUP - The group object contains a list of NIS principal names. Groups * are used to authorize principals. Each object has a set of access rights * for members of its group. Principal names in groups are in the form * name.directory and recursive groups are expressed as @groupname.directory */ struct group_obj { uint_t gr_flags; /* Flags controlling group */ nis_name gr_members<>; /* List of names in group */ }; /* * LINK - This is the LINK object. It is quite similar to a symbolic link * in the UNIX filesystem. The attributes in the main object structure are * relative to the LINK data and not what it points to (like the file system) * "modify" privleges here indicate the right to modify what the link points * at and not to modify that actual object pointed to by the link. */ struct link_obj { zotypes li_rtype; /* Real type of the object */ nis_attr li_attrs<>; /* Attribute/Values for tables */ nis_name li_name; /* The object's real NIS name */ }; /* * TABLE - This is the table object. It implements a simple * data base that applications and use for configuration or * administration purposes. The role of the table is to group together * a set of related entries. Tables are the simple database component * of NIS. Like many databases, tables are logically divided into columns * and rows. The columns are labeled with indexes and each ENTRY makes * up a row. Rows may be addressed within the table by selecting one * or more indexes, and values for those indexes. Each row which has * a value for the given index that matches the desired value is returned. * Within the definition of each column there is a flags variable, this * variable contains flags which determine whether or not the column is * searchable, contains binary data, and access rights for the entry objects * column value. */ const TA_BINARY = 1; /* Means table data is binary */ const TA_CRYPT = 2; /* Means value should be encrypted */ const TA_XDR = 4; /* Means value is XDR encoded */ const TA_SEARCHABLE = 8; /* Means this column is searchable */ const TA_CASE = 16; /* Means this column is Case Sensitive */ const TA_MODIFIED = 32; /* Means this columns attrs are modified*/ const TA_ASN1 = 64; /* Means contents use ASN.1 encoding */ struct table_col { string tc_name<64>; /* Column Name */ uint_t tc_flags; /* control flags */ uint_t tc_rights; /* Access rights mask */ }; struct table_obj { string ta_type<64>; /* Table type such as "passwd" */ int ta_maxcol; /* Total number of columns */ u_char ta_sep; /* Separator character */ table_col ta_cols<>; /* The number of table indexes */ string ta_path<>; /* A search path for this table */ }; /* * This union joins together all of the currently known objects. */ union objdata switch (zotypes zo_type) { case NIS_DIRECTORY_OBJ : struct directory_obj di_data; case NIS_GROUP_OBJ : struct group_obj gr_data; case NIS_TABLE_OBJ : struct table_obj ta_data; case NIS_ENTRY_OBJ: struct entry_obj en_data; case NIS_LINK_OBJ : struct link_obj li_data; case NIS_PRIVATE_OBJ : opaque po_data<>; case NIS_NO_OBJ : void; case NIS_BOGUS_OBJ : void; default : void; }; /* * This is the basic NIS object data type. It consists of a generic part * which all objects contain, and a specialized part which varies depending * on the type of the object. All of the specialized sections have been * described above. You might have wondered why they all start with an * integer size, followed by the useful data. The answer is, when the * server doesn't recognize the type returned it treats it as opaque data. * And the definition for opaque data is {int size; char *data;}. In this * way, servers and utility routines that do not understand a given type * may still pass it around. One has to be careful in setting * this variable accurately, it must take into account such things as * XDR padding of structures etc. The best way to set it is to note one's * position in the XDR encoding stream, encode the structure, look at the * new position and calculate the size. */ struct nis_oid { uint32_t ctime; /* Time of objects creation */ uint32_t mtime; /* Time of objects modification */ }; struct nis_object { nis_oid zo_oid; /* object identity verifier. */ nis_name zo_name; /* The NIS name for this object */ nis_name zo_owner; /* NIS name of object owner. */ nis_name zo_group; /* NIS name of access group. */ nis_name zo_domain; /* The administrator for the object */ uint_t zo_access; /* Access rights (owner, group, world) */ uint32_t zo_ttl; /* Object's time to live in seconds. */ objdata zo_data; /* Data structure for this type */ }; #if RPC_HDR % %#endif /* if __nis_object_h */ % #endif /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License (the "License"). * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright 2014 Garrett D'Amore * * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ /* * nislib.h * * This file contains the interfaces that are visible in the SunOS 5.x * implementation of NIS Plus. */ #ifndef _RPCSVC_NISLIB_H #define _RPCSVC_NISLIB_H #ifdef __cplusplus extern "C" { #endif extern name_pos nis_dir_cmp(nis_name, nis_name); extern nis_name nis_domain_of(nis_name); extern nis_name nis_leaf_of(nis_name); extern nis_name nis_leaf_of_r(const nis_name, char *, size_t); extern nis_name nis_name_of(nis_name); extern nis_name nis_local_group(void); extern nis_name nis_local_directory(void); extern nis_name nis_local_host(void); extern void nis_destroy_object(nis_object *); extern nis_object *nis_clone_object(nis_object *, nis_object *); extern nis_object *nis_read_obj(char *); extern int nis_write_obj(char *, nis_object *); extern void *nis_get_static_storage(struct nis_sdata *, uint_t, uint_t); extern nis_name __nis_rpc_domain(void); CLIENT *__nis_clnt_create(int, struct netconfig *, char *, struct netbuf *, int, int, int, int, int); #ifdef __cplusplus } #endif #endif /* _RPCSVC_NISLIB_H */ /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License, Version 1.0 only * (the "License"). You may not use this file except in compliance * with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright (c) 1994, by Sun Microsystems, Inc. */ #ifndef _RPCSVC_RPC_SZTYPES_H #define _RPCSVC_RPC_SZTYPES_H #include #endif /* _RPCSVC_RPC_SZTYPES_H */ /* * Please do not edit this file. * It was generated using rpcgen. */ #ifndef _RQUOTA_H_RPCGEN #define _RQUOTA_H_RPCGEN #include #ifdef __cplusplus extern "C" { #endif #define RQ_PATHLEN 1024 struct getquota_args { char *gqa_pathp; int32_t gqa_uid; }; typedef struct getquota_args getquota_args; struct rquota { int32_t rq_bsize; bool_t rq_active; uint32_t rq_bhardlimit; uint32_t rq_bsoftlimit; uint32_t rq_curblocks; uint32_t rq_fhardlimit; uint32_t rq_fsoftlimit; uint32_t rq_curfiles; uint32_t rq_btimeleft; uint32_t rq_ftimeleft; }; typedef struct rquota rquota; enum gqr_status { Q_OK = 1, Q_NOQUOTA = 2, Q_EPERM = 3 }; typedef enum gqr_status gqr_status; struct getquota_rslt { gqr_status status; union { rquota gqr_rquota; } getquota_rslt_u; }; typedef struct getquota_rslt getquota_rslt; #define RQUOTAPROG 100011 #define RQUOTAVERS 1 #if defined(__STDC__) || defined(__cplusplus) #define RQUOTAPROC_GETQUOTA 1 extern getquota_rslt * rquotaproc_getquota_1(getquota_args *, CLIENT *); extern getquota_rslt * rquotaproc_getquota_1_svc(getquota_args *, struct svc_req *); #define RQUOTAPROC_GETACTIVEQUOTA 2 extern getquota_rslt * rquotaproc_getactivequota_1(getquota_args *, CLIENT *); extern getquota_rslt * rquotaproc_getactivequota_1_svc(getquota_args *, struct svc_req *); extern int rquotaprog_1_freeresult(SVCXPRT *, xdrproc_t, caddr_t); #else /* K&R C */ #define RQUOTAPROC_GETQUOTA 1 extern getquota_rslt * rquotaproc_getquota_1(); extern getquota_rslt * rquotaproc_getquota_1_svc(); #define RQUOTAPROC_GETACTIVEQUOTA 2 extern getquota_rslt * rquotaproc_getactivequota_1(); extern getquota_rslt * rquotaproc_getactivequota_1_svc(); extern int rquotaprog_1_freeresult(); #endif /* K&R C */ /* the xdr functions */ #if defined(__STDC__) || defined(__cplusplus) extern bool_t xdr_getquota_args(XDR *, getquota_args*); extern bool_t xdr_rquota(XDR *, rquota*); extern bool_t xdr_gqr_status(XDR *, gqr_status*); extern bool_t xdr_getquota_rslt(XDR *, getquota_rslt*); #else /* K&R C */ extern bool_t xdr_getquota_args(); extern bool_t xdr_rquota(); extern bool_t xdr_gqr_status(); extern bool_t xdr_getquota_rslt(); #endif /* K&R C */ #ifdef __cplusplus } #endif #endif /* !_RQUOTA_H_RPCGEN */ /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License, Version 1.0 only * (the "License"). You may not use this file except in compliance * with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END * * Copyright 1987 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ /* * Remote quota protocol * Requires unix authentication */ const RQ_PATHLEN = 1024; struct getquota_args { string gqa_pathp; /* path to filesystem of interest */ int32_t gqa_uid; /* inquire about quota for uid */ }; /* * remote quota structure */ struct rquota { int32_t rq_bsize; /* block size for block counts */ bool rq_active; /* indicates whether quota is active */ uint32_t rq_bhardlimit; /* absolute limit on disk blks alloc */ uint32_t rq_bsoftlimit; /* preferred limit on disk blks */ uint32_t rq_curblocks; /* current block count */ uint32_t rq_fhardlimit; /* absolute limit on allocated files */ uint32_t rq_fsoftlimit; /* preferred file limit */ uint32_t rq_curfiles; /* current # allocated files */ uint32_t rq_btimeleft; /* time left for excessive disk use */ uint32_t rq_ftimeleft; /* time left for excessive files */ }; enum gqr_status { Q_OK = 1, /* quota returned */ Q_NOQUOTA = 2, /* noquota for uid */ Q_EPERM = 3 /* no permission to access quota */ }; union getquota_rslt switch (gqr_status status) { case Q_OK: rquota gqr_rquota; /* valid if status == Q_OK */ case Q_NOQUOTA: void; case Q_EPERM: void; }; program RQUOTAPROG { version RQUOTAVERS { /* * Get all quotas */ getquota_rslt RQUOTAPROC_GETQUOTA(getquota_args) = 1; /* * Get active quotas only */ getquota_rslt RQUOTAPROC_GETACTIVEQUOTA(getquota_args) = 2; } = 1; } = 100011; /* * Please do not edit this file. * It was generated using rpcgen. */ #ifndef _RSTAT_H_RPCGEN #define _RSTAT_H_RPCGEN #include #ifdef __cplusplus extern "C" { #endif /* * Copyright (c) 1985, 1990, 1991 by Sun Microsystems, Inc. */ /* from rstat.x */ /* * Scale factor for scaled integers used to count load averages. */ #ifndef FSCALE #define FSHIFT 8 /* bits to right of fixed binary point */ #define FSCALE (1< /* The time struct defined below is */ #endif /* meant to match struct timeval. */ #define RSTAT_CPUSTATES 4 #define RSTAT_DK_NDRIVE 4 #define RSTAT_CPU_USER 0 #define RSTAT_CPU_NICE 1 #define RSTAT_CPU_SYS 2 #define RSTAT_CPU_IDLE 3 struct rstat_timeval { int tv_sec; int tv_usec; }; typedef struct rstat_timeval rstat_timeval; struct statsvar { struct { u_int cp_time_len; int *cp_time_val; } cp_time; struct { u_int dk_xfer_len; int *dk_xfer_val; } dk_xfer; u_int v_pgpgin; u_int v_pgpgout; u_int v_pswpin; u_int v_pswpout; u_int v_intr; int if_ipackets; int if_ierrors; int if_opackets; int if_oerrors; int if_collisions; u_int v_swtch; int avenrun[3]; rstat_timeval boottime; rstat_timeval curtime; }; typedef struct statsvar statsvar; struct statstime { int cp_time[RSTAT_CPUSTATES]; int dk_xfer[RSTAT_DK_NDRIVE]; u_int v_pgpgin; u_int v_pgpgout; u_int v_pswpin; u_int v_pswpout; u_int v_intr; int if_ipackets; int if_ierrors; int if_oerrors; int if_collisions; u_int v_swtch; int avenrun[3]; rstat_timeval boottime; rstat_timeval curtime; int if_opackets; }; typedef struct statstime statstime; #if 1 || defined(__cplusplus) enum clnt_stat rstat(char *, struct statstime *); int havedisk(char *); #else enum clnt_stat rstat(); int havedisk(); #endif #define RSTATPROG 100001 #define RSTATVERS_VAR 4 #if defined(__STDC__) || defined(__cplusplus) #define RSTATPROC_STATS 1 extern statsvar * rstatproc_stats_4(void *, CLIENT *); extern statsvar * rstatproc_stats_4_svc(void *, struct svc_req *); #define RSTATPROC_HAVEDISK 2 extern u_int * rstatproc_havedisk_4(void *, CLIENT *); extern u_int * rstatproc_havedisk_4_svc(void *, struct svc_req *); extern int rstatprog_4_freeresult(SVCXPRT *, xdrproc_t, caddr_t); #else /* K&R C */ #define RSTATPROC_STATS 1 extern statsvar * rstatproc_stats_4(); extern statsvar * rstatproc_stats_4_svc(); #define RSTATPROC_HAVEDISK 2 extern u_int * rstatproc_havedisk_4(); extern u_int * rstatproc_havedisk_4_svc(); extern int rstatprog_4_freeresult(); #endif /* K&R C */ #define RSTATVERS_TIME 3 #if defined(__STDC__) || defined(__cplusplus) extern statstime * rstatproc_stats_3(void *, CLIENT *); extern statstime * rstatproc_stats_3_svc(void *, struct svc_req *); extern u_int * rstatproc_havedisk_3(void *, CLIENT *); extern u_int * rstatproc_havedisk_3_svc(void *, struct svc_req *); extern int rstatprog_3_freeresult(SVCXPRT *, xdrproc_t, caddr_t); #else /* K&R C */ extern statstime * rstatproc_stats_3(); extern statstime * rstatproc_stats_3_svc(); extern u_int * rstatproc_havedisk_3(); extern u_int * rstatproc_havedisk_3_svc(); extern int rstatprog_3_freeresult(); #endif /* K&R C */ /* the xdr functions */ #if defined(__STDC__) || defined(__cplusplus) extern bool_t xdr_rstat_timeval(XDR *, rstat_timeval*); extern bool_t xdr_statsvar(XDR *, statsvar*); extern bool_t xdr_statstime(XDR *, statstime*); #else /* K&R C */ extern bool_t xdr_rstat_timeval(); extern bool_t xdr_statsvar(); extern bool_t xdr_statstime(); #endif /* K&R C */ #ifdef __cplusplus } #endif #endif /* !_RSTAT_H_RPCGEN */ /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License, Version 1.0 only * (the "License"). You may not use this file except in compliance * with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ %/* % * Copyright (c) 1985, 1990, 1991 by Sun Microsystems, Inc. % */ %/* from rstat.x */ /* * Gather statistics on remote machines */ #ifdef RPC_HDR % %/* % * Scale factor for scaled integers used to count load averages. % */ %#ifndef FSCALE %#define FSHIFT 8 /* bits to right of fixed binary point */ %#define FSCALE (1< /* The time struct defined below is */ %#endif /* meant to match struct timeval. */ % % % % % % #elif RPC_SVC % %/* % * Server side stub routines for the rstat daemon % */ % #elif RPC_CLNT % %/* % * Client side stub routines for the rstat daemon % */ % #elif RPC_XDR %/* % * XDR routines for the rstat daemon, rup and perfmeter. % */ % %/* % * xdr_timeval was used in previous releases. % */ % %bool_t %#ifdef __STDC__ %xdr_timeval(XDR *xdrs, struct timeval *tvp) %#else /* K&R C */ %xdr_timeval(xdrs, tvp) % XDR *xdrs; % struct timeval *tvp; %#endif /* K&R C */ %{ % return (xdr_rstat_timeval(xdrs, (rstat_timeval *)tvp)); %} % #endif const RSTAT_CPUSTATES = 4; const RSTAT_DK_NDRIVE = 4; /* * the cpu stat values */ const RSTAT_CPU_USER = 0; const RSTAT_CPU_NICE = 1; const RSTAT_CPU_SYS = 2; const RSTAT_CPU_IDLE = 3; /* * GMT since 0:00, January 1, 1970 */ struct rstat_timeval { int tv_sec; /* seconds */ int tv_usec; /* and microseconds */ }; struct statsvar { /* RSTATVERS_VAR */ int cp_time<>; /* variable number of CPU states */ int dk_xfer<>; /* variable number of disks */ unsigned v_pgpgin; /* these are cumulative sum */ unsigned v_pgpgout; unsigned v_pswpin; unsigned v_pswpout; unsigned v_intr; int if_ipackets; int if_ierrors; int if_opackets; int if_oerrors; int if_collisions; unsigned v_swtch; int avenrun[3]; rstat_timeval boottime; rstat_timeval curtime; }; struct statstime { /* RSTATVERS_TIME */ int cp_time[RSTAT_CPUSTATES]; int dk_xfer[RSTAT_DK_NDRIVE]; unsigned int v_pgpgin; /* these are cumulative sum */ unsigned int v_pgpgout; unsigned int v_pswpin; unsigned int v_pswpout; unsigned int v_intr; int if_ipackets; int if_ierrors; int if_oerrors; int if_collisions; unsigned int v_swtch; int avenrun[3]; rstat_timeval boottime; rstat_timeval curtime; int if_opackets; }; program RSTATPROG { /* * Version 4 allows for variable number of disk and RSTAT_CPU states. */ version RSTATVERS_VAR { statsvar RSTATPROC_STATS (void) = 1; unsigned int RSTATPROC_HAVEDISK (void) = 2; } = 4; /* * Newest version includes current time and context switching info */ version RSTATVERS_TIME { statstime RSTATPROC_STATS(void) = 1; unsigned int RSTATPROC_HAVEDISK(void) = 2; } = 3; } = 100001; #ifdef RPC_HDR % %#if defined(__STDC__) || defined(__cplusplus) %enum clnt_stat rstat(char *, struct statstime *); %int havedisk(char *); %#else %enum clnt_stat rstat(); %int havedisk(); %#endif % #endif /* * Please do not edit this file. * It was generated using rpcgen. */ #ifndef _RUSERS_H_RPCGEN #define _RUSERS_H_RPCGEN #include #ifdef __cplusplus extern "C" { #endif /* * Find out about remote users */ #define RUSERS_MAXUSERLEN 32 #define RUSERS_MAXLINELEN 32 #define RUSERS_MAXHOSTLEN 257 struct rusers_utmp { char *ut_user; char *ut_line; char *ut_host; int ut_type; int ut_time; u_int ut_idle; }; typedef struct rusers_utmp rusers_utmp; typedef struct { u_int utmp_array_len; rusers_utmp *utmp_array_val; } utmp_array; /* * Values for ut_type field above. */ #define RUSERS_EMPTY 0 #define RUSERS_RUN_LVL 1 #define RUSERS_BOOT_TIME 2 #define RUSERS_OLD_TIME 3 #define RUSERS_NEW_TIME 4 #define RUSERS_INIT_PROCESS 5 #define RUSERS_LOGIN_PROCESS 6 #define RUSERS_USER_PROCESS 7 #define RUSERS_DEAD_PROCESS 8 #define RUSERS_ACCOUNTING 9 /* * The following structures are used by version 2 of the rusersd protocol. * They were not developed with rpcgen, so they do not appear as RPCL. */ #define RUSERSVERS_IDLE 2 #define RUSERSVERS 3 /* current version */ #define MAXUSERS 100 /* * This is the structure used in version 2 of the rusersd RPC service. * It corresponds to the utmp structure for BSD systems. */ struct ru_utmp { char ut_line[8]; /* tty name */ char ut_name[8]; /* user id */ char ut_host[16]; /* host name, if remote */ time_t ut_time; /* time on */ }; struct utmpidle { struct ru_utmp ui_utmp; unsigned ui_idle; }; struct utmpidlearr { struct utmpidle **uia_arr; int uia_cnt; }; int xdr_utmpidlearr(); #if 1 || defined(__cplusplus) enum clnt_stat rusers(char *host, struct utmpidlearr *up); int rnusers(char *host); #else enum clnt_stat rusers(); int rnusers(); #endif #define RUSERSPROG 100002 #define RUSERSVERS_3 3 #if defined(__STDC__) || defined(__cplusplus) #define RUSERSPROC_NUM 1 extern int * rusersproc_num_3(void *, CLIENT *); extern int * rusersproc_num_3_svc(void *, struct svc_req *); #define RUSERSPROC_NAMES 2 extern utmp_array * rusersproc_names_3(void *, CLIENT *); extern utmp_array * rusersproc_names_3_svc(void *, struct svc_req *); #define RUSERSPROC_ALLNAMES 3 extern utmp_array * rusersproc_allnames_3(void *, CLIENT *); extern utmp_array * rusersproc_allnames_3_svc(void *, struct svc_req *); extern int rusersprog_3_freeresult(SVCXPRT *, xdrproc_t, caddr_t); #else /* K&R C */ #define RUSERSPROC_NUM 1 extern int * rusersproc_num_3(); extern int * rusersproc_num_3_svc(); #define RUSERSPROC_NAMES 2 extern utmp_array * rusersproc_names_3(); extern utmp_array * rusersproc_names_3_svc(); #define RUSERSPROC_ALLNAMES 3 extern utmp_array * rusersproc_allnames_3(); extern utmp_array * rusersproc_allnames_3_svc(); extern int rusersprog_3_freeresult(); #endif /* K&R C */ /* the xdr functions */ #if defined(__STDC__) || defined(__cplusplus) extern bool_t xdr_rusers_utmp(XDR *, rusers_utmp*); extern bool_t xdr_utmp_array(XDR *, utmp_array*); #else /* K&R C */ extern bool_t xdr_rusers_utmp(); extern bool_t xdr_utmp_array(); #endif /* K&R C */ #ifdef __cplusplus } #endif #endif /* !_RUSERS_H_RPCGEN */ /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License, Version 1.0 only * (the "License"). You may not use this file except in compliance * with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright 1991 Sun Microsystems, Inc. */ %/* % * Find out about remote users % */ const RUSERS_MAXUSERLEN = 32; const RUSERS_MAXLINELEN = 32; const RUSERS_MAXHOSTLEN = 257; struct rusers_utmp { string ut_user; /* aka ut_name */ string ut_line; /* device */ string ut_host; /* host user logged on from */ int ut_type; /* type of entry */ int ut_time; /* time entry was made */ unsigned int ut_idle; /* minutes idle */ }; typedef rusers_utmp utmp_array<>; #ifdef RPC_HDR % %/* % * Values for ut_type field above. % */ #endif const RUSERS_EMPTY = 0; const RUSERS_RUN_LVL = 1; const RUSERS_BOOT_TIME = 2; const RUSERS_OLD_TIME = 3; const RUSERS_NEW_TIME = 4; const RUSERS_INIT_PROCESS = 5; const RUSERS_LOGIN_PROCESS = 6; const RUSERS_USER_PROCESS = 7; const RUSERS_DEAD_PROCESS = 8; const RUSERS_ACCOUNTING = 9; program RUSERSPROG { version RUSERSVERS_3 { int RUSERSPROC_NUM(void) = 1; utmp_array RUSERSPROC_NAMES(void) = 2; utmp_array RUSERSPROC_ALLNAMES(void) = 3; } = 3; } = 100002; #ifdef RPC_HDR % % % %/* % * The following structures are used by version 2 of the rusersd protocol. % * They were not developed with rpcgen, so they do not appear as RPCL. % */ % %#define RUSERSVERS_IDLE 2 %#define RUSERSVERS 3 /* current version */ %#define MAXUSERS 100 % %/* % * This is the structure used in version 2 of the rusersd RPC service. % * It corresponds to the utmp structure for BSD systems. % */ %struct ru_utmp { % char ut_line[8]; /* tty name */ % char ut_name[8]; /* user id */ % char ut_host[16]; /* host name, if remote */ % time_t ut_time; /* time on */ %}; % %struct utmpidle { % struct ru_utmp ui_utmp; % unsigned ui_idle; %}; % %struct utmpidlearr { % struct utmpidle **uia_arr; % int uia_cnt; %}; % %int xdr_utmpidlearr(); % %#if defined(__STDC__) || defined(__cplusplus) %enum clnt_stat rusers(char *host, struct utmpidlearr *up); %int rnusers(char *host); %#else %enum clnt_stat rusers(); %int rnusers(); %#endif % #endif /* * Please do not edit this file. * It was generated using rpcgen. */ #ifndef _RWALL_H_RPCGEN #define _RWALL_H_RPCGEN #include #ifndef _KERNEL #include #include #endif /* !_KERNEL */ #ifdef __cplusplus extern "C" { #endif /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. * * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License, Version 1.0 only * (the "License"). You may not use this file except in compliance * with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* from rwall.x */ /* * Remote write-all ONC service */ typedef char *wrapstring; #if 1 || defined(__cplusplus) enum clnt_stat rwall(char *, char *); #else enum clnt_stat rwall(); #endif #define WALLPROG 100008 #define WALLVERS 1 #if defined(__STDC__) || defined(__cplusplus) #define WALLPROC_WALL 2 extern enum clnt_stat wallproc_wall_1(wrapstring *, void *, CLIENT *); extern bool_t wallproc_wall_1_svc(wrapstring *, void *, struct svc_req *); extern int wallprog_1_freeresult(SVCXPRT *, xdrproc_t, caddr_t); #else /* K&R C */ #define WALLPROC_WALL 2 extern enum clnt_stat wallproc_wall_1(); extern bool_t wallproc_wall_1_svc(); extern int wallprog_1_freeresult(); #endif /* K&R C */ /* the xdr functions */ #if defined(__STDC__) || defined(__cplusplus) extern bool_t xdr_wrapstring(XDR *, wrapstring*); #else /* K&R C */ extern bool_t xdr_wrapstring(); #endif /* K&R C */ #ifdef __cplusplus } #endif #endif /* !_RWALL_H_RPCGEN */ %/* % * Copyright 2005 Sun Microsystems, Inc. All rights reserved. % * Use is subject to license terms. % * % * CDDL HEADER START % * % * The contents of this file are subject to the terms of the % * Common Development and Distribution License, Version 1.0 only % * (the "License"). You may not use this file except in compliance % * with the License. % * % * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE % * or http://www.opensolaris.org/os/licensing. % * See the License for the specific language governing permissions % * and limitations under the License. % * % * When distributing Covered Code, include this CDDL HEADER in each % * file and include the License file at usr/src/OPENSOLARIS.LICENSE. % * If applicable, add the following below this CDDL HEADER, with the % * fields enclosed by brackets "[]" replaced with your own identifying % * information: Portions Copyright [yyyy] [name of copyright owner] % * % * CDDL HEADER END % */ %/* from rwall.x */ % %/* % * Remote write-all ONC service % */ #ifdef RPC_HDR % #elif RPC_SVC % %/* % * Server side stub routines for the rpc.rwalld daemon % */ % #elif RPC_CLNT % %/* % * Client side stub routines for the rwall program % */ % #endif typedef string wrapstring<>; /* Define for RPC library's xdr_wrapstring */ program WALLPROG { version WALLVERS { /* * There is no procedure 1 */ void WALLPROC_WALL (wrapstring) = 2; } = 1; } = 100008; #ifdef RPC_HDR % % %#if defined(__STDC__) || defined(__cplusplus) %enum clnt_stat rwall(char *, char *); %#else %enum clnt_stat rwall(); %#endif % #endif /* * Please do not edit this file. * It was generated using rpcgen. */ #ifndef _SPRAY_H_RPCGEN #define _SPRAY_H_RPCGEN #include #ifdef __cplusplus extern "C" { #endif /* * Copyright (c) 1987, 1991 by Sun Microsystems, Inc. */ /* from spray.x */ #define SPRAYMAX 8845 struct spraytimeval { u_int sec; u_int usec; }; typedef struct spraytimeval spraytimeval; struct spraycumul { u_int counter; spraytimeval clock; }; typedef struct spraycumul spraycumul; typedef struct { u_int sprayarr_len; char *sprayarr_val; } sprayarr; #define SPRAYPROG 100012 #define SPRAYVERS 1 #if defined(__STDC__) || defined(__cplusplus) #define SPRAYPROC_SPRAY 1 extern void * sprayproc_spray_1(sprayarr *, CLIENT *); extern void * sprayproc_spray_1_svc(sprayarr *, struct svc_req *); #define SPRAYPROC_GET 2 extern spraycumul * sprayproc_get_1(void *, CLIENT *); extern spraycumul * sprayproc_get_1_svc(void *, struct svc_req *); #define SPRAYPROC_CLEAR 3 extern void * sprayproc_clear_1(void *, CLIENT *); extern void * sprayproc_clear_1_svc(void *, struct svc_req *); extern int sprayprog_1_freeresult(SVCXPRT *, xdrproc_t, caddr_t); #else /* K&R C */ #define SPRAYPROC_SPRAY 1 extern void * sprayproc_spray_1(); extern void * sprayproc_spray_1_svc(); #define SPRAYPROC_GET 2 extern spraycumul * sprayproc_get_1(); extern spraycumul * sprayproc_get_1_svc(); #define SPRAYPROC_CLEAR 3 extern void * sprayproc_clear_1(); extern void * sprayproc_clear_1_svc(); extern int sprayprog_1_freeresult(); #endif /* K&R C */ /* the xdr functions */ #if defined(__STDC__) || defined(__cplusplus) extern bool_t xdr_spraytimeval(XDR *, spraytimeval*); extern bool_t xdr_spraycumul(XDR *, spraycumul*); extern bool_t xdr_sprayarr(XDR *, sprayarr*); #else /* K&R C */ extern bool_t xdr_spraytimeval(); extern bool_t xdr_spraycumul(); extern bool_t xdr_sprayarr(); #endif /* K&R C */ #ifdef __cplusplus } #endif #endif /* !_SPRAY_H_RPCGEN */ /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License, Version 1.0 only * (the "License"). You may not use this file except in compliance * with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ %/* % * Copyright (c) 1987, 1991 by Sun Microsystems, Inc. % */ %/* from spray.x */ /* * Spray a server with packets * Useful for testing flakiness of network interfaces */ const SPRAYMAX = 8845; /* max amount can spray */ /* * GMT since 0:00, 1 January 1970 */ struct spraytimeval { unsigned int sec; unsigned int usec; }; /* * spray statistics */ struct spraycumul { unsigned int counter; spraytimeval clock; }; /* * spray data */ typedef opaque sprayarr; program SPRAYPROG { version SPRAYVERS { /* * Just throw away the data and increment the counter * This call never returns, so the client should always * time it out. */ void SPRAYPROC_SPRAY(sprayarr) = 1; /* * Get the value of the counter and elapsed time since * last CLEAR. */ spraycumul SPRAYPROC_GET(void) = 2; /* * Clear the counter and reset the elapsed time */ void SPRAYPROC_CLEAR(void) = 3; } = 1; } = 100012; /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License (the "License"). * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ #ifndef _SVC_DG_PRIV_H #define _SVC_DG_PRIV_H /* * The svc_dg_data private datastructure shared by some services * for nefarious reasons. THIS IS NOT AN INTERFACE. DO NOT USE. */ #ifdef __cplusplus extern "C" { #endif /* * The size of the option header should include sufficient space for * a ucred; we reserve 32 words as before we had ucreds and we allocate * sizeof (svc_dg_data) + ucred_size(). Of course, opts must be declared * last so it can use the additional memory. */ #define MAX_OPT_WORDS 32 /* * kept in xprt->xp_p2 */ struct svc_dg_data { /* Note: optbuf must be the first field, used by ti_opts.c code */ struct netbuf optbuf; /* netbuf for options */ uint_t su_iosz; /* size of send.recv buffer */ uint32_t su_xid; /* transaction id */ XDR su_xdrs; /* XDR handle */ char su_verfbody[MAX_AUTH_BYTES]; /* verifier body */ char *su_cache; /* cached data, NULL if none */ struct t_unitdata su_tudata; /* tu_data for recv */ int opts[MAX_OPT_WORDS]; /* options: MUST BE LAST */ }; #define get_svc_dg_data(xprt) ((struct svc_dg_data *)((xprt)->xp_p2)) #ifdef __cplusplus } #endif #endif /* _SVC_DG_PRIV_H */ /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License, Version 1.0 only * (the "License"). You may not use this file except in compliance * with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * yp.x * * Copyright (c) 1988-1992 Sun Microsystems Inc * All Rights Reserved. */ /* * Protocol description file for the Network Information Services */ const YPMAXRECORD = 1024; const YPMAXDOMAIN = 256; const YPMAXMAP = 64; const YPMAXPEER = 64; enum ypstat { YP_TRUE = 1, YP_NOMORE = 2, YP_FALSE = 0, YP_NOMAP = -1, YP_NODOM = -2, YP_NOKEY = -3, YP_BADOP = -4, YP_BADDB = -5, YP_YPERR = -6, YP_BADARGS = -7, YP_VERS = -8 }; enum ypxfrstat { YPXFR_SUCC = 1, YPXFR_AGE = 2, YPXFR_NOMAP = -1, YPXFR_NODOM = -2, YPXFR_RSRC = -3, YPXFR_RPC = -4, YPXFR_MADDR = -5, YPXFR_YPERR = -6, YPXFR_BADARGS = -7, YPXFR_DBM = -8, YPXFR_FILE = -9, YPXFR_SKEW = -10, YPXFR_CLEAR = -11, YPXFR_FORCE = -12, YPXFR_XFRERR = -13, YPXFR_REFUSED = -14 }; typedef string domainname; typedef string mapname; typedef string peername; typedef opaque keydat; typedef opaque valdat; struct ypmap_parms { domainname domain; mapname map; unsigned int ordernum; peername peer; }; struct ypreq_key { domainname domain; mapname map; keydat key; }; struct ypreq_nokey { domainname domain; mapname map; }; struct ypreq_xfr { ypmap_parms map_parms; unsigned int transid; unsigned int prog; unsigned int port; }; struct ypresp_val { ypstat stat; valdat val; }; struct ypresp_key_val { ypstat stat; valdat val; keydat key; }; struct ypresp_master { ypstat stat; peername peer; }; struct ypresp_order { ypstat stat; unsigned int ordernum; }; union ypresp_all switch (bool more) { case TRUE: ypresp_key_val val; case FALSE: void; }; struct ypresp_xfr { unsigned int transid; ypxfrstat xfrstat; }; struct ypmaplist { mapname map; ypmaplist *next; }; struct ypresp_maplist { ypstat stat; ypmaplist *maps; }; enum yppush_status { YPPUSH_SUCC = 1, /* Success */ YPPUSH_AGE = 2, /* Master's version not newer */ YPPUSH_NOMAP = -1, /* Can't find server for map */ YPPUSH_NODOM = -2, /* Domain not supported */ YPPUSH_RSRC = -3, /* Local resource alloc failure */ YPPUSH_RPC = -4, /* RPC failure talking to server */ YPPUSH_MADDR = -5, /* Can't get master address */ YPPUSH_YPERR = -6, /* NIS server/map db error */ YPPUSH_BADARGS = -7, /* Request arguments bad */ YPPUSH_DBM = -8, /* Local dbm operation failed */ YPPUSH_FILE = -9, /* Local file I/O operation failed */ YPPUSH_SKEW = -10, /* Map version skew during transfer */ YPPUSH_CLEAR = -11, /* Can't send "Clear" req to local ypserv */ YPPUSH_FORCE = -12, /* No local order number in map use -f flag. */ YPPUSH_XFRERR = -13, /* ypxfr error */ YPPUSH_REFUSED = -14 /* Transfer request refused by ypserv */ }; struct yppushresp_xfr { unsigned transid; yppush_status status; }; /* * Response structure and overall result status codes. Success and failure * represent two separate response message types. */ enum ypbind_resptype { YPBIND_SUCC_VAL = 1, YPBIND_FAIL_VAL = 2 }; struct ypbind_binding { opaque ypbind_binding_addr[4]; /* In network order */ opaque ypbind_binding_port[2]; /* In network order */ }; union ypbind_resp switch (ypbind_resptype ypbind_status) { case YPBIND_FAIL_VAL: unsigned ypbind_error; case YPBIND_SUCC_VAL: ypbind_binding ypbind_bindinfo; }; /* Detailed failure reason codes for response field ypbind_error*/ const YPBIND_ERR_ERR = 1; /* Internal error */ const YPBIND_ERR_NOSERV = 2; /* No bound server for passed domain */ const YPBIND_ERR_RESC = 3; /* System resource allocation failure */ /* * Request data structure for ypbind "Set domain" procedure. */ struct ypbind_setdom { domainname ypsetdom_domain; ypbind_binding ypsetdom_binding; unsigned ypsetdom_vers; }; /* * NIS access protocol */ program YPPROG { version YPVERS { void YPPROC_NULL(void) = 0; bool YPPROC_DOMAIN(domainname) = 1; bool YPPROC_DOMAIN_NONACK(domainname) = 2; ypresp_val YPPROC_MATCH(ypreq_key) = 3; ypresp_key_val YPPROC_FIRST(ypreq_key) = 4; ypresp_key_val YPPROC_NEXT(ypreq_key) = 5; ypresp_xfr YPPROC_XFR(ypreq_xfr) = 6; void YPPROC_CLEAR(void) = 7; ypresp_all YPPROC_ALL(ypreq_nokey) = 8; ypresp_master YPPROC_MASTER(ypreq_nokey) = 9; ypresp_order YPPROC_ORDER(ypreq_nokey) = 10; ypresp_maplist YPPROC_MAPLIST(domainname) = 11; } = 2; } = 100004; /* * YPPUSHPROC_XFRRESP is the callback routine for result of YPPROC_XFR */ program YPPUSH_XFRRESPPROG { version YPPUSH_XFRRESPVERS { void YPPUSHPROC_NULL(void) = 0; yppushresp_xfr YPPUSHPROC_XFRRESP(void) = 1; } = 1; } = 0x40000000; /* transient: could be anything up to 0x5fffffff */ /* * NIS binding protocol */ program YPBINDPROG { version YPBINDVERS { void YPBINDPROC_NULL(void) = 0; ypbind_resp YPBINDPROC_DOMAIN(domainname) = 1; void YPBINDPROC_SETDOM(ypbind_setdom) = 2; } = 2; } = 100007; /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License, Version 1.0 only * (the "License"). You may not use this file except in compliance * with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright 2014 Garrett D'Amore * * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ /* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ /* * Portions of this source code were derived from Berkeley 4.3 BSD * under license from the Regents of the University of California. */ #ifndef _RPCSVC_YP_PROT_H #define _RPCSVC_YP_PROT_H #include #include #include #ifdef __cplusplus extern "C" { #endif /* * This file contains symbols and structures defining the rpc protocol * between the YP clients and the YP servers. The servers are the YP * database servers, and the YP. */ /* * The following procedures are supported by the protocol: * * YPPROC_NULL() returns () takes nothing, returns nothing. This indicates * that the yp server is alive. * * YPPROC_DOMAIN (char *) returns (bool_t) TRUE. Indicates that the * responding yp server does serve the named domain; FALSE indicates no * support. * * YPPROC_DOMAIN_NONACK (char *) returns (TRUE) if the yp server does serve * the named domain, otherwise does not return. Used in the broadcast case. * * YPPROC_MATCH (struct ypreq_key) returns (struct ypresp_val). Returns the * right-hand value for a passed left-hand key, within a named map and * domain. * * YPPROC_FIRST (struct ypreq_nokey) returns (struct ypresp_key_val). * Returns the first key-value pair from a named domain and map. * * YPPROC_NEXT (struct ypreq_key) returns (struct ypresp_key_val). Returns * the key-value pair following a passed key-value pair within a named * domain and map. * * YPPROC_XFR (struct ypreq_xfr) returns nothing. Indicates to a server that * a map should be updated. * * YPPROC_NEWXFR (struct ypreq_newxfr) returns nothing. Indicates to a server * that a map should be updated. Uses protocol independent request struct. * * YPPROC_CLEAR takes nothing, returns nothing. Instructs a yp server to * close the current map, so that old versions of the disk file don't get * held open. * * YPPROC_ALL (struct ypreq_nokey), returns * union switch (bool more) { * TRUE: (struct ypresp_key_val); * FALSE: (struct) {}; * } * * YPPROC_MASTER (struct ypreq_nokey), returns (ypresp_master) * * YPPROC_ORDER (struct ypreq_nokey), returns (ypresp_order) * * YPPROC_MAPLIST (char *), returns (struct ypmaplist *) */ /* 'bool' is a built-in type for g++ */ #if !(defined(__cplusplus) && defined(_BOOL)) && !defined(__GNUG__) #ifndef BOOL_DEFINED typedef unsigned int bool; #define BOOL_DEFINED #endif #endif /* Program and version symbols, magic numbers */ #define YPPROG ((rpcprog_t)100004) #define YPVERS ((rpcvers_t)2) #define YPVERS_ORIG ((rpcvers_t)1) #define YPMAXRECORD ((uint_t)1024) #define YPMAXDOMAIN ((uint_t)256) #define YPMAXMAP ((uint_t)64) #define YPMAXPEER ((uint_t)256) /* byte size of a large yp packet */ #define YPMSGSZ 1600 struct ypmap_parms { char *domain; /* Null string means not available */ char *map; /* Null string means not available */ unsigned int ordernum; /* 0 means not available */ char *owner; /* Null string means not available */ }; /* * Request parameter structures */ struct ypreq_key { char *domain; char *map; datum keydat; }; struct ypreq_nokey { char *domain; char *map; }; struct ypreq_xfr { struct ypmap_parms map_parms; unsigned int transid; unsigned int proto; unsigned short port; }; struct ypreq_newxfr { struct ypmap_parms map_parms; unsigned int transid; unsigned int proto; char *name; }; #define ypxfr_domain map_parms.domain #define ypxfr_map map_parms.map #define ypxfr_ordernum map_parms.ordernum #define ypxfr_owner map_parms.owner /* * Response parameter structures */ struct ypresp_val { unsigned int status; datum valdat; }; struct ypresp_key_val { unsigned int status; datum valdat; datum keydat; }; struct ypresp_master { unsigned int status; char *master; }; struct ypresp_order { unsigned int status; unsigned int ordernum; }; struct ypmaplist { char ypml_name[YPMAXMAP + 1]; struct ypmaplist *ypml_next; }; struct ypresp_maplist { unsigned int status; struct ypmaplist *list; }; /* * Procedure symbols. YPPROC_NULL, YPPROC_DOMAIN, and YPPROC_DOMAIN_NONACK * must keep the same values (0, 1, and 2) that they had in the first version * of the protocol. */ #define YPPROC_NULL ((rpcproc_t)0) #define YPPROC_DOMAIN ((rpcproc_t)1) #define YPPROC_DOMAIN_NONACK ((rpcproc_t)2) #define YPPROC_MATCH ((rpcproc_t)3) #define YPPROC_FIRST ((rpcproc_t)4) #define YPPROC_NEXT ((rpcproc_t)5) #define YPPROC_XFR ((rpcproc_t)6) #define YPPROC_NEWXFR ((rpcproc_t)12) #define YPPROC_CLEAR ((rpcproc_t)7) #define YPPROC_ALL ((rpcproc_t)8) #define YPPROC_MASTER ((rpcproc_t)9) #define YPPROC_ORDER ((rpcproc_t)10) #define YPPROC_MAPLIST ((rpcproc_t)11) /* Return status values */ #define YP_TRUE (1) /* General purpose success code */ #define YP_NOMORE (2) /* No more entries in map */ #define YP_FALSE (0) /* General purpose failure code */ #define YP_NOMAP (-1) /* No such map in domain */ #define YP_NODOM (-2) /* Domain not supported */ #define YP_NOKEY (-3) /* No such key in map */ #define YP_BADOP (-4) /* Invalid operation */ #define YP_BADDB (-5) /* Server data base is bad */ #define YP_YPERR (-6) /* YP server error */ #define YP_BADARGS (-7) /* Request arguments bad */ #define YP_VERS (-8) /* YP server vers. mismatch - server */ /* can't supply requested service. */ enum ypreqtype {YPREQ_KEY = 1, YPREQ_NOKEY = 2, YPREQ_MAP_PARMS = 3}; struct yprequest { enum ypreqtype yp_reqtype; union { struct ypreq_key yp_req_keytype; struct ypreq_nokey yp_req_nokeytype; struct ypmap_parms yp_req_map_parmstype; }yp_reqbody; }; #define YPMATCH_REQTYPE YPREQ_KEY #define ypmatch_req_domain yp_reqbody.yp_req_keytype.domain #define ypmatch_req_map yp_reqbody.yp_req_keytype.map #define ypmatch_req_keydat yp_reqbody.yp_req_keytype.keydat #define ypmatch_req_keyptr yp_reqbody.yp_req_keytype.keydat.dptr #define ypmatch_req_keysize yp_reqbody.yp_req_keytype.keydat.dsize #define YPFIRST_REQTYPE YPREQ_NOKEY #define ypfirst_req_domain yp_reqbody.yp_req_nokeytype.domain #define ypfirst_req_map yp_reqbody.yp_req_nokeytype.map #define YPNEXT_REQTYPE YPREQ_KEY #define ypnext_req_domain yp_reqbody.yp_req_keytype.domain #define ypnext_req_map yp_reqbody.yp_req_keytype.map #define ypnext_req_keydat yp_reqbody.yp_req_keytype.keydat #define ypnext_req_keyptr yp_reqbody.yp_req_keytype.keydat.dptr #define ypnext_req_keysize yp_reqbody.yp_req_keytype.keydat.dsize #define YPPUSH_REQTYPE YPREQ_NOKEY #define yppush_req_domain yp_reqbody.yp_req_nokeytype.domain #define yppush_req_map yp_reqbody.yp_req_nokeytype.map #define YPPULL_REQTYPE YPREQ_NOKEY #define yppull_req_domain yp_reqbody.yp_req_nokeytype.domain #define yppull_req_map yp_reqbody.yp_req_nokeytype.map #define YPPOLL_REQTYPE YPREQ_NOKEY #define yppoll_req_domain yp_reqbody.yp_req_nokeytype.domain #define yppoll_req_map yp_reqbody.yp_req_nokeytype.map #define YPGET_REQTYPE YPREQ_MAP_PARMS #define ypget_req_domain yp_reqbody.yp_req_map_parmstype.domain #define ypget_req_map yp_reqbody.yp_req_map_parmstype.map #define ypget_req_ordernum yp_reqbody.yp_req_map_parmstype.ordernum #define ypget_req_owner yp_reqbody.yp_req_map_parmstype.owner enum ypresptype {YPRESP_VAL = 1, YPRESP_KEY_VAL = 2, YPRESP_MAP_PARMS = 3}; struct ypresponse { enum ypresptype yp_resptype; union { struct ypresp_val yp_resp_valtype; struct ypresp_key_val yp_resp_key_valtype; struct ypmap_parms yp_resp_map_parmstype; } yp_respbody; }; #define YPMATCH_RESPTYPE YPRESP_VAL #define ypmatch_resp_status yp_respbody.yp_resp_valtype.status #define ypmatch_resp_valdat yp_respbody.yp_resp_valtype.valdat #define ypmatch_resp_valptr yp_respbody.yp_resp_valtype.valdat.dptr #define ypmatch_resp_valsize yp_respbody.yp_resp_valtype.valdat.dsize #define YPFIRST_RESPTYPE YPRESP_KEY_VAL #define ypfirst_resp_status yp_respbody.yp_resp_key_valtype.status #define ypfirst_resp_keydat yp_respbody.yp_resp_key_valtype.keydat #define ypfirst_resp_keyptr yp_respbody.yp_resp_key_valtype.keydat.dptr #define ypfirst_resp_keysize yp_respbody.yp_resp_key_valtype.keydat.dsize #define ypfirst_resp_valdat yp_respbody.yp_resp_key_valtype.valdat #define ypfirst_resp_valptr yp_respbody.yp_resp_key_valtype.valdat.dptr #define ypfirst_resp_valsize yp_respbody.yp_resp_key_valtype.valdat.dsize #define YPNEXT_RESPTYPE YPRESP_KEY_VAL #define ypnext_resp_status yp_respbody.yp_resp_key_valtype.status #define ypnext_resp_keydat yp_respbody.yp_resp_key_valtype.keydat #define ypnext_resp_keyptr yp_respbody.yp_resp_key_valtype.keydat.dptr #define ypnext_resp_keysize yp_respbody.yp_resp_key_valtype.keydat.dsize #define ypnext_resp_valdat yp_respbody.yp_resp_key_valtype.valdat #define ypnext_resp_valptr yp_respbody.yp_resp_key_valtype.valdat.dptr #define ypnext_resp_valsize yp_respbody.yp_resp_key_valtype.valdat.dsize #define YPPOLL_RESPTYPE YPRESP_MAP_PARMS #define yppoll_resp_domain yp_respbody.yp_resp_map_parmstype.domain #define yppoll_resp_map yp_respbody.yp_resp_map_parmstype.map #define yppoll_resp_ordernum yp_respbody.yp_resp_map_parmstype.ordernum #define yppoll_resp_owner yp_respbody.yp_resp_map_parmstype.owner extern bool _xdr_yprequest(); extern bool _xdr_ypresponse(); /* * Protocol between clients (ypxfr, only) and yppush * yppush speaks a protocol in the transient range, which * is supplied to ypxfr as a command-line parameter when it * is activated by ypserv. */ #define YPPUSHVERS ((rpcvers_t)1) #define YPPUSHVERS_ORIG ((rpcvers_t)1) /* Procedure symbols */ #define YPPUSHPROC_NULL ((rpcproc_t)0) #define YPPUSHPROC_XFRRESP ((rpcproc_t)1) struct yppushresp_xfr { unsigned int transid; unsigned int status; }; /* Status values for yppushresp_xfr.status */ #define YPPUSH_SUCC (1) /* Success */ #define YPPUSH_AGE (2) /* Master's version not newer */ #define YPPUSH_NOMAP (-1) /* Can't find server for map */ #define YPPUSH_NODOM (-2) /* Domain not supported */ #define YPPUSH_RSRC (-3) /* Local resouce alloc failure */ #define YPPUSH_RPC (-4) /* RPC failure talking to server */ #define YPPUSH_MADDR (-5) /* Can't get master address */ #define YPPUSH_YPERR (-6) /* YP server/map db error */ #define YPPUSH_BADARGS (-7) /* Request arguments bad */ #define YPPUSH_DBM (-8) /* Local dbm operation failed */ #define YPPUSH_FILE (-9) /* Local file I/O operation failed */ #define YPPUSH_SKEW (-10) /* Map version skew during transfer */ #define YPPUSH_CLEAR (-11) /* Can't send "Clear" req to local */ /* ypserv */ #define YPPUSH_FORCE (-12) /* No local order number in map - */ /* use -f flag. */ #define YPPUSH_XFRERR (-13) /* ypxfr error */ #define YPPUSH_REFUSED (-14) /* Transfer request refused by ypserv */ #define YPPUSH_NOALIAS (-15) /* Alias not found for map or domain */ extern bool xdr_datum(XDR *, datum *); extern bool xdr_ypdomain_wrap_string(XDR *, char **); extern bool xdr_ypmap_wrap_string(XDR *, char **); extern bool xdr_ypreq_key(XDR *, struct ypreq_key *); extern bool xdr_ypreq_nokey(XDR *, struct ypreq_nokey *); extern bool xdr_ypreq_xfr(XDR *, struct ypreq_xfr *); extern bool xdr_ypreq_newxfr(XDR *, struct ypreq_newxfr *); extern bool xdr_ypresp_val(XDR *, struct ypresp_val *); extern bool xdr_ypresp_key_val(XDR *, struct ypresp_key_val *); extern bool xdr_ypmap_parms(XDR *, struct ypmap_parms *); extern bool xdr_ypowner_wrap_string(XDR *, char **); extern bool xdr_yppushresp_xfr(XDR *, struct yppushresp_xfr *); extern bool xdr_ypresp_order(XDR *, struct ypresp_order *); extern bool xdr_ypresp_master(XDR *, struct ypresp_master *); extern bool xdr_ypall(XDR *, struct ypall_callback *); extern bool xdr_ypresp_maplist(XDR *, struct ypresp_maplist *); #ifdef __cplusplus } #endif #endif /* _RPCSVC_YP_PROT_H */ /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License, Version 1.0 only * (the "License"). You may not use this file except in compliance * with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright 2014 Garrett D'Amore * * Copyright 1989 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ /* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ /* * Portions of this source code were derived from Berkeley 4.3 BSD * under license from the Regents of the University of California. */ #ifndef _RPCSVC_YPCLNT_H #define _RPCSVC_YPCLNT_H #ifdef __cplusplus extern "C" { #endif /* * ypclnt.h * This defines the symbols used in the c language * interface to the yp client functions. A description of this interface * can be read in ypclnt(3NSL). */ /* * Failure reason codes. The success condition is indicated by a functional * value of "0". */ #define YPERR_BADARGS 1 /* Args to function are bad */ #define YPERR_RPC 2 /* RPC failure */ #define YPERR_DOMAIN 3 /* Can't bind to a server which */ /* serves this domain. */ #define YPERR_MAP 4 /* No such map in server's domain */ #define YPERR_KEY 5 /* No such key in map */ #define YPERR_YPERR 6 /* Internal yp server or client */ /* interface error */ #define YPERR_RESRC 7 /* Local resource allocation failure */ #define YPERR_NOMORE 8 /* No more records in map database */ #define YPERR_PMAP 9 /* Can't communicate with portmapper */ #define YPERR_YPBIND 10 /* Can't communicate with ypbind */ #define YPERR_YPSERV 11 /* Can't communicate with ypserv */ #define YPERR_NODOM 12 /* Local domain name not set */ #define YPERR_BADDB 13 /* yp data base is bad */ #define YPERR_VERS 14 /* YP version mismatch */ #define YPERR_ACCESS 15 /* Access violation */ #define YPERR_BUSY 16 /* Database is busy */ /* * Types of update operations */ #define YPOP_CHANGE 1 /* change, do not add */ #define YPOP_INSERT 2 /* add, do not change */ #define YPOP_DELETE 3 /* delete this entry */ #define YPOP_STORE 4 /* add, or change */ /* * Data definitions */ /* * struct ypall_callback * is the arg which must be passed to yp_all */ struct ypall_callback { int (*foreach)(); /* Return non-0 to stop getting */ /* called */ char *data; /* Opaque pointer for use of callback */ /* function */ }; /* * External yp client function references. */ extern int yp_bind(char *); extern void yp_unbind(char *); extern int yp_get_default_domain(char **); extern int yp_match(char *, char *, char *, int, char **, int *); extern int yp_first(char *, char *, char **, int *, char **, int *); extern int yp_next(char *, char *, char *, int, char **, int *, char **, int *); extern int yp_master(char *, char *, char **); extern int yp_order(char *, char *, unsigned long *); extern int yp_all(char *, char *, struct ypall_callback *); extern char *yperr_string(int); extern int ypprot_err(int); extern int yp_update(char *, char *, unsigned, char *, int, char *, int); /* * Global yp data structures */ #ifdef __cplusplus } #endif #endif /* _RPCSVC_YPCLNT_H */ /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License, Version 1.0 only * (the "License"). You may not use this file except in compliance * with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright (c) 1985 by Sun Microsystems, Inc. * */ #ifndef _RPCSVC_YPPASSWD_H #define _RPCSVC_YPPASSWD_H #ifndef _PWD_H #include #endif #ifdef __cplusplus extern "C" { #endif #define YPPASSWDPROG ((rpcprog_t)100009) #define YPPASSWDVERS ((rpcvers_t)1) #define YPPASSWDPROC_UPDATE ((rpcproc_t)1) struct yppasswd { char *oldpass; /* old (unencrypted) password */ struct passwd newpw; /* new pw structure */ }; int xdr_yppasswd(); #ifdef __cplusplus } #endif #endif /* !_RPCSVC_YPPASSWD_H */ /* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License, Version 1.0 only * (the "License"). You may not use this file except in compliance * with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright 1998 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ /* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ /* * Portions of this source code were derived from Berkeley 4.3 BSD * under license from the Regents of the University of California. */ #ifndef _RPCSVC_YPUPD_H #define _RPCSVC_YPUPD_H /* * Please do not edit this file. * It was generated using rpcgen. */ #include #ifdef __cplusplus extern "C" { #endif /* * Compiled from ypupdate_prot.x using rpcgen * This is NOT source code! * DO NOT EDIT THIS FILE! */ #define MAXMAPNAMELEN 255 #define MAXYPDATALEN 1023 #define MAXERRMSGLEN 255 #define YPU_PROG ((ulong_t)100028) #define YPU_VERS ((ulong_t)1) #define YPU_CHANGE ((ulong_t)1) extern uint_t *ypu_change_1(); #define YPU_INSERT ((ulong_t)2) extern uint_t *ypu_insert_1(); #define YPU_DELETE ((ulong_t)3) extern uint_t *ypu_delete_1(); #define YPU_STORE ((ulong_t)4) extern uint_t *ypu_store_1(); typedef struct { uint_t yp_buf_len; char *yp_buf_val; } yp_buf; bool_t xdr_yp_buf(); struct ypupdate_args { char *mapname; yp_buf key; yp_buf datum; }; typedef struct ypupdate_args ypupdate_args; bool_t xdr_ypupdate_args(); struct ypdelete_args { char *mapname; yp_buf key; }; typedef struct ypdelete_args ypdelete_args; bool_t xdr_ypdelete_args(); #ifdef __cplusplus } #endif #endif /* _RPCSVC_YPUPD_H */