NAME
libnvmf_tid_from_fields - Allocate a TID from individual field strings.
SYNOPSIS
int libnvmf_tid_from_fields (const char *transport , const char *traddr , const char *trsvcid , const char *subsysnqn , const char *host_traddr , const char *host_iface , const char *hostnqn , const char *hostid , struct libnvmf_tid **out );
ARGUMENTS
- transport
-
Transport type (e.g. "tcp", "rdma", "fc").
- traddr
-
Transport address.
- trsvcid
-
Transport service ID (e.g. "8009").
- subsysnqn
-
Subsystem NQN.
- host_traddr
-
Host transport address, or NULL.
- host_iface
-
Host interface name, or NULL.
- hostnqn
-
Host NQN, or NULL.
- hostid
-
Host Identifier, or NULL.
- out
-
The allocated TID on success; NULL on error.
DESCRIPTION
Convenience constructor. NULL fields are stored as NULL. For an IP transport (tcp, rdma) a numeric traddr/host_traddr is canonicalized; a hostname is rejected -- resolving it is the caller's job, not libnvme's.
RETURN
0 on success (*out is the allocated TID); -EINVAL if out is NULL or traddr/host_traddr is not numeric on an IP transport; -ENOMEM on allocation failure.