2 * Test 0054: Check boundary conditions (BPF_LD+BPF_W+BPF_IND)
8 static struct bpf_insn pc[] = {
9 BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
10 BPF_STMT(BPF_LDX+BPF_IMM, 6),
11 BPF_STMT(BPF_LD+BPF_W+BPF_IND, 1),
12 BPF_STMT(BPF_RET+BPF_A, 0),
16 static u_char pkt[] = {
17 0x01, 0x23, 0x45, 0x67, 0x89, 0xab,
20 /* Packet length seen on wire */
21 static u_int wirelen = sizeof(pkt);
23 /* Packet length passed on buffer */
24 static u_int buflen = sizeof(pkt);
26 /* Invalid instruction */
27 static int invalid = 0;
29 /* Expected return value */
30 static u_int expect = 0;
33 static int expect_signal = 0;