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