Home | History | Annotate | Line # | Download | only in nfs_prot
      1 /*	$NetBSD: nfs_prot_hpux11.h,v 1.1.1.3 2015/01/17 16:34:16 christos Exp $	*/
      2 
      3 /*
      4  * Copyright (c) 1997-2014 Erez Zadok
      5  * Copyright (c) 1990 Jan-Simon Pendry
      6  * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
      7  * Copyright (c) 1990 The Regents of the University of California.
      8  * All rights reserved.
      9  *
     10  * This code is derived from software contributed to Berkeley by
     11  * Jan-Simon Pendry at Imperial College, London.
     12  *
     13  * Redistribution and use in source and binary forms, with or without
     14  * modification, are permitted provided that the following conditions
     15  * are met:
     16  * 1. Redistributions of source code must retain the above copyright
     17  *    notice, this list of conditions and the following disclaimer.
     18  * 2. Redistributions in binary form must reproduce the above copyright
     19  *    notice, this list of conditions and the following disclaimer in the
     20  *    documentation and/or other materials provided with the distribution.
     21  * 3. Neither the name of the University nor the names of its contributors
     22  *    may be used to endorse or promote products derived from this software
     23  *    without specific prior written permission.
     24  *
     25  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     26  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     27  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     28  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     29  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     30  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     31  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     32  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     33  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     34  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     35  * SUCH DAMAGE.
     36  *
     37  *
     38  * File: am-utils/conf/nfs_prot/nfs_prot_hpux11.h
     39  *
     40  */
     41 
     42 #ifndef _AMU_NFS_PROT_H
     43 #define _AMU_NFS_PROT_H
     44 
     45 /*
     46  * NOTE: HPUX 11 is missing many header definitions which had to be
     47  * guessed and copied over from HPUX 10.20.
     48  */
     49 
     50 /* don't include this file as it isn't needed on hpux */
     51 #ifndef _TIUSER_H
     52 # define _TIUSER_H
     53 #endif /* TIUSER_H */
     54 #ifndef _TIUSER_INCLUDED
     55 # define _TIUSER_INCLUDED
     56 #endif /* TIUSER_INCLUDED */
     57 #ifndef _SYS_TIUSER_INCLUDED
     58 # define _SYS_TIUSER_INCLUDED
     59 #endif /* _SYS_TIUSER_INCLUDED */
     60 /* if T_NULL is defined, undefine it due to a conflict with <arpa/nameser.h> */
     61 #ifdef T_NULL
     62 # undef T_NULL
     63 #endif /* T_NULL */
     64 
     65 #ifdef HAVE_NFS_EXPORT_H_not
     66 /* don't include this b/c it'll get included twice */
     67 # include <nfs/export.h>
     68 #endif /* HAVE_NFS_EXPORT_H */
     69 #ifdef HAVE_NFS_NFSV2_H
     70 # include <nfs/nfsv2.h>
     71 #endif /* HAVE_NFS_NFSV2_H */
     72 #ifdef HAVE_NFS_RPCV2_H
     73 # include <nfs/rpcv2.h>
     74 #endif /* HAVE_NFS_RPCV2_H */
     75 #ifdef HAVE_NFS_NFS_H
     76 # include <nfs/nfs.h>
     77 #endif /* HAVE_NFS_NFS_H */
     78 #ifdef HAVE_SYS_FS_NFS_H
     79 # include <sys/fs/nfs.h>
     80 #endif /* HAVE_SYS_FS_NFS_H */
     81 #ifdef HAVE_RPCSVC_MOUNT_H
     82 # include <rpcsvc/mount.h>
     83 #endif /* HAVE_RPCSVC_MOUNT_H */
     84 
     85 
     86 /*
     87  * MACROS
     88  */
     89 
     90 #define NFS_PORT 2049
     91 #define NFS_MAXDATA 8192
     92 #define NFS_MAXPATHLEN 1024
     93 #define NFS_MAXNAMLEN 255
     94 #define NFS_FHSIZE 32
     95 #define NFS_COOKIESIZE 4
     96 #define	MNTPATHLEN 1024
     97 #define	MNTNAMLEN 255
     98 #define HOSTNAMESZ 32      /* Max size of hostname in struct nfs_args */
     99 
    100 #define NFSMODE_FMT 0170000
    101 #define NFSMODE_DIR 0040000
    102 #define NFSMODE_CHR 0020000
    103 #define NFSMODE_BLK 0060000
    104 #define NFSMODE_REG 0100000
    105 #define NFSMODE_LNK 0120000
    106 #define NFSMODE_SOCK 0140000
    107 #define NFSMODE_FIFO 0010000
    108 
    109 #ifndef NFS_PROGRAM
    110 # define NFS_PROGRAM ((u_long)100003)
    111 #endif /* not NFS_PROGRAM */
    112 #ifndef NFS_VERSION
    113 # define NFS_VERSION ((u_long)2)
    114 #endif /* not NFS_VERSION */
    115 
    116 #define NFSPROC_NULL ((u_long)0)
    117 #define NFSPROC_GETATTR ((u_long)1)
    118 #define NFSPROC_SETATTR ((u_long)2)
    119 #define NFSPROC_ROOT ((u_long)3)
    120 #define NFSPROC_LOOKUP ((u_long)4)
    121 #define NFSPROC_READLINK ((u_long)5)
    122 #define NFSPROC_READ ((u_long)6)
    123 #define NFSPROC_WRITECACHE ((u_long)7)
    124 #define NFSPROC_WRITE ((u_long)8)
    125 #define NFSPROC_CREATE ((u_long)9)
    126 #define NFSPROC_REMOVE ((u_long)10)
    127 #define NFSPROC_RENAME ((u_long)11)
    128 #define NFSPROC_LINK ((u_long)12)
    129 #define NFSPROC_SYMLINK ((u_long)13)
    130 #define NFSPROC_MKDIR ((u_long)14)
    131 #define NFSPROC_RMDIR ((u_long)15)
    132 #define NFSPROC_READDIR ((u_long)16)
    133 #define NFSPROC_STATFS ((u_long)17)
    134 
    135 /*
    136  * NFS mount option flags
    137  */
    138 #define	NFSMNT_SOFT		0x001	/* soft mount (hard is default) */
    139 #define	NFSMNT_WSIZE		0x002	/* set write size */
    140 #define	NFSMNT_RSIZE		0x004	/* set read size */
    141 #define	NFSMNT_TIMEO		0x008	/* set initial timeout */
    142 #define	NFSMNT_RETRANS		0x010	/* set number of request retries */
    143 #define	NFSMNT_HOSTNAME		0x020	/* set hostname for error printf */
    144 #define	NFSMNT_INT		0x040	/* allow interrupts on hard mount */
    145 #define	NFSMNT_NOAC		0x080	/* don't cache attributes */
    146 #define	NFSMNT_ACREGMIN		0x0100	/* set min secs for file attr cache */
    147 #define	NFSMNT_ACREGMAX		0x0200	/* set max secs for file attr cache */
    148 #define	NFSMNT_ACDIRMIN		0x0400	/* set min secs for dir attr cache */
    149 #define	NFSMNT_ACDIRMAX		0x0800	/* set max secs for dir attr cache */
    150 #define	NFSMNT_SECURE		0x1000	/* secure mount */
    151 #define	NFSMNT_NOCTO		0x2000	/* no close-to-open consistency */
    152 #define	NFSMNT_KNCONF		0x4000	/* transport's knetconfig structure */
    153 #define	NFSMNT_GRPID		0x8000	/* System V-style gid inheritance */
    154 #define	NFSMNT_RPCTIMESYNC	0x10000	/* use RPC to do secure NFS time sync */
    155 #define	NFSMNT_KERBEROS		0x20000	/* use kerberos credentials */
    156 #define	NFSMNT_POSIX		0x40000 /* static pathconf kludge info */
    157 #define	NFSMNT_LLOCK		0x80000	/* Local locking (no lock manager) */
    158 #define NFSMNT_REMOUNT          0x100000 /* Remount from r/o to r/w */
    159 
    160 #define NFSMNT_FSNAME           0x1000000 /* FS name e.g. "host:/path/" */
    161 #define NFSMNT_NODEVS           0x2000000 /* no devices access (default on) */
    162 #define NFSMNT_IGNORE           0x4000000 /* ignore in mnttab */
    163 
    164 #define MS_FSS        0x00            /* fake flag to do nothing */
    165 
    166 /*
    167  * ENUMS:
    168  */
    169 
    170 /*
    171  * Error status
    172  * Should include all possible net errors.
    173  * For now we just cast errno into an enum nfsstat.
    174  */
    175 enum nfsstat {
    176   NFS_OK = 0,			/* no error */
    177   NFSERR_PERM = 1,		/* Not owner */
    178   NFSERR_NOENT = 2,		/* No such file or directory */
    179   NFSERR_IO = 5,		/* I/O error */
    180   NFSERR_NXIO = 6,		/* No such device or address */
    181   NFSERR_ACCES = 13,		/* Permission denied */
    182   NFSERR_EXIST = 17,		/* File exists */
    183   NFSERR_XDEV = 18,		/* Cross-device link */
    184   NFSERR_NODEV = 19,		/* No such device */
    185   NFSERR_NOTDIR = 20,		/* Not a directory */
    186   NFSERR_ISDIR = 21,		/* Is a directory */
    187   NFSERR_INVAL = 22,		/* Invalid argument */
    188   NFSERR_FBIG = 27,		/* File too large */
    189   NFSERR_NOSPC = 28,		/* No space left on device */
    190   NFSERR_ROFS = 30,		/* Read-only file system */
    191   NFSERR_OPNOTSUPP = 45,	/* Operation not supported */
    192   NFSERR_NAMETOOLONG = 63,	/* File name too long */
    193   NFSERR_NOTEMPTY = 66,		/* Directory not empty */
    194   NFSERR_DQUOT = 69,		/* Disc quota exceeded */
    195   NFSERR_STALE = 70,		/* Stale NFS file handle */
    196   NFSERR_REMOTE = 71,		/* Object is remote */
    197   NFSERR_WFLUSH			/* write cache flushed */
    198 };
    199 
    200 /*
    201  * File types
    202  */
    203 enum nfsftype {
    204   NFNON,
    205   NFREG,			/* regular file */
    206   NFDIR,			/* directory */
    207   NFBLK,			/* block special */
    208   NFCHR,			/* character special */
    209   NFLNK,			/* symbolic link */
    210   NFSOC				/* socket */
    211 };
    212 
    213 
    214 /*
    215  * TYPEDEFS:
    216  */
    217 typedef struct nfs_fh nfs_fh;
    218 typedef char *filename;
    219 typedef char *nfspath;
    220 typedef char nfscookie[NFS_COOKIESIZE];
    221 typedef enum nfsftype nfsftype;
    222 typedef enum nfsstat nfsstat;
    223 typedef struct attrstat nfsattrstat;
    224 typedef struct createargs nfscreateargs;
    225 typedef struct dirlist nfsdirlist;
    226 typedef struct diropargs nfsdiropargs;
    227 typedef struct diropokres nfsdiropokres;
    228 typedef struct diropres nfsdiropres;
    229 typedef struct entry nfsentry;
    230 typedef struct fattr nfsfattr;
    231 typedef struct linkargs nfslinkargs;
    232 typedef struct nfstime nfstime;
    233 typedef struct readargs nfsreadargs;
    234 typedef struct readdirargs nfsreaddirargs;
    235 typedef struct readdirres nfsreaddirres;
    236 typedef struct readlinkres nfsreadlinkres;
    237 typedef struct readokres nfsreadokres;
    238 typedef struct readres nfsreadres;
    239 typedef struct renameargs nfsrenameargs;
    240 typedef struct sattr nfssattr;
    241 typedef struct sattrargs nfssattrargs;
    242 typedef struct statfsokres nfsstatfsokres;
    243 typedef struct statfsres nfsstatfsres;
    244 typedef struct symlinkargs nfssymlinkargs;
    245 typedef struct writeargs nfswriteargs;
    246 
    247 /*
    248  * NFSv3 handle (copied from am_xdr_func.h, because it is needed here)
    249  * we use a different name but same storage size/alignment to avoid
    250  * conflicts.  Sigh, this is so hacky. -ezk
    251  */
    252 #define HPUX11_FHSIZE3 64	/* size in bytes of a file handle (v3) */
    253 struct hpux11_nfs_fh3 {
    254   u_int am_fh3_length;
    255   char am_fh3_data[HPUX11_FHSIZE3];
    256 };
    257 typedef struct hpux11_nfs_fh3 hpux11_nfs_fh3;
    258 
    259 /*
    260  * EXTERNALS:
    261  */
    262 
    263 extern void *nfsproc_null_2_svc(void *, struct svc_req *);
    264 extern nfsattrstat *nfsproc_getattr_2_svc(nfs_fh *, struct svc_req *);
    265 extern nfsattrstat *nfsproc_setattr_2_svc(nfssattrargs *, struct svc_req *);
    266 extern void *nfsproc_root_2_svc(void *, struct svc_req *);
    267 extern nfsdiropres *nfsproc_lookup_2_svc(nfsdiropargs *, struct svc_req *);
    268 extern nfsreadlinkres *nfsproc_readlink_2_svc(nfs_fh *, struct svc_req *);
    269 extern nfsreadres *nfsproc_read_2_svc(nfsreadargs *, struct svc_req *);
    270 extern void *nfsproc_writecache_2_svc(void *, struct svc_req *);
    271 extern nfsattrstat *nfsproc_write_2_svc(nfswriteargs *, struct svc_req *);
    272 extern nfsdiropres *nfsproc_create_2_svc(nfscreateargs *, struct svc_req *);
    273 extern nfsstat *nfsproc_remove_2_svc(nfsdiropargs *, struct svc_req *);
    274 extern nfsstat *nfsproc_rename_2_svc(nfsrenameargs *, struct svc_req *);
    275 extern nfsstat *nfsproc_link_2_svc(nfslinkargs *, struct svc_req *);
    276 extern nfsstat *nfsproc_symlink_2_svc(nfssymlinkargs *, struct svc_req *);
    277 extern nfsdiropres *nfsproc_mkdir_2_svc(nfscreateargs *, struct svc_req *);
    278 extern nfsstat *nfsproc_rmdir_2_svc(nfsdiropargs *, struct svc_req *);
    279 extern nfsreaddirres *nfsproc_readdir_2_svc(nfsreaddirargs *, struct svc_req *);
    280 extern nfsstatfsres *nfsproc_statfs_2_svc(nfs_fh *, struct svc_req *);
    281 
    282 extern bool_t xdr_nfsstat(XDR *, nfsstat*);
    283 extern bool_t xdr_ftype(XDR *, nfsftype*);
    284 extern bool_t xdr_nfs_fh(XDR *, nfs_fh*);
    285 extern bool_t xdr_nfstime(XDR *, nfstime*);
    286 extern bool_t xdr_fattr(XDR *, nfsfattr*);
    287 extern bool_t xdr_sattr(XDR *, nfssattr*);
    288 extern bool_t xdr_filename(XDR *, filename*);
    289 extern bool_t xdr_nfspath(XDR *, nfspath*);
    290 extern bool_t xdr_attrstat(XDR *, nfsattrstat*);
    291 extern bool_t xdr_sattrargs(XDR *, nfssattrargs*);
    292 extern bool_t xdr_diropargs(XDR *, nfsdiropargs*);
    293 extern bool_t xdr_diropokres(XDR *, nfsdiropokres*);
    294 extern bool_t xdr_diropres(XDR *, nfsdiropres*);
    295 extern bool_t xdr_readlinkres(XDR *, nfsreadlinkres*);
    296 extern bool_t xdr_readargs(XDR *, nfsreadargs*);
    297 extern bool_t xdr_readokres(XDR *, nfsreadokres*);
    298 extern bool_t xdr_readres(XDR *, nfsreadres*);
    299 extern bool_t xdr_writeargs(XDR *, nfswriteargs*);
    300 extern bool_t xdr_createargs(XDR *, nfscreateargs*);
    301 extern bool_t xdr_renameargs(XDR *, nfsrenameargs*);
    302 extern bool_t xdr_linkargs(XDR *, nfslinkargs*);
    303 extern bool_t xdr_symlinkargs(XDR *, nfssymlinkargs*);
    304 extern bool_t xdr_nfscookie(XDR *, nfscookie);
    305 extern bool_t xdr_readdirargs(XDR *, nfsreaddirargs*);
    306 extern bool_t xdr_entry(XDR *, nfsentry*);
    307 extern bool_t xdr_dirlist(XDR *, nfsdirlist*);
    308 extern bool_t xdr_readdirres(XDR *, nfsreaddirres*);
    309 extern bool_t xdr_statfsokres(XDR *, nfsstatfsokres*);
    310 extern bool_t xdr_statfsres(XDR *, nfsstatfsres*);
    311 
    312 /*
    313  * STRUCTURES:
    314  */
    315 
    316 /* This is similar to Solaris 2.5.1 */
    317 struct nfs_args {
    318   struct netbuf		*addr;		/* file server address */
    319   struct netbuf		*syncaddr;	/* secure NFS time sync addr */
    320   struct knetconfig	*knconf;	/* transport netconfig struct */
    321   char			*hostname;	/* server's hostname */
    322   char			*netname;	/* server's netname */
    323   caddr_t		fh;		/* File handle to be mounted */
    324   int			flags;		/* flags */
    325   int			wsize;		/* write size in bytes */
    326   int			rsize;		/* read size in bytes */
    327   int			timeo;		/* initial timeout in .1 secs */
    328   int			retrans;	/* times to retry send */
    329   int			acregmin;	/* attr cache file min secs */
    330   int			acregmax;	/* attr cache file max secs */
    331   int			acdirmin;	/* attr cache dir min secs */
    332   int			acdirmax;	/* attr cache dir max secs */
    333   char                  *fsname;        /* F/S name */
    334 #if 0
    335   struct pathcnf	*pathconf;	/* static pathconf kludge */
    336 #endif /* 0 */
    337 };
    338 
    339 struct nfs_fh {
    340   char fh_data[NFS_FHSIZE];
    341 };
    342 
    343 struct nfstime {
    344   u_int nt_seconds;
    345   u_int nt_useconds;
    346 };
    347 
    348 struct fattr {
    349   nfsftype na_type;
    350   u_int na_mode;
    351   u_int na_nlink;
    352   u_int na_uid;
    353   u_int na_gid;
    354   u_int na_size;
    355   u_int na_blocksize;
    356   u_int na_rdev;
    357   u_int na_blocks;
    358   u_int na_fsid;
    359   u_int na_fileid;
    360   nfstime na_atime;
    361   nfstime na_mtime;
    362   nfstime na_ctime;
    363 };
    364 
    365 struct sattr {
    366   u_int sa_mode;
    367   u_int sa_uid;
    368   u_int sa_gid;
    369   u_int sa_size;
    370   nfstime sa_atime;
    371   nfstime sa_mtime;
    372 };
    373 
    374 struct attrstat {
    375   nfsstat ns_status;
    376   union {
    377     nfsfattr ns_attr_u;
    378   } ns_u;
    379 };
    380 
    381 struct sattrargs {
    382   nfs_fh sag_fhandle;
    383   nfssattr sag_attributes;
    384 };
    385 
    386 struct diropargs {
    387   nfs_fh da_fhandle;		/* was dir */
    388   filename da_name;
    389 };
    390 
    391 struct diropokres {
    392   nfs_fh drok_fhandle;
    393   nfsfattr drok_attributes;
    394 };
    395 
    396 struct diropres {
    397   nfsstat dr_status;		/* was status */
    398   union {
    399     nfsdiropokres dr_drok_u;	/* was diropres */
    400   } dr_u;			/* was diropres_u */
    401 };
    402 
    403 struct readlinkres {
    404   nfsstat rlr_status;
    405   union {
    406     nfspath rlr_data_u;
    407   } rlr_u;
    408 };
    409 
    410 struct readargs {
    411   nfs_fh ra_fhandle;
    412   u_int ra_offset;
    413   u_int ra_count;
    414   u_int ra_totalcount;
    415 };
    416 
    417 struct readokres {
    418   nfsfattr raok_attributes;
    419   struct {
    420     u_int raok_len_u;
    421     char *raok_val_u;
    422   } raok_u;
    423 };
    424 
    425 struct readres {
    426   nfsstat rr_status;
    427   union {
    428     nfsreadokres rr_reply_u;
    429   } rr_u;
    430 };
    431 
    432 struct writeargs {
    433   nfs_fh wra_fhandle;
    434   u_int wra_beginoffset;
    435   u_int wra_offset;
    436   u_int wra_totalcount;
    437   struct {
    438     u_int wra_len_u;
    439     char *wra_val_u;
    440   } wra_u;
    441 };
    442 
    443 struct createargs {
    444   nfsdiropargs ca_where;
    445   nfssattr ca_attributes;
    446 };
    447 
    448 struct renameargs {
    449   nfsdiropargs rna_from;
    450   nfsdiropargs rna_to;
    451 };
    452 
    453 struct linkargs {
    454   nfs_fh la_fhandle;
    455   nfsdiropargs la_to;
    456 };
    457 
    458 struct symlinkargs {
    459   nfsdiropargs sla_from;
    460   nfspath sla_to;
    461   nfssattr sla_attributes;
    462 };
    463 
    464 struct readdirargs {
    465   nfs_fh rda_fhandle;
    466   nfscookie rda_cookie;
    467   u_int rda_count;
    468 };
    469 
    470 struct entry {
    471   u_int ne_fileid;
    472   filename ne_name;
    473   nfscookie ne_cookie;
    474   nfsentry *ne_nextentry;
    475 };
    476 
    477 struct dirlist {
    478   nfsentry *dl_entries;
    479   bool_t dl_eof;
    480 };
    481 
    482 struct readdirres {
    483   nfsstat rdr_status;
    484   union {
    485     nfsdirlist rdr_reply_u;
    486   } rdr_u;
    487 };
    488 
    489 struct statfsokres {
    490   u_int sfrok_tsize;
    491   u_int sfrok_bsize;
    492   u_int sfrok_blocks;
    493   u_int sfrok_bfree;
    494   u_int sfrok_bavail;
    495 };
    496 
    497 struct statfsres {
    498   nfsstat sfr_status;
    499   union {
    500     nfsstatfsokres sfr_reply_u;
    501   } sfr_u;
    502 };
    503 
    504 /*
    505  **************************************************************************
    506  * HP-UX 11 has Autofs support, but we don't support it yet.
    507  * For now, undefine it or define dummy entries.
    508  **************************************************************************
    509  */
    510 #ifdef MNTTYPE_AUTOFS
    511 # undef MNTTYPE_AUTOFS
    512 #endif /* MNTTYPE_AUTOFS */
    513 #ifdef MNTTAB_TYPE_AUTOFS
    514 # undef MNTTAB_TYPE_AUTOFS
    515 #endif /* MNTTAB_TYPE_AUTOFS */
    516 #ifdef HAVE_FS_AUTOFS
    517 # undef HAVE_FS_AUTOFS
    518 #endif /* HAVE_FS_AUTOFS */
    519 
    520 #ifdef MNTTYPE_NFS3
    521 
    522 #define NFSPROC3_LOOKUP ((u_long) 3)
    523 enum nfsstat3 {
    524 	NFS3_OK = 0,
    525 	NFS3ERR_PERM = 1,
    526 	NFS3ERR_NOENT = 2,
    527 	NFS3ERR_IO = 5,
    528 	NFS3ERR_NXIO = 6,
    529 	NFS3ERR_ACCES = 13,
    530 	NFS3ERR_EXIST = 17,
    531 	NFS3ERR_XDEV = 18,
    532 	NFS3ERR_NODEV = 19,
    533 	NFS3ERR_NOTDIR = 20,
    534 	NFS3ERR_ISDIR = 21,
    535 	NFS3ERR_INVAL = 22,
    536 	NFS3ERR_FBIG = 27,
    537 	NFS3ERR_NOSPC = 28,
    538 	NFS3ERR_ROFS = 30,
    539 	NFS3ERR_MLINK = 31,
    540 	NFS3ERR_NAMETOOLONG = 63,
    541 	NFS3ERR_NOTEMPTY = 66,
    542 	NFS3ERR_DQUOT = 69,
    543 	NFS3ERR_STALE = 70,
    544 	NFS3ERR_REMOTE = 71,
    545 	NFS3ERR_BADHANDLE = 10001,
    546 	NFS3ERR_NOT_SYNC = 10002,
    547 	NFS3ERR_BAD_COOKIE = 10003,
    548 	NFS3ERR_NOTSUPP = 10004,
    549 	NFS3ERR_TOOSMALL = 10005,
    550 	NFS3ERR_SERVERFAULT = 10006,
    551 	NFS3ERR_BADTYPE = 10007,
    552 	NFS3ERR_JUKEBOX = 10008
    553 };
    554 typedef enum nfsstat3 nfsstat3;
    555 
    556 typedef char *filename3;
    557 
    558 struct diropargs3 {
    559 	hpux11_nfs_fh3 dir;
    560 	filename3 name;
    561 };
    562 typedef struct diropargs3 diropargs3;
    563 
    564 struct LOOKUP3args {
    565 	diropargs3 what;
    566 };
    567 typedef struct LOOKUP3args LOOKUP3args;
    568 
    569 struct LOOKUP3resok {
    570 	hpux11_nfs_fh3 object;
    571 #if 0
    572 	post_op_attr obj_attributes;
    573 	post_op_attr dir_attributes;
    574 #endif /* 0 */
    575 };
    576 typedef struct LOOKUP3resok LOOKUP3resok;
    577 
    578 struct LOOKUP3resfail {
    579   int dummy;
    580 #if 0
    581 	post_op_attr dir_attributes;
    582 #endif /* 0 */
    583 };
    584 typedef struct LOOKUP3resfail LOOKUP3resfail;
    585 
    586 struct LOOKUP3res {
    587 	nfsstat3 status;
    588 	union {
    589 		LOOKUP3resok ok;
    590 		LOOKUP3resfail fail;
    591 	} res_u;
    592 };
    593 typedef struct LOOKUP3res LOOKUP3res;
    594 
    595 # endif /* MNTTYPE_NFS3 */
    596 
    597 #endif /* not _AMU_NFS_PROT_H */
    598