Clean up and add some test cases for ALU instructions.
This commit is contained in:
parent
69d410eeb1
commit
fadb8b98ee
@ -20,9 +20,11 @@ TEST_CASES?= test0001 test0002 test0003 test0004 \
|
||||
test0069 test0070 test0071 test0072 \
|
||||
test0073 test0074 test0075 test0076 \
|
||||
test0077 test0078 test0079 test0080 \
|
||||
test0081 test0082 test0083 test0084
|
||||
test0081 test0082 test0083 test0084 \
|
||||
test0085 test0086 test0087 test0088 \
|
||||
test0089 test0090 test0091
|
||||
|
||||
SYSDIR?= ${.CURDIR}/../../../../sys
|
||||
SYSDIR?= ${SRCTOP}/sys
|
||||
|
||||
SRCS= ${.CURDIR}/bpf_test.c
|
||||
|
||||
|
@ -105,8 +105,8 @@ static const u_short bpf_code_map[] = {
|
||||
0x1013, /* 0x60-0x6f: 1100100000001000 */
|
||||
0x1010, /* 0x70-0x7f: 0000100000001000 */
|
||||
0x0093, /* 0x80-0x8f: 1100100100000000 */
|
||||
0x0000, /* 0x90-0x9f: 0000000000000000 */
|
||||
0x0000, /* 0xa0-0xaf: 0000000000000000 */
|
||||
0x1010, /* 0x90-0x9f: 0000100000001000 */
|
||||
0x1010, /* 0xa0-0xaf: 0000100000001000 */
|
||||
0x0002, /* 0xb0-0xbf: 0100000000000000 */
|
||||
0x0000, /* 0xc0-0xcf: 0000000000000000 */
|
||||
0x0000, /* 0xd0-0xdf: 0000000000000000 */
|
||||
@ -176,7 +176,8 @@ bpf_validate(const struct bpf_insn *f, int len)
|
||||
/*
|
||||
* Check for constant division by 0.
|
||||
*/
|
||||
if (p->code == (BPF_ALU|BPF_DIV|BPF_K) && p->k == 0)
|
||||
if ((p->code == (BPF_ALU|BPF_DIV|BPF_K) ||
|
||||
p->code == (BPF_ALU|BPF_MOD|BPF_K)) && p->k == 0)
|
||||
return (0);
|
||||
}
|
||||
return (BPF_CLASS(f[len - 1].code) == BPF_RET);
|
||||
|
@ -5,27 +5,27 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(0x55, 0),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 1;
|
||||
static int invalid = 1;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
static u_int expect = 0;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = SIGABRT;
|
||||
static int expect_signal = SIGABRT;
|
||||
|
@ -5,26 +5,26 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_RET+BPF_K, 0xdeadc0de),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0xdeadc0de;
|
||||
static u_int expect = 0xdeadc0de;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,27 +5,27 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0xdeadc0de;
|
||||
static u_int expect = 0xdeadc0de;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,27 +5,27 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x01, 0x23, 0x45, 0x67, 0x89,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0x23456789;
|
||||
static u_int expect = 0x23456789;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,27 +5,27 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_H+BPF_ABS, 1),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x01, 0x23, 0x45,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0x2345;
|
||||
static u_int expect = 0x2345;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,27 +5,27 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_B+BPF_ABS, 1),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x01, 0x23,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0x23;
|
||||
static u_int expect = 0x23;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,27 +5,27 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_W+BPF_LEN, 0),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = 0xdeadc0de;
|
||||
static u_int wirelen = 0xdeadc0de;
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = 0xdeadc0de;
|
||||
static u_int buflen = 0xdeadc0de;
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0xdeadc0de;
|
||||
static u_int expect = 0xdeadc0de;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,28 +5,28 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LDX+BPF_W+BPF_LEN, 0),
|
||||
BPF_STMT(BPF_MISC+BPF_TXA, 0),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = 0xdeadc0de;
|
||||
static u_int wirelen = 0xdeadc0de;
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = 0xdeadc0de;
|
||||
static u_int buflen = 0xdeadc0de;
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0xdeadc0de;
|
||||
static u_int expect = 0xdeadc0de;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,28 +5,28 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 1),
|
||||
BPF_STMT(BPF_LD+BPF_W+BPF_IND, 1),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x01, 0x23, 0x45, 0x67, 0x89, 0xab,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0x456789ab;
|
||||
static u_int expect = 0x456789ab;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,28 +5,28 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 1),
|
||||
BPF_STMT(BPF_LD+BPF_H+BPF_IND, 1),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x01, 0x23, 0x45, 0x67,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0x4567;
|
||||
static u_int expect = 0x4567;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,28 +5,28 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 1),
|
||||
BPF_STMT(BPF_LD+BPF_B+BPF_IND, 1),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x01, 0x23, 0x45,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0x45;
|
||||
static u_int expect = 0x45;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,28 +5,28 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LDX+BPF_MSH+BPF_B, 1),
|
||||
BPF_STMT(BPF_MISC+BPF_TXA, 0),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x01, 0x23,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = (0x23 & 0xf) << 2;
|
||||
static u_int expect = (0x23 & 0xf) << 2;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_ST, 7),
|
||||
BPF_STMT(BPF_LDX+BPF_MEM, 7),
|
||||
@ -14,21 +14,21 @@ struct bpf_insn pc[] = {
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0xdeadc0de;
|
||||
static u_int expect = 0xdeadc0de;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_STX, 7),
|
||||
BPF_STMT(BPF_LD+BPF_MEM, 7),
|
||||
@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0xdeadc0de;
|
||||
static u_int expect = 0xdeadc0de;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xc0decafe),
|
||||
BPF_STMT(BPF_JMP+BPF_JA, 1),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0xc0decafe;
|
||||
static u_int expect = 0xc0decafe;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0x01234567),
|
||||
BPF_JUMP(BPF_JMP+BPF_JGT+BPF_K, 0x01234568, 2, 0),
|
||||
BPF_JUMP(BPF_JMP+BPF_JGT+BPF_K, 0x01234566, 2, 1),
|
||||
@ -17,21 +17,21 @@ struct bpf_insn pc[] = {
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0xc0decafe;
|
||||
static u_int expect = 0xc0decafe;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0x01234567),
|
||||
BPF_JUMP(BPF_JMP+BPF_JGE+BPF_K, 0x01234568, 2, 0),
|
||||
BPF_JUMP(BPF_JMP+BPF_JGE+BPF_K, 0x01234567, 2, 1),
|
||||
@ -17,21 +17,21 @@ struct bpf_insn pc[] = {
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0xc0decafe;
|
||||
static u_int expect = 0xc0decafe;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0x01234567),
|
||||
BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, 0x01234568, 2, 0),
|
||||
BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_K, 0x01234567, 2, 1),
|
||||
@ -17,21 +17,21 @@ struct bpf_insn pc[] = {
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0xc0decafe;
|
||||
static u_int expect = 0xc0decafe;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0x01234567),
|
||||
BPF_JUMP(BPF_JMP+BPF_JSET+BPF_K, 0x80000000, 5, 0),
|
||||
BPF_JUMP(BPF_JMP+BPF_JSET+BPF_K, 0x40000000, 4, 0),
|
||||
@ -22,21 +22,21 @@ struct bpf_insn pc[] = {
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0xc0decafe;
|
||||
static u_int expect = 0xc0decafe;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0x01234567),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0x01234568),
|
||||
BPF_JUMP(BPF_JMP+BPF_JGT+BPF_X, 0, 3, 0),
|
||||
@ -20,21 +20,21 @@ struct bpf_insn pc[] = {
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0xc0decafe;
|
||||
static u_int expect = 0xc0decafe;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0x01234567),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0x01234568),
|
||||
BPF_JUMP(BPF_JMP+BPF_JGE+BPF_X, 0, 3, 0),
|
||||
@ -20,21 +20,21 @@ struct bpf_insn pc[] = {
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0xc0decafe;
|
||||
static u_int expect = 0xc0decafe;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0x01234567),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0x01234568),
|
||||
BPF_JUMP(BPF_JMP+BPF_JEQ+BPF_X, 0, 3, 0),
|
||||
@ -20,21 +20,21 @@ struct bpf_insn pc[] = {
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0xc0decafe;
|
||||
static u_int expect = 0xc0decafe;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0x01234567),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0x80000000),
|
||||
BPF_JUMP(BPF_JMP+BPF_JSET+BPF_X, 0, 9, 0),
|
||||
@ -30,21 +30,21 @@ struct bpf_insn pc[] = {
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0xc0decafe;
|
||||
static u_int expect = 0xc0decafe;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xbeadb8dd),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0x20000801),
|
||||
BPF_STMT(BPF_ALU+BPF_ADD+BPF_X, 0),
|
||||
@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0xdeadc0de;
|
||||
static u_int expect = 0xdeadc0de;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0x20000801),
|
||||
BPF_STMT(BPF_ALU+BPF_SUB+BPF_X, 0),
|
||||
@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0xbeadb8dd;
|
||||
static u_int expect = 0xbeadb8dd;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdead),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0xc0de),
|
||||
BPF_STMT(BPF_ALU+BPF_MUL+BPF_X, 0),
|
||||
@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0xa7c2da06;
|
||||
static u_int expect = 0xa7c2da06;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xa7c2da06),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0xdead),
|
||||
BPF_STMT(BPF_ALU+BPF_DIV+BPF_X, 0),
|
||||
@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0xc0de;
|
||||
static u_int expect = 0xc0de;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0xc0decafe),
|
||||
BPF_STMT(BPF_ALU+BPF_AND+BPF_X, 0),
|
||||
@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0xc08cc0de;
|
||||
static u_int expect = 0xc08cc0de;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0xc0decafe),
|
||||
BPF_STMT(BPF_ALU+BPF_OR+BPF_X, 0),
|
||||
@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0xdeffcafe;
|
||||
static u_int expect = 0xdeffcafe;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdefc0),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 9),
|
||||
BPF_STMT(BPF_ALU+BPF_LSH+BPF_X, 0),
|
||||
@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0x1bdf8000;
|
||||
static u_int expect = 0x1bdf8000;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 13),
|
||||
BPF_STMT(BPF_ALU+BPF_RSH+BPF_X, 0),
|
||||
@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0x6f56e;
|
||||
static u_int expect = 0x6f56e;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,28 +5,28 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xbeadb8dd),
|
||||
BPF_STMT(BPF_ALU+BPF_ADD+BPF_K, 0x20000801),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0xdeadc0de;
|
||||
static u_int expect = 0xdeadc0de;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,28 +5,28 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_ALU+BPF_SUB+BPF_K, 0x20000801),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0xbeadb8dd;
|
||||
static u_int expect = 0xbeadb8dd;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,28 +5,28 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdead),
|
||||
BPF_STMT(BPF_ALU+BPF_MUL+BPF_K, 0xc0de),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0xa7c2da06;
|
||||
static u_int expect = 0xa7c2da06;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,28 +5,28 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xa7c2da06),
|
||||
BPF_STMT(BPF_ALU+BPF_DIV+BPF_K, 0xdead),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0xc0de;
|
||||
static u_int expect = 0xc0de;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,28 +5,28 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_ALU+BPF_AND+BPF_K, 0xc0decafe),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0xc08cc0de;
|
||||
static u_int expect = 0xc08cc0de;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,28 +5,28 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_ALU+BPF_OR+BPF_K, 0xc0decafe),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0xdeffcafe;
|
||||
static u_int expect = 0xdeffcafe;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,28 +5,28 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdefc0),
|
||||
BPF_STMT(BPF_ALU+BPF_LSH+BPF_K, 9),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0x1bdf8000;
|
||||
static u_int expect = 0x1bdf8000;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,28 +5,28 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_ALU+BPF_RSH+BPF_K, 13),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0x6f56e;
|
||||
static u_int expect = 0x6f56e;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,28 +5,28 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0x21523f22),
|
||||
BPF_STMT(BPF_ALU+BPF_NEG, 0),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0xdeadc0de;
|
||||
static u_int expect = 0xdeadc0de;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_MISC+BPF_TAX, 0),
|
||||
BPF_STMT(BPF_STX, 0),
|
||||
@ -14,21 +14,21 @@ struct bpf_insn pc[] = {
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0xdeadc0de;
|
||||
static u_int expect = 0xdeadc0de;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,28 +5,28 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 2),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x01, 0x23, 0x45, 0x67, 0x89,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
static u_int expect = 0;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,28 +5,28 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LD+BPF_H+BPF_ABS, 2),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x01, 0x23, 0x45,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
static u_int expect = 0;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,28 +5,28 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LD+BPF_B+BPF_ABS, 2),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x01, 0x23,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
static u_int expect = 0;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 1),
|
||||
BPF_STMT(BPF_LD+BPF_W+BPF_IND, 2),
|
||||
@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x01, 0x23, 0x45, 0x67, 0x89, 0xab,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
static u_int expect = 0;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 1),
|
||||
BPF_STMT(BPF_LD+BPF_H+BPF_IND, 2),
|
||||
@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x01, 0x23, 0x45, 0x67,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
static u_int expect = 0;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 1),
|
||||
BPF_STMT(BPF_LD+BPF_B+BPF_IND, 2),
|
||||
@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x01, 0x23, 0x45,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
static u_int expect = 0;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_MSH+BPF_B, 2),
|
||||
BPF_STMT(BPF_MISC+BPF_TXA, 0),
|
||||
@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x01, 0x23,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
static u_int expect = 0;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,28 +5,28 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 6),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x01, 0x23, 0x45, 0x67, 0x89,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
static u_int expect = 0;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,28 +5,28 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LD+BPF_H+BPF_ABS, 4),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x01, 0x23, 0x45,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
static u_int expect = 0;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 1),
|
||||
BPF_STMT(BPF_LD+BPF_W+BPF_IND, 6),
|
||||
@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x01, 0x23, 0x45, 0x67, 0x89, 0xab,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
static u_int expect = 0;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 1),
|
||||
BPF_STMT(BPF_LD+BPF_H+BPF_IND, 4),
|
||||
@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x01, 0x23, 0x45, 0x67,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
static u_int expect = 0;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 1),
|
||||
BPF_STMT(BPF_LD+BPF_B+BPF_IND, 3),
|
||||
@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x01, 0x23, 0x45,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
static u_int expect = 0;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 6),
|
||||
BPF_STMT(BPF_LD+BPF_W+BPF_IND, 1),
|
||||
@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x01, 0x23, 0x45, 0x67, 0x89, 0xab,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
static u_int expect = 0;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 4),
|
||||
BPF_STMT(BPF_LD+BPF_H+BPF_IND, 1),
|
||||
@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x01, 0x23, 0x45, 0x67,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
static u_int expect = 0;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 1),
|
||||
BPF_STMT(BPF_LD+BPF_W+BPF_IND, 0xffffffff),
|
||||
@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x01, 0x23, 0x45, 0x67, 0x89, 0xab,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
static u_int expect = 0;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 1),
|
||||
BPF_STMT(BPF_LD+BPF_H+BPF_IND, 0xffffffff),
|
||||
@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x01, 0x23, 0x45, 0x67,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
static u_int expect = 0;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 1),
|
||||
BPF_STMT(BPF_LD+BPF_B+BPF_IND, 0xffffffff),
|
||||
@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x01, 0x23, 0x45,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
static u_int expect = 0;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0xffffffff),
|
||||
BPF_STMT(BPF_LD+BPF_W+BPF_IND, 1),
|
||||
@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x01, 0x23, 0x45, 0x67, 0x89, 0xab,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
static u_int expect = 0;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0xffffffff),
|
||||
BPF_STMT(BPF_LD+BPF_H+BPF_IND, 1),
|
||||
@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x01, 0x23, 0x45, 0x67,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
static u_int expect = 0;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0xffffffff),
|
||||
BPF_STMT(BPF_LD+BPF_B+BPF_IND, 1),
|
||||
@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x01, 0x23, 0x45,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
static u_int expect = 0;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 1),
|
||||
BPF_STMT(BPF_LD+BPF_W+BPF_IND, 1),
|
||||
@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x01, 0x23, 0x45, 0x67, 0x89, 0xab,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = 0;
|
||||
static u_int buflen = 0;
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
static u_int expect = 0;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 1),
|
||||
BPF_STMT(BPF_LD+BPF_H+BPF_IND, 1),
|
||||
@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x01, 0x23, 0x45, 0x67,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = 0;
|
||||
static u_int buflen = 0;
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
static u_int expect = 0;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 1),
|
||||
BPF_STMT(BPF_LD+BPF_B+BPF_IND, 1),
|
||||
@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x01, 0x23, 0x45,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = 0;
|
||||
static u_int buflen = 0;
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
static u_int expect = 0;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0),
|
||||
BPF_STMT(BPF_LD+BPF_W+BPF_IND, 1),
|
||||
@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x01, 0x23, 0x45, 0x67, 0x89, 0xab,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = 0;
|
||||
static u_int buflen = 0;
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
static u_int expect = 0;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0),
|
||||
BPF_STMT(BPF_LD+BPF_H+BPF_IND, 1),
|
||||
@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x01, 0x23, 0x45, 0x67,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = 0;
|
||||
static u_int buflen = 0;
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
static u_int expect = 0;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0),
|
||||
BPF_STMT(BPF_LD+BPF_B+BPF_IND, 1),
|
||||
@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x01, 0x23, 0x45,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = 0;
|
||||
static u_int buflen = 0;
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
static u_int expect = 0;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 1),
|
||||
BPF_STMT(BPF_LD+BPF_W+BPF_IND, 0),
|
||||
@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x01, 0x23, 0x45, 0x67, 0x89, 0xab,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = 0;
|
||||
static u_int buflen = 0;
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
static u_int expect = 0;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 1),
|
||||
BPF_STMT(BPF_LD+BPF_H+BPF_IND, 0),
|
||||
@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x01, 0x23, 0x45, 0x67,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = 0;
|
||||
static u_int buflen = 0;
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
static u_int expect = 0;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 1),
|
||||
BPF_STMT(BPF_LD+BPF_B+BPF_IND, 0),
|
||||
@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x01, 0x23, 0x45,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = 0;
|
||||
static u_int buflen = 0;
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
static u_int expect = 0;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0),
|
||||
BPF_STMT(BPF_LD+BPF_W+BPF_IND, 0),
|
||||
@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x01, 0x23, 0x45, 0x67, 0x89, 0xab,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = 0;
|
||||
static u_int buflen = 0;
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
static u_int expect = 0;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0),
|
||||
BPF_STMT(BPF_LD+BPF_H+BPF_IND, 0),
|
||||
@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x01, 0x23, 0x45, 0x67,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = 0;
|
||||
static u_int buflen = 0;
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
static u_int expect = 0;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0),
|
||||
BPF_STMT(BPF_LD+BPF_B+BPF_IND, 0),
|
||||
@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x01, 0x23, 0x45,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = 0;
|
||||
static u_int buflen = 0;
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
static u_int expect = 0;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xa7c2da06),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0),
|
||||
BPF_STMT(BPF_ALU+BPF_DIV+BPF_X, 0),
|
||||
@ -13,21 +13,21 @@ struct bpf_insn pc[] = {
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
static u_int expect = 0;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,32 +5,32 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LD+BPF_MEM, 0x8fffffff),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 1;
|
||||
static int invalid = 1;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0xdeadc0de;
|
||||
static u_int expect = 0xdeadc0de;
|
||||
|
||||
/* Expected signal */
|
||||
#ifdef __amd64__
|
||||
int expect_signal = SIGBUS;
|
||||
static int expect_signal = SIGBUS;
|
||||
#else
|
||||
int expect_signal = SIGSEGV;
|
||||
static int expect_signal = SIGSEGV;
|
||||
#endif
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_MEM, 0x8fffffff),
|
||||
BPF_STMT(BPF_MISC+BPF_TXA, 0),
|
||||
@ -13,25 +13,25 @@ struct bpf_insn pc[] = {
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 1;
|
||||
static int invalid = 1;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0xdeadc0de;
|
||||
static u_int expect = 0xdeadc0de;
|
||||
|
||||
/* Expected signal */
|
||||
#ifdef __amd64__
|
||||
int expect_signal = SIGBUS;
|
||||
static int expect_signal = SIGBUS;
|
||||
#else
|
||||
int expect_signal = SIGSEGV;
|
||||
static int expect_signal = SIGSEGV;
|
||||
#endif
|
||||
|
@ -5,32 +5,32 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_ST, 0x8fffffff),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 1;
|
||||
static int invalid = 1;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0xdeadc0de;
|
||||
static u_int expect = 0xdeadc0de;
|
||||
|
||||
/* Expected signal */
|
||||
#ifdef __amd64__
|
||||
int expect_signal = SIGBUS;
|
||||
static int expect_signal = SIGBUS;
|
||||
#else
|
||||
int expect_signal = SIGSEGV;
|
||||
static int expect_signal = SIGSEGV;
|
||||
#endif
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_STX, 0x8fffffff),
|
||||
BPF_STMT(BPF_MISC+BPF_TXA, 0),
|
||||
@ -13,25 +13,25 @@ struct bpf_insn pc[] = {
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 1;
|
||||
static int invalid = 1;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0xdeadc0de;
|
||||
static u_int expect = 0xdeadc0de;
|
||||
|
||||
/* Expected signal */
|
||||
#ifdef __amd64__
|
||||
int expect_signal = SIGBUS;
|
||||
static int expect_signal = SIGBUS;
|
||||
#else
|
||||
int expect_signal = SIGSEGV;
|
||||
static int expect_signal = SIGSEGV;
|
||||
#endif
|
||||
|
@ -5,25 +5,25 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = (u_int)-1;
|
||||
static u_int expect = (u_int)-1;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
#ifdef BPF_JIT_COMPILER_OBSOLETE
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0xffffffff),
|
||||
BPF_STMT(BPF_LD+BPF_MEM, 0),
|
||||
@ -46,21 +46,21 @@ struct bpf_insn pc[] = {
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
static u_int expect = 0;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0),
|
||||
BPF_JUMP(BPF_JMP+BPF_JA, 2, 0, 0),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
@ -13,25 +13,25 @@ struct bpf_insn pc[] = {
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 1;
|
||||
static int invalid = 1;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
static u_int expect = 0;
|
||||
|
||||
/* Expected signal */
|
||||
#ifdef BPF_JIT_COMPILER
|
||||
int expect_signal = SIGSEGV;
|
||||
static int expect_signal = SIGSEGV;
|
||||
#else
|
||||
int expect_signal = SIGABRT;
|
||||
static int expect_signal = SIGABRT;
|
||||
#endif
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0),
|
||||
BPF_JUMP(BPF_JMP+BPF_JGT+BPF_K, 0, 1, 2),
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
@ -13,25 +13,25 @@ struct bpf_insn pc[] = {
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 1;
|
||||
static int invalid = 1;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
static u_int expect = 0;
|
||||
|
||||
/* Expected signal */
|
||||
#ifdef BPF_JIT_COMPILER
|
||||
int expect_signal = SIGSEGV;
|
||||
static int expect_signal = SIGSEGV;
|
||||
#else
|
||||
int expect_signal = SIGABRT;
|
||||
static int expect_signal = SIGABRT;
|
||||
#endif
|
||||
|
@ -5,30 +5,30 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD|BPF_IMM, 0),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 1;
|
||||
static int invalid = 1;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0;
|
||||
static u_int expect = 0;
|
||||
|
||||
/* Expected signal */
|
||||
#ifdef BPF_JIT_COMPILER
|
||||
int expect_signal = SIGSEGV;
|
||||
static int expect_signal = SIGSEGV;
|
||||
#else
|
||||
int expect_signal = SIGABRT;
|
||||
static int expect_signal = SIGABRT;
|
||||
#endif
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
struct bpf_insn pc[] = {
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 0),
|
||||
BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 1),
|
||||
BPF_STMT(BPF_LD+BPF_W+BPF_ABS, 0),
|
||||
@ -1010,21 +1010,21 @@ struct bpf_insn pc[] = {
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
u_char pkt[] = {
|
||||
static u_char pkt[] = {
|
||||
0x01, 0x23, 0x45, 0x67, 0x89,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
u_int wirelen = sizeof(pkt);
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
u_int buflen = sizeof(pkt);
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
int invalid = 0;
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
u_int expect = 0x23456789;
|
||||
static u_int expect = 0x23456789;
|
||||
|
||||
/* Expected signal */
|
||||
int expect_signal = 0;
|
||||
static int expect_signal = 0;
|
||||
|
33
tools/regression/bpf/bpf_filter/tests/test0085.h
Normal file
33
tools/regression/bpf/bpf_filter/tests/test0085.h
Normal file
@ -0,0 +1,33 @@
|
||||
/*-
|
||||
* Test 0085: BPF_ALU+BPF_MOD+BPF_X
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdfe03de1),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0xdead),
|
||||
BPF_STMT(BPF_ALU+BPF_MOD+BPF_X, 0),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
static u_char pkt[] = {
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
static u_int expect = 0x3154;
|
||||
|
||||
/* Expected signal */
|
||||
static int expect_signal = 0;
|
33
tools/regression/bpf/bpf_filter/tests/test0086.h
Normal file
33
tools/regression/bpf/bpf_filter/tests/test0086.h
Normal file
@ -0,0 +1,33 @@
|
||||
/*-
|
||||
* Test 0086: BPF_ALU+BPF_XOR+BPF_X
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0xc0decafe),
|
||||
BPF_STMT(BPF_ALU+BPF_XOR+BPF_X, 0),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
static u_char pkt[] = {
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
static u_int expect = 0x1e730a20;
|
||||
|
||||
/* Expected signal */
|
||||
static int expect_signal = 0;
|
32
tools/regression/bpf/bpf_filter/tests/test0087.h
Normal file
32
tools/regression/bpf/bpf_filter/tests/test0087.h
Normal file
@ -0,0 +1,32 @@
|
||||
/*-
|
||||
* Test 0087: BPF_ALU+BPF_MOD+BPF_K
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdfe03de1),
|
||||
BPF_STMT(BPF_ALU+BPF_MOD+BPF_K, 0xdead),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
static u_char pkt[] = {
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
static u_int expect = 0x3154;
|
||||
|
||||
/* Expected signal */
|
||||
static int expect_signal = 0;
|
32
tools/regression/bpf/bpf_filter/tests/test0088.h
Normal file
32
tools/regression/bpf/bpf_filter/tests/test0088.h
Normal file
@ -0,0 +1,32 @@
|
||||
/*-
|
||||
* Test 0088: BPF_ALU+BPF_XOR+BPF_K
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
|
||||
BPF_STMT(BPF_ALU+BPF_XOR+BPF_K, 0xc0decafe),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
static u_char pkt[] = {
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
static u_int expect = 0x1e730a20;
|
||||
|
||||
/* Expected signal */
|
||||
static int expect_signal = 0;
|
33
tools/regression/bpf/bpf_filter/tests/test0089.h
Normal file
33
tools/regression/bpf/bpf_filter/tests/test0089.h
Normal file
@ -0,0 +1,33 @@
|
||||
/*-
|
||||
* Test 0089: Divide by 0 (BPF_ALU+BPF_MOD+BPF_X)
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xa7c2da06),
|
||||
BPF_STMT(BPF_LDX+BPF_IMM, 0),
|
||||
BPF_STMT(BPF_ALU+BPF_MOD+BPF_X, 0),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
static u_char pkt[] = {
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
static int invalid = 0;
|
||||
|
||||
/* Expected return value */
|
||||
static u_int expect = 0;
|
||||
|
||||
/* Expected signal */
|
||||
static int expect_signal = 0;
|
32
tools/regression/bpf/bpf_filter/tests/test0090.h
Normal file
32
tools/regression/bpf/bpf_filter/tests/test0090.h
Normal file
@ -0,0 +1,32 @@
|
||||
/*-
|
||||
* Test 0090: Divide by 0 (BPF_ALU+BPF_DIV+BPF_K)
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xa7c2da06),
|
||||
BPF_STMT(BPF_ALU+BPF_DIV+BPF_K, 0),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
static u_char pkt[] = {
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
static int invalid = 1;
|
||||
|
||||
/* Expected return value */
|
||||
static u_int expect = 0;
|
||||
|
||||
/* Expected signal */
|
||||
static int expect_signal = SIGFPE;
|
32
tools/regression/bpf/bpf_filter/tests/test0091.h
Normal file
32
tools/regression/bpf/bpf_filter/tests/test0091.h
Normal file
@ -0,0 +1,32 @@
|
||||
/*-
|
||||
* Test 0091: Divide by 0 (BPF_ALU+BPF_MOD+BPF_K)
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* BPF program */
|
||||
static struct bpf_insn pc[] = {
|
||||
BPF_STMT(BPF_LD+BPF_IMM, 0xa7c2da06),
|
||||
BPF_STMT(BPF_ALU+BPF_MOD+BPF_K, 0),
|
||||
BPF_STMT(BPF_RET+BPF_A, 0),
|
||||
};
|
||||
|
||||
/* Packet */
|
||||
static u_char pkt[] = {
|
||||
0x00,
|
||||
};
|
||||
|
||||
/* Packet length seen on wire */
|
||||
static u_int wirelen = sizeof(pkt);
|
||||
|
||||
/* Packet length passed on buffer */
|
||||
static u_int buflen = sizeof(pkt);
|
||||
|
||||
/* Invalid instruction */
|
||||
static int invalid = 1;
|
||||
|
||||
/* Expected return value */
|
||||
static u_int expect = 0;
|
||||
|
||||
/* Expected signal */
|
||||
static int expect_signal = SIGFPE;
|
Loading…
Reference in New Issue
Block a user