linux/usr/include/linux/filter.h

/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
/*
 * Linux Socket Filter Data Structures
 */

#ifndef __LINUX_FILTER_H__
#define __LINUX_FILTER_H__


#include <linux/types.h>
#include <linux/bpf_common.h>

/*
 * Current version of the filter code architecture.
 */
#define BPF_MAJOR_VERSION
#define BPF_MINOR_VERSION

/*
 *	Try and keep these values and structures similar to BSD, especially
 *	the BPF code definitions which need to match so you can share filters
 */
 
struct sock_filter {};

struct sock_fprog {};

/* ret - BPF_K and BPF_X also apply */
#define BPF_RVAL(code)
#define BPF_A

/* misc */
#define BPF_MISCOP(code)
#define BPF_TAX
#define BPF_TXA

/*
 * Macros for filter block array initializers.
 */
#ifndef BPF_STMT
#define BPF_STMT(code, k)
#endif
#ifndef BPF_JUMP
#define BPF_JUMP(code, k, jt, jf)
#endif

/*
 * Number of scratch memory words for: BPF_ST and BPF_STX
 */
#define BPF_MEMWORDS

/* RATIONALE. Negative offsets are invalid in BPF.
   We use them to reference ancillary data.
   Unlike introduction new instructions, it does not break
   existing compilers/optimizers.
 */
#define SKF_AD_OFF
#define SKF_AD_PROTOCOL
#define SKF_AD_PKTTYPE
#define SKF_AD_IFINDEX
#define SKF_AD_NLATTR
#define SKF_AD_NLATTR_NEST
#define SKF_AD_MARK
#define SKF_AD_QUEUE
#define SKF_AD_HATYPE
#define SKF_AD_RXHASH
#define SKF_AD_CPU
#define SKF_AD_ALU_XOR_X
#define SKF_AD_VLAN_TAG
#define SKF_AD_VLAN_TAG_PRESENT
#define SKF_AD_PAY_OFFSET
#define SKF_AD_RANDOM
#define SKF_AD_VLAN_TPID
#define SKF_AD_MAX

#define SKF_NET_OFF
#define SKF_LL_OFF

#define BPF_NET_OFF
#define BPF_LL_OFF

#endif /* __LINUX_FILTER_H__ */