1/*-
2 * Test 0046:	Check boundary conditions (BPF_LD+BPF_H+BPF_IND)
3 */
4
5/* BPF program */
6static struct bpf_insn	pc[] = {
7	BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
8	BPF_STMT(BPF_LDX+BPF_IMM, 1),
9	BPF_STMT(BPF_LD+BPF_H+BPF_IND, 2),
10	BPF_STMT(BPF_RET+BPF_A, 0),
11};
12
13/* Packet */
14static u_char	pkt[] = {
15	0x01, 0x23, 0x45, 0x67,
16};
17
18/* Packet length seen on wire */
19static u_int	wirelen =	sizeof(pkt);
20
21/* Packet length passed on buffer */
22static u_int	buflen =	sizeof(pkt);
23
24/* Invalid instruction */
25static int	invalid =	0;
26
27/* Expected return value */
28static u_int	expect =	0;
29
30/* Expected signal */
31static int	expect_signal =	0;
32