STRUCT RTNL_AF_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

okay so bestie, this is the manual page for struct rtnl_af_ops β€” aka rtnetlink address family operations β€” from the Kernel API Manual. It's giving kernel-internals main character energy, and honestly? Iconic. πŸ’…

✨ SYNOPSIS ✨

here's the struct, exactly as the page lays it out:

struct rtnl_af_ops {
    struct list_head        list;
    struct srcu_struct      srcu;
    int family;
    int (*fill_link_af)(struct sk_buff *skb, const struct net_device
*dev, u32 ext_filter_mask);
    size_t (*get_link_af_size)(const struct net_device *dev, u32
ext_filter_mask);
    int (*validate_link_af)(const struct net_device *dev, const struct
nlattr *attr, struct netlink_ext_ack *extack);
    int (*set_link_af)(struct net_device *dev, const struct nlattr
*attr, struct netlink_ext_ack *extack);
    int (*fill_stats_af)(struct sk_buff *skb, const struct net_device
*dev);
    size_t (*get_stats_af_size)(const struct net_device *dev);
};

πŸŽ€ MEMBERS πŸŽ€

  • list β€” used internally, protected by RTNL and SRCU. no cap.
  • srcu β€” used internally. that's it, that's the whole blurb. 🫢
  • family β€” the address family.
  • fill_link_af β€” the function that fills IFLA_AF_SPEC with address-family-specific netlink attributes. literally its whole job.
  • get_link_af_size β€” the function that calculates the size of those address-family-specific netlink attributes.
  • validate_link_af β€” validates an IFLA_AF_SPEC attribute; it must check attr for invalid configuration settings. this is the vibe-check function, fr fr.
  • set_link_af β€” the function that parses an IFLA_AF_SPEC attribute and modifies net_device accordingly.
quick heads-up, bestie: the synopsis up top also shows fill_stats_af and get_stats_af_size, but this page's Members list doesn't give them their own blurbs β€” so I'm not out here inventing lore. πŸ’…

πŸ’– SEE ALSO πŸ’–

go check out the Kernel file ./include/net/rtnetlink.h, plus these icons:

  • struct rtnl_msg_handler(9)
  • struct rtnl_newlink_params(9)
  • struct rtnl_link_ops(9)

mwah πŸ’‹ this one's from ./include/net and it's dated October 2026. periodt. 🫢✨

πŸ“¦ where this page comes from