diff options
-rw-r--r-- | tools/bpf.h | 3 | ||||
-rw-r--r-- | tools/scmp_bpf_disasm.c | 6 |
2 files changed, 9 insertions, 0 deletions
diff --git a/tools/bpf.h b/tools/bpf.h index 46f270f..7679d01 100644 --- a/tools/bpf.h +++ b/tools/bpf.h @@ -101,6 +101,9 @@ typedef struct sock_filter bpf_instr_raw; #define BPF_LSH 0x60 #define BPF_RSH 0x70 #define BPF_NEG 0x80 +#define BPF_MOD 0x90 +#define BPF_XOR 0xa0 + /* BPF_JMP */ #define BPF_JA 0x00 #define BPF_JEQ 0x10 diff --git a/tools/scmp_bpf_disasm.c b/tools/scmp_bpf_disasm.c index e8e376b..05590f4 100644 --- a/tools/scmp_bpf_disasm.c +++ b/tools/scmp_bpf_disasm.c @@ -131,6 +131,12 @@ static const char *bpf_decode_op(const bpf_instr_raw *bpf) case BPF_ALU+BPF_NEG+BPF_K: case BPF_ALU+BPF_NEG+BPF_X: return "neg"; + case BPF_ALU+BPF_MOD+BPF_K: + case BPF_ALU+BPF_MOD+BPF_X: + return "mod"; + case BPF_ALU+BPF_XOR+BPF_K: + case BPF_ALU+BPF_XOR+BPF_X: + return "xor"; case BPF_JMP+BPF_JA+BPF_K: case BPF_JMP+BPF_JA+BPF_X: return "jmp"; |