]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - tools/regression/bpf/bpf_filter/tests/test0002.h
Import tzdata 2017c
[FreeBSD/FreeBSD.git] / tools / regression / bpf / bpf_filter / tests / test0002.h
1 /*-
2  * Test 0002:   BPF_RET+BPF_K
3  *
4  * $FreeBSD$
5  */
6
7 /* BPF program */
8 static struct bpf_insn  pc[] = {
9         BPF_STMT(BPF_RET+BPF_K, 0xdeadc0de),
10 };
11
12 /* Packet */
13 static u_char   pkt[] = {
14         0x00,
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 =        0xdeadc0de;
28
29 /* Expected signal */
30 static int      expect_signal = 0;