Flags for SIOC{G,S}IFFLAGS

This commit is contained in:
Benjamin Hetz 2024-11-09 16:04:31 -06:00 committed by Alex Rønne Petersen
parent c271fe5092
commit c59aee03c8
2 changed files with 15 additions and 1 deletions

View File

@ -7121,6 +7121,19 @@ pub const SIOCPROTOPRIVATE = 0x89E0;
pub const IFNAMESIZE = 16;
pub const IFF = packed struct(u16) {
UP: bool = false,
BROADCAST: bool = false,
DEBUG: bool = false,
LOOPBACK: bool = false,
POINTOPOINT: bool = false,
NOTRAILERS: bool = false,
RUNNING: bool = false,
NOARP: bool = false,
PROMISC: bool = false,
_9: u7 = 0,
};
pub const ifmap = extern struct {
mem_start: usize,
mem_end: usize,
@ -7140,7 +7153,7 @@ pub const ifreq = extern struct {
broadaddr: sockaddr,
netmask: sockaddr,
hwaddr: sockaddr,
flags: i16,
flags: IFF,
ivalue: i32,
mtu: i32,
map: ifmap,

View File

@ -104,6 +104,7 @@ pub const SIOCGIFINDEX = system.SIOCGIFINDEX;
pub const SO = system.SO;
pub const SOCK = system.SOCK;
pub const SOL = system.SOL;
pub const IFF = system.IFF;
pub const STDERR_FILENO = system.STDERR_FILENO;
pub const STDIN_FILENO = system.STDIN_FILENO;
pub const STDOUT_FILENO = system.STDOUT_FILENO;