]> CyberLeo.Net >> Repos - FreeBSD/releng/8.1.git/blob - tools/regression/bpf/bpf_filter/tests/test0083.h
Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.
[FreeBSD/releng/8.1.git] / tools / regression / bpf / bpf_filter / tests / test0083.h
1 /*-
2  * Test 0083:   Check that the last instruction is BPF_RET.
3  *
4  * $FreeBSD$
5  */
6
7 /* BPF program */
8 struct bpf_insn pc[] = {
9         BPF_JUMP(BPF_JMP+BPF_JA, 0, 0, 0),
10 };
11
12 /* Packet */
13 u_char  pkt[] = {
14         0x00,
15 };
16
17 /* Packet length seen on wire */
18 u_int   wirelen =       sizeof(pkt);
19
20 /* Packet length passed on buffer */
21 u_int   buflen =        sizeof(pkt);
22
23 /* Invalid instruction */
24 int     invalid =       1;
25
26 /* Expected return value */
27 u_int   expect =        0;
28
29 /* Expected signal */
30 #ifdef BPF_JIT_COMPILER
31 int     expect_signal = SIGSEGV;
32 #else
33 int     expect_signal = SIGABRT;
34 #endif