aboutsummaryrefslogtreecommitdiff
path: root/lib/std
diff options
context:
space:
mode:
authorAlex Rønne Petersen <alex@alexrp.com>2024-10-02 22:59:57 +0200
committerGitHub <noreply@github.com>2024-10-02 22:59:57 +0200
commite652318c133a7ec0a2f682fa49af0bc70a455e39 (patch)
tree1b15a31ff40418fd85c1b1262b597fa48d4b05a6 /lib/std
parent3b465ebec59ee942b6c490ada2f81902ec047d7f (diff)
parent0d00c733de80f41e2e4bae848658213f7076d49e (diff)
downloadzig-e652318c133a7ec0a2f682fa49af0bc70a455e39.tar.gz
zig-e652318c133a7ec0a2f682fa49af0bc70a455e39.zip
Merge pull request #21513 from pseudocc/rtattr
std.os.linux: extend rtattr.type to support IFA_*
Diffstat (limited to 'lib/std')
-rw-r--r--lib/std/os/linux.zig24
1 files changed, 23 insertions, 1 deletions
diff --git a/lib/std/os/linux.zig b/lib/std/os/linux.zig
index 46ca9ed6f4..aaf08395fa 100644
--- a/lib/std/os/linux.zig
+++ b/lib/std/os/linux.zig
@@ -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,