linux/usr/include/linux/bpf_common.h

/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
#ifndef __LINUX_BPF_COMMON_H__
#define __LINUX_BPF_COMMON_H__

/* Instruction classes */
#define BPF_CLASS(code)
#define BPF_LD
#define BPF_LDX
#define BPF_ST
#define BPF_STX
#define BPF_ALU
#define BPF_JMP
#define BPF_RET
#define BPF_MISC

/* ld/ldx fields */
#define BPF_SIZE(code)
#define BPF_W
#define BPF_H
#define BPF_B
/* eBPF		BPF_DW		0x18    64-bit */
#define BPF_MODE(code)
#define BPF_IMM
#define BPF_ABS
#define BPF_IND
#define BPF_MEM
#define BPF_LEN
#define BPF_MSH

/* alu/jmp fields */
#define BPF_OP(code)
#define BPF_ADD
#define BPF_SUB
#define BPF_MUL
#define BPF_DIV
#define BPF_OR
#define BPF_AND
#define BPF_LSH
#define BPF_RSH
#define BPF_NEG
#define BPF_MOD
#define BPF_XOR

#define BPF_JA
#define BPF_JEQ
#define BPF_JGT
#define BPF_JGE
#define BPF_JSET
#define BPF_SRC(code)
#define BPF_K
#define BPF_X

#ifndef BPF_MAXINSNS
#define BPF_MAXINSNS
#endif

#endif /* __LINUX_BPF_COMMON_H__ */