mirror of
https://github.com/ziglang/zig.git
synced 2025-12-15 10:43:08 +00:00
std.os.linux: extend rtattr.type to support IFA_*
This is a breaking change which updates the `rtattr.type` from `IFLA` to
`union { IFLA, IFA }`. `IFLA` is for the `RTM_*LINK` messages and `IFA`
is for the `RTM_*ADDR` messages.
This commit is contained in:
parent
0e876a6378
commit
0d00c733de
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user