summaryrefslogtreecommitdiffstats
path: root/doc/rst/util.rst
diff options
context:
space:
mode:
Diffstat (limited to 'doc/rst/util.rst')
-rw-r--r--doc/rst/util.rst117
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.
+
+