STRUCT INET_FRAG_QUEUE(9)
๐ struct inet_frag_queue(9) โ kernel API manual, but make it make sense
okay bestie, so this page is all about struct inet_frag_queue, aka the fragment queue โจ โ literally the data structure the kernel uses when it's holding onto all the lil' pieces of a datagram until it can put them back together. think of it as the group chat where every fragment has to show up before the convo can actually be read ๐ซถ
โจ SYNOPSIS โจ
here's the whole struct exactly as it lives, no cap, every field in order ๐
struct inet_frag_queue {
struct rhash_head node;
union {
struct frag_v4_compare_key v4;
struct frag_v6_compare_key v6;
} key;
struct timer_list timer;
spinlock_t lock;
refcount_t refcnt;
struct rb_root rb_fragments;
struct sk_buff *fragments_tail;
struct sk_buff *last_run_head;
ktime_t stamp;
int len;
int meat;
u8 tstamp_type;
__u8 flags;
u16 max_size;
struct fqdir *fqdir;
struct rcu_head rcu;
};
๐ธ Members ๐ธ
like. the whole cast. main character energy each and every one ๐
nodeโ the rhash node, bestie. it's how this queue sits in the hash. ๐ซkeyโ the keys that identify this frag, lowkey its whole identity ๐ชชtimerโ the queue expiration timer โฐ yes she has a deadlinelockโ the spinlock protecting this frag ๐ do not skip the lock, fr frrefcntโ reference count of the queue ๐งฎrb_fragmentsโ received fragments rb-tree root ๐ณ the family tree of piecesfragments_tailโ received fragments tail ๐ (no seriously, the tail)last_run_headโ the head of the last "run". seeip_fragment.c๐ iykykstampโ timestamp of the last received fragment โฑ๏ธlenโ total length of the original datagram ๐ the big picturemeatโ length of received fragments so far ๐ฅฉ (yes it's literally called meat, and yes i'm obsessed)tstamp_typeโ stamp has a mono delivery time (EDT) ๐ฐ๏ธflagsโ fragment queue flags ๐ฉmax_sizeโ maximum received fragment size ๐ฆfqdirโ pointer tostruct fqdir๐rcuโ rcu head for freeing deferall ๐งน (yes, that's how it's spelled on the page, we don't gatekeep)
ngl the meat field is the icon here. it's giving "the actual payload received so far" and honestly? slay.
๐ฆ SEE ALSO ๐ฆ
./include/net/inet_frag.hโ Kernel file ๐enum (anonymous)(9)โ also in that header, go read it, it's right there ๐
๐ the cute sign-off ๐
this lil' page lives in ./include/net, and the version tag on it reads October 2026 โ so yes, bestie, she's from the future and she's still just a fragment queue. periodt. ๐ง๐ธ
pages like this are why you read the header files โ go put your fragments back together responsibly ๐
๐ฆ 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