STRUCT MFC_CACHE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct mfc_cache(9) πŸ’–

okay so this is a page straight out of the Kernel API Manual β€” yes bestie, the actual kernel docs β€” and it's all about struct mfc_cache, the little data structure that holds multicast routing entries πŸ‘‘ ngl it's giving "plumbing that runs the internet" energy and we're obsessed.


✨ NAME ✨

struct mfc_cache β€” multicast routing entries πŸ¦‹

Like, that's it, that's the whole vibe: this struct is the routing entry. Slay.


🌸 SYNOPSIS 🌸

here's the shape, verbatim, do not come for me about the formatting, I did not write the kernel, I just live here πŸ’…

struct mfc_cache {
    struct mr_mfc _c;
    union {
      struct {
        __be32 mfc_mcastgrp;
        __be32 mfc_origin;
      };
      struct mfc_cache_cmp_arg cmparg;
    };
 };

πŸŽ€ Members πŸŽ€

  • _c β€” the Common multicast routing information, and it has to be first, literally, because of [for casting] β€” yeah, the whole casting trick depends on it sitting right up front. main character position, no cap πŸ”₯
  • {unnamed_union} β€” anonymous πŸ‘€ (that's the whole note, she's mysterious, she's unnamed)
  • {unnamed_struct} β€” anonymous 🫢 (same deal, no name, just vibes)
  • mfc_mcastgrp β€” the destination multicast group address β€” like, where the traffic is actually going πŸ“¬βœ¨
  • mfc_origin β€” the source address β€” where it came from in the first place πŸ’«
  • cmparg β€” used for rhashtable comparisons 🧚 this one's the compare key, the little gremlin that lets the hashtable tell entries apart

⭐ SEE ALSO ⭐

  • Kernel file ./include/linux/mroute.h β€” go read the source bestie, it ate πŸ’€

lowkey a warning from me to you: _c must be first. that's not a suggestion, that's the casting situation. respect it πŸ™ˆ

and that's the whole page!! short and iconic, just like her πŸ’œ

mwah, bye bestie πŸŽ€ β€” this one came from the source dir ./include/linux, dated October 2026, and I hope you had as much fun as I did, which is a normal amount, periodt πŸ’…πŸŒˆ

πŸ“¦ where this page comes from