STRUCT TCF_EMATCH(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct tcf_ematch β€” the Kernel API Manual, bestie edition

okay so. we're looking at struct tcf_ematch(9) today and ngl this lil struct is lowkey the main character of extended matching in the kernel. "ematch" = extended match, iykyk. it's giving traffic-classifier royalty πŸ‘‘


✨ NAME ✨

struct tcf_ematch β€” extended match (ematch). that's it, that's the whole vibe πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

here's the whole thing, copy it exactly, don't @ me:

struct tcf_ematch {
    struct tcf_ematch_ops * ops;
    unsigned long           data;
    unsigned int            datalen;
    u16 matchid;
    u16 flags;
    struct net              *net;
 };

literally all of it. six whole members. slay.


🌸 Members 🌸

  • ops β€” the operations lookup table of the corresponding ematch module. like, this is where all the actual behaviour lives. the struct itself is just the paperwork πŸ’…
  • data β€” ematch specific data. yes it's vague, no I can't elaborate, that's literally what the page says πŸ™ˆ
  • datalen β€” length of the ematch specific configuration data. a size for the data above, periodt.
  • matchid β€” identifier to allow userspace to reidentify a match. so userspace can point at it later and go "that one" πŸ‘‘
  • flags β€” flags specifying attributes and the relation to other matches. the "how do I relate to my siblings" field, highkey relatable 😭
  • net β€” the network namespace. which world this match lives in 🌈

πŸ”₯ SEE ALSO πŸ”₯

go read those next, bestie, they're the extended universe 🫢


kay that's the whole page!! source is ./include/net, dated October 2026, and the version tag is literally struct tcf_ematch(9) β€” same as the title, iconic behaviour honestly. mwah, bye bestie πŸ’–βœ¨πŸ¦‹πŸŒΈπŸŽ€

πŸ“¦ where this page comes from