libbpf.h: add BPF_JMP_A macro

Add unconditional jump macro to use in generated bpf programs.
This commit is contained in:
Roman Gushchin 2018-08-23 10:45:26 -07:00
parent 17f149556a
commit e867866623
1 changed files with 10 additions and 0 deletions

View File

@ -174,6 +174,16 @@ struct bpf_insn;
.off = OFF, \
.imm = IMM })
/* Unconditional jumps */
#define BPF_JMP_A(OFF) \
((struct bpf_insn) { \
.code = BPF_JMP | BPF_JA, \
.dst_reg = 0, \
.src_reg = 0, \
.off = OFF, \
.imm = 0 })
/* Raw code statement block */
#define BPF_RAW_INSN(CODE, DST, SRC, OFF, IMM) \