BPF
Type definitions in this namespace
Types
- Helper
- These values correspond to "syscalls" within the BPF program's environment,
- Insn
- a single BPF instruction
- MapCreateAttr
- struct used by Cmd.map_create command
- MapElemAttr
- struct used by Cmd.map_*_elem commands
- MapBatchAttr
- struct used by Cmd.map_*_batch commands
- ProgLoadAttr
- struct used by Cmd.prog_load command
- ObjAttr
- struct used by Cmd.obj_* commands
- ProgAttachAttr
- struct used by Cmd.prog_attach/detach commands
- TestRunAttr
- struct used by Cmd.prog_test_run command
- GetIdAttr
- struct used by Cmd.*_get_*_id commands
- InfoAttr
- struct used by Cmd.obj_get_info_by_fd command
- QueryAttr
- struct used by Cmd.prog_query command
- RawTracepointAttr
- struct used by Cmd.raw_tracepoint_open command
- BtfLoadAttr
- struct used by Cmd.btf_load command
- TaskFdQueryAttr
- struct used by Cmd.task_fd_query
- LinkCreateAttr
- struct used by Cmd.link_create command
- LinkUpdateAttr
- struct used by Cmd.link_update command
- EnableStatsAttr
- struct used by Cmd.enable_stats command
- IterCreateAttr
- struct used by Cmd.iter_create command
- Attr
- Mega struct that is passed to the bpf() syscall
Functions in this namespace
Functions
= 0x00
Values
- LD
- = 0x00
- LDX
- = 0x01
- ST
- = 0x02
- STX
- = 0x03
- ALU
- = 0x04
- JMP
- = 0x05
- RET
- = 0x06
- MISC
- = 0x07
- W
- 32-bit
- H
- 16-bit
- B
- 8-bit
- DW
- 64-bit
- IMM
- = 0x00
- ABS
- = 0x20
- IND
- = 0x40
- MEM
- = 0x60
- LEN
- = 0x80
- MSH
- = 0xa0
- ADD
- = 0x00
- SUB
- = 0x10
- MUL
- = 0x20
- DIV
- = 0x30
- OR
- = 0x40
- AND
- = 0x50
- LSH
- = 0x60
- RSH
- = 0x70
- NEG
- = 0x80
- MOD
- = 0x90
- XOR
- = 0xa0
- JA
- = 0x00
- JEQ
- = 0x10
- JGT
- = 0x20
- JGE
- = 0x30
- JSET
- = 0x40
- K
- = 0x00
- X
- = 0x08
- MAXINSNS
- = 4096
- JMP32
- jmp mode in word width
- ALU64
- alu mode in double word width
- XADD
- exclusive add
- MOV
- mov reg to reg
- ARSH
- sign extending arithmetic shift right */
- END
- flags for endianness conversion:
- TO_LE
- convert to little-endian */
- TO_BE
- convert to big-endian
- FROM_LE
- = TO_LE
- FROM_BE
- = TO_BE
- JNE
- jump != *
- JLT
- LT is unsigned, '<'
- JLE
- LE is unsigned, '<=' *
- JSGT
- SGT is signed '>', GT in x86
- JSGE
- SGE is signed '>=', GE in x86
- JSLT
- SLT is signed, '<'
- JSLE
- SLE is signed, '<='
- CALL
- function call
- EXIT
- function return
- F_ALLOW_OVERRIDE
- Flag for prog_attach command.
- F_ALLOW_MULTI
- Flag for prog_attach command.
- F_REPLACE
- Flag for prog_attach command.
- F_STRICT_ALIGNMENT
- If BPF_F_STRICT_ALIGNMENT is used in BPF_PROG_LOAD command, the verifier
- F_ANY_ALIGNMENT
- If BPF_F_ANY_ALIGNMENT is used in BPF_PROF_LOAD command, the verifier will
- F_TEST_RND_HI32
- BPF_F_TEST_RND_HI32 is used in BPF_PROG_LOAD command for testing purpose.
- F_SLEEPABLE
- If BPF_F_SLEEPABLE is used in BPF_PROG_LOAD command, the verifier will
- PSEUDO_MAP_FD
- When BPF ldimm64's insn[0].src_reg != 0 then this can have two extensions:
- PSEUDO_CALL
- when bpf_call->src_reg == BPF_PSEUDO_CALL, bpf_call->imm == pc-relative
- ANY
- flag for BPF_MAP_UPDATE_ELEM command.
- NOEXIST
- flag for BPF_MAP_UPDATE_ELEM command.
- EXIST
- flag for BPF_MAP_UPDATE_ELEM command.
- F_LOCK
- flag for BPF_MAP_UPDATE_ELEM command.
- BPF_F_NO_PREALLOC
- flag for BPF_MAP_CREATE command */
- BPF_F_NO_COMMON_LRU
- flag for BPF_MAP_CREATE command.
- BPF_F_NUMA_NODE
- flag for BPF_MAP_CREATE command.
- BPF_F_RDONLY
- flag for BPF_MAP_CREATE command.
- BPF_F_WRONLY
- flag for BPF_MAP_CREATE command.
- BPF_F_STACK_BUILD_ID
- flag for BPF_MAP_CREATE command.
- BPF_F_ZERO_SEED
- flag for BPF_MAP_CREATE command.
- BPF_F_RDONLY_PROG
- flag for BPF_MAP_CREATE command Flags for accessing BPF object from program
- BPF_F_WRONLY_PROG
- flag for BPF_MAP_CREATE command.
- BPF_F_CLONE
- flag for BPF_MAP_CREATE command.
- BPF_F_MMAPABLE
- flag for BPF_MAP_CREATE command.