Source
pub const NI = switch (native_os) {
.linux, .emscripten => packed struct(u32) {
NUMERICHOST: bool = false,
NUMERICSERV: bool = false,
NOFQDN: bool = false,
NAMEREQD: bool = false,
DGRAM: bool = false,
_5: u3 = 0,
NUMERICSCOPE: bool = false,
_: u23 = 0,
},
.solaris, .illumos => packed struct(u32) {
NOFQDN: bool = false,
NUMERICHOST: bool = false,
NAMEREQD: bool = false,
NUMERICSERV: bool = false,
DGRAM: bool = false,
WITHSCOPEID: bool = false,
NUMERICSCOPE: bool = false,
_: u25 = 0,
},
// https://github.com/SerenityOS/serenity/blob/d510d2aeb2facbd8f6c383d70fd1b033e1fee5dd/Userland/Libraries/LibC/netdb.h#L101-L105
.serenity => packed struct(c_int) {
NUMERICHOST: bool = false,
NUMERICSERV: bool = false,
NAMEREQD: bool = false,
NOFQDN: bool = false,
DGRAM: bool = false,
_: std.meta.Int(.unsigned, @bitSizeOf(c_int) - 5) = 0,
},
else => void,
}