libnvmf_context_create-libnvme32
Create a new fabrics context for discovery/connect
Usage
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
ctx
|
Global context |
|---|---|
decide_retry
|
Hook to decide if a retry should be attempted |
connected
|
Hook invoked when a connection is established |
already_connected
|
Hook invoked if already connected |
user_data
|
User data passed to hooks |
fctxp
|
Pointer to store the created context |
Overview
Allocates and initializes a new fabrics context for discovery/connect operations.
Return
0 on success, negative error code otherwise.