netdev_rx_handler_register(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… netdev_rx_handler_register πŸ’…

okay so bestie, this is the netdev_rx_handler_register page from the Kernel API Manual β€” and yes, it's giving low-level networking main character energy. 🫢


πŸ’– NAME πŸ’–

netdev_rx_handler_register β€” register receive handler


✨ SYNOPSIS ✨

int netdev_rx_handler_register (struct net_device *dev ,
rx_handler_func_t *rx_handler , void *rx_handler_data );

πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” device to register a handler for. Like, the actual device, bestie.
  • rx_handler β€” receive handler to register.
  • rx_handler_data β€” data pointer that is used by rx handler.

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so you're registering a receive handler for a device. ✨ This handler will then be called from __netif_receive_skb β€” yes, that exact function. If something goes wrong, a negative errno code is returned on a failure. πŸ’€

🚨 The caller must hold the rtnl_mutex. Not optional, no cap.

For a general description of rx_handler, see enum rx_handler_result.


πŸ’œ SEE ALSO πŸ’œ

Kernel file ./net/core/dev.c is in the mix too β€” and here's the whole (9) crew:


mwah πŸ’‹ β€” this page came from the Kernel API Manual, source ./net/core, date October 2026. Stay iconic, bestie 🫢

πŸ“¦ where this page comes from