relay_open(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’« relay_open(9) β€” the Kernel API Manual, bestie edition πŸ’«

okay so you're reading the relay_open(9) page, iconic choice, this is genuinely one of the fun ones. it lives in the Kernel API Manual and it's all about making a brand new relay channel. let's get into it πŸŽ€


✨ NAME ✨

relay_open β€” create a new relay channel. that's the whole vibe. new channel, fresh out the box, slay πŸ’…


🌸 SYNOPSIS 🌸

struct rchan * relay_open (const char *base_filename , struct dentry
*parent , size_t subbuf_size , size_t n_subbufs , const struct
rchan_callbacks *cb , void *private_data );

like, look at her. six arguments, all main character energy πŸ‘‘


πŸ¦‹ ARGUMENTS πŸ¦‹

  • base_filename β€” the base name of the files to create. this is the name-y part of the name, iykyk ✨
  • parent β€” the dentry of the parent directory, NULL for the root directory or buffer. pass NULL and she goes to root, no notes 🫢
  • subbuf_size β€” size of sub-buffers. how big each lil sub-buffer is πŸ“
  • n_subbufs β€” number of sub-buffers. how many of them there are, literally just a count πŸ’œ
  • cb β€” client callback functions. your callbacks, your rules 🌈
  • private_data β€” user-defined data. whatever you want, no questions asked πŸ™ˆ

πŸ”₯ DESCRIPTION πŸ”₯

so what does it actually do? it returns the channel pointer if successful, NULL otherwise. that's the deal. NULL means nope 😭

it creates a channel buffer for each cpu using the sizes and attributes specified. not me giving every cpu its own lil buffer, generous queen πŸ‘‘

the created channel buffer files will be named base_filename0...base_filenameN-1. note the naming, bestie β€” it's 0 through N-1, don't come for me with off-by-one nonsense πŸ’€

file permissions will be S_IRUSR. that's it. that's the permission. read it and weep (or, like, just read it, that's the only thing you can do) 🌸


⭐ SEE ALSO ⭐

kernel file ./kernel/relay.c β€” and the whole relay fam, all of them, no cap:

go read all of them, or don't, I'm not your mom 🧚


πŸ’– that's the whole page! go open a relay channel, you've got this!

mwah πŸ’‹ this one came straight out of ./kernel and it's dated October 2026, so like, remember that when you cite her. periodt.

πŸ“¦ where this page comes from