xdr4cb.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #define NFS4_MAXTAGLEN 20
  2. #define NFS4_enc_cb_null_sz 0
  3. #define NFS4_dec_cb_null_sz 0
  4. #define cb_compound_enc_hdr_sz 4
  5. #define cb_compound_dec_hdr_sz (3 + (NFS4_MAXTAGLEN >> 2))
  6. #define sessionid_sz (NFS4_MAX_SESSIONID_LEN >> 2)
  7. #define cb_sequence_enc_sz (sessionid_sz + 4 + \
  8. 1 /* no referring calls list yet */)
  9. #define cb_sequence_dec_sz (op_dec_sz + sessionid_sz + 4)
  10. #define op_enc_sz 1
  11. #define op_dec_sz 2
  12. #define enc_nfs4_fh_sz (1 + (NFS4_FHSIZE >> 2))
  13. #define enc_stateid_sz (NFS4_STATEID_SIZE >> 2)
  14. #define NFS4_enc_cb_recall_sz (cb_compound_enc_hdr_sz + \
  15. cb_sequence_enc_sz + \
  16. 1 + enc_stateid_sz + \
  17. enc_nfs4_fh_sz)
  18. #define NFS4_dec_cb_recall_sz (cb_compound_dec_hdr_sz + \
  19. cb_sequence_dec_sz + \
  20. op_dec_sz)
  21. #define NFS4_enc_cb_layout_sz (cb_compound_enc_hdr_sz + \
  22. cb_sequence_enc_sz + \
  23. 1 + 3 + \
  24. enc_nfs4_fh_sz + 4)
  25. #define NFS4_dec_cb_layout_sz (cb_compound_dec_hdr_sz + \
  26. cb_sequence_dec_sz + \
  27. op_dec_sz)
  28. #define NFS4_enc_cb_notify_lock_sz (cb_compound_enc_hdr_sz + \
  29. cb_sequence_enc_sz + \
  30. 2 + 1 + \
  31. XDR_QUADLEN(NFS4_OPAQUE_LIMIT) + \
  32. enc_nfs4_fh_sz)
  33. #define NFS4_dec_cb_notify_lock_sz (cb_compound_dec_hdr_sz + \
  34. cb_sequence_dec_sz + \
  35. op_dec_sz)