---
name: "packet.nfs.nlm4"
section: "3"
platform: "linux"
package: "nfstest"
version: "3.2-3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/packet.nfs.nlm4"
---

# packet.nfs.nlm4(3)

NLMv4 decoding module

## NAME

packet.nfs.nlm4 - NLMv4 decoding module

## CLASSES

### class CANCEL4args(nlm4\_cancargs)

```
struct nlm4_cancargs {
    netobj    cookie;
    bool      block;
    bool      exclusive;
    nlm4_lock locker;
};
```

### class CANCEL4res(nlm4\_res)

```
struct nlm4_res {
    netobj     cookie;
    nlm4_stats status;
};
```

### class CANCEL\_MSG4args(nlm4\_cancargs)

```
struct nlm4_cancargs {
    netobj    cookie;
    bool      block;
    bool      exclusive;
    nlm4_lock locker;
};
```

### class CANCEL\_RES4args(nlm4\_res)

```
struct nlm4_res {
    netobj     cookie;
    nlm4_stats status;
};
```

### class FREE\_ALL4args(baseobj.BaseObj)

```
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)

```
struct nlm4_testargs {
    netobj    cookie;
    bool      exclusive;
    nlm4_lock locker;
};
```

### class GRANTED4res(nlm4\_res)

```
struct nlm4_res {
    netobj     cookie;
    nlm4_stats status;
};
```

### class GRANTED\_MSG4args(nlm4\_testargs)

```
struct nlm4_testargs {
    netobj    cookie;
    bool      exclusive;
    nlm4_lock locker;
};
```

### class GRANTED\_RES4args(nlm4\_res)

```
struct nlm4_res {
    netobj     cookie;
    nlm4_stats status;
};
```

### class LOCK4args(nlm4\_lockargs)

```
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)

```
struct nlm4_res {
    netobj     cookie;
    nlm4_stats status;
};
```

### class LOCK\_MSG4args(nlm4\_lockargs)

```
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)

```
struct nlm4_res {
    netobj     cookie;
    nlm4_stats status;
};
```

### class NLM4args(packet.utils.RPCload)

```
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)

```
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)

```
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)

```
struct nlm4_res {
    netobj     cookie;
    nlm4_stats status;
};
```

### class SHARE4args(nlm4\_shareargs)

```
struct nlm4_shareargs {
    netobj     cookie;
    nlm4_share share;
    bool       reclaim;
};
```

### class SHARE4res(nlm4\_shareres)

```
struct nlm4_shareres {
    netobj     cookie;
    nlm4_stats status;
    int        sequence;
};
```

### class TEST4args(nlm4\_testargs)

```
struct nlm4_testargs {
    netobj    cookie;
    bool      exclusive;
    nlm4_lock locker;
};
```

### class TEST4res(nlm4\_testres)

```
struct nlm4_testres {
    netobj        cookie;
    nlm4_testrply stat;
};
```

### class TEST\_MSG4args(nlm4\_testargs)

```
struct nlm4_testargs {
    netobj    cookie;
    bool      exclusive;
    nlm4_lock locker;
};
```

### class TEST\_RES4args(nlm4\_testres)

```
struct nlm4_testres {
    netobj        cookie;
    nlm4_testrply stat;
};
```

### class UNLOCK4args(nlm4\_unlockargs)

```
struct nlm4_unlockargs {
    netobj    cookie;
    nlm4_lock locker;
};
```

### class UNLOCK4res(nlm4\_res)

```
struct nlm4_res {
    netobj     cookie;
    nlm4_stats status;
};
```

### class UNLOCK\_MSG4args(nlm4\_unlockargs)

```
struct nlm4_unlockargs {
    netobj    cookie;
    nlm4_lock locker;
};
```

### class UNLOCK\_RES4args(nlm4\_res)

```
struct nlm4_res {
    netobj     cookie;
    nlm4_stats status;
};
```

### class UNSHARE4args(nlm4\_shareargs)

```
struct nlm4_shareargs {
    netobj     cookie;
    nlm4_share share;
    bool       reclaim;
};
```

### class UNSHARE4res(nlm4\_shareres)

```
struct nlm4_shareres {
    netobj     cookie;
    nlm4_stats status;
    int        sequence;
};
```

### class fsh4\_access(packet.utils.Enum)

```
enum fsh4_access
```

### class fsh4\_mode(packet.utils.Enum)

```
enum fsh4_mode
```

### class nfs\_bool(packet.utils.Enum)

```
enum nfs_bool
```

### class nlm4\_cancargs(baseobj.BaseObj)

```
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)

```
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)

```
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)

```
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)

```
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)

```
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.

### class nlm4\_shareargs(baseobj.BaseObj)

```
struct nlm4_shareargs {
    netobj     cookie;
    nlm4_share share;
    bool       reclaim;
};
```

**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\_shareres(baseobj.BaseObj)

```
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.

### class nlm4\_stats(packet.utils.Enum)

```
enum nlm4_stats
```

### 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.

### 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.

### 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.

### 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.

### class nlm\_proc4(packet.utils.Enum)

```
enum nlm_proc4
```

## FUNCTIONS

```
netobj(unpack)
```

**nlm\_fh(unpack)**

**strobj(unpack)**

## SEE ALSO

**[baseobj(3)](/baseobj/3.md),** **[packet.nfs.nlm4\_const(3)](/packet.nfs.nlm4_const/3.md),** **[packet.unpack(3)](/packet.unpack/3.md),** **[packet.utils(3)](/packet.utils/3.md)**

## BUGS

No known bugs.

## AUTHOR

Jorge Mora (mora@netapp.com)
