Merge pull request #21513 from pseudocc/rtattr

std.os.linux: extend rtattr.type to support IFA_*
This commit is contained in:
Alex Rønne Petersen 2024-10-02 22:59:57 +02:00 committed by GitHub
commit e652318c13
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -8064,11 +8064,33 @@ pub const rtattr = extern struct {
len: c_ushort,
/// Type of option
type: IFLA,
type: extern union {
/// IFLA_* from linux/if_link.h
link: IFLA,
/// IFA_* from linux/if_addr.h
addr: IFA,
},
pub const ALIGNTO = 4;
};
pub const IFA = enum(c_ushort) {
UNSPEC,
ADDRESS,
LOCAL,
LABEL,
BROADCAST,
ANYCAST,
CACHEINFO,
MULTICAST,
FLAGS,
RT_PRIORITY,
TARGET_NETNSID,
PROTO,
_,
};
pub const IFLA = enum(c_ushort) {
UNSPEC,
ADDRESS,