tcf_em_tree_match(9)
π tcf_em_tree_match(9) π
okay bestie, welcome to the Kernel API Manual β¨ this one's a lil function called tcf_em_tree_match and it's literally the vibe check for packets, no cap π«Ά
πΈ NAME πΈ
tcf_em_tree_match β evaluate an ematch tree π§
like, it runs the tree and tells you if your packet slays or not π
β¨ SYNOPSIS β¨
int tcf_em_tree_match (struct sk_buff *skb , struct tcf_ematch_tree
*tree , struct tcf_pkt_info *info );
three args, one int back, iconic behavior π
π ARGUMENTS π
skbβ the socket buffer of the packet in question π¦ like, the actual packet we're judging. main character energy fr fr.treeβ the ematch tree to be used for evaluation πΈ this is the tree we're walking through, respectfully.infoβ packet information examined by classifier π the classifier's little notes about the packet, iykyk.
π₯ DESCRIPTION π₯
so here's the tea β β this function matches skb against the ematch tree in tree by going through all the ematches, respecting their logic relations, and returning as soon as the result is obvious π no wasting time, it dips out the second it knows. efficiency ate, honestly.
π RETURN π
1β if the ematch tree as-one matches π or if no ematches are configured π«Ά or if ematch is just not enabled in the kernel π (yes, all three get a1, that's just how she is)0β otherwise π
π¦ 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(9)struct tcf_ematch_tree(9)struct tcf_ematch_ops(9)
go read those next bestie, they're all linked up in the same lore π
ok that's the whole page!! no notes, she's perfect π
and that's a wrap on this little slice of the kernel API manual, straight out of ./include/net, dated October 2026 β mwah, go match some trees πππ¦
π¦ 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