ENUM NET_DEVICE_FLAGS(9)
β¨ 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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms