• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /****************************************************************************
2  ****************************************************************************
3  ***
4  ***   This header was automatically generated from a Linux kernel header
5  ***   of the same name, to make information necessary for userspace to
6  ***   call into the kernel available to libc.  It contains only constants,
7  ***   structures, and macros generated from the original header, and thus,
8  ***   contains no copyrightable information.
9  ***
10  ***   To edit the content of this header, modify the corresponding
11  ***   source file (e.g. under external/kernel-headers/original/) then
12  ***   run bionic/libc/kernel/tools/update_all.py
13  ***
14  ***   Any manual change here will be lost the next time this script will
15  ***   be run. You've been warned!
16  ***
17  ****************************************************************************
18  ****************************************************************************/
19 #ifndef _UAPI__LINUX_FILTER_H__
20 #define _UAPI__LINUX_FILTER_H__
21 #include <linux/compiler.h>
22 #include <linux/types.h>
23 #include <linux/bpf_common.h>
24 #define BPF_MAJOR_VERSION 1
25 #define BPF_MINOR_VERSION 1
26 struct sock_filter {
27   __u16 code;
28   __u8 jt;
29   __u8 jf;
30   __u32 k;
31 };
32 struct sock_fprog {
33   unsigned short len;
34   struct sock_filter __user * filter;
35 };
36 #define BPF_RVAL(code) ((code) & 0x18)
37 #define BPF_A 0x10
38 #define BPF_MISCOP(code) ((code) & 0xf8)
39 #define BPF_TAX 0x00
40 #define BPF_TXA 0x80
41 #ifndef BPF_STMT
42 #define BPF_STMT(code,k) { (unsigned short) (code), 0, 0, k }
43 #endif
44 #ifndef BPF_JUMP
45 #define BPF_JUMP(code,k,jt,jf) { (unsigned short) (code), jt, jf, k }
46 #endif
47 #define BPF_MEMWORDS 16
48 #define SKF_AD_OFF (- 0x1000)
49 #define SKF_AD_PROTOCOL 0
50 #define SKF_AD_PKTTYPE 4
51 #define SKF_AD_IFINDEX 8
52 #define SKF_AD_NLATTR 12
53 #define SKF_AD_NLATTR_NEST 16
54 #define SKF_AD_MARK 20
55 #define SKF_AD_QUEUE 24
56 #define SKF_AD_HATYPE 28
57 #define SKF_AD_RXHASH 32
58 #define SKF_AD_CPU 36
59 #define SKF_AD_ALU_XOR_X 40
60 #define SKF_AD_VLAN_TAG 44
61 #define SKF_AD_VLAN_TAG_PRESENT 48
62 #define SKF_AD_PAY_OFFSET 52
63 #define SKF_AD_RANDOM 56
64 #define SKF_AD_VLAN_TPID 60
65 #define SKF_AD_MAX 64
66 #define SKF_NET_OFF (- 0x100000)
67 #define SKF_LL_OFF (- 0x200000)
68 #define BPF_NET_OFF SKF_NET_OFF
69 #define BPF_LL_OFF SKF_LL_OFF
70 #endif
71