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

ProgLoadAttr

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

struct used by Cmd.prog_load command

Fields

prog_type: u32

one of ProgType

insn_cnt: u32
insns: u64
license: u64
log_level: u32

verbosity level of verifier

log_size: u32

size of user buffer

log_buf: u64

user supplied buffer

kern_version: u32

not used

prog_flags: u32
prog_name: [obj_name_len]u8
prog_ifindex: u32

ifindex of netdev to prep for.

expected_attach_type: u32

For some prog types expected attach type must be known at load time to verify attach type specific parts of prog (context accesses, allowed helpers, etc).

prog_btf_fd: fd_t

fd pointing to BTF type data

func_info_rec_size: u32

userspace bpf_func_info size

func_info: u64
func_info_cnt: u32

number of bpf_func_info records

line_info_rec_size: u32

userspace bpf_line_info size

line_info: u64
line_info_cnt: u32

number of bpf_line_info records

attact_btf_id: u32

in-kernel BTF type id to attach to

attach_prog_id: u32

0 to attach to vmlinux

File

os/linux/bpf.zig:1368
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
pub const ProgLoadAttr = extern struct {
    /// one of ProgType
    prog_type: u32,
    insn_cnt: u32,
    insns: u64,
    license: u64,

    /// verbosity level of verifier
    log_level: u32,

    /// size of user buffer
    log_size: u32,

    /// user supplied buffer
    log_buf: u64,

    /// not used
    kern_version: u32,
    prog_flags: u32,
    prog_name: [obj_name_len]u8,

    /// ifindex of netdev to prep for.
    prog_ifindex: u32,

    /// For some prog types expected attach type must be known at load time to
    /// verify attach type specific parts of prog (context accesses, allowed
    /// helpers, etc).
    expected_attach_type: u32,

    /// fd pointing to BTF type data
    prog_btf_fd: fd_t,

    /// userspace bpf_func_info size
    func_info_rec_size: u32,
    func_info: u64,

    /// number of bpf_func_info records
    func_info_cnt: u32,

    /// userspace bpf_line_info size
    line_info_rec_size: u32,
    line_info: u64,

    /// number of bpf_line_info records
    line_info_cnt: u32,

    /// in-kernel BTF type id to attach to
    attact_btf_id: u32,

    /// 0 to attach to vmlinux
    attach_prog_id: u32,
}