Zig 0.17.0-dev (Split by item) This is an example of documentation generated by
ZigDoc , an alternative to Zig's built-in
Auto Doc feature. See also
examples in other modes/formats . The project being documented here (as the example) is the Zig standard library.
std › c › ifreq Public Constant ifreq Doc Source Public Constant std.c.ifreq
pub const ifreq = switch (native_os ) File c.zig: 4039
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064 pub const ifreq = switch (native_os ) {
.linux => linux .ifreq ,
.emscripten => emscripten .ifreq ,
.illumos => lifreq ,
// https://github.com/SerenityOS/serenity/blob/9882848e0bf783dfc8e8a6d887a848d70d9c58f4/Kernel/API/POSIX/net/if.h#L49-L82
.serenity => extern struct {
// Not actually in a union, but the stdlib expects one for ifreq
ifrn : extern union {
name : [IFNAMESIZE ]u8 ,
},
ifru : extern union {
addr : sockaddr ,
dstaddr : sockaddr ,
broadaddr : sockaddr ,
netmask : sockaddr ,
hwaddr : sockaddr ,
flags : c_short ,
metric : c_int ,
vnetid : i64 ,
media : u64 ,
data : ?*anyopaque ,
index : c_uint ,
},
},
else => void ,
}