anchor.diff:     (offset :uint64)
      (len :uint64)))
   
  -(defxstruct nlm4-share ()
  +(defxstruct nlm-holder ()
  +  ((exclusive :boolean)
  +   (id :int32)
  +   (oh netobj)
  +   (offset :uint64)
  +   (len :uint64)))
  +
  +(defxstruct nlm-share ()
     ((name :string)
      (fh netobj)
      (oh netobj)
      (mode fsh4-mode)
      (access fsh4-mode)))
   
  -(defxstruct nlm4-lock-args ()
  -  ((cookie netobj)
  -   (block :boolean)
  -   (exclusive :boolean)
  -   (alock nlm4-lock)
  -   (reclaim :boolean)
  -   (state :int32)))
  -
  -(defxtype* nlm4-cancel-args ()
  -  (:list netobj :boolean :boolean nlm4-lock)) ;; cookie block exclusive alock
  -
  -(defxtype* nlm4-test-args ()
  -  (:list netobj :boolean nlm4-lock)) ;; cookie exclusive alock
  -
  -(defxtype* nlm4-test-res () ;; cookie stat
  -  (:list netobj
  -         (:union nlm4-stat
  -           (:denied nlm4-holder)
  -           (otherwise :void))))
  -
  -(defxtype* nlm4-unlock-args ()
  -  (:list netobj nlm4-lock)) ;; cookie alock
  -
  -(defxtype* nlm4-share-args ()
  -  (:list netobj nlm4-share :boolean)) ;; cookie share reclaim
  -
  -(defxtype* nlm4-share-res ()
  -  (:list netobj nlm4-stat :int32)) ;; cookie stat seqno
  -
  -(defxtype* nlm4-notify ()
  -  (:list :string :uint64)) ;; name state
  -
  -;; ----------------
  +;; --------------------------------
   
   ;; there is very little information on how to implement these
   ;; I can't find any RFC defining them, only the NFSv3 RFC seems to mention
  
positive.code: 
  ;; TEST ::  test whether a lock would be granted 
  
  ;;(defrpc call-test 1 nlm4-test-args ntlm-test-res
  ;;  (:documentation "Check for conflicting lock. 
  ;;
  ;;Most NLM servers do not implement this function, and most clients never use it, so it is not implemented here."))
  
  ;;(defhandler %handle-test (args 1)
  ;;  (destructuring-bind (cookie exclusive alock) args
  
negative.code: (defpackage #:nefarious.nlm
    (:use #:cl #:frpc)
    (:nicknames #:nlm)
    (:export #:make-nlm-lock
             #:make-nlm-share
             
             ;; rpcs 
             #:call-null
             #:call-test
             #:call-lock
             #:call-cancel
             #:call-unlock
             #:call-granted
             #:call-test-msg
             #:call-lock-msg
             #:call-cancel-msg
             #:call-unlock-msg
             #:call-granted-msg
             #:call-test-res
             #:call-lock-res
             #:call-cancel-res
             #:call-unlock-res
             #:call-granted-res
             #:call-share
             #:call-nm-lock
             #:call-free-all
  	   
  	   ))
  
  