1*7c478bd9Sstevel@tonic-gate /* 2*7c478bd9Sstevel@tonic-gate * CDDL HEADER START 3*7c478bd9Sstevel@tonic-gate * 4*7c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*7c478bd9Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 6*7c478bd9Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 7*7c478bd9Sstevel@tonic-gate * with the License. 8*7c478bd9Sstevel@tonic-gate * 9*7c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*7c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 11*7c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 12*7c478bd9Sstevel@tonic-gate * and limitations under the License. 13*7c478bd9Sstevel@tonic-gate * 14*7c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 15*7c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*7c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 17*7c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 18*7c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 19*7c478bd9Sstevel@tonic-gate * 20*7c478bd9Sstevel@tonic-gate * CDDL HEADER END 21*7c478bd9Sstevel@tonic-gate */ 22*7c478bd9Sstevel@tonic-gate /* 23*7c478bd9Sstevel@tonic-gate * Copyright 1996-1999, 2003 Sun Microsystems, Inc. All rights reserved. 24*7c478bd9Sstevel@tonic-gate * Use is subject to license terms. 25*7c478bd9Sstevel@tonic-gate */ 26*7c478bd9Sstevel@tonic-gate 27*7c478bd9Sstevel@tonic-gate %#pragma ident "%Z%%M% %I% %E% SMI" 28*7c478bd9Sstevel@tonic-gate 29*7c478bd9Sstevel@tonic-gate const WNL_PORT = 2049; 30*7c478bd9Sstevel@tonic-gate const WNL_MAXDATA = 8192; 31*7c478bd9Sstevel@tonic-gate const WNL_MAXNAMLEN = 255; 32*7c478bd9Sstevel@tonic-gate const WNL_FHSIZE = 32; 33*7c478bd9Sstevel@tonic-gate const WNL_FIFO_DEV = -1; /* size kludge for named pipes */ 34*7c478bd9Sstevel@tonic-gate 35*7c478bd9Sstevel@tonic-gate /* 36*7c478bd9Sstevel@tonic-gate * Indicator for native path semantics. 37*7c478bd9Sstevel@tonic-gate */ 38*7c478bd9Sstevel@tonic-gate const WNL_NATIVEPATH = 0x80; 39*7c478bd9Sstevel@tonic-gate 40*7c478bd9Sstevel@tonic-gate /* 41*7c478bd9Sstevel@tonic-gate * Indicator for security negotiation. 42*7c478bd9Sstevel@tonic-gate */ 43*7c478bd9Sstevel@tonic-gate const WNL_SEC_NEGO = 0x81; 44*7c478bd9Sstevel@tonic-gate 45*7c478bd9Sstevel@tonic-gate /* 46*7c478bd9Sstevel@tonic-gate * File types 47*7c478bd9Sstevel@tonic-gate */ 48*7c478bd9Sstevel@tonic-gate const WNLMODE_FMT = 0170000; /* type of file */ 49*7c478bd9Sstevel@tonic-gate const WNLMODE_DIR = 0040000; /* directory */ 50*7c478bd9Sstevel@tonic-gate const WNLMODE_CHR = 0020000; /* character special */ 51*7c478bd9Sstevel@tonic-gate const WNLMODE_BLK = 0060000; /* block special */ 52*7c478bd9Sstevel@tonic-gate const WNLMODE_REG = 0100000; /* regular */ 53*7c478bd9Sstevel@tonic-gate const WNLMODE_LNK = 0120000; /* symbolic link */ 54*7c478bd9Sstevel@tonic-gate const WNLMODE_SOCK = 0140000; /* socket */ 55*7c478bd9Sstevel@tonic-gate const WNLMODE_FIFO = 0010000; /* fifo */ 56*7c478bd9Sstevel@tonic-gate 57*7c478bd9Sstevel@tonic-gate /* 58*7c478bd9Sstevel@tonic-gate * Error status 59*7c478bd9Sstevel@tonic-gate */ 60*7c478bd9Sstevel@tonic-gate enum wnl_stat { 61*7c478bd9Sstevel@tonic-gate WNL_OK= 0, /* no error */ 62*7c478bd9Sstevel@tonic-gate WNLERR_PERM=1, /* Not owner */ 63*7c478bd9Sstevel@tonic-gate WNLERR_NOENT=2, /* No such file or directory */ 64*7c478bd9Sstevel@tonic-gate WNLERR_IO=5, /* I/O error */ 65*7c478bd9Sstevel@tonic-gate WNLERR_NXIO=6, /* No such device or address */ 66*7c478bd9Sstevel@tonic-gate WNLERR_ACCES=13, /* Permission denied */ 67*7c478bd9Sstevel@tonic-gate WNLERR_EXIST=17, /* File exists */ 68*7c478bd9Sstevel@tonic-gate WNLERR_XDEV=18, /* Cross-device link */ 69*7c478bd9Sstevel@tonic-gate WNLERR_NODEV=19, /* No such device */ 70*7c478bd9Sstevel@tonic-gate WNLERR_NOTDIR=20, /* Not a directory*/ 71*7c478bd9Sstevel@tonic-gate WNLERR_ISDIR=21, /* Is a directory */ 72*7c478bd9Sstevel@tonic-gate WNLERR_INVAL=22, /* Invalid argument */ 73*7c478bd9Sstevel@tonic-gate WNLERR_FBIG=27, /* File too large */ 74*7c478bd9Sstevel@tonic-gate WNLERR_NOSPC=28, /* No space left on device */ 75*7c478bd9Sstevel@tonic-gate WNLERR_ROFS=30, /* Read-only file system */ 76*7c478bd9Sstevel@tonic-gate WNLERR_OPNOTSUPP=45, /* Operation not supported */ 77*7c478bd9Sstevel@tonic-gate WNLERR_NAMETOOLONG=63, /* File name too long */ 78*7c478bd9Sstevel@tonic-gate WNLERR_NOTEMPTY=66, /* Directory not empty */ 79*7c478bd9Sstevel@tonic-gate WNLERR_DQUOT=69, /* Disc quota exceeded */ 80*7c478bd9Sstevel@tonic-gate WNLERR_STALE=70, /* Stale WNL file handle */ 81*7c478bd9Sstevel@tonic-gate WNLERR_REMOTE=71, /* Object is remote */ 82*7c478bd9Sstevel@tonic-gate WNLERR_WFLUSH=72 /* write cache flushed */ 83*7c478bd9Sstevel@tonic-gate }; 84*7c478bd9Sstevel@tonic-gate 85*7c478bd9Sstevel@tonic-gate /* 86*7c478bd9Sstevel@tonic-gate * File types 87*7c478bd9Sstevel@tonic-gate */ 88*7c478bd9Sstevel@tonic-gate enum wnl_ftype { 89*7c478bd9Sstevel@tonic-gate WNL_NON = 0, /* non-file */ 90*7c478bd9Sstevel@tonic-gate WNL_REG = 1, /* regular file */ 91*7c478bd9Sstevel@tonic-gate WNL_DIR = 2, /* directory */ 92*7c478bd9Sstevel@tonic-gate WNL_BLK = 3, /* block special */ 93*7c478bd9Sstevel@tonic-gate WNL_CHR = 4, /* character special */ 94*7c478bd9Sstevel@tonic-gate WNL_LNK = 5, /* symbolic link */ 95*7c478bd9Sstevel@tonic-gate WNL_SOCK = 6, /* unix domain sockets */ 96*7c478bd9Sstevel@tonic-gate WNL_BAD = 7, /* unused */ 97*7c478bd9Sstevel@tonic-gate WNL_FIFO = 8 /* named pipe */ 98*7c478bd9Sstevel@tonic-gate }; 99*7c478bd9Sstevel@tonic-gate 100*7c478bd9Sstevel@tonic-gate /* 101*7c478bd9Sstevel@tonic-gate * File access handle 102*7c478bd9Sstevel@tonic-gate */ 103*7c478bd9Sstevel@tonic-gate struct wnl_fh { 104*7c478bd9Sstevel@tonic-gate opaque data[WNL_FHSIZE]; 105*7c478bd9Sstevel@tonic-gate }; 106*7c478bd9Sstevel@tonic-gate 107*7c478bd9Sstevel@tonic-gate /* 108*7c478bd9Sstevel@tonic-gate * Timeval 109*7c478bd9Sstevel@tonic-gate */ 110*7c478bd9Sstevel@tonic-gate struct wnl_time { 111*7c478bd9Sstevel@tonic-gate unsigned seconds; 112*7c478bd9Sstevel@tonic-gate unsigned useconds; 113*7c478bd9Sstevel@tonic-gate }; 114*7c478bd9Sstevel@tonic-gate 115*7c478bd9Sstevel@tonic-gate 116*7c478bd9Sstevel@tonic-gate /* 117*7c478bd9Sstevel@tonic-gate * File attributes 118*7c478bd9Sstevel@tonic-gate */ 119*7c478bd9Sstevel@tonic-gate struct wnl_fattr { 120*7c478bd9Sstevel@tonic-gate wnl_ftype type; /* file type */ 121*7c478bd9Sstevel@tonic-gate unsigned mode; /* protection mode bits */ 122*7c478bd9Sstevel@tonic-gate unsigned nlink; /* # hard links */ 123*7c478bd9Sstevel@tonic-gate unsigned uid; /* owner user id */ 124*7c478bd9Sstevel@tonic-gate unsigned gid; /* owner group id */ 125*7c478bd9Sstevel@tonic-gate unsigned size; /* file size in bytes */ 126*7c478bd9Sstevel@tonic-gate unsigned blocksize; /* prefered block size */ 127*7c478bd9Sstevel@tonic-gate unsigned rdev; /* special device # */ 128*7c478bd9Sstevel@tonic-gate unsigned blocks; /* Kb of disk used by file */ 129*7c478bd9Sstevel@tonic-gate unsigned fsid; /* device # */ 130*7c478bd9Sstevel@tonic-gate unsigned fileid; /* inode # */ 131*7c478bd9Sstevel@tonic-gate wnl_time atime; /* time of last access */ 132*7c478bd9Sstevel@tonic-gate wnl_time mtime; /* time of last modification */ 133*7c478bd9Sstevel@tonic-gate wnl_time ctime; /* time of last change */ 134*7c478bd9Sstevel@tonic-gate }; 135*7c478bd9Sstevel@tonic-gate 136*7c478bd9Sstevel@tonic-gate typedef string wnl_filename<WNL_MAXNAMLEN>; 137*7c478bd9Sstevel@tonic-gate 138*7c478bd9Sstevel@tonic-gate /* 139*7c478bd9Sstevel@tonic-gate * Arguments for directory operations 140*7c478bd9Sstevel@tonic-gate */ 141*7c478bd9Sstevel@tonic-gate struct wnl_diropargs { 142*7c478bd9Sstevel@tonic-gate wnl_fh dir; /* directory file handle */ 143*7c478bd9Sstevel@tonic-gate wnl_filename name; /* name (up to WNL_MAXNAMLEN bytes) */ 144*7c478bd9Sstevel@tonic-gate }; 145*7c478bd9Sstevel@tonic-gate 146*7c478bd9Sstevel@tonic-gate struct wnl_diropokres { 147*7c478bd9Sstevel@tonic-gate wnl_fh file; 148*7c478bd9Sstevel@tonic-gate wnl_fattr attributes; 149*7c478bd9Sstevel@tonic-gate }; 150*7c478bd9Sstevel@tonic-gate 151*7c478bd9Sstevel@tonic-gate /* 152*7c478bd9Sstevel@tonic-gate * Results from directory operation 153*7c478bd9Sstevel@tonic-gate */ 154*7c478bd9Sstevel@tonic-gate union wnl_diropres switch (wnl_stat status) { 155*7c478bd9Sstevel@tonic-gate case WNL_OK: 156*7c478bd9Sstevel@tonic-gate wnl_diropokres wnl_diropres; 157*7c478bd9Sstevel@tonic-gate default: 158*7c478bd9Sstevel@tonic-gate void; 159*7c478bd9Sstevel@tonic-gate }; 160*7c478bd9Sstevel@tonic-gate 161*7c478bd9Sstevel@tonic-gate /* 162*7c478bd9Sstevel@tonic-gate * Version 3 declarations and definitions. 163*7c478bd9Sstevel@tonic-gate */ 164*7c478bd9Sstevel@tonic-gate 165*7c478bd9Sstevel@tonic-gate /* 166*7c478bd9Sstevel@tonic-gate * Sizes 167*7c478bd9Sstevel@tonic-gate */ 168*7c478bd9Sstevel@tonic-gate const WNL3_FHSIZE = 64; 169*7c478bd9Sstevel@tonic-gate 170*7c478bd9Sstevel@tonic-gate /* 171*7c478bd9Sstevel@tonic-gate * Basic data types 172*7c478bd9Sstevel@tonic-gate */ 173*7c478bd9Sstevel@tonic-gate typedef unsigned hyper wnl_uint64; 174*7c478bd9Sstevel@tonic-gate typedef hyper wnl_int64; 175*7c478bd9Sstevel@tonic-gate typedef unsigned int wnl_uint32; 176*7c478bd9Sstevel@tonic-gate typedef string wnl_filename3<>; 177*7c478bd9Sstevel@tonic-gate typedef wnl_uint64 wnl_fileid3; 178*7c478bd9Sstevel@tonic-gate typedef wnl_uint32 wnl_uid3; 179*7c478bd9Sstevel@tonic-gate typedef wnl_uint32 wnl_gid3; 180*7c478bd9Sstevel@tonic-gate typedef wnl_uint64 wnl_size3; 181*7c478bd9Sstevel@tonic-gate typedef wnl_uint32 wnl_mode3; 182*7c478bd9Sstevel@tonic-gate 183*7c478bd9Sstevel@tonic-gate /* 184*7c478bd9Sstevel@tonic-gate * Error status 185*7c478bd9Sstevel@tonic-gate */ 186*7c478bd9Sstevel@tonic-gate enum wnl_stat3 { 187*7c478bd9Sstevel@tonic-gate WNL3_OK = 0, 188*7c478bd9Sstevel@tonic-gate WNL3ERR_PERM = 1, 189*7c478bd9Sstevel@tonic-gate WNL3ERR_NOENT = 2, 190*7c478bd9Sstevel@tonic-gate WNL3ERR_IO = 5, 191*7c478bd9Sstevel@tonic-gate WNL3ERR_NXIO = 6, 192*7c478bd9Sstevel@tonic-gate WNL3ERR_ACCES = 13, 193*7c478bd9Sstevel@tonic-gate WNL3ERR_EXIST = 17, 194*7c478bd9Sstevel@tonic-gate WNL3ERR_XDEV = 18, 195*7c478bd9Sstevel@tonic-gate WNL3ERR_NODEV = 19, 196*7c478bd9Sstevel@tonic-gate WNL3ERR_NOTDIR = 20, 197*7c478bd9Sstevel@tonic-gate WNL3ERR_ISDIR = 21, 198*7c478bd9Sstevel@tonic-gate WNL3ERR_INVAL = 22, 199*7c478bd9Sstevel@tonic-gate WNL3ERR_FBIG = 27, 200*7c478bd9Sstevel@tonic-gate WNL3ERR_NOSPC = 28, 201*7c478bd9Sstevel@tonic-gate WNL3ERR_ROFS = 30, 202*7c478bd9Sstevel@tonic-gate WNL3ERR_MLINK = 31, 203*7c478bd9Sstevel@tonic-gate WNL3ERR_NAMETOOLONG = 63, 204*7c478bd9Sstevel@tonic-gate WNL3ERR_NOTEMPTY = 66, 205*7c478bd9Sstevel@tonic-gate WNL3ERR_DQUOT = 69, 206*7c478bd9Sstevel@tonic-gate WNL3ERR_STALE = 70, 207*7c478bd9Sstevel@tonic-gate WNL3ERR_REMOTE = 71, 208*7c478bd9Sstevel@tonic-gate WNL3ERR_BADHANDLE = 10001, 209*7c478bd9Sstevel@tonic-gate WNL3ERR_NOT_SYNC = 10002, 210*7c478bd9Sstevel@tonic-gate WNL3ERR_BAD_COOKIE = 10003, 211*7c478bd9Sstevel@tonic-gate WNL3ERR_NOTSUPP = 10004, 212*7c478bd9Sstevel@tonic-gate WNL3ERR_TOOSMALL = 10005, 213*7c478bd9Sstevel@tonic-gate WNL3ERR_SERVERFAULT = 10006, 214*7c478bd9Sstevel@tonic-gate WNL3ERR_BADTYPE = 10007, 215*7c478bd9Sstevel@tonic-gate WNL3ERR_JUKEBOX = 10008 216*7c478bd9Sstevel@tonic-gate }; 217*7c478bd9Sstevel@tonic-gate 218*7c478bd9Sstevel@tonic-gate /* 219*7c478bd9Sstevel@tonic-gate * File types 220*7c478bd9Sstevel@tonic-gate */ 221*7c478bd9Sstevel@tonic-gate enum wnl_ftype3 { 222*7c478bd9Sstevel@tonic-gate WNL_3REG = 1, 223*7c478bd9Sstevel@tonic-gate WNL_3DIR = 2, 224*7c478bd9Sstevel@tonic-gate WNL_3BLK = 3, 225*7c478bd9Sstevel@tonic-gate WNL_3CHR = 4, 226*7c478bd9Sstevel@tonic-gate WNL_3LNK = 5, 227*7c478bd9Sstevel@tonic-gate WNL_3SOCK = 6, 228*7c478bd9Sstevel@tonic-gate WNL_3FIFO = 7 229*7c478bd9Sstevel@tonic-gate }; 230*7c478bd9Sstevel@tonic-gate 231*7c478bd9Sstevel@tonic-gate struct wnl_specdata3 { 232*7c478bd9Sstevel@tonic-gate wnl_uint32 specdata1; 233*7c478bd9Sstevel@tonic-gate wnl_uint32 specdata2; 234*7c478bd9Sstevel@tonic-gate }; 235*7c478bd9Sstevel@tonic-gate 236*7c478bd9Sstevel@tonic-gate /* 237*7c478bd9Sstevel@tonic-gate * File access handle 238*7c478bd9Sstevel@tonic-gate */ 239*7c478bd9Sstevel@tonic-gate struct wnl_fh3 { 240*7c478bd9Sstevel@tonic-gate opaque data<WNL3_FHSIZE>; 241*7c478bd9Sstevel@tonic-gate }; 242*7c478bd9Sstevel@tonic-gate 243*7c478bd9Sstevel@tonic-gate /* 244*7c478bd9Sstevel@tonic-gate * Timeval 245*7c478bd9Sstevel@tonic-gate */ 246*7c478bd9Sstevel@tonic-gate struct wnl_time3 { 247*7c478bd9Sstevel@tonic-gate wnl_uint32 seconds; 248*7c478bd9Sstevel@tonic-gate wnl_uint32 nseconds; 249*7c478bd9Sstevel@tonic-gate }; 250*7c478bd9Sstevel@tonic-gate 251*7c478bd9Sstevel@tonic-gate /* 252*7c478bd9Sstevel@tonic-gate * File attributes 253*7c478bd9Sstevel@tonic-gate */ 254*7c478bd9Sstevel@tonic-gate struct wnl_fattr3 { 255*7c478bd9Sstevel@tonic-gate wnl_ftype3 type; 256*7c478bd9Sstevel@tonic-gate wnl_mode3 mode; 257*7c478bd9Sstevel@tonic-gate wnl_uint32 nlink; 258*7c478bd9Sstevel@tonic-gate wnl_uid3 uid; 259*7c478bd9Sstevel@tonic-gate wnl_gid3 gid; 260*7c478bd9Sstevel@tonic-gate wnl_size3 size; 261*7c478bd9Sstevel@tonic-gate wnl_size3 used; 262*7c478bd9Sstevel@tonic-gate wnl_specdata3 rdev; 263*7c478bd9Sstevel@tonic-gate wnl_uint64 fsid; 264*7c478bd9Sstevel@tonic-gate wnl_fileid3 fileid; 265*7c478bd9Sstevel@tonic-gate wnl_time3 atime; 266*7c478bd9Sstevel@tonic-gate wnl_time3 mtime; 267*7c478bd9Sstevel@tonic-gate wnl_time3 ctime; 268*7c478bd9Sstevel@tonic-gate }; 269*7c478bd9Sstevel@tonic-gate 270*7c478bd9Sstevel@tonic-gate /* 271*7c478bd9Sstevel@tonic-gate * File attributes 272*7c478bd9Sstevel@tonic-gate */ 273*7c478bd9Sstevel@tonic-gate union wnl_post_op_attr switch (bool attributes_follow) { 274*7c478bd9Sstevel@tonic-gate case TRUE: 275*7c478bd9Sstevel@tonic-gate wnl_fattr3 attributes; 276*7c478bd9Sstevel@tonic-gate case FALSE: 277*7c478bd9Sstevel@tonic-gate void; 278*7c478bd9Sstevel@tonic-gate }; 279*7c478bd9Sstevel@tonic-gate 280*7c478bd9Sstevel@tonic-gate union wln_post_op_fh3 switch (bool handle_follows) { 281*7c478bd9Sstevel@tonic-gate case TRUE: 282*7c478bd9Sstevel@tonic-gate wnl_fh3 handle; 283*7c478bd9Sstevel@tonic-gate case FALSE: 284*7c478bd9Sstevel@tonic-gate void; 285*7c478bd9Sstevel@tonic-gate }; 286*7c478bd9Sstevel@tonic-gate 287*7c478bd9Sstevel@tonic-gate struct wnl_diropargs3 { 288*7c478bd9Sstevel@tonic-gate wnl_fh3 dir; 289*7c478bd9Sstevel@tonic-gate wnl_filename3 name; 290*7c478bd9Sstevel@tonic-gate }; 291*7c478bd9Sstevel@tonic-gate 292*7c478bd9Sstevel@tonic-gate /* 293*7c478bd9Sstevel@tonic-gate * LOOKUP: Lookup wnl_filename 294*7c478bd9Sstevel@tonic-gate */ 295*7c478bd9Sstevel@tonic-gate struct WNL_LOOKUP3args { 296*7c478bd9Sstevel@tonic-gate wnl_diropargs3 what; 297*7c478bd9Sstevel@tonic-gate }; 298*7c478bd9Sstevel@tonic-gate 299*7c478bd9Sstevel@tonic-gate struct WNL_LOOKUP3resok { 300*7c478bd9Sstevel@tonic-gate wnl_fh3 object; 301*7c478bd9Sstevel@tonic-gate wnl_post_op_attr obj_attributes; 302*7c478bd9Sstevel@tonic-gate wnl_post_op_attr dir_attributes; 303*7c478bd9Sstevel@tonic-gate }; 304*7c478bd9Sstevel@tonic-gate 305*7c478bd9Sstevel@tonic-gate struct WNL_LOOKUP3resfail { 306*7c478bd9Sstevel@tonic-gate wnl_post_op_attr dir_attributes; 307*7c478bd9Sstevel@tonic-gate }; 308*7c478bd9Sstevel@tonic-gate 309*7c478bd9Sstevel@tonic-gate union WNL_LOOKUP3res switch (wnl_stat3 status) { 310*7c478bd9Sstevel@tonic-gate case WNL3_OK: 311*7c478bd9Sstevel@tonic-gate WNL_LOOKUP3resok res_ok; 312*7c478bd9Sstevel@tonic-gate default: 313*7c478bd9Sstevel@tonic-gate WNL_LOOKUP3resfail res_fail; 314*7c478bd9Sstevel@tonic-gate }; 315*7c478bd9Sstevel@tonic-gate 316*7c478bd9Sstevel@tonic-gate const MAX_FLAVORS = 128; 317*7c478bd9Sstevel@tonic-gate 318*7c478bd9Sstevel@tonic-gate struct snego_t { 319*7c478bd9Sstevel@tonic-gate int cnt; 320*7c478bd9Sstevel@tonic-gate int array[MAX_FLAVORS]; 321*7c478bd9Sstevel@tonic-gate }; 322*7c478bd9Sstevel@tonic-gate 323*7c478bd9Sstevel@tonic-gate enum snego_stat { 324*7c478bd9Sstevel@tonic-gate /* default flavor invalid and a flavor has been negotiated */ 325*7c478bd9Sstevel@tonic-gate SNEGO_SUCCESS = 0, 326*7c478bd9Sstevel@tonic-gate 327*7c478bd9Sstevel@tonic-gate /* default flavor valid, no need to negotiate flavors */ 328*7c478bd9Sstevel@tonic-gate SNEGO_DEF_VALID = 1, 329*7c478bd9Sstevel@tonic-gate 330*7c478bd9Sstevel@tonic-gate /* array size too small */ 331*7c478bd9Sstevel@tonic-gate SNEGO_ARRAY_TOO_SMALL = 2, 332*7c478bd9Sstevel@tonic-gate 333*7c478bd9Sstevel@tonic-gate SNEGO_FAILURE = 3 334*7c478bd9Sstevel@tonic-gate }; 335*7c478bd9Sstevel@tonic-gate 336*7c478bd9Sstevel@tonic-gate /* 337*7c478bd9Sstevel@tonic-gate * Remote file service routines 338*7c478bd9Sstevel@tonic-gate */ 339*7c478bd9Sstevel@tonic-gate program WNL_PROGRAM { 340*7c478bd9Sstevel@tonic-gate version WNL_V2 { 341*7c478bd9Sstevel@tonic-gate void 342*7c478bd9Sstevel@tonic-gate WNLPROC_NULL(void) = 0; 343*7c478bd9Sstevel@tonic-gate 344*7c478bd9Sstevel@tonic-gate wnl_diropres 345*7c478bd9Sstevel@tonic-gate WNLPROC_LOOKUP(wnl_diropargs) = 4; 346*7c478bd9Sstevel@tonic-gate } = 2; 347*7c478bd9Sstevel@tonic-gate 348*7c478bd9Sstevel@tonic-gate version WNL_V3 { 349*7c478bd9Sstevel@tonic-gate void 350*7c478bd9Sstevel@tonic-gate WNLPROC3_NULL(void) = 0; 351*7c478bd9Sstevel@tonic-gate 352*7c478bd9Sstevel@tonic-gate WNL_LOOKUP3res 353*7c478bd9Sstevel@tonic-gate WNLPROC3_LOOKUP(WNL_LOOKUP3args) = 3; 354*7c478bd9Sstevel@tonic-gate } = 3; 355*7c478bd9Sstevel@tonic-gate 356*7c478bd9Sstevel@tonic-gate version WNL_V4 { 357*7c478bd9Sstevel@tonic-gate void 358*7c478bd9Sstevel@tonic-gate WNLPROC4_NULL(void) = 0; 359*7c478bd9Sstevel@tonic-gate } = 4; 360*7c478bd9Sstevel@tonic-gate 361*7c478bd9Sstevel@tonic-gate } = 100003; 362