RDMA_GET_DST_PORT(3)

✨ RDMA_GET_DST_PORT ✨

okay bestie, welcome to the Librdmacm Programmer's Manual β€” this one's about rdma_get_dst_port, and it's a short one so we can be cute about it πŸ’–


πŸ’« NAME πŸ’«

rdma_get_dst_port β€” returns the remote port number of a bound rdma_cm_id.

like. it tells you which port the other side is on. that's the whole gig. no cap. πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <rdma/rdma_cma.h>

uint16_t rdma_get_dst_port (struct rdma_cm_id *id);

yes that's the whole function signature, she's little but she's fierce πŸ’…


🌸 ARGUMENTS 🌸

  • id β€” the RDMA identifier. your little rdma_cm_id bestie. you hand her over and she spills the tea about the peer's port 🫢

🌈 DESCRIPTION 🌈

Returns the remote port number for an rdma_cm_id that has been bound to a remote address.

that's it. that's the function. she's a getter. she gets. the way that she just. gets the port. iconic behavior honestly 😭✨

heads up: the rdma_cm_id needs to be bound to a remote address for this to give you the goods β€” otherwise see below πŸ‘‡

⭐ RETURN VALUE ⭐

Returns the 16-bit port identifier associated with the peer endpoint. 🎯

If the rdma_cm_id is not connected, the returned value is 0.

so like, if you get a 0 back, she's telling you nothing's connected yet. that's your vibe check result. 0 = no connection, bestie πŸ’€


πŸ‘‘ SEE ALSO πŸ‘‘

go read these next, they're all part of the same friend group:


and that's the page!! this came from the Librdmacm Programmer's Manual, dated 2007-05-15, part of the librdmacm package (version librdmacm). mwah, go write some RDMA code, you got this πŸ§šπŸ’œ

πŸ“¦ where this page comes from