STRUCT L3MDEV_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’œ struct l3mdev_ops(9) β€” from the Kernel API Manual, bestie

okay so picture this: you're deep in the kernel, poking at L3 master devices, and you need to know what knobs a driver can hook into. that's literally this whole page. it's the ops struct for l3mdev β€” the l3mdev operations, periodt. πŸŽ€


✨ NAME ✨

struct l3mdev_ops β€” l3mdev operations. that's it, that's the vibe. πŸ¦‹


🌸 SYNOPSIS 🌸

here's the whole shape of it, copy it exactly, no cap:

struct l3mdev_ops {
    u32 (*l3mdev_fib_table)(const struct net_device *dev);
    struct sk_buff * (*l3mdev_l3_rcv)(struct net_device *dev, struct
sk_buff *skb, u16 proto);
    struct sk_buff * (*l3mdev_l3_out)(struct net_device *dev, struct
sock *sk, struct sk_buff *skb, u16 proto);
    struct dst_entry * (*l3mdev_link_scope_lookup)(const struct
net_device *dev, struct flowi6 *fl6);
 };

like… four function pointers, all gorgeous, all doing their own little job. main character energy from every single one. πŸ’…


πŸ‘‘ Members πŸ‘‘

  • l3mdev_fib_table β€” hands you the FIB table id to use for lookups. it's giving "which table are we even using" energy. πŸ”₯
  • l3mdev_l3_rcv β€” the hook that plugs into the L3 receive path. incoming packets, we see you. πŸ™ˆ
  • l3mdev_l3_out β€” the hook that plugs into the L3 output path. bye bestie, off you go. ✨
  • l3mdev_link_scope_lookup β€” the IPv6 lookup for linklocal and mcast destinations. lowkey the most niche one and honestly? iconic. πŸ’€

πŸ¦‹ SEE ALSO πŸ¦‹

  • Kernel file ./include/net/l3mdev.h β€” go read the source, iykyk. πŸ“–

and that's the page, bestie! 🫢 this little masterpiece is from ./include/net, dated October 2026, and it's filed under struct l3mdev_ops(9) β€” go forth and hook those ops, you're gonna slay. πŸŒˆβ­πŸ’–

πŸ“¦ where this page comes from