Annotation of 43BSDReno/usr.sbin/amd/rpcx/nfs_prot.h, revision 1.1.1.1

1.1       root        1: /*
                      2:  * $Id: nfs_prot.h,v 5.2 90/06/23 22:20:24 jsp Rel $
                      3:  *
                      4:  * Copyright (c) 1990 Jan-Simon Pendry
                      5:  * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
                      6:  * Copyright (c) 1990 The Regents of the University of California.
                      7:  * All rights reserved.
                      8:  *
                      9:  * This code is derived from software contributed to Berkeley by
                     10:  * Jan-Simon Pendry at Imperial College, London.
                     11:  *
                     12:  * Redistribution and use in source and binary forms are permitted provided
                     13:  * that: (1) source distributions retain this entire copyright notice and
                     14:  * comment, and (2) distributions including binaries display the following
                     15:  * acknowledgement:  ``This product includes software developed by the
                     16:  * University of California, Berkeley and its contributors'' in the
                     17:  * documentation or other materials provided with the distribution and in
                     18:  * all advertising materials mentioning features or use of this software.
                     19:  * Neither the name of the University nor the names of its contributors may
                     20:  * be used to endorse or promote products derived from this software without
                     21:  * specific prior written permission.
                     22:  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
                     23:  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
                     24:  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
                     25:  *
                     26:  *     @(#)nfs_prot.h  5.1 (Berkeley) 7/19/90
                     27:  */
                     28: 
                     29: #define        xdr_nfsstat xdr_enum
                     30: #define        xdr_ftype xdr_enum
                     31: 
                     32: #define NFS_PORT 2049
                     33: #define NFS_MAXDATA 8192
                     34: #define NFS_MAXPATHLEN 1024
                     35: #define NFS_MAXNAMLEN 255
                     36: #define NFS_FHSIZE 32
                     37: #define NFS_COOKIESIZE 4
                     38: #define NFS_FIFO_DEV -1
                     39: #define NFSMODE_FMT 0170000
                     40: #define NFSMODE_DIR 0040000
                     41: #define NFSMODE_CHR 0020000
                     42: #define NFSMODE_BLK 0060000
                     43: #define NFSMODE_REG 0100000
                     44: #define NFSMODE_LNK 0120000
                     45: #define NFSMODE_SOCK 0140000
                     46: #define NFSMODE_FIFO 0010000
                     47: 
                     48: enum nfsstat {
                     49:        NFS_OK = 0,
                     50:        NFSERR_PERM = 1,
                     51:        NFSERR_NOENT = 2,
                     52:        NFSERR_IO = 5,
                     53:        NFSERR_NXIO = 6,
                     54:        NFSERR_ACCES = 13,
                     55:        NFSERR_EXIST = 17,
                     56:        NFSERR_NODEV = 19,
                     57:        NFSERR_NOTDIR = 20,
                     58:        NFSERR_ISDIR = 21,
                     59:        NFSERR_FBIG = 27,
                     60:        NFSERR_NOSPC = 28,
                     61:        NFSERR_ROFS = 30,
                     62:        NFSERR_NAMETOOLONG = 63,
                     63:        NFSERR_NOTEMPTY = 66,
                     64:        NFSERR_DQUOT = 69,
                     65:        NFSERR_STALE = 70,
                     66:        NFSERR_WFLUSH = 99
                     67: };
                     68: typedef enum nfsstat nfsstat;
                     69: bool_t xdr_nfsstat();
                     70: 
                     71: 
                     72: enum ftype {
                     73:        NFNON = 0,
                     74:        NFREG = 1,
                     75:        NFDIR = 2,
                     76:        NFBLK = 3,
                     77:        NFCHR = 4,
                     78:        NFLNK = 5,
                     79:        NFSOCK = 6,
                     80:        NFBAD = 7,
                     81:        NFFIFO = 8
                     82: };
                     83: typedef enum ftype ftype;
                     84: /* static bool_t xdr_ftype(); */
                     85: 
                     86: 
                     87: struct nfs_fh {
                     88:        char data[NFS_FHSIZE];
                     89: };
                     90: typedef struct nfs_fh nfs_fh;
                     91: bool_t xdr_nfs_fh();
                     92: 
                     93: 
                     94: struct nfstime {
                     95:        u_int seconds;
                     96:        u_int useconds;
                     97: };
                     98: typedef struct nfstime nfstime;
                     99: /* static bool_t xdr_nfstime(); */
                    100: 
                    101: 
                    102: struct fattr {
                    103:        ftype type;
                    104:        u_int mode;
                    105:        u_int nlink;
                    106:        u_int uid;
                    107:        u_int gid;
                    108:        u_int size;
                    109:        u_int blocksize;
                    110:        u_int rdev;
                    111:        u_int blocks;
                    112:        u_int fsid;
                    113:        u_int fileid;
                    114:        nfstime atime;
                    115:        nfstime mtime;
                    116:        nfstime ctime;
                    117: };
                    118: typedef struct fattr fattr;
                    119: /* static bool_t xdr_fattr(); */
                    120: 
                    121: 
                    122: struct sattr {
                    123:        u_int mode;
                    124:        u_int uid;
                    125:        u_int gid;
                    126:        u_int size;
                    127:        nfstime atime;
                    128:        nfstime mtime;
                    129: };
                    130: typedef struct sattr sattr;
                    131: /* static bool_t xdr_sattr(); */
                    132: 
                    133: 
                    134: typedef char *filename;
                    135: /* static bool_t xdr_filename(); */
                    136: 
                    137: 
                    138: typedef char *nfspath;
                    139: bool_t xdr_nfspath();
                    140: 
                    141: 
                    142: struct attrstat {
                    143:        nfsstat status;
                    144:        union {
                    145:                fattr attributes;
                    146:        } attrstat_u;
                    147: };
                    148: typedef struct attrstat attrstat;
                    149: bool_t xdr_attrstat();
                    150: 
                    151: 
                    152: struct sattrargs {
                    153:        nfs_fh file;
                    154:        sattr attributes;
                    155: };
                    156: typedef struct sattrargs sattrargs;
                    157: bool_t xdr_sattrargs();
                    158: 
                    159: 
                    160: struct diropargs {
                    161:        nfs_fh dir;
                    162:        filename name;
                    163: };
                    164: typedef struct diropargs diropargs;
                    165: bool_t xdr_diropargs();
                    166: 
                    167: 
                    168: struct diropokres {
                    169:        nfs_fh file;
                    170:        fattr attributes;
                    171: };
                    172: typedef struct diropokres diropokres;
                    173: bool_t xdr_diropokres();
                    174: 
                    175: 
                    176: struct diropres {
                    177:        nfsstat status;
                    178:        union {
                    179:                diropokres diropres;
                    180:        } diropres_u;
                    181: };
                    182: typedef struct diropres diropres;
                    183: bool_t xdr_diropres();
                    184: 
                    185: 
                    186: struct readlinkres {
                    187:        nfsstat status;
                    188:        union {
                    189:                nfspath data;
                    190:        } readlinkres_u;
                    191: };
                    192: typedef struct readlinkres readlinkres;
                    193: bool_t xdr_readlinkres();
                    194: 
                    195: 
                    196: struct readargs {
                    197:        nfs_fh file;
                    198:        u_int offset;
                    199:        u_int count;
                    200:        u_int totalcount;
                    201: };
                    202: typedef struct readargs readargs;
                    203: bool_t xdr_readargs();
                    204: 
                    205: 
                    206: struct readokres {
                    207:        fattr attributes;
                    208:        struct {
                    209:                u_int data_len;
                    210:                char *data_val;
                    211:        } data;
                    212: };
                    213: typedef struct readokres readokres;
                    214: bool_t xdr_readokres();
                    215: 
                    216: 
                    217: struct readres {
                    218:        nfsstat status;
                    219:        union {
                    220:                readokres reply;
                    221:        } readres_u;
                    222: };
                    223: typedef struct readres readres;
                    224: bool_t xdr_readres();
                    225: 
                    226: 
                    227: struct writeargs {
                    228:        nfs_fh file;
                    229:        u_int beginoffset;
                    230:        u_int offset;
                    231:        u_int totalcount;
                    232:        struct {
                    233:                u_int data_len;
                    234:                char *data_val;
                    235:        } data;
                    236: };
                    237: typedef struct writeargs writeargs;
                    238: bool_t xdr_writeargs();
                    239: 
                    240: 
                    241: struct createargs {
                    242:        diropargs where;
                    243:        sattr attributes;
                    244: };
                    245: typedef struct createargs createargs;
                    246: bool_t xdr_createargs();
                    247: 
                    248: 
                    249: struct renameargs {
                    250:        diropargs from;
                    251:        diropargs to;
                    252: };
                    253: typedef struct renameargs renameargs;
                    254: bool_t xdr_renameargs();
                    255: 
                    256: 
                    257: struct linkargs {
                    258:        nfs_fh from;
                    259:        diropargs to;
                    260: };
                    261: typedef struct linkargs linkargs;
                    262: bool_t xdr_linkargs();
                    263: 
                    264: 
                    265: struct symlinkargs {
                    266:        diropargs from;
                    267:        nfspath to;
                    268:        sattr attributes;
                    269: };
                    270: typedef struct symlinkargs symlinkargs;
                    271: bool_t xdr_symlinkargs();
                    272: 
                    273: 
                    274: typedef char nfscookie[NFS_COOKIESIZE];
                    275: /* static bool_t xdr_nfscookie(); */
                    276: 
                    277: 
                    278: struct readdirargs {
                    279:        nfs_fh dir;
                    280:        nfscookie cookie;
                    281:        u_int count;
                    282: };
                    283: typedef struct readdirargs readdirargs;
                    284: bool_t xdr_readdirargs();
                    285: 
                    286: 
                    287: struct entry {
                    288:        u_int fileid;
                    289:        filename name;
                    290:        nfscookie cookie;
                    291:        struct entry *nextentry;
                    292: };
                    293: typedef struct entry entry;
                    294: /* static bool_t xdr_entry(); */
                    295: 
                    296: 
                    297: struct dirlist {
                    298:        entry *entries;
                    299:        bool_t eof;
                    300: };
                    301: typedef struct dirlist dirlist;
                    302: /* static bool_t xdr_dirlist(); */
                    303: 
                    304: 
                    305: struct readdirres {
                    306:        nfsstat status;
                    307:        union {
                    308:                dirlist reply;
                    309:        } readdirres_u;
                    310: };
                    311: typedef struct readdirres readdirres;
                    312: bool_t xdr_readdirres();
                    313: 
                    314: 
                    315: struct statfsokres {
                    316:        u_int tsize;
                    317:        u_int bsize;
                    318:        u_int blocks;
                    319:        u_int bfree;
                    320:        u_int bavail;
                    321: };
                    322: typedef struct statfsokres statfsokres;
                    323: bool_t xdr_statfsokres();
                    324: 
                    325: 
                    326: struct statfsres {
                    327:        nfsstat status;
                    328:        union {
                    329:                statfsokres reply;
                    330:        } statfsres_u;
                    331: };
                    332: typedef struct statfsres statfsres;
                    333: bool_t xdr_statfsres();
                    334: 
                    335: 
                    336: #define NFS_PROGRAM ((u_long)100003)
                    337: #define NFS_VERSION ((u_long)2)
                    338: #define NFSPROC_NULL ((u_long)0)
                    339: extern voidp nfsproc_null_2();
                    340: #define NFSPROC_GETATTR ((u_long)1)
                    341: extern attrstat *nfsproc_getattr_2();
                    342: #define NFSPROC_SETATTR ((u_long)2)
                    343: extern attrstat *nfsproc_setattr_2();
                    344: #define NFSPROC_ROOT ((u_long)3)
                    345: extern voidp nfsproc_root_2();
                    346: #define NFSPROC_LOOKUP ((u_long)4)
                    347: extern diropres *nfsproc_lookup_2();
                    348: #define NFSPROC_READLINK ((u_long)5)
                    349: extern readlinkres *nfsproc_readlink_2();
                    350: #define NFSPROC_READ ((u_long)6)
                    351: extern readres *nfsproc_read_2();
                    352: #define NFSPROC_WRITECACHE ((u_long)7)
                    353: extern voidp nfsproc_writecache_2();
                    354: #define NFSPROC_WRITE ((u_long)8)
                    355: extern attrstat *nfsproc_write_2();
                    356: #define NFSPROC_CREATE ((u_long)9)
                    357: extern diropres *nfsproc_create_2();
                    358: #define NFSPROC_REMOVE ((u_long)10)
                    359: extern nfsstat *nfsproc_remove_2();
                    360: #define NFSPROC_RENAME ((u_long)11)
                    361: extern nfsstat *nfsproc_rename_2();
                    362: #define NFSPROC_LINK ((u_long)12)
                    363: extern nfsstat *nfsproc_link_2();
                    364: #define NFSPROC_SYMLINK ((u_long)13)
                    365: extern nfsstat *nfsproc_symlink_2();
                    366: #define NFSPROC_MKDIR ((u_long)14)
                    367: extern diropres *nfsproc_mkdir_2();
                    368: #define NFSPROC_RMDIR ((u_long)15)
                    369: extern nfsstat *nfsproc_rmdir_2();
                    370: #define NFSPROC_READDIR ((u_long)16)
                    371: extern readdirres *nfsproc_readdir_2();
                    372: #define NFSPROC_STATFS ((u_long)17)
                    373: extern statfsres *nfsproc_statfs_2();
                    374: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.