* Copyright (c) 1988-1990 The Regents of the University of California.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that: (1) source code distributions
* retain the above copyright notice and this paragraph in its entirety, (2)
* distributions including binary code include the above copyright notice and
* this paragraph in its entirety in the documentation or other materials
* provided with the distribution, and (3) all advertising materials mentioning
* features or use of this software display the following acknowledgement:
* ``This product includes software developed by the University of California,
* Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
* the University nor the names of its contributors may be used to endorse
* or promote products derived from this software without specific prior
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
"@(#) $Header: bpf_image.c,v 1.10 92/01/26 21:01:16 mccanne Exp $ (LBL)";
case BPF_LD
|BPF_W
|BPF_ABS
:
case BPF_LD
|BPF_H
|BPF_ABS
:
case BPF_LD
|BPF_B
|BPF_ABS
:
case BPF_LD
|BPF_W
|BPF_LEN
:
case BPF_LD
|BPF_W
|BPF_IND
:
case BPF_LD
|BPF_H
|BPF_IND
:
case BPF_LD
|BPF_B
|BPF_IND
:
case BPF_LDX
|BPF_MSH
|BPF_B
:
case BPF_JMP
|BPF_JGT
|BPF_K
:
case BPF_JMP
|BPF_JGE
|BPF_K
:
case BPF_JMP
|BPF_JEQ
|BPF_K
:
case BPF_JMP
|BPF_JSET
|BPF_K
:
case BPF_JMP
|BPF_JGT
|BPF_X
:
case BPF_JMP
|BPF_JGE
|BPF_X
:
case BPF_JMP
|BPF_JEQ
|BPF_X
:
case BPF_JMP
|BPF_JSET
|BPF_X
:
case BPF_ALU
|BPF_ADD
|BPF_X
:
case BPF_ALU
|BPF_SUB
|BPF_X
:
case BPF_ALU
|BPF_MUL
|BPF_X
:
case BPF_ALU
|BPF_DIV
|BPF_X
:
case BPF_ALU
|BPF_AND
|BPF_X
:
case BPF_ALU
|BPF_OR
|BPF_X
:
case BPF_ALU
|BPF_LSH
|BPF_X
:
case BPF_ALU
|BPF_RSH
|BPF_X
:
case BPF_ALU
|BPF_ADD
|BPF_K
:
case BPF_ALU
|BPF_SUB
|BPF_K
:
case BPF_ALU
|BPF_MUL
|BPF_K
:
case BPF_ALU
|BPF_DIV
|BPF_K
:
case BPF_ALU
|BPF_AND
|BPF_K
:
case BPF_ALU
|BPF_OR
|BPF_K
:
case BPF_ALU
|BPF_LSH
|BPF_K
:
case BPF_ALU
|BPF_RSH
|BPF_K
:
(void)sprintf(operand
, fmt
, v
);
(BPF_CLASS(p
->code
) == BPF_JMP
&&
BPF_OP(p
->code
) != BPF_JA
) ?
"(%03d) %-8s %-16s jt %d\tjf %d"
n
, op
, operand
, n
+ 1 + p
->jt
, n
+ 1 + p
->jf
);