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