]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - tools/regression/bpf/bpf_filter/tests/test0086.h
Upgrade Unbound to 1.6.1. More to follow.
[FreeBSD/FreeBSD.git] / tools / regression / bpf / bpf_filter / tests / test0086.h
1 /*-
2  * Test 0086:   BPF_ALU+BPF_XOR+BPF_X
3  *
4  * $FreeBSD$
5  */
6
7 /* BPF program */
8 static struct bpf_insn  pc[] = {
9         BPF_STMT(BPF_LD+BPF_IMM, 0xdeadc0de),
10         BPF_STMT(BPF_LDX+BPF_IMM, 0xc0decafe),
11         BPF_STMT(BPF_ALU+BPF_XOR+BPF_X, 0),
12         BPF_STMT(BPF_RET+BPF_A, 0),
13 };
14
15 /* Packet */
16 static u_char   pkt[] = {
17         0x00,
18 };
19
20 /* Packet length seen on wire */
21 static u_int    wirelen =       sizeof(pkt);
22
23 /* Packet length passed on buffer */
24 static u_int    buflen =        sizeof(pkt);
25
26 /* Invalid instruction */
27 static int      invalid =       0;
28
29 /* Expected return value */
30 static u_int    expect =        0x1e730a20;
31
32 /* Expected signal */
33 static int      expect_signal = 0;