diff --git a/include/spdk/nvmf_transport.h b/include/spdk/nvmf_transport.h index 8e6c62a62..8cc7c074c 100644 --- a/include/spdk/nvmf_transport.h +++ b/include/spdk/nvmf_transport.h @@ -259,6 +259,12 @@ struct spdk_nvmf_transport_ops { int (*listen)(struct spdk_nvmf_transport *transport, const struct spdk_nvme_transport_id *trid, struct spdk_nvmf_listen_opts *opts); + /** + * Dump transport-specific listen opts into JSON + */ + void (*listen_dump_opts)(struct spdk_nvmf_transport *transport, + const struct spdk_nvme_transport_id *trid, struct spdk_json_write_ctx *w); + /** * Stop accepting new connections at the given address. */ diff --git a/lib/nvmf/transport.c b/lib/nvmf/transport.c index 52c984ced..74d83bed8 100644 --- a/lib/nvmf/transport.c +++ b/lib/nvmf/transport.c @@ -136,6 +136,10 @@ nvmf_transport_listen_dump_opts(struct spdk_nvmf_transport *transport, spdk_json_write_named_string(w, "traddr", trid->traddr); spdk_json_write_named_string(w, "trsvcid", trid->trsvcid); + if (transport->ops->listen_dump_opts) { + transport->ops->listen_dump_opts(transport, trid, w); + } + spdk_json_write_object_end(w); }