nfs4xdr.c (36b2e922b5acd291051fab25bc7535274ce49532) nfs4xdr.c (e1ca12dfb1be7fe8b82ca723a9b511f7d808bf81)
1/*
2 * Server-side XDR for NFSv4
3 *
4 * Copyright (c) 2002 The Regents of the University of Michigan.
5 * All rights reserved.
6 *
7 * Kendrick Smith <kmsmith@umich.edu>
8 * Andy Adamson <andros@umich.edu>

--- 1232 unchanged lines hidden (view full) ---

1241 DECODE_HEAD;
1242 READ_BUF(NFS4_MAX_SESSIONID_LEN);
1243 COPYMEM(destroy_session->sessionid.data, NFS4_MAX_SESSIONID_LEN);
1244
1245 DECODE_TAIL;
1246}
1247
1248static __be32
1/*
2 * Server-side XDR for NFSv4
3 *
4 * Copyright (c) 2002 The Regents of the University of Michigan.
5 * All rights reserved.
6 *
7 * Kendrick Smith <kmsmith@umich.edu>
8 * Andy Adamson <andros@umich.edu>

--- 1232 unchanged lines hidden (view full) ---

1241 DECODE_HEAD;
1242 READ_BUF(NFS4_MAX_SESSIONID_LEN);
1243 COPYMEM(destroy_session->sessionid.data, NFS4_MAX_SESSIONID_LEN);
1244
1245 DECODE_TAIL;
1246}
1247
1248static __be32
1249nfsd4_decode_free_stateid(struct nfsd4_compoundargs *argp,
1250 struct nfsd4_free_stateid *free_stateid)
1251{
1252 DECODE_HEAD;
1253
1254 READ_BUF(sizeof(stateid_t));
1255 READ32(free_stateid->fr_stateid.si_generation);
1256 COPYMEM(&free_stateid->fr_stateid.si_opaque, sizeof(stateid_opaque_t));
1257
1258 DECODE_TAIL;
1259}
1260
1261static __be32
1249nfsd4_decode_sequence(struct nfsd4_compoundargs *argp,
1250 struct nfsd4_sequence *seq)
1251{
1252 DECODE_HEAD;
1253
1254 READ_BUF(NFS4_MAX_SESSIONID_LEN + 16);
1255 COPYMEM(seq->sessionid.data, NFS4_MAX_SESSIONID_LEN);
1256 READ32(seq->seqid);

--- 108 unchanged lines hidden (view full) ---

1365 [OP_RELEASE_LOCKOWNER] = (nfsd4_dec)nfsd4_decode_notsupp,
1366
1367 /* new operations for NFSv4.1 */
1368 [OP_BACKCHANNEL_CTL] = (nfsd4_dec)nfsd4_decode_notsupp,
1369 [OP_BIND_CONN_TO_SESSION]= (nfsd4_dec)nfsd4_decode_bind_conn_to_session,
1370 [OP_EXCHANGE_ID] = (nfsd4_dec)nfsd4_decode_exchange_id,
1371 [OP_CREATE_SESSION] = (nfsd4_dec)nfsd4_decode_create_session,
1372 [OP_DESTROY_SESSION] = (nfsd4_dec)nfsd4_decode_destroy_session,
1262nfsd4_decode_sequence(struct nfsd4_compoundargs *argp,
1263 struct nfsd4_sequence *seq)
1264{
1265 DECODE_HEAD;
1266
1267 READ_BUF(NFS4_MAX_SESSIONID_LEN + 16);
1268 COPYMEM(seq->sessionid.data, NFS4_MAX_SESSIONID_LEN);
1269 READ32(seq->seqid);

--- 108 unchanged lines hidden (view full) ---

1378 [OP_RELEASE_LOCKOWNER] = (nfsd4_dec)nfsd4_decode_notsupp,
1379
1380 /* new operations for NFSv4.1 */
1381 [OP_BACKCHANNEL_CTL] = (nfsd4_dec)nfsd4_decode_notsupp,
1382 [OP_BIND_CONN_TO_SESSION]= (nfsd4_dec)nfsd4_decode_bind_conn_to_session,
1383 [OP_EXCHANGE_ID] = (nfsd4_dec)nfsd4_decode_exchange_id,
1384 [OP_CREATE_SESSION] = (nfsd4_dec)nfsd4_decode_create_session,
1385 [OP_DESTROY_SESSION] = (nfsd4_dec)nfsd4_decode_destroy_session,
1373 [OP_FREE_STATEID] = (nfsd4_dec)nfsd4_decode_notsupp,
1386 [OP_FREE_STATEID] = (nfsd4_dec)nfsd4_decode_free_stateid,
1374 [OP_GET_DIR_DELEGATION] = (nfsd4_dec)nfsd4_decode_notsupp,
1375 [OP_GETDEVICEINFO] = (nfsd4_dec)nfsd4_decode_notsupp,
1376 [OP_GETDEVICELIST] = (nfsd4_dec)nfsd4_decode_notsupp,
1377 [OP_LAYOUTCOMMIT] = (nfsd4_dec)nfsd4_decode_notsupp,
1378 [OP_LAYOUTGET] = (nfsd4_dec)nfsd4_decode_notsupp,
1379 [OP_LAYOUTRETURN] = (nfsd4_dec)nfsd4_decode_notsupp,
1380 [OP_SECINFO_NO_NAME] = (nfsd4_dec)nfsd4_decode_secinfo_no_name,
1381 [OP_SEQUENCE] = (nfsd4_dec)nfsd4_decode_sequence,

--- 1729 unchanged lines hidden (view full) ---

3111static __be32
3112nfsd4_encode_destroy_session(struct nfsd4_compoundres *resp, int nfserr,
3113 struct nfsd4_destroy_session *destroy_session)
3114{
3115 return nfserr;
3116}
3117
3118static __be32
1387 [OP_GET_DIR_DELEGATION] = (nfsd4_dec)nfsd4_decode_notsupp,
1388 [OP_GETDEVICEINFO] = (nfsd4_dec)nfsd4_decode_notsupp,
1389 [OP_GETDEVICELIST] = (nfsd4_dec)nfsd4_decode_notsupp,
1390 [OP_LAYOUTCOMMIT] = (nfsd4_dec)nfsd4_decode_notsupp,
1391 [OP_LAYOUTGET] = (nfsd4_dec)nfsd4_decode_notsupp,
1392 [OP_LAYOUTRETURN] = (nfsd4_dec)nfsd4_decode_notsupp,
1393 [OP_SECINFO_NO_NAME] = (nfsd4_dec)nfsd4_decode_secinfo_no_name,
1394 [OP_SEQUENCE] = (nfsd4_dec)nfsd4_decode_sequence,

--- 1729 unchanged lines hidden (view full) ---

3124static __be32
3125nfsd4_encode_destroy_session(struct nfsd4_compoundres *resp, int nfserr,
3126 struct nfsd4_destroy_session *destroy_session)
3127{
3128 return nfserr;
3129}
3130
3131static __be32
3132nfsd4_encode_free_stateid(struct nfsd4_compoundres *resp, int nfserr,
3133 struct nfsd4_free_stateid *free_stateid)
3134{
3135 __be32 *p;
3136
3137 if (nfserr)
3138 return nfserr;
3139
3140 RESERVE_SPACE(4);
3141 WRITE32(nfserr);
3142 ADJUST_ARGS();
3143 return nfserr;
3144}
3145
3146static __be32
3119nfsd4_encode_sequence(struct nfsd4_compoundres *resp, int nfserr,
3120 struct nfsd4_sequence *seq)
3121{
3122 __be32 *p;
3123
3124 if (nfserr)
3125 return nfserr;
3126

--- 64 unchanged lines hidden (view full) ---

3191 [OP_RELEASE_LOCKOWNER] = (nfsd4_enc)nfsd4_encode_noop,
3192
3193 /* NFSv4.1 operations */
3194 [OP_BACKCHANNEL_CTL] = (nfsd4_enc)nfsd4_encode_noop,
3195 [OP_BIND_CONN_TO_SESSION] = (nfsd4_enc)nfsd4_encode_bind_conn_to_session,
3196 [OP_EXCHANGE_ID] = (nfsd4_enc)nfsd4_encode_exchange_id,
3197 [OP_CREATE_SESSION] = (nfsd4_enc)nfsd4_encode_create_session,
3198 [OP_DESTROY_SESSION] = (nfsd4_enc)nfsd4_encode_destroy_session,
3147nfsd4_encode_sequence(struct nfsd4_compoundres *resp, int nfserr,
3148 struct nfsd4_sequence *seq)
3149{
3150 __be32 *p;
3151
3152 if (nfserr)
3153 return nfserr;
3154

--- 64 unchanged lines hidden (view full) ---

3219 [OP_RELEASE_LOCKOWNER] = (nfsd4_enc)nfsd4_encode_noop,
3220
3221 /* NFSv4.1 operations */
3222 [OP_BACKCHANNEL_CTL] = (nfsd4_enc)nfsd4_encode_noop,
3223 [OP_BIND_CONN_TO_SESSION] = (nfsd4_enc)nfsd4_encode_bind_conn_to_session,
3224 [OP_EXCHANGE_ID] = (nfsd4_enc)nfsd4_encode_exchange_id,
3225 [OP_CREATE_SESSION] = (nfsd4_enc)nfsd4_encode_create_session,
3226 [OP_DESTROY_SESSION] = (nfsd4_enc)nfsd4_encode_destroy_session,
3199 [OP_FREE_STATEID] = (nfsd4_enc)nfsd4_encode_noop,
3227 [OP_FREE_STATEID] = (nfsd4_enc)nfsd4_encode_free_stateid,
3200 [OP_GET_DIR_DELEGATION] = (nfsd4_enc)nfsd4_encode_noop,
3201 [OP_GETDEVICEINFO] = (nfsd4_enc)nfsd4_encode_noop,
3202 [OP_GETDEVICELIST] = (nfsd4_enc)nfsd4_encode_noop,
3203 [OP_LAYOUTCOMMIT] = (nfsd4_enc)nfsd4_encode_noop,
3204 [OP_LAYOUTGET] = (nfsd4_enc)nfsd4_encode_noop,
3205 [OP_LAYOUTRETURN] = (nfsd4_enc)nfsd4_encode_noop,
3206 [OP_SECINFO_NO_NAME] = (nfsd4_enc)nfsd4_encode_secinfo_no_name,
3207 [OP_SEQUENCE] = (nfsd4_enc)nfsd4_encode_sequence,

--- 189 unchanged lines hidden ---
3228 [OP_GET_DIR_DELEGATION] = (nfsd4_enc)nfsd4_encode_noop,
3229 [OP_GETDEVICEINFO] = (nfsd4_enc)nfsd4_encode_noop,
3230 [OP_GETDEVICELIST] = (nfsd4_enc)nfsd4_encode_noop,
3231 [OP_LAYOUTCOMMIT] = (nfsd4_enc)nfsd4_encode_noop,
3232 [OP_LAYOUTGET] = (nfsd4_enc)nfsd4_encode_noop,
3233 [OP_LAYOUTRETURN] = (nfsd4_enc)nfsd4_encode_noop,
3234 [OP_SECINFO_NO_NAME] = (nfsd4_enc)nfsd4_encode_secinfo_no_name,
3235 [OP_SEQUENCE] = (nfsd4_enc)nfsd4_encode_sequence,

--- 189 unchanged lines hidden ---