RDMA_QUERY_ADDRINFO(3)

✨ RDMA_QUERY_ADDRINFO ✨

okay bestie, welcome to the Librdmacm Programmer's Manual section 3 β€” yes, the rdma_query_addrinfo(3) page, and no, you're not lost, this is exactly where you're supposed to be πŸ’–


🌸 NAME 🌸

RDMA_QUERY_ADDRINFO β€” the little function that goes and queries the resolved address information. it's giving "hey did that resolve actually land?" energy πŸ¦‹


πŸŽ€ SYNOPSIS πŸŽ€

#include <rdma/rdma_cma.h>

int rdma_query_addrinfo(struct rdma_cm_id *id, struct rdma_addrinfo
**info);

like. that's the whole thing. two args, one include, no drama πŸ’…


πŸ‘‘ ARGUMENTS πŸ‘‘

  • id β€” the RDMA identifier. your lil handle for the connection thing you're doing. so main character.
  • info β€” a pointer to a linked list of rdma_addrinfo structures holding the resolved information. yes, linked list, yes, pointer-to-pointer, we love a level of indirection around here πŸ™ˆ

πŸ”₯ DESCRIPTION πŸ”₯

so what does it actually do, bestie? it retrieves the resulting rdma_addrinfo structures from a successful rdma_resolve_addrinfo() operation. that's it. that's the function. it's the "okay so did my resolve work, and what did it give me" follow-up call 🫢

note the word successful up there β€” this is the retrieval step after the resolving step. it's a duo, not a solo act ✨

⭐ RETURN VALUE ⭐

  • on success, 0 is returned, and info contains a resolved address information. slay πŸ’–
  • on error, -1 is returned, and errno will be set to indicate the failure reason. so like, check errno. fr fr 😭

🌈 NOTES 🌈

the info must be released with rdma_freeaddrinfo(3). like, that's not a suggestion, that's a whole obligation. clean up after yourself, queen 🧚


πŸ’œ SEE ALSO πŸ’œ

iykyk πŸ”₯


πŸ“ AUTHOR πŸ“

Mark Zhang <markzhang@nvidia.com> β€” ty for the lore, king πŸ‘‘


and that's the page, babe πŸ’… this was the Librdmacm Programmer's Manual, page RDMA_QUERY_ADDRINFO(3), dated 2025-02-06 β€” go forth and resolve, then query, then free πŸŒΈβœ¨πŸ¦‹

πŸ“¦ where this page comes from