1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 * or http://www.opensolaris.org/os/licensing. 10 * See the License for the specific language governing permissions 11 * and limitations under the License. 12 * 13 * When distributing Covered Code, include this CDDL HEADER in each 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21 /* 22 * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 23 * Use is subject to license terms. 24 */ 25 #ifndef _NFS4_EXT_DEFS_H 26 #define _NFS4_EXT_DEFS_H 27 28 #ifdef __cplusplus 29 extern "C" { 30 #endif 31 32 /* 33 * Extended definition in NFSv4.1 34 */ 35 enum nfsstat4 { 36 NFS4_OK = 0, 37 NFS4ERR_PERM = 1, 38 NFS4ERR_NOENT = 2, 39 NFS4ERR_IO = 5, 40 NFS4ERR_NXIO = 6, 41 NFS4ERR_ACCESS = 13, 42 NFS4ERR_EXIST = 17, 43 NFS4ERR_XDEV = 18, 44 NFS4ERR_NOTDIR = 20, 45 NFS4ERR_ISDIR = 21, 46 NFS4ERR_INVAL = 22, 47 NFS4ERR_FBIG = 27, 48 NFS4ERR_NOSPC = 28, 49 NFS4ERR_ROFS = 30, 50 NFS4ERR_MLINK = 31, 51 NFS4ERR_NAMETOOLONG = 63, 52 NFS4ERR_NOTEMPTY = 66, 53 NFS4ERR_DQUOT = 69, 54 NFS4ERR_STALE = 70, 55 NFS4ERR_BADHANDLE = 10001, 56 NFS4ERR_BAD_COOKIE = 10003, 57 NFS4ERR_NOTSUPP = 10004, 58 NFS4ERR_TOOSMALL = 10005, 59 NFS4ERR_SERVERFAULT = 10006, 60 NFS4ERR_BADTYPE = 10007, 61 NFS4ERR_DELAY = 10008, 62 NFS4ERR_SAME = 10009, 63 NFS4ERR_DENIED = 10010, 64 NFS4ERR_EXPIRED = 10011, 65 NFS4ERR_LOCKED = 10012, 66 NFS4ERR_GRACE = 10013, 67 NFS4ERR_FHEXPIRED = 10014, 68 NFS4ERR_SHARE_DENIED = 10015, 69 NFS4ERR_WRONGSEC = 10016, 70 NFS4ERR_CLID_INUSE = 10017, 71 NFS4ERR_RESOURCE = 10018, 72 NFS4ERR_MOVED = 10019, 73 NFS4ERR_NOFILEHANDLE = 10020, 74 NFS4ERR_MINOR_VERS_MISMATCH = 10021, 75 NFS4ERR_STALE_CLIENTID = 10022, 76 NFS4ERR_STALE_STATEID = 10023, 77 NFS4ERR_OLD_STATEID = 10024, 78 NFS4ERR_BAD_STATEID = 10025, 79 NFS4ERR_BAD_SEQID = 10026, 80 NFS4ERR_NOT_SAME = 10027, 81 NFS4ERR_LOCK_RANGE = 10028, 82 NFS4ERR_SYMLINK = 10029, 83 NFS4ERR_RESTOREFH = 10030, 84 NFS4ERR_LEASE_MOVED = 10031, 85 NFS4ERR_ATTRNOTSUPP = 10032, 86 NFS4ERR_NO_GRACE = 10033, 87 NFS4ERR_RECLAIM_BAD = 10034, 88 NFS4ERR_RECLAIM_CONFLICT = 10035, 89 NFS4ERR_BADXDR = 10036, 90 NFS4ERR_LOCKS_HELD = 10037, 91 NFS4ERR_OPENMODE = 10038, 92 NFS4ERR_BADOWNER = 10039, 93 NFS4ERR_BADCHAR = 10040, 94 NFS4ERR_BADNAME = 10041, 95 NFS4ERR_BAD_RANGE = 10042, 96 NFS4ERR_LOCK_NOTSUPP = 10043, 97 NFS4ERR_OP_ILLEGAL = 10044, 98 NFS4ERR_DEADLOCK = 10045, 99 NFS4ERR_FILE_OPEN = 10046, 100 NFS4ERR_ADMIN_REVOKED = 10047, 101 NFS4ERR_CB_PATH_DOWN = 10048, 102 NFS4ERR_BADIOMODE = 10049, 103 NFS4ERR_BADLAYOUT = 10050, 104 NFS4ERR_BAD_SESSION_DIGEST = 10051, 105 NFS4ERR_BADSESSION = 10052, 106 NFS4ERR_BADSLOT = 10053, 107 NFS4ERR_COMPLETE_ALREADY = 10054, 108 NFS4ERR_CONN_NOT_BOUND_TO_SESSION = 10055, 109 NFS4ERR_DELEG_ALREADY_WANTED = 10056, 110 NFS4ERR_BACK_CHAN_BUSY = 10057, 111 NFS4ERR_LAYOUTTRYLATER = 10058, 112 NFS4ERR_LAYOUTUNAVAILABLE = 10059, 113 NFS4ERR_NOMATCHING_LAYOUT = 10060, 114 NFS4ERR_RECALLCONFLICT = 10061, 115 NFS4ERR_UNKNOWN_LAYOUTTYPE = 10062, 116 NFS4ERR_SEQ_MISORDERED = 10063, 117 NFS4ERR_SEQUENCE_POS = 10064, 118 NFS4ERR_REQ_TOO_BIG = 10065, 119 NFS4ERR_REP_TOO_BIG = 10066, 120 NFS4ERR_REP_TOO_BIG_TO_CACHE = 10067, 121 NFS4ERR_RETRY_UNCACHED_REP = 10068, 122 NFS4ERR_UNSAFE_COMPOUND = 10069, 123 NFS4ERR_TOO_MANY_OPS = 10070, 124 NFS4ERR_OP_NOT_IN_SESSION = 10071, 125 NFS4ERR_HASH_ALG_UNSUPP = 10072, 126 /* Error 10073 is unused. */ 127 NFS4ERR_CLIENTID_BUSY = 10074, 128 NFS4ERR_PNFS_IO_HOLE = 10075, 129 NFS4ERR_SEQ_FALSE_RETRY = 10076, 130 NFS4ERR_BAD_HIGH_SLOT = 10077, 131 NFS4ERR_DEADSESSION = 10078, 132 NFS4ERR_ENCR_ALG_UNSUPP = 10079, 133 NFS4ERR_PNFS_NO_LAYOUT = 10080, 134 NFS4ERR_NOT_ONLY_OP = 10081, 135 NFS4ERR_WRONG_CRED = 10082, 136 NFS4ERR_WRONG_TYPE = 10083, 137 NFS4ERR_DIRDELEG_UNAVAIL = 10084, 138 NFS4ERR_REJECT_DELEG = 10085, 139 NFS4ERR_RETURNCONFLICT = 10086 140 }; 141 typedef enum nfsstat4 nfsstat4; 142 143 /* 144 * Extended definition in NFSv4.1 145 */ 146 enum open_delegation_type4 { 147 OPEN_DELEGATE_NONE = 0, 148 OPEN_DELEGATE_READ = 1, 149 OPEN_DELEGATE_WRITE = 2, 150 OPEN_DELEGATE_NONE_EXT = 3 151 }; 152 typedef enum open_delegation_type4 open_delegation_type4; 153 154 /* 155 * Extended definition in NFSv4.1 156 */ 157 enum open_claim_type4 { 158 CLAIM_NULL = 0, 159 CLAIM_PREVIOUS = 1, 160 CLAIM_DELEGATE_CUR = 2, 161 CLAIM_DELEGATE_PREV = 3, 162 CLAIM_FH = 4, 163 CLAIM_DELEG_CUR_FH = 5, 164 CLAIM_DELEG_PREV_FH = 6 165 }; 166 typedef enum open_claim_type4 open_claim_type4; 167 168 /* 169 * New type, but needed here so the include ordering will work 170 */ 171 enum why_no_delegation4 { 172 WND4_NOT_WANTED = 0, 173 WND4_CONTENTION = 1, 174 WND4_RESOURCE = 2, 175 WND4_NOT_SUPP_FTYPE = 3, 176 WND4_WRITE_DELEG_NOT_SUPP_FTYPE = 4, 177 WND4_NOT_SUPP_UPGRADE = 5, 178 WND4_NOT_SUPP_DOWNGRADE = 6, 179 WND4_CANCELED = 7, 180 WND4_IS_DIR = 8 181 }; 182 typedef enum why_no_delegation4 why_no_delegation4; 183 184 /* 185 * New type, but needed here so the include ordering will work 186 */ 187 struct open_none_delegation4 { 188 why_no_delegation4 ond_why; 189 union { 190 bool_t ond_server_will_push_deleg; 191 bool_t ond_server_will_signal_avail; 192 } open_none_delegation4_u; 193 }; 194 typedef struct open_none_delegation4 open_none_delegation4; 195 196 #ifdef __cplusplus 197 } 198 #endif 199 200 #endif /* _NFS4_EXT_DEFS_H */ 201