anchor.diff:  ;; the client, informing it that it has now acquired the lock
   
   ;; server NLM callback procedure to grant lock
  -(defrpc call-granted 5 nlm4-test-args nlm4-res)
  +(defrpc call-granted 5 
  +  (:list netobj :boolean nlm-lock)
  +  (:list netobj nlm-stat)
  +  (:arg-transformer (lock &key cookie exclusive)
  +    (list cookie exclusive lock))
  +  (:documentation "This procedure is the callback from the server running NLM to the host that requested a lock that could not be immediately honoured."))
   
   (defhandler %handle-granted (args 5)
     (destructuring-bind (cookie exclusive alock) args
  
positive.code:    (offset :uint64)
     (len :uint64)))
  
  (defxstruct nlm4-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
  
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
  	   
  	   ))
  
  