authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-10-02 22:59:57+02:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2024-10-02 22:59:57+02:00
loge652318c133a7ec0a2f682fa49af0bc70a455e39
tree1b15a31ff40418fd85c1b1262b597fa48d4b05a6
parent3b465ebec59ee942b6c490ada2f81902ec047d7f
parent0d00c733de80f41e2e4bae848658213f7076d49e
signaturebadge-check Signed by PGP key B5690EEEBB952194

Merge pull request #21513 from pseudocc/rtattr

std.os.linux: extend rtattr.type to support IFA_*

1 files changed, 23 insertions(+), 1 deletions(-)

lib/std/os/linux.zig+23-1
...@@ -8064,11 +8064,33 @@ pub const rtattr = extern struct {...@@ -8064,11 +8064,33 @@ pub const rtattr = extern struct {
8064 len: c_ushort,8064 len: c_ushort,
80658065
8066 /// Type of option8066 /// Type of option
8067 type: IFLA,8067 type: extern union {
8068 /// IFLA_* from linux/if_link.h
8069 link: IFLA,
8070 /// IFA_* from linux/if_addr.h
8071 addr: IFA,
8072 },
80688073
8069 pub const ALIGNTO = 4;8074 pub const ALIGNTO = 4;
8070};8075};
80718076
8077pub const IFA = enum(c_ushort) {
8078 UNSPEC,
8079 ADDRESS,
8080 LOCAL,
8081 LABEL,
8082 BROADCAST,
8083 ANYCAST,
8084 CACHEINFO,
8085 MULTICAST,
8086 FLAGS,
8087 RT_PRIORITY,
8088 TARGET_NETNSID,
8089 PROTO,
8090
8091 _,
8092};
8093
8072pub const IFLA = enum(c_ushort) {8094pub const IFLA = enum(c_ushort) {
8073 UNSPEC,8095 UNSPEC,
8074 ADDRESS,8096 ADDRESS,