NLM4(3)
πΈ NLM4(3) πΈ β the nlm4 4.0 era, bestie π
okay so before we even get into it β yes, this is NLM4(3), it's the page for nlm4 4.0, and it is long, so we're doing it in two parts. Sit down, hydrate, get comfy. π«Ά
β¨ NAME β¨
packet.nfs.nlm4 β the NLMv4 decoding module. that's it, that's the name, and honestly? iconic. π
π CLASSES π
bestie. there are so many classes. like, SO many. every single one of them is here, no skips, no "and so on", we are listing all of them. let's go π
class CANCEL4args(nlm4_cancargs)
she's a cancel-args girlie and she inherits from nlm4_cancargs. her whole shape is this:
struct nlm4_cancargs {
netobj cookie;
bool block;
bool exclusive;
nlm4_lock locker;
};
class CANCEL4res(nlm4_res)
the response half of the cancel situation, riding on nlm4_res. lowkey minimalist:
struct nlm4_res {
netobj cookie;
nlm4_stats status;
};
class CANCEL_MSG4args(nlm4_cancargs)
same nlm4_cancargs parent, same exact struct β the _MSG version of the cancel args. the way that the struct is literally identical? yeah. it is. π
struct nlm4_cancargs {
netobj cookie;
bool block;
bool exclusive;
nlm4_lock locker;
};
class CANCEL_RES4args(nlm4_res)
the _RES args for cancel, inheriting nlm4_res:
struct nlm4_res {
netobj cookie;
nlm4_stats status;
};
class FREE_ALL4args(baseobj.BaseObj)
this one's a full baseobj.BaseObj glow-up, not a subclass of another nlm4 struct. she carries a name and a state, and that's the whole personality:
struct FREE_ALL4args {
string name<MAXNAMELEN>;
int32 state;
};
Methods defined here
__init__(self, unpack)β Constructor
Initialize object's private data according to the arguments given. Arguments can be given as positional, named arguments or a combination of both.
class GRANTED4args(nlm4_testargs)
granted bestie!! she inherits from nlm4_testargs:
struct nlm4_testargs {
netobj cookie;
bool exclusive;
nlm4_lock locker;
};
class GRANTED4res(nlm4_res)
the granted response, courtesy of nlm4_res:
struct nlm4_res {
netobj cookie;
nlm4_stats status;
};
class GRANTED_MSG4args(nlm4_testargs)
the _MSG flavor of granted, same nlm4_testargs parent, same struct, zero notes:
struct nlm4_testargs {
netobj cookie;
bool exclusive;
nlm4_lock locker;
};
class GRANTED_RES4args(nlm4_res)
_RES args for granted, on nlm4_res:
struct nlm4_res {
netobj cookie;
nlm4_stats status;
};
class LOCK4args(nlm4_lockargs)
the big one. lock args. she's got a reclaim for recovering locks and a state for specifying the local status monitor state β both of those comments are straight from the source, not me being cute, they're literally in there. β¨
struct nlm4_lockargs {
netobj cookie;
bool block;
bool exclusive;
nlm4_lock locker;
bool reclaim; /* used for recovering locks */
int state; /* specify local status monitor state */
};
class LOCK4res(nlm4_res)
lock response, nlm4_res core:
struct nlm4_res {
netobj cookie;
nlm4_stats status;
};
class LOCK_MSG4args(nlm4_lockargs)
_MSG lock args, nlm4_lockargs parent, and yep β reclaim and state are still right there with their comments:
struct nlm4_lockargs {
netobj cookie;
bool block;
bool exclusive;
nlm4_lock locker;
bool reclaim; /* used for recovering locks */
int state; /* specify local status monitor state */
};
class LOCK_RES4args(nlm4_res)
_RES args for lock, nlm4_res energy:
struct nlm4_res {
netobj cookie;
nlm4_stats status;
};
class NLM4args(packet.utils.RPCload)
okay THIS one. main character energy fr fr. she's a packet.utils.RPCload and she's a union switch over nlm_proc4 procedure, which means the procedure decides which op you get. look at this absolute unit:
union switch NLM4args (nlm_proc4 procedure) {
case const.NLMPROC4_NULL:
void;
case const.NLMPROC4_TEST:
TEST4args optest;
case const.NLMPROC4_LOCK:
LOCK4args oplock;
case const.NLMPROC4_CANCEL:
CANCEL4args opcancel;
case const.NLMPROC4_UNLOCK:
UNLOCK4args opunlock;
case const.NLMPROC4_GRANTED:
GRANTED4args opgranted;
case const.NLMPROC4_TEST_MSG:
TEST_MSG4args optest_msg;
case const.NLMPROC4_LOCK_MSG:
LOCK_MSG4args oplock_msg;
case const.NLMPROC4_CANCEL_MSG:
CANCEL_MSG4args opcancel_msg;
case const.NLMPROC4_UNLOCK_MSG:
UNLOCK_MSG4args opunlock_msg;
case const.NLMPROC4_GRANTED_MSG:
GRANTED_MSG4args opgranted_msg;
case const.NLMPROC4_TEST_RES:
TEST_RES4args optest_res;
case const.NLMPROC4_LOCK_RES:
LOCK_RES4args oplock_res;
case const.NLMPROC4_CANCEL_RES:
CANCEL_RES4args opcancel_res;
case const.NLMPROC4_UNLOCK_RES:
UNLOCK_RES4args opunlock_res;
case const.NLMPROC4_GRANTED_RES:
GRANTED_RES4args opgranted_res;
case const.NLMPROC4_SHARE:
SHARE4args opshare;
case const.NLMPROC4_UNSHARE:
UNSHARE4args opunshare;
case const.NLMPROC4_NM_LOCK:
NM_LOCK4args opnm_lock;
case const.NLMPROC4_FREE_ALL:
FREE_ALL4args opfree_all;
};
Methods defined here
__init__(self, unpack, procedure)β Constructor
Initialize object's private data according to the arguments given. Arguments can be given as positional, named arguments or a combination of both.
class NLM4res(packet.utils.RPCload)
the response twin!! also a packet.utils.RPCload, also a union switch on nlm_proc4 procedure, but look β a bunch of these cases are just void. no response payload, she said. π
union switch NLM4res (nlm_proc4 procedure) {
case const.NLMPROC4_NULL:
void;
case const.NLMPROC4_TEST:
TEST4res optest;
case const.NLMPROC4_LOCK:
LOCK4res oplock;
case const.NLMPROC4_CANCEL:
CANCEL4res opcancel;
case const.NLMPROC4_UNLOCK:
UNLOCK4res opunlock;
case const.NLMPROC4_GRANTED:
GRANTED4res opgranted;
case const.NLMPROC4_TEST_MSG:
void;
case const.NLMPROC4_LOCK_MSG:
void;
case const.NLMPROC4_CANCEL_MSG:
void;
case const.NLMPROC4_UNLOCK_MSG:
void;
case const.NLMPROC4_GRANTED_MSG:
void;
case const.NLMPROC4_TEST_RES:
void;
case const.NLMPROC4_LOCK_RES:
void;
case const.NLMPROC4_CANCEL_RES:
void;
case const.NLMPROC4_UNLOCK_RES:
void;
case const.NLMPROC4_GRANTED_RES:
void;
case const.NLMPROC4_SHARE:
SHARE4res opshare;
case const.NLMPROC4_UNSHARE:
UNSHARE4res opunshare;
case const.NLMPROC4_NM_LOCK:
NM_LOCK4res opnm_lock;
case const.NLMPROC4_FREE_ALL:
void;
};
Methods defined here
__init__(self, unpack, procedure)β Constructor
Initialize object's private data according to the arguments given. Arguments can be given as positional, named arguments or a combination of both.
class NM_LOCK4args(nlm4_lockargs)
nm lock args, nlm4_lockargs parent, and yes β reclaim for recovering locks, state for specifying local status monitor state. she's bringing the whole lockargs fit:
struct nlm4_lockargs {
netobj cookie;
bool block;
bool exclusive;
nlm4_lock locker;
bool reclaim; /* used for recovering locks */
int state; /* specify local status monitor state */
};
class NM_LOCK4res(nlm4_res)
nm lock response on nlm4_res:
struct nlm4_res {
netobj cookie;
nlm4_stats status;
};
class SHARE4args(nlm4_shareargs)
sharing is caring and this class is nlm4_shareargs-coded:
struct nlm4_shareargs {
netobj cookie;
nlm4_share share;
bool reclaim;
};
class SHARE4res(nlm4_shareres)
share response, and she's got a sequence int in there like a little timestamped receipt π
struct nlm4_shareres {
netobj cookie;
nlm4_stats status;
int sequence;
};
class TEST4args(nlm4_testargs)
test args! nlm4_testargs parent:
struct nlm4_testargs {
netobj cookie;
bool exclusive;
nlm4_lock locker;
};
class TEST4res(nlm4_testres)
test response, nlm4_testres based, with a nlm4_testrply stat doing the heavy lifting:
struct nlm4_testres {
netobj cookie;
nlm4_testrply stat;
};
class TEST_MSG4args(nlm4_testargs)
_MSG test args, nlm4_testargs again:
struct nlm4_testargs {
netobj cookie;
bool exclusive;
nlm4_lock locker;
};
class TEST_RES4args(nlm4_testres)
_RES test args, and she's still carrying that nlm4_testrply stat:
struct nlm4_testres {
netobj cookie;
nlm4_testrply stat;
};
class UNLOCK4args(nlm4_unlockargs)
unlock args! no block, no exclusive β just cookie and locker. she's streamlined π¦
struct nlm4_unlockargs {
netobj cookie;
nlm4_lock locker;
};
class UNLOCK4res(nlm4_res)
unlock response on nlm4_res:
struct nlm4_res {
netobj cookie;
nlm4_stats status;
};
class UNLOCK_MSG4args(nlm4_unlockargs)
_MSG unlock args, same nlm4_unlockargs, same cute minimal struct:
struct nlm4_unlockargs {
netobj cookie;
nlm4_lock locker;
};
class UNLOCK_RES4args(nlm4_res)
_RES unlock args, nlm4_res to the core:
struct nlm4_res {
netobj cookie;
nlm4_stats status;
};
class UNSHARE4args(nlm4_shareargs)
unshare args, nlm4_shareargs parent β cookie, share, reclaim, done:
struct nlm4_shareargs {
netobj cookie;
nlm4_share share;
bool reclaim;
};
class UNSHARE4res(nlm4_shareres)
unshare response, also with the sequence int. consistent queen π
struct nlm4_shareres {
netobj cookie;
nlm4_stats status;
int sequence;
};
class fsh4_access(packet.utils.Enum)
she's a packet.utils.Enum, and she is:
enum fsh4_access
that's the whole thing. no methods listed. no notes. periodt. π
class fsh4_mode(packet.utils.Enum)
another packet.utils.Enum:
enum fsh4_mode
nothing else on the page for her. she's mysterious, she's lowkey, she's fine.
class nfs_bool(packet.utils.Enum)
and the last of the enum trio, packet.utils.Enum again:
enum nfs_bool
no methods, no drama.
class nlm4_cancargs(baseobj.BaseObj)
the actual base cancel-args struct, a real baseobj.BaseObj and the parent of a bunch of the CANCEL* girlies up top:
struct nlm4_cancargs {
netobj cookie;
bool block;
bool exclusive;
nlm4_lock locker;
};
Methods defined here
__init__(self, unpack)β Constructor
Initialize object's private data according to the arguments given. Arguments can be given as positional, named arguments or a combination of both.
class nlm4_holder(baseobj.BaseObj)
a baseobj.BaseObj who holds the lock info β exclusive flag, server id, owner handle, offset, length:
struct nlm4_holder {
bool exclusive;
int32 svid;
strobj oh;
uint64 offset;
uint64 length;
};
Methods defined here
__init__(self, unpack)β Constructor
Initialize object's private data according to the arguments given. Arguments can be given as positional, named arguments or a combination of both.
class nlm4_lock(baseobj.BaseObj)
the lock struct itself. she's a baseobj.BaseObj with a bounded owner string (LM_MAXSTRLEN), a file handle, an owner handle, a server id, and a uint64 offset + length:
struct nlm4_lock {
string owner<LM_MAXSTRLEN>;
nlm_fh fh;
strobj oh;
int32 svid;
uint64 offset;
uint64 length;
};
Methods defined here
__init__(self, unpack)β Constructor
Initialize object's private data according to the arguments given. Arguments can be given as positional, named arguments or a combination of both.
class nlm4_lockargs(baseobj.BaseObj)
the canonical lockargs, a baseobj.BaseObj, and the parent of LOCK4args, LOCK_MSG4args and NM_LOCK4args. yes, reclaim and state are commented exactly like this in the source:
struct nlm4_lockargs {
netobj cookie;
bool block;
bool exclusive;
nlm4_lock locker;
bool reclaim; /* used for recovering locks */
int state; /* specify local status monitor state */
};
Methods defined here
__init__(self, unpack)β Constructor
Initialize object's private data according to the arguments given. Arguments can be given as positional, named arguments or a combination of both.
class nlm4_res(baseobj.BaseObj)
the response blueprint. baseobj.BaseObj, cookie plus status, and literally half the classes on this page inherit from her:
struct nlm4_res {
netobj cookie;
nlm4_stats status;
};
Methods defined here
__init__(self, unpack)β Constructor
Initialize object's private data according to the arguments given. Arguments can be given as positional, named arguments or a combination of both.
class nlm4_share(baseobj.BaseObj)
the share struct, a baseobj.BaseObj, with a bounded owner string, file handle, owner handle, and both an fsh4_mode and an fsh4_access β those enums from earlier get to hang out here:
struct nlm4_share {
string owner<LM_MAXSTRLEN>;
nlm_fh fh;
strobj oh;
fsh4_mode mode;
fsh4_access access;
};
Methods defined here
__init__(self, unpack)β Constructor
Initialize object's private data according to the arguments given. Arguments can be given as positional, named arguments or a combination of both.
okay bestie, that's the end of part 1 β and no, we are NOT done, more parts follow. don't go anywhere π
β¨ class nlm4_shareargs(baseobj.BaseObj) β¨
Okay bestie, this one is giving share-args realness. Here's the struct, no cap:
struct nlm4_shareargs {
netobj cookie;
nlm4_share share;
bool reclaim;
};
π Methods defined here:
__init__(self, unpack)β Constructor. It initializes the object's private data according to the arguments you give it. You can pass those arguments positionally, as named arguments, or a combo of both. Slay. π«Ά
β¨ class nlm4_shareres(baseobj.BaseObj) β¨
The response vibe. Here's the struct:
struct nlm4_shareres {
netobj cookie;
nlm4_stats status;
int sequence;
};
π Methods defined here:
__init__(self, unpack)β Constructor. Initialize object's private data according to the arguments given. Arguments can be given as positional, named arguments or a combination of both. Periodt. π
β¨ class nlm4_stats(packet.utils.Enum) β¨
enum nlm4_stats
No methods listed here, just the enum. Minimal, iconic, we love that for her. πΈ
β¨ class nlm4_testargs(baseobj.BaseObj) β¨
struct nlm4_testargs {
netobj cookie;
bool exclusive;
nlm4_lock locker;
};
π Methods defined here:
__init__(self, unpack)β Constructor. Initialize object's private data according to the arguments given. Arguments can be given as positional, named arguments or a combination of both. You got this. β¨
β¨ class nlm4_testres(baseobj.BaseObj) β¨
struct nlm4_testres {
netobj cookie;
nlm4_testrply stat;
};
π Methods defined here:
__init__(self, unpack)β Constructor. Initialize object's private data according to the arguments given. Arguments can be given as positional, named arguments or a combination of both. Main character constructor energy. π
β¨ class nlm4_testrply(baseobj.BaseObj) β¨
union switch nlm4_testrply (nlm4_stats status) {
case const.NLM4_DENIED:
nlm4_holder denied;
default:
void;
};
π Methods defined here:
__init__(self, unpack)β Constructor. Initialize object's private data according to the arguments given. Arguments can be given as positional, named arguments or a combination of both. Lowkey essential. π
β¨ class nlm4_unlockargs(baseobj.BaseObj) β¨
struct nlm4_unlockargs {
netobj cookie;
nlm4_lock locker;
};
π Methods defined here:
__init__(self, unpack)β Constructor. Initialize object's private data according to the arguments given. Arguments can be given as positional, named arguments or a combination of both. Unlock the vibe. π
β¨ class nlm_proc4(packet.utils.Enum) β¨
enum nlm_proc4
Again, no methods, just the enum. She's mysterious like that. π¦
π₯ FUNCTIONS π₯
netobj(unpack)nlm_fh(unpack)strobj(unpack)
These are the function besties. Short, sweet, no drama. β¨
π SEE ALSO π
Go read these too, iykyk. π
π BUGS π
No known bugs.
Clean sheet, no cap. We love a bug-free moment. π
π«Ά AUTHOR π«Ά
Jorge Mora (mora@netapp.com)
Author icon. Periodt. π
π And that's the NLM4(3) page, bestie β brought to you by NFStest 3.2, dated 21 March 2023. Periodt. π
π¦ where this page comes from
- debian trixie: nfstest 3.2-3
- fedora 43: NFStest 3.2-14.fc43 Β· GPL-2.0-or-later
- fedora 44: NFStest 3.2-16.fc44 Β· GPL-2.0-or-later
- ubuntu noble: nfstest 3.2-2
- ubuntu questing: nfstest 3.2-3
- ubuntu resolute: nfstest 3.2-3build1
- ubuntu stonking: nfstest 3.2-5
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms