rxrpc_kernel_remote_srx(9)
π rxrpc_kernel_remote_srx π
okay so bestie, this one's from the Kernel API Manual (yes, the kernel has a whole manual, we love a documented icon) and it's honestly so simple you're gonna be like "wait that's it?" π
β¨ NAME β¨
rxrpc_kernel_remote_srx β get the address of a peer πΈ
like, the address address, not the vibe. well, also the vibe, but mostly the address.
π SYNOPSIS π
const struct sockaddr_rxrpc * rxrpc_kernel_remote_srx (const struct rxrpc_peer *peer );
that's the whole thing. const struct sockaddr_rxrpc * going in, one argument, no surprises, we love a low-drama signature π«Ά
π ARGUMENTS π
peerβ the peer you wanna query π. that's the one. that's the whole argument list. main character energy fr.
π¦ DESCRIPTION π¦
so you've got a peer record and you want a pointer to the address sitting inside it β that's literally the whole function, and honestly? iconic. β¨
β οΈ but listen β the caller is responsible for making sure that the address is not deallocated. that part is on YOU, bestie, not on this function. it hands you a pointer and trusts you with it. do not let it get freed underneath you, no cap π
and here's the sweet part: a fake address will be substituted if peer is NULL. so it's not gonna just explode on you β you get a fake record to hold instead. thoughtful king behavior honestly π
β RETURN β
you get back the rxrpc address record or a fake record β that's it, that's the whole deal. real one if you gave it a real peer, fake one if you gave it NULL π§
π SEE ALSO π
- kernel file
./net/rxrpc/peer_object.cβ this is where the magic lives, go read it iykwim π rxrpc_kernel_get_call_peer(9)rxrpc_kernel_get_srtt(9)rxrpc_kernel_remote_addr(9)rxrpc_kernel_set_peer_data(9)rxrpc_kernel_get_peer_data(9)
the whole friend group fr, go say hi to all of them π«ΆπΈ
k bye, that's the whole page!! π this little slice of the kernel lives in ./net/rxrpc, stamped October 2026, delivered to you in the Kernel API Manual β mwah, stay hydrated, don't leak your pointers πβ¨π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms