Scroll to navigation

libnvmf_context_create(9) libnvme API manual libnvmf_context_create(9)

NAME

libnvmf_context_create - Create a new fabrics context for discovery/connect

SYNOPSIS

int libnvmf_context_create (struct libnvme_global_ctx *ctx , bool (*decide_retry)(struct libnvmf_context *fctx, int err, void *user_data) , void (*connected)(struct libnvmf_context *fctx, struct libnvme_ctrl *c, void *user_data) , void (*already_connected)(struct libnvmf_context *fctx, struct libnvme_host *host, const char *subsysnqn, const char *transport, const char *traddr, const char *trsvcid, void *user_data) , void *user_data , struct libnvmf_context **fctxp );

ARGUMENTS

Global context
Hook to decide if a retry should be attempted
Hook invoked when a connection is established
Hook invoked if already connected
User data passed to hooks
Pointer to store the created context

DESCRIPTION

Allocates and initializes a new fabrics context for discovery/connect operations.

RETURN

0 on success, negative error code otherwise.

libnvmf_context_create July 2026