• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * This file is auto-generated. Modifications will be lost.
3  *
4  * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5  * for more information.
6  */
7 #ifndef _UAPI__LINUX_FILTER_H__
8 #define _UAPI__LINUX_FILTER_H__
9 #include <linux/compiler.h>
10 #include <linux/types.h>
11 #include <linux/bpf_common.h>
12 #define BPF_MAJOR_VERSION 1
13 #define BPF_MINOR_VERSION 1
14 struct sock_filter {
15   __u16 code;
16   __u8 jt;
17   __u8 jf;
18   __u32 k;
19 };
20 struct sock_fprog {
21   unsigned short len;
22   struct sock_filter  * filter;
23 };
24 #define BPF_RVAL(code) ((code) & 0x18)
25 #define BPF_A 0x10
26 #define BPF_MISCOP(code) ((code) & 0xf8)
27 #define BPF_TAX 0x00
28 #define BPF_TXA 0x80
29 #ifndef BPF_STMT
30 #define BPF_STMT(code,k) { (unsigned short) (code), 0, 0, k }
31 #endif
32 #ifndef BPF_JUMP
33 #define BPF_JUMP(code,k,jt,jf) { (unsigned short) (code), jt, jf, k }
34 #endif
35 #define BPF_MEMWORDS 16
36 #define SKF_AD_OFF (- 0x1000)
37 #define SKF_AD_PROTOCOL 0
38 #define SKF_AD_PKTTYPE 4
39 #define SKF_AD_IFINDEX 8
40 #define SKF_AD_NLATTR 12
41 #define SKF_AD_NLATTR_NEST 16
42 #define SKF_AD_MARK 20
43 #define SKF_AD_QUEUE 24
44 #define SKF_AD_HATYPE 28
45 #define SKF_AD_RXHASH 32
46 #define SKF_AD_CPU 36
47 #define SKF_AD_ALU_XOR_X 40
48 #define SKF_AD_VLAN_TAG 44
49 #define SKF_AD_VLAN_TAG_PRESENT 48
50 #define SKF_AD_PAY_OFFSET 52
51 #define SKF_AD_RANDOM 56
52 #define SKF_AD_VLAN_TPID 60
53 #define SKF_AD_MAX 64
54 #define SKF_NET_OFF (- 0x100000)
55 #define SKF_LL_OFF (- 0x200000)
56 #define BPF_NET_OFF SKF_NET_OFF
57 #define BPF_LL_OFF SKF_LL_OFF
58 #endif
59