std: add some definitions for netlink sockets

This commit is contained in:
daurnimator
2020-03-09 04:20:37 +11:00
committed by Andrew Kelley
parent 6ab156ce7d
commit 648f94c027
2 changed files with 504 additions and 0 deletions

View File

@@ -18,6 +18,8 @@ pub usingnamespace switch (builtin.arch) {
else => struct {},
};
pub usingnamespace @import("linux/netlink.zig");
const is_mips = builtin.arch.isMIPS();
pub const pid_t = i32;
@@ -30,6 +32,10 @@ pub const NAME_MAX = 255;
pub const PATH_MAX = 4096;
pub const IOV_MAX = 1024;
/// Largest hardware address length
/// e.g. a mac address is a type of hardware address
pub const MAX_ADDR_LEN = 32;
pub const STDIN_FILENO = 0;
pub const STDOUT_FILENO = 1;
pub const STDERR_FILENO = 2;