rpma_conn_...ivate_data(3)

πŸ“¦
version 1.3.0 Β· 3 versions
, in ubuntu noble

✨ rpma_conn_req_get_private_data β€” bestie's guide πŸ’–

okay so you're reading the RPMA Programmer's Manual, page rpma_conn_...ivate_data(3), and honestly? you came to the right place. this one's short and sweet and it SLAPS. πŸŽ€


🌸 NAME 🌸

rpma_conn_req_get_private_data β€” get a pointer to the request's private data

like literally, that's the whole job. it hands you a pointer. that's it. she's an icon, she's a legend, and she is not doing extra credit. πŸ’…


✨ SYNOPSIS ✨

#include <librpma.h>

struct rpma_conn_req;
struct rpma_conn_private_data;
int rpma_conn_req_get_private_data(const struct rpma_conn_req *req,
                struct rpma_conn_private_data *pdata);

no cap, that's the whole signature. two structs and one function. clean. minimal. main character energy. πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so rpma_conn_req_get_private_data() obtains the pointer to the connection's private data β€” and here's the cute part β€” that private data was given by the other side of the connection 🫢, and it arrives before the connection is established. so it's like, the little hello note your bestie slipped you before the actual hangout even started. obsessed.


🚨 SECURITY WARNING 🚨

bestie. listen. πŸ‘€

See rpma_conn_get_private_data(3).

that's it, that's the warning. go read that page, it's important, fr fr. πŸ”₯


🌈 RETURN VALUE 🌈

  • rpma_conn_req_get_private_data() returns 0 on success πŸ’š
  • or a negative error code on failure 😭

and a very important detail, do NOT miss this: rpma_conn_req_get_private_data() does not set *pdata value on failure. so if it flopped, that pointer is untouched. don't go reading it like it's valid. that's giving undefined behavior vibes and we don't do that here. πŸ’€


πŸ’œ ERRORS πŸ’œ

rpma_conn_req_get_private_data() can fail with the following error:

  • RPMA_E_INVAL β€” req or pdata is NULL πŸ™ˆ

that's the one and only. just don't pass NULL, bestie, it's not that deep. ✨


πŸ‘‘ SEE ALSO πŸ‘‘


okay that's the whole page, you ate that πŸ“βœ¨ go forth and get your private data, you absolute legend. mwah. πŸ’–

β€” RPMA Programmer's Manual Β· RPMA Β· 01 April 2024 Β· rpma_conn_...ivate_data(3) Β· no thoughts, just pointers πŸ§šπŸ’…

πŸ“¦ where this page comes from