dvb_ringbuffer_pkt_next(9)
π dvb_ringbuffer_pkt_next(9) β the kernel API manual, bestie edition π
okay so like, this is the manual page for dvb_ringbuffer_pkt_next(9), and honestly? it's giving "tiny function, big main character energy." let's get into it π«Ά
β¨ NAME β¨
dvb_ringbuffer_pkt_next β literally just "get the index of the next packet in a ringbuffer." that's it, that's the whole vibe. no cap. π
π¦ SYNOPSIS π¦
ssize_t dvb_ringbuffer_pkt_next (struct dvb_ringbuffer *rbuf , size_t
idx , size_t *pktlen );
like, that's the whole signature. yes the line break is weird, no we're not fixing it, it's iconic in its own way. periodt. π
πΈ ARGUMENTS πΈ
rbufβ the ringbuffer we're concerned about. this is the one we're snooping through, bestie. πidxβ the previous packet index. but here's the slay: if you pass-1, it returns the first packet index instead. so-1is basically your "start me from the top" button. π¬pktlenβ on success, this gets updated to contain the length of the packet in bytes. she's the output param, she's doing her job, we love to see it. π
and oh β right there in the original arguments it says: returns Packet index (if >=0), or -1 if no packets available. so like, that's the return behavior, sneaking in under the pktlen bullet. iykyk. π
β¨ THE VIBE (a.k.a. what you get back) β¨
so like:
- if it works, you get a packet index (if
>=0) β she's valid, she's real, she ate π₯ - if there are no packets available, you get
-1β the classic "there's nothing here" π
fr fr, that's the whole return contract. no extra lore.
heads up bestie:-1is doing double duty here β as an input toidxit means "give me the first packet," and as a return value it means "no packets available." she contains multitudes. π
π SEE ALSO π
the kernel file lives at ./include/media/dvb_ringbuffer.h and here's the whole friend group, no one gets left out:
struct dvb_ringbuffer(9)dvb_ringbuffer_init(9)dvb_ringbuffer_empty(9)dvb_ringbuffer_free(9)dvb_ringbuffer_avail(9)dvb_ringbuffer_reset(9)dvb_ringbuffer_flush(9)dvb_ringbuffer_flush_spinlock_wakeup(9)DVB_RINGBUFFER_PEEK(9)DVB_RINGBUFFER_SKIP(9)dvb_ringbuffer_read_user(9)dvb_ringbuffer_read(9)DVB_RINGBUFFER_WRITE_BYTE(9)dvb_ringbuffer_write(9)dvb_ringbuffer_write_user(9)dvb_ringbuffer_pkt_write(9)dvb_ringbuffer_pkt_read_user(9)dvb_ringbuffer_pkt_read(9)dvb_ringbuffer_pkt_dispose(9)
like, that's the whole squad. go read them too, they're all lowkey obsessed with the same ringbuffer. π§π
aaaand that's the page!! this lil icon came to you from ./include/media, dated October 2026, and it ships as part of the Kernel API Manual. mwah, go forth and iterate your packets bestie πβπ
π¦ 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