ENUM NET_DEVICE_FLAGS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ enum net_device_flags(9) ✨

okay so this is a page from the Kernel API Manual and it's literally about enum net_device_flags β€” the flags that live on a &struct net_device. yeah. the whole personality of your network interface, fr fr. let's get into it πŸ’…


🌸 NAME 🌸

enum net_device_flags β€” the flags on &struct net_device, bestie. that's the whole vibe.


πŸ¦‹ SYNOPSIS πŸ¦‹

enum net_device_flags {
    IFF_UP ,
    IFF_BROADCAST ,
    IFF_DEBUG ,
    IFF_LOOPBACK ,
    IFF_POINTOPOINT ,
    IFF_NOTRAILERS ,
    IFF_RUNNING ,
    IFF_NOARP ,
    IFF_PROMISC ,
    IFF_ALLMULTI ,
    IFF_MASTER ,
    IFF_SLAVE ,
    IFF_MULTICAST ,
    IFF_PORTSEL ,
    IFF_AUTOMEDIA ,
    IFF_DYNAMIC ,
    IFF_LOWER_UP ,
    IFF_DORMANT ,
    IFF_ECHO

};

like, that's the whole roster. all nineteen of them, sitting there in the enum, being iconic πŸ‘‘


πŸŽ€ Constants πŸŽ€

okay bestie, here's each one, one by one, no skipping, no cap:

  • IFF_UP β€” interface is up. can be toggled through sysfs ✨
  • IFF_BROADCAST β€” broadcast address valid. this one's volatile πŸ‘€
  • IFF_DEBUG β€” turn on debugging. can be toggled through sysfs πŸ›
  • IFF_LOOPBACK β€” is a loopback net. volatile πŸ”
  • IFF_POINTOPOINT β€” interface is has p-p link. volatile. (and yes, that's exactly how the original words it β€” "is has" β€” we stan a typo that made it into the kernel docs πŸ’€)
  • IFF_NOTRAILERS β€” avoid use of trailers. can be toggled through sysfs. volatile 🌈
  • IFF_RUNNING β€” interface RFC2863 OPER_UP. volatile ⭐
  • IFF_NOARP β€” no ARP protocol. can be toggled through sysfs. volatile πŸ™ˆ
  • IFF_PROMISC β€” receive all packets. can be toggled through sysfs. (she's nosy. love her.) πŸ’…
  • IFF_ALLMULTI β€” receive all multicast packets. can be toggled through sysfs πŸ“¬
  • IFF_MASTER β€” master of a load balancer. volatile πŸ‘‘
  • IFF_SLAVE β€” slave of a load balancer. volatile 🫢
  • IFF_MULTICAST β€” Supports multicast. can be toggled through sysfs 🌸
  • IFF_PORTSEL β€” can set media type. can be toggled through sysfs πŸŽ€
  • IFF_AUTOMEDIA β€” auto media select active. can be toggled through sysfs ⚑
  • IFF_DYNAMIC β€” dialup device with changing addresses. can be toggled through sysfs πŸŒ€
  • IFF_LOWER_UP β€” driver signals L1 up. volatile πŸ”₯
  • IFF_DORMANT β€” driver signals dormant. volatile 😴
  • IFF_ECHO β€” echo sent packets. volatile πŸ“’

πŸ’– Description πŸ’–

so these are the struct net_device flags β€” drivers can set them, the kernel can set them, and some of them can be triggered by userspace. userspace can query and set these flags using userspace utilities, but there's also a sysfs entry available for all dev flags which can be queried and set. these flags are shared for all types of net_devices, which is honestly so generous of them 🫢

the sysfs entries live at /sys/class/net/<dev>/flags β€” that's the little door you knock on to peek at them.

flags which can be toggled through sysfs are annotated above, but heads up bestie: only a few flags can actually be toggled, and some other flags are always preserved from the original net_device flags even if you try to set them via sysfs. sneaky, right? those always-preserved ones are kept under the flag grouping IFF_VOLATILE, and anything volatile is annotated as such above πŸ‘€βœ¨

and like, real talk: you should have a pretty good reason to be extending these flags. don't just add one because the vibe felt right. okay? okay. πŸ’€

🌟 SEE ALSO 🌟

  • Kernel file ./include/uapi/linux/if.h

that's the whole thing bestie, go forth and flag responsibly πŸŒˆπŸ’œ

anyway, this page came from ./include/uapi/linux, dated October 2026 β€” mwah, xoxo, bye πŸŽ€πŸ’‹

πŸ“¦ where this page comes from