1 /* 2 * Please do not edit this file. 3 * It was generated using rpcgen. 4 */ 5 6 #ifndef _WEBNFS_H_RPCGEN 7 #define _WEBNFS_H_RPCGEN 8 9 #include <rpc/rpc.h> 10 #ifndef _KERNEL 11 #include <synch.h> 12 #include <thread.h> 13 #endif /* !_KERNEL */ 14 15 #ifdef __cplusplus 16 extern "C" { 17 #endif 18 19 #pragma ident "%Z%%M% %I% %E% SMI" 20 #define WNL_PORT 2049 21 #define WNL_MAXDATA 8192 22 #define WNL_MAXNAMLEN 255 23 #define WNL_FHSIZE 32 24 #define WNL_FIFO_DEV -1 25 #define WNL_NATIVEPATH 0x80 26 #define WNL_SEC_NEGO 0x81 27 #define WNLMODE_FMT 0170000 28 #define WNLMODE_DIR 0040000 29 #define WNLMODE_CHR 0020000 30 #define WNLMODE_BLK 0060000 31 #define WNLMODE_REG 0100000 32 #define WNLMODE_LNK 0120000 33 #define WNLMODE_SOCK 0140000 34 #define WNLMODE_FIFO 0010000 35 36 enum wnl_stat { 37 WNL_OK = 0, 38 WNLERR_PERM = 1, 39 WNLERR_NOENT = 2, 40 WNLERR_IO = 5, 41 WNLERR_NXIO = 6, 42 WNLERR_ACCES = 13, 43 WNLERR_EXIST = 17, 44 WNLERR_XDEV = 18, 45 WNLERR_NODEV = 19, 46 WNLERR_NOTDIR = 20, 47 WNLERR_ISDIR = 21, 48 WNLERR_INVAL = 22, 49 WNLERR_FBIG = 27, 50 WNLERR_NOSPC = 28, 51 WNLERR_ROFS = 30, 52 WNLERR_OPNOTSUPP = 45, 53 WNLERR_NAMETOOLONG = 63, 54 WNLERR_NOTEMPTY = 66, 55 WNLERR_DQUOT = 69, 56 WNLERR_STALE = 70, 57 WNLERR_REMOTE = 71, 58 WNLERR_WFLUSH = 72 59 }; 60 typedef enum wnl_stat wnl_stat; 61 62 enum wnl_ftype { 63 WNL_NON = 0, 64 WNL_REG = 1, 65 WNL_DIR = 2, 66 WNL_BLK = 3, 67 WNL_CHR = 4, 68 WNL_LNK = 5, 69 WNL_SOCK = 6, 70 WNL_BAD = 7, 71 WNL_FIFO = 8 72 }; 73 typedef enum wnl_ftype wnl_ftype; 74 75 struct wnl_fh { 76 char data[WNL_FHSIZE]; 77 }; 78 typedef struct wnl_fh wnl_fh; 79 80 struct wnl_time { 81 u_int seconds; 82 u_int useconds; 83 }; 84 typedef struct wnl_time wnl_time; 85 86 struct wnl_fattr { 87 wnl_ftype type; 88 u_int mode; 89 u_int nlink; 90 u_int uid; 91 u_int gid; 92 u_int size; 93 u_int blocksize; 94 u_int rdev; 95 u_int blocks; 96 u_int fsid; 97 u_int fileid; 98 wnl_time atime; 99 wnl_time mtime; 100 wnl_time ctime; 101 }; 102 typedef struct wnl_fattr wnl_fattr; 103 104 typedef char *wnl_filename; 105 106 struct wnl_diropargs { 107 wnl_fh dir; 108 wnl_filename name; 109 }; 110 typedef struct wnl_diropargs wnl_diropargs; 111 112 struct wnl_diropokres { 113 wnl_fh file; 114 wnl_fattr attributes; 115 }; 116 typedef struct wnl_diropokres wnl_diropokres; 117 118 struct wnl_diropres { 119 wnl_stat status; 120 union { 121 wnl_diropokres wnl_diropres; 122 } wnl_diropres_u; 123 }; 124 typedef struct wnl_diropres wnl_diropres; 125 #define WNL3_FHSIZE 64 126 127 typedef u_longlong_t wnl_uint64; 128 129 typedef longlong_t wnl_int64; 130 131 typedef u_int wnl_uint32; 132 133 typedef char *wnl_filename3; 134 135 typedef wnl_uint64 wnl_fileid3; 136 137 typedef wnl_uint32 wnl_uid3; 138 139 typedef wnl_uint32 wnl_gid3; 140 141 typedef wnl_uint64 wnl_size3; 142 143 typedef wnl_uint32 wnl_mode3; 144 145 enum wnl_stat3 { 146 WNL3_OK = 0, 147 WNL3ERR_PERM = 1, 148 WNL3ERR_NOENT = 2, 149 WNL3ERR_IO = 5, 150 WNL3ERR_NXIO = 6, 151 WNL3ERR_ACCES = 13, 152 WNL3ERR_EXIST = 17, 153 WNL3ERR_XDEV = 18, 154 WNL3ERR_NODEV = 19, 155 WNL3ERR_NOTDIR = 20, 156 WNL3ERR_ISDIR = 21, 157 WNL3ERR_INVAL = 22, 158 WNL3ERR_FBIG = 27, 159 WNL3ERR_NOSPC = 28, 160 WNL3ERR_ROFS = 30, 161 WNL3ERR_MLINK = 31, 162 WNL3ERR_NAMETOOLONG = 63, 163 WNL3ERR_NOTEMPTY = 66, 164 WNL3ERR_DQUOT = 69, 165 WNL3ERR_STALE = 70, 166 WNL3ERR_REMOTE = 71, 167 WNL3ERR_BADHANDLE = 10001, 168 WNL3ERR_NOT_SYNC = 10002, 169 WNL3ERR_BAD_COOKIE = 10003, 170 WNL3ERR_NOTSUPP = 10004, 171 WNL3ERR_TOOSMALL = 10005, 172 WNL3ERR_SERVERFAULT = 10006, 173 WNL3ERR_BADTYPE = 10007, 174 WNL3ERR_JUKEBOX = 10008 175 }; 176 typedef enum wnl_stat3 wnl_stat3; 177 178 enum wnl_ftype3 { 179 WNL_3REG = 1, 180 WNL_3DIR = 2, 181 WNL_3BLK = 3, 182 WNL_3CHR = 4, 183 WNL_3LNK = 5, 184 WNL_3SOCK = 6, 185 WNL_3FIFO = 7 186 }; 187 typedef enum wnl_ftype3 wnl_ftype3; 188 189 struct wnl_specdata3 { 190 wnl_uint32 specdata1; 191 wnl_uint32 specdata2; 192 }; 193 typedef struct wnl_specdata3 wnl_specdata3; 194 195 struct wnl_fh3 { 196 struct { 197 u_int data_len; 198 char *data_val; 199 } data; 200 }; 201 typedef struct wnl_fh3 wnl_fh3; 202 203 struct wnl_time3 { 204 wnl_uint32 seconds; 205 wnl_uint32 nseconds; 206 }; 207 typedef struct wnl_time3 wnl_time3; 208 209 struct wnl_fattr3 { 210 wnl_ftype3 type; 211 wnl_mode3 mode; 212 wnl_uint32 nlink; 213 wnl_uid3 uid; 214 wnl_gid3 gid; 215 wnl_size3 size; 216 wnl_size3 used; 217 wnl_specdata3 rdev; 218 wnl_uint64 fsid; 219 wnl_fileid3 fileid; 220 wnl_time3 atime; 221 wnl_time3 mtime; 222 wnl_time3 ctime; 223 }; 224 typedef struct wnl_fattr3 wnl_fattr3; 225 226 struct wnl_post_op_attr { 227 bool_t attributes_follow; 228 union { 229 wnl_fattr3 attributes; 230 } wnl_post_op_attr_u; 231 }; 232 typedef struct wnl_post_op_attr wnl_post_op_attr; 233 234 struct wln_post_op_fh3 { 235 bool_t handle_follows; 236 union { 237 wnl_fh3 handle; 238 } wln_post_op_fh3_u; 239 }; 240 typedef struct wln_post_op_fh3 wln_post_op_fh3; 241 242 struct wnl_diropargs3 { 243 wnl_fh3 dir; 244 wnl_filename3 name; 245 }; 246 typedef struct wnl_diropargs3 wnl_diropargs3; 247 248 struct WNL_LOOKUP3args { 249 wnl_diropargs3 what; 250 }; 251 typedef struct WNL_LOOKUP3args WNL_LOOKUP3args; 252 253 struct WNL_LOOKUP3resok { 254 wnl_fh3 object; 255 wnl_post_op_attr obj_attributes; 256 wnl_post_op_attr dir_attributes; 257 }; 258 typedef struct WNL_LOOKUP3resok WNL_LOOKUP3resok; 259 260 struct WNL_LOOKUP3resfail { 261 wnl_post_op_attr dir_attributes; 262 }; 263 typedef struct WNL_LOOKUP3resfail WNL_LOOKUP3resfail; 264 265 struct WNL_LOOKUP3res { 266 wnl_stat3 status; 267 union { 268 WNL_LOOKUP3resok res_ok; 269 WNL_LOOKUP3resfail res_fail; 270 } WNL_LOOKUP3res_u; 271 }; 272 typedef struct WNL_LOOKUP3res WNL_LOOKUP3res; 273 #define MAX_FLAVORS 128 274 275 struct snego_t { 276 int cnt; 277 int array[MAX_FLAVORS]; 278 }; 279 typedef struct snego_t snego_t; 280 281 enum snego_stat { 282 SNEGO_SUCCESS = 0, 283 SNEGO_DEF_VALID = 1, 284 SNEGO_ARRAY_TOO_SMALL = 2, 285 SNEGO_FAILURE = 3 286 }; 287 typedef enum snego_stat snego_stat; 288 289 #define WNL_PROGRAM 100003 290 #define WNL_V2 2 291 292 #if defined(__STDC__) || defined(__cplusplus) 293 #define WNLPROC_NULL 0 294 extern enum clnt_stat wnlproc_null_2(void *, void *, CLIENT *); 295 extern bool_t wnlproc_null_2_svc(void *, void *, struct svc_req *); 296 #define WNLPROC_LOOKUP 4 297 extern enum clnt_stat wnlproc_lookup_2(wnl_diropargs *, wnl_diropres *, CLIENT *); 298 extern bool_t wnlproc_lookup_2_svc(wnl_diropargs *, wnl_diropres *, struct svc_req *); 299 extern int wnl_program_2_freeresult(SVCXPRT *, xdrproc_t, caddr_t); 300 301 #else /* K&R C */ 302 #define WNLPROC_NULL 0 303 extern enum clnt_stat wnlproc_null_2(); 304 extern bool_t wnlproc_null_2_svc(); 305 #define WNLPROC_LOOKUP 4 306 extern enum clnt_stat wnlproc_lookup_2(); 307 extern bool_t wnlproc_lookup_2_svc(); 308 extern int wnl_program_2_freeresult(); 309 #endif /* K&R C */ 310 #define WNL_V3 3 311 312 #if defined(__STDC__) || defined(__cplusplus) 313 #define WNLPROC3_NULL 0 314 extern enum clnt_stat wnlproc3_null_3(void *, void *, CLIENT *); 315 extern bool_t wnlproc3_null_3_svc(void *, void *, struct svc_req *); 316 #define WNLPROC3_LOOKUP 3 317 extern enum clnt_stat wnlproc3_lookup_3(WNL_LOOKUP3args *, WNL_LOOKUP3res *, CLIENT *); 318 extern bool_t wnlproc3_lookup_3_svc(WNL_LOOKUP3args *, WNL_LOOKUP3res *, struct svc_req *); 319 extern int wnl_program_3_freeresult(SVCXPRT *, xdrproc_t, caddr_t); 320 321 #else /* K&R C */ 322 #define WNLPROC3_NULL 0 323 extern enum clnt_stat wnlproc3_null_3(); 324 extern bool_t wnlproc3_null_3_svc(); 325 #define WNLPROC3_LOOKUP 3 326 extern enum clnt_stat wnlproc3_lookup_3(); 327 extern bool_t wnlproc3_lookup_3_svc(); 328 extern int wnl_program_3_freeresult(); 329 #endif /* K&R C */ 330 #define WNL_V4 4 331 332 #if defined(__STDC__) || defined(__cplusplus) 333 #define WNLPROC4_NULL 0 334 extern enum clnt_stat wnlproc4_null_4(void *, void *, CLIENT *); 335 extern bool_t wnlproc4_null_4_svc(void *, void *, struct svc_req *); 336 extern int wnl_program_4_freeresult(SVCXPRT *, xdrproc_t, caddr_t); 337 338 #else /* K&R C */ 339 #define WNLPROC4_NULL 0 340 extern enum clnt_stat wnlproc4_null_4(); 341 extern bool_t wnlproc4_null_4_svc(); 342 extern int wnl_program_4_freeresult(); 343 #endif /* K&R C */ 344 345 /* the xdr functions */ 346 347 #if defined(__STDC__) || defined(__cplusplus) 348 extern bool_t xdr_wnl_stat(XDR *, wnl_stat*); 349 extern bool_t xdr_wnl_ftype(XDR *, wnl_ftype*); 350 extern bool_t xdr_wnl_fh(XDR *, wnl_fh*); 351 extern bool_t xdr_wnl_time(XDR *, wnl_time*); 352 extern bool_t xdr_wnl_fattr(XDR *, wnl_fattr*); 353 extern bool_t xdr_wnl_filename(XDR *, wnl_filename*); 354 extern bool_t xdr_wnl_diropargs(XDR *, wnl_diropargs*); 355 extern bool_t xdr_wnl_diropokres(XDR *, wnl_diropokres*); 356 extern bool_t xdr_wnl_diropres(XDR *, wnl_diropres*); 357 extern bool_t xdr_wnl_uint64(XDR *, wnl_uint64*); 358 extern bool_t xdr_wnl_int64(XDR *, wnl_int64*); 359 extern bool_t xdr_wnl_uint32(XDR *, wnl_uint32*); 360 extern bool_t xdr_wnl_filename3(XDR *, wnl_filename3*); 361 extern bool_t xdr_wnl_fileid3(XDR *, wnl_fileid3*); 362 extern bool_t xdr_wnl_uid3(XDR *, wnl_uid3*); 363 extern bool_t xdr_wnl_gid3(XDR *, wnl_gid3*); 364 extern bool_t xdr_wnl_size3(XDR *, wnl_size3*); 365 extern bool_t xdr_wnl_mode3(XDR *, wnl_mode3*); 366 extern bool_t xdr_wnl_stat3(XDR *, wnl_stat3*); 367 extern bool_t xdr_wnl_ftype3(XDR *, wnl_ftype3*); 368 extern bool_t xdr_wnl_specdata3(XDR *, wnl_specdata3*); 369 extern bool_t xdr_wnl_fh3(XDR *, wnl_fh3*); 370 extern bool_t xdr_wnl_time3(XDR *, wnl_time3*); 371 extern bool_t xdr_wnl_fattr3(XDR *, wnl_fattr3*); 372 extern bool_t xdr_wnl_post_op_attr(XDR *, wnl_post_op_attr*); 373 extern bool_t xdr_wln_post_op_fh3(XDR *, wln_post_op_fh3*); 374 extern bool_t xdr_wnl_diropargs3(XDR *, wnl_diropargs3*); 375 extern bool_t xdr_WNL_LOOKUP3args(XDR *, WNL_LOOKUP3args*); 376 extern bool_t xdr_WNL_LOOKUP3resok(XDR *, WNL_LOOKUP3resok*); 377 extern bool_t xdr_WNL_LOOKUP3resfail(XDR *, WNL_LOOKUP3resfail*); 378 extern bool_t xdr_WNL_LOOKUP3res(XDR *, WNL_LOOKUP3res*); 379 extern bool_t xdr_snego_t(XDR *, snego_t*); 380 extern bool_t xdr_snego_stat(XDR *, snego_stat*); 381 382 #else /* K&R C */ 383 extern bool_t xdr_wnl_stat(); 384 extern bool_t xdr_wnl_ftype(); 385 extern bool_t xdr_wnl_fh(); 386 extern bool_t xdr_wnl_time(); 387 extern bool_t xdr_wnl_fattr(); 388 extern bool_t xdr_wnl_filename(); 389 extern bool_t xdr_wnl_diropargs(); 390 extern bool_t xdr_wnl_diropokres(); 391 extern bool_t xdr_wnl_diropres(); 392 extern bool_t xdr_wnl_uint64(); 393 extern bool_t xdr_wnl_int64(); 394 extern bool_t xdr_wnl_uint32(); 395 extern bool_t xdr_wnl_filename3(); 396 extern bool_t xdr_wnl_fileid3(); 397 extern bool_t xdr_wnl_uid3(); 398 extern bool_t xdr_wnl_gid3(); 399 extern bool_t xdr_wnl_size3(); 400 extern bool_t xdr_wnl_mode3(); 401 extern bool_t xdr_wnl_stat3(); 402 extern bool_t xdr_wnl_ftype3(); 403 extern bool_t xdr_wnl_specdata3(); 404 extern bool_t xdr_wnl_fh3(); 405 extern bool_t xdr_wnl_time3(); 406 extern bool_t xdr_wnl_fattr3(); 407 extern bool_t xdr_wnl_post_op_attr(); 408 extern bool_t xdr_wln_post_op_fh3(); 409 extern bool_t xdr_wnl_diropargs3(); 410 extern bool_t xdr_WNL_LOOKUP3args(); 411 extern bool_t xdr_WNL_LOOKUP3resok(); 412 extern bool_t xdr_WNL_LOOKUP3resfail(); 413 extern bool_t xdr_WNL_LOOKUP3res(); 414 extern bool_t xdr_snego_t(); 415 extern bool_t xdr_snego_stat(); 416 417 #endif /* K&R C */ 418 419 #ifdef __cplusplus 420 } 421 #endif 422 423 #endif /* !_WEBNFS_H_RPCGEN */ 424