1/*- 2 * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from the Stanford/CMU enet packet filter, 6 * (net/enet.c) distributed as part of 4.3BSD, and code contributed 7 * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence 8 * Berkeley Laboratory. --- 391 unchanged lines hidden (view full) --- 400 mem[pc->k] = A; 401 continue; 402 403 case BPF_STX: 404 mem[pc->k] = X; 405 continue; 406 407 case BPF_JMP|BPF_JA: |
408#if defined(KERNEL) || defined(_KERNEL) 409 /* 410 * No backward jumps allowed. 411 */ |
412 pc += pc->k; |
413#else 414 /* 415 * XXX - we currently implement "ip6 protochain" 416 * with backward jumps, so sign-extend pc->k. 417 */ 418 pc += (bpf_int32)pc->k; 419#endif |
420 continue; 421 422 case BPF_JMP|BPF_JGT|BPF_K: 423 pc += (A > pc->k) ? pc->jt : pc->jf; 424 continue; 425 426 case BPF_JMP|BPF_JGE|BPF_K: 427 pc += (A >= pc->k) ? pc->jt : pc->jf; --- 259 unchanged lines hidden --- |