RDMA_BIND_ADDR(3)

πŸ’– RDMA_BIND_ADDR πŸ’–

okay bestie, welcome to the Librdmacm Programmer's Manual ✨ this is rdma_bind_addr, and yes she's a 3-section girlie (that means library function, iykyk). let's get into it πŸŽ€


✨ NAME ✨

rdma_bind_addr β€” bind an RDMA identifier to a source address πŸ¦‹


🌸 SYNOPSIS 🌸

#include <rdma/rdma_cma.h>

int rdma_bind_addr (struct rdma_cm_id *id, struct sockaddr *addr);

πŸ’… ARGUMENTS πŸ’…

  • id β€” the RDMA identifier, your main character 🫢
  • addr β€” local address info. wildcard values are permitted, she's flexible like that πŸ’β™€οΈ

πŸ‘‘ DESCRIPTION πŸ‘‘

so basically this associates a source address with an rdma_cm_id. the address may be wildcarded β€” no cap. and if you're binding to a specific local address, the rdma_cm_id will also get bound to a local RDMA device. two things at once, she's multitasking, we love to see it ✨


πŸ“ RETURN VALUE πŸ“

  • returns 0 on success πŸ’–
  • returns -1 on error 😭
  • and if an error happens, errno gets set to tell you the failure reason. she will always tell you what went wrong, communication queen πŸ’…

🌈 NOTES 🌈

typically, you call this routine before calling rdma_listen to bind to a specific port number. but it may also be called on the active side of a connection before calling rdma_resolve_addr to bind to a specific address. so like, either vibe works depending on what you're doing πŸ¦‹

if you use it to bind to port 0, the rdma_cm will select an available port for you β€” and you can retrieve it with rdma_get_src_port(3). free port, no effort, we love an assist 🫢


πŸŽ€ SEE ALSO πŸŽ€


and that's the whole page, bestie β€” no crumbs left πŸ’œ this came to you from librdmacm, dated 2007-05-15, under the header RDMA_BIND_ADDR(3). she's been iconic since '07 and she's still serving ⭐ go bind something and slay πŸ‘‘πŸ’–

πŸ“¦ where this page comes from