rpma_conn_...ivate_data(3)

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

✨ rpma_conn_get_private_data β€” get a pointer to the connection's private data ✨

okay bestie, welcome to the RPMA Programmer's Manual πŸ’– this one's a lil function from librpma called rpma_conn_get_private_data, and she's giving handshake gossip energy β€” she hands you a pointer to the private data the other side of your connection sent over. cute, right? πŸŽ€


🌸 NAME 🌸

rpma_conn_get_private_data β€” grab a pointer to the connection's private data πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <librpma.h>

struct rpma_conn;
struct rpma_conn_private_data;
int rpma_conn_get_private_data(const struct rpma_conn *conn,
                struct rpma_conn_private_data *pdata);

✨ DESCRIPTION ✨

so basically, rpma_conn_get_private_data() obtains the pointer to the private data that was given by the other side of the connection. that's it. that's the whole vibe. the peer slid you their data and this function is the lil messenger that tells you where it's at 🫢


πŸ”₯ SECURITY WARNING πŸ”₯

no cap, this one's serious. the connection's private data is INSECURE. 😭

an attacker might modify all data transferred via the rdma_cm private data. like, all of it. not a vibe.

users should avoid using rpma_conn_get_private_data(3) and rpma_conn_req_get_private_data(3) API calls, and they should utilize TLS/SSL connections to transfer all configuration data between peers instead. protect your data, bestie, she deserves it πŸ’œ


πŸ‘‘ RETURN VALUE πŸ‘‘

rpma_conn_get_private_data() returns 0 on success, or a negative error code on failure. and heads up β€” on failure, rpma_conn_get_private_data() does not set *pdata. so don't go reading that value like it's gonna be something. it's not. πŸ™ˆ


πŸ’€ ERRORS πŸ’€

rpma_conn_get_private_data() can fail with the following error:

  • RPMA_E_INVAL β€” conn or pdata is NULL πŸ’… (yeah, passing NULL is not the move, periodt)

🌈 SEE ALSO 🌈


and that's the whole page, bestie πŸŽ€ go forth and pointer responsibly ✨

RPMA β€” 01 April 2024 β€” mwah, sending you the fluffiest of vibes from the RPMA Programmer's Manual πŸ«ΆπŸ’–πŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from