STRUCT TCF_EMATCH(9)
π 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 thedataabove, 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 π₯
- Kernel file
./include/net/pkt_cls.h tcf_exts_has_actions(9)tcf_exts_exec(9)struct tcf_pkt_info(9)struct tcf_ematch_tree(9)struct tcf_ematch_ops(9)tcf_em_tree_match(9)
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
- 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