RDMA_GET_LOCAL_ADDR(3)

πŸ’– RDMA_GET_LOCAL_ADDR πŸ’–

okay bestie, welcome to the Librdmacm Programmer's Manual ✨ this one is RDMA_GET_LOCAL_ADDR(3) and it's literally the chillest little function, I promise 🫢


🌸 NAME 🌸

rdma_get_local_addr β€” gives you back the local IP address of an rdma_cm_id that's been bound. that's it. that's the whole job. she's simple, she's reliable, she ate πŸ’…


✨ SYNOPSIS ✨

#include <rdma/rdma_cma.h>

struct sockaddr * rdma_get_local_addr (struct rdma_cm_id *id);

look at her. one include, one call. no cap πŸŽ€


πŸ¦‹ ARGUMENTS πŸ¦‹

  • id β€” the RDMA identifier. your main character struct, fr fr. this is the rdma_cm_id you want the local address of πŸ‘‘

πŸ’œ DESCRIPTION πŸ’œ

so here's the vibe: this function returns the local IP address for an rdma_cm_id that has already been bound to a local device. that's the prerequisite bestie β€” bound to a local device β€” if it hasn't been bound, don't come crying to me, check the RETURN VALUE section below 🌈

it's giving "I just want to know where I'm coming from." lowkey iconic energy honestly 😌


πŸ“ RETURN VALUE πŸ“

  • it returns a pointer to the local sockaddr address of the rdma_cm_id πŸ’«
  • and here's the important bit, bestie, do not skip this: if the rdma_cm_id is not bound to an address, then the contents of the sockaddr structure will be set to all zeroes. all zeroes. not an error code, not a NULL, just straight-up zeros πŸ™ˆ so if you're getting a suspiciously empty-looking address, that's why, and now you know πŸ’€

🧚 SEE ALSO 🧚

the girlies that hang out together:


okay that's the whole page, you're fully caught up, go slay some RDMA πŸ«ΆπŸ’–

this one's from librdmacm, dated 2007-05-15, and yeah she's been serving since 2007 β€” vintage but never outdated, periodt πŸ‘‘βœ¨

πŸ“¦ where this page comes from