diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-12-24 07:51:44 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-12-24 07:51:44 +0000 |
commit | 4da5b4b2fba02bd3e78f16828359cef79a757911 (patch) | |
tree | 326db4edaddfc20f78fb048509fd646f497e2a65 /doc/rst/util.rst | |
parent | Adding upstream version 1.5. (diff) | |
download | libnvme-4da5b4b2fba02bd3e78f16828359cef79a757911.tar.xz libnvme-4da5b4b2fba02bd3e78f16828359cef79a757911.zip |
Adding upstream version 1.7.1.upstream/1.7.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'doc/rst/util.rst')
-rw-r--r-- | doc/rst/util.rst | 117 |
1 files changed, 117 insertions, 0 deletions
diff --git a/doc/rst/util.rst b/doc/rst/util.rst index 6f7974e..f45452e 100644 --- a/doc/rst/util.rst +++ b/doc/rst/util.rst @@ -233,6 +233,74 @@ otherwise. Number of descriptors to construct +.. c:function:: void nvme_init_copy_range_f2 (struct nvme_copy_range_f2 *copy, __u32 *snsids, __u16 *nlbs, __u64 *slbas, __u16 *sopts, __u32 *eilbrts, __u32 *elbatms, __u32 *elbats, __u16 nr) + + Constructs a copy range f2 structure + +**Parameters** + +``struct nvme_copy_range_f2 *copy`` + Copy range array + +``__u32 *snsids`` + Source namespace identifier + +``__u16 *nlbs`` + Number of logical blocks + +``__u64 *slbas`` + Starting LBA + +``__u16 *sopts`` + Source options + +``__u32 *eilbrts`` + Expected initial logical block reference tag + +``__u32 *elbatms`` + Expected logical block application tag mask + +``__u32 *elbats`` + Expected logical block application tag + +``__u16 nr`` + Number of descriptors to construct + + +.. c:function:: void nvme_init_copy_range_f3 (struct nvme_copy_range_f3 *copy, __u32 *snsids, __u16 *nlbs, __u64 *slbas, __u16 *sopts, __u64 *eilbrts, __u32 *elbatms, __u32 *elbats, __u16 nr) + + Constructs a copy range f3 structure + +**Parameters** + +``struct nvme_copy_range_f3 *copy`` + Copy range array + +``__u32 *snsids`` + Source namespace identifier + +``__u16 *nlbs`` + Number of logical blocks + +``__u64 *slbas`` + Starting LBA + +``__u16 *sopts`` + Source options + +``__u64 *eilbrts`` + Expected initial logical block reference tag + +``__u32 *elbatms`` + Expected logical block application tag mask + +``__u32 *elbats`` + Expected logical block application tag + +``__u16 nr`` + Number of descriptors to construct + + .. c:function:: int nvme_get_feature_length (int fid, __u32 cdw11, __u32 *len) Retreive the command payload length for a specific feature identifier @@ -598,3 +666,52 @@ Returns error code if generating of random number fails. true if addr1 == addr2. false otherwise. +.. c:function:: const char * nvme_iface_matching_addr (const struct ifaddrs *iface_list, const char *addr) + + Get interface matching **addr** + +**Parameters** + +``const struct ifaddrs *iface_list`` + Interface list returned by getifaddrs() + +``const char *addr`` + Address to match + +**Description** + +Parse the interface list pointed to by **iface_list** looking +for the interface that has **addr** as one of its assigned +addresses. + +**Return** + +The name of the interface that owns **addr** or NULL. + + +.. c:function:: bool nvme_iface_primary_addr_matches (const struct ifaddrs *iface_list, const char *iface, const char *addr) + + Check that interface's primary address matches + +**Parameters** + +``const struct ifaddrs *iface_list`` + Interface list returned by getifaddrs() + +``const char *iface`` + Interface to match + +``const char *addr`` + Address to match + +**Description** + +Parse the interface list pointed to by **iface_list** and looking for +interface **iface**. The get its primary address and check if it matches +**addr**. + +**Return** + +true if a match is found, false otherwise. + + |