X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=nlm%2Fnlm.x;h=8ec6614ddb8ac714d8580b2235d1b7a0175504fc;hb=4edd78302d2a019fa4ca496531e4da0ebc9ca8a4;hp=e8a28804fe5cf3b691891885565afaf94880534e;hpb=e01ed6a239175772baf904d66105766f825fc1d4;p=deb_libnfs.git diff --git a/nlm/nlm.x b/nlm/nlm.x index e8a2880..8ec6614 100644 --- a/nlm/nlm.x +++ b/nlm/nlm.x @@ -1,5 +1,6 @@ /* based on rfc1813 and wireshark */ +typedef unsigned hyper uint64; struct nlm_fh4 { opaque data<>; @@ -28,8 +29,8 @@ struct nlm4_holder { bool exclusive; unsigned int svid; nlm4_oh oh; - unsigned hyper l_offset; - unsigned hyper l_len; + uint64 l_offset; + uint64 l_len; }; const NLM_MAXNAME = 256; @@ -38,8 +39,8 @@ struct nlm4_lock { struct nlm_fh4 fh; nlm4_oh oh; unsigned int svid; - unsigned hyper l_offset; - unsigned hyper l_len; + uint64 l_offset; + uint64 l_len; }; struct nlm4_share { @@ -50,25 +51,75 @@ struct nlm4_share { unsigned int access; }; - -struct nlm4_testres_ok { - nlm_cookie cookie; +struct nlm4_testres_denied { nlm4_holder holder; }; -union NLM4_TESTres switch (nlmstat4 status) { - case NLM4_GRANTED: - nlm4_testres_ok lock; +union nlm4_testreply switch (nlmstat4 status) { + case NLM4_DENIED: + nlm4_testres_denied lock; default: void; }; +struct NLM4_TESTres { + nlm_cookie cookie; + nlm4_testreply reply; +}; + struct NLM4_TESTargs { nlm_cookie cookie; bool exclusive; nlm4_lock lock; }; +struct NLM4_CANCres { + nlm_cookie cookie; + nlmstat4 status; +}; + +struct NLM4_CANCargs { + nlm_cookie cookie; + bool block; + bool exclusive; + nlm4_lock lock; +}; + +struct NLM4_UNLOCKres { + nlm_cookie cookie; + nlmstat4 status; +}; + +struct NLM4_UNLOCKargs { + nlm_cookie cookie; + nlm4_lock lock; +}; + +struct NLM4_LOCKres { + nlm_cookie cookie; + nlmstat4 status; +}; + +struct NLM4_LOCKargs { + nlm_cookie cookie; + bool block; + bool exclusive; + nlm4_lock lock; + bool reclaim; + int state; +}; + +struct NLM4_GRANTEDargs { + nlm_cookie cookie; + bool exclusive; + nlm4_lock lock; +}; + +struct NLM4_GRANTEDres { + nlm_cookie cookie; + nlmstat4 status; +}; + program NLM_PROGRAM { version NLM_V4 { void @@ -77,47 +128,47 @@ program NLM_PROGRAM { NLM4_TESTres NLM4_TEST(NLM4_TESTargs) = 1; -/* nlm4_res */ -/* NLM4_LOCK(nlm4_lockargs) = 2; */ + NLM4_LOCKres + NLM4_LOCK(NLM4_LOCKargs) = 2; -/* nlm4_res */ -/* NLM4_CANCEL(nlm4_cancargs) = 3; */ + NLM4_CANCres + NLM4_CANCEL(NLM4_CANCargs) = 3; -/* nlm4_res */ -/* NLM4_UNLOCK(nlm4_unlockargs) = 4; */ + NLM4_UNLOCKres + NLM4_UNLOCK(NLM4_UNLOCKargs) = 4; -/* nlm4_res */ -/* NLM4_GRANTED(nlm4_testargs) = 5; */ + NLM4_GRANTEDres + NLM4_GRANT(NLM4_GRANTEDargs) = 5; void NLM4_TEST_MSG(NLM4_TESTargs) = 6; -/* void */ -/* NLM4_LOCK_MSG(nlm4_lockargs) = 7; */ + void + NLM4_LOCK_MSG(NLM4_LOCKargs) = 7; -/* void */ -/* NLM4_CANCEL_MSG(nlm4_cancargs) = 8; */ + void + NLM4_CANCEL_MSG(NLM4_CANCargs) = 8; -/* void */ -/* NLM4_UNLOCK_MSG(nlm4_unlockargs) = 9; */ + void + NLM4_UNLOCK_MSG(NLM4_UNLOCKargs) = 9; -/* void */ -/* NLM4_GRANTED_MSG(nlm4_testargs) = 10; */ + void + NLM4_GRANT_MSG(NLM4_GRANTEDargs) = 10; void NLM4_TEST_RES(NLM4_TESTres) = 11; -/* void */ -/* NLM4_LOCK_RES(nlm4_res) = 12; */ + void + NLM4_LOCK_RES(NLM4_LOCKres) = 12; -/* void */ -/* NLM4_CANCEL_RES(nlm4_res) = 13; */ + void + NLM4_CANCEL_RES(NLM4_CANCres) = 13; -/* void */ -/* NLM4_UNLOCK_RES(nlm4_res) = 14; */ + void + NLM4_UNLOCK_RES(NLM4_UNLOCKres) = 14; -/* void */ -/* NLM4_GRANTED_RES(nlm4_res) = 15; */ + void + NLM4_GRANT_RES(NLM4_GRANTEDres) = 15; /* nlm4_shareres */ /* NLM4_SHARE(nlm4_shareargs) = 20; */