aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorChangli Gao <xiaosuo@gmail.com>2010-11-16 15:28:24 -0500
committerDavid S. Miller <davem@davemloft.net>2010-11-18 13:59:51 -0500
commit4c3710afbc333c33100739dec10662b4ee64e219 (patch)
tree3ededf09c4e236121d021a38fd991963d7bf2e84 /net
parentcba328fc5ede9091616e7296483840869b615a46 (diff)
net: move definitions of BPF_S_* to net/core/filter.c
BPF_S_* are used internally, should not be exposed to the others. Signed-off-by: Changli Gao <xiaosuo@gmail.com> Acked-by: Eric Dumazet <eric.dumazet@gmail.com> Acked-by: Hagen Paul Pfeifer <hagen@jauu.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/core/filter.c48
1 files changed, 48 insertions, 0 deletions
diff --git a/net/core/filter.c b/net/core/filter.c
index 03dc0710194f..15a545d39cd3 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -38,6 +38,54 @@
38#include <asm/unaligned.h> 38#include <asm/unaligned.h>
39#include <linux/filter.h> 39#include <linux/filter.h>
40 40
41enum {
42 BPF_S_RET_K = 0,
43 BPF_S_RET_A,
44 BPF_S_ALU_ADD_K,
45 BPF_S_ALU_ADD_X,
46 BPF_S_ALU_SUB_K,
47 BPF_S_ALU_SUB_X,
48 BPF_S_ALU_MUL_K,
49 BPF_S_ALU_MUL_X,
50 BPF_S_ALU_DIV_X,
51 BPF_S_ALU_AND_K,
52 BPF_S_ALU_AND_X,
53 BPF_S_ALU_OR_K,
54 BPF_S_ALU_OR_X,
55 BPF_S_ALU_LSH_K,
56 BPF_S_ALU_LSH_X,
57 BPF_S_ALU_RSH_K,
58 BPF_S_ALU_RSH_X,
59 BPF_S_ALU_NEG,
60 BPF_S_LD_W_ABS,
61 BPF_S_LD_H_ABS,
62 BPF_S_LD_B_ABS,
63 BPF_S_LD_W_LEN,
64 BPF_S_LD_W_IND,
65 BPF_S_LD_H_IND,
66 BPF_S_LD_B_IND,
67 BPF_S_LD_IMM,
68 BPF_S_LDX_W_LEN,
69 BPF_S_LDX_B_MSH,
70 BPF_S_LDX_IMM,
71 BPF_S_MISC_TAX,
72 BPF_S_MISC_TXA,
73 BPF_S_ALU_DIV_K,
74 BPF_S_LD_MEM,
75 BPF_S_LDX_MEM,
76 BPF_S_ST,
77 BPF_S_STX,
78 BPF_S_JMP_JA,
79 BPF_S_JMP_JEQ_K,
80 BPF_S_JMP_JEQ_X,
81 BPF_S_JMP_JGE_K,
82 BPF_S_JMP_JGE_X,
83 BPF_S_JMP_JGT_K,
84 BPF_S_JMP_JGT_X,
85 BPF_S_JMP_JSET_K,
86 BPF_S_JMP_JSET_X,
87};
88
41/* No hurry in this branch */ 89/* No hurry in this branch */
42static void *__load_pointer(struct sk_buff *skb, int k) 90static void *__load_pointer(struct sk_buff *skb, int k)
43{ 91{