Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
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. Public Struct

MapCreateAttr

Public Struct
std.os.linux.bpf.MapCreateAttr
pub const MapCreateAttr = extern struct

struct used by Cmd.map_create command

Fields

map_type: u32

one of MapType

key_size: u32

size of key in bytes

value_size: u32

size of value in bytes

max_entries: u32

max number of entries in a map

map_flags: u32

.map_create related flags

inner_map_fd: fd_t

fd pointing to the inner map

numa_node: u32

numa node (effective only if MapCreateFlags.numa_node is set)

map_name: [obj_name_len]u8
map_ifindex: u32

ifindex of netdev to create on

btf_fd: fd_t

fd pointing to a BTF type data

btf_key_type_id: u32

BTF type_id of the key

bpf_value_type_id: u32

BTF type_id of the value

btf_vmlinux_value_type_id: u32

BTF type_id of a kernel struct stored as the map value

File

os/linux/bpf.zig:1298
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
pub const MapCreateAttr = extern struct {
    /// one of MapType
    map_type: u32,

    /// size of key in bytes
    key_size: u32,

    /// size of value in bytes
    value_size: u32,

    /// max number of entries in a map
    max_entries: u32,

    /// .map_create related flags
    map_flags: u32,

    /// fd pointing to the inner map
    inner_map_fd: fd_t,

    /// numa node (effective only if MapCreateFlags.numa_node is set)
    numa_node: u32,
    map_name: [obj_name_len]u8,

    /// ifindex of netdev to create on
    map_ifindex: u32,

    /// fd pointing to a BTF type data
    btf_fd: fd_t,

    /// BTF type_id of the key
    btf_key_type_id: u32,

    /// BTF type_id of the value
    bpf_value_type_id: u32,

    /// BTF type_id of a kernel struct stored as the map value
    btf_vmlinux_value_type_id: u32,
}