2 * Test 0010: BPF_LD+BPF_H+BPF_IND
8 static struct bpf_insn pc[] = {
9 BPF_STMT(BPF_LDX+BPF_IMM, 1),
10 BPF_STMT(BPF_LD+BPF_H+BPF_IND, 1),
11 BPF_STMT(BPF_RET+BPF_A, 0),
15 static u_char pkt[] = {
16 0x01, 0x23, 0x45, 0x67,
19 /* Packet length seen on wire */
20 static u_int wirelen = sizeof(pkt);
22 /* Packet length passed on buffer */
23 static u_int buflen = sizeof(pkt);
25 /* Invalid instruction */
26 static int invalid = 0;
28 /* Expected return value */
29 static u_int expect = 0x4567;
32 static int expect_signal = 0;