jnetpcap.filter.bpf
Enum BPFCode

java.lang.Object
  extended by java.lang.Enum<BPFCode>
      extended by jnetpcap.filter.bpf.BPFCode
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<BPFCode>

public enum BPFCode
extends java.lang.Enum<BPFCode>

Instruction set for BPF program. Based on "pcap-bpf.h" file.

Author:
Mark Bednarczyk, Sly Technologies, Inc.

Enum Constant Summary
MN_A
           
MN_ABS
           
MN_ADD
           
MN_ALU
           
MN_AND
           
MN_B
           
MN_DIV
           
MN_H
           
MN_IMM
           
MN_IND
           
MN_JA
           
MN_JEQ
           
MN_JGE
           
MN_JGT
           
MN_JMP
           
MN_JSET
           
MN_K
           
MN_LD
           
MN_LDX
           
MN_LEN
           
MN_LSH
           
MN_MEM
           
MN_MISC
           
MN_MSH
           
MN_MUL
           
MN_NEG
           
MN_OR
           
MN_RET
           
MN_RSH
           
MN_ST
           
MN_STX
           
MN_SUB
           
MN_TAX
           
MN_TXA
           
MN_W
           
MN_X
           
 
Field Summary
static int A
           
static int ABS
           
static int ADD
           
static int ALU
           
static int AND
           
static int B
           
static int DIV
           
static int H
           
static int IMM
           
static int IND
           
static int JA
           
static int JEQ
           
static int JGE
           
static int JGT
           
static int JMP
           
static int JSET
           
static int K
           
static int LD
           
static int LDX
           
static int LEN
           
static int LSH
           
static int MEM
           
static int MISC
           
static int MSH
           
static int MUL
           
static int NEG
           
static int OR
           
static int RET
           
static int RSH
           
static int ST
           
static int STX
           
static int SUB
           
static int TAX
           
static int TXA
           
static int W
           
static int X
           
 
Method Summary
 int getMask()
           
 int op()
           
static BPFCode valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static BPFCode[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

MN_LD

public static final BPFCode MN_LD

MN_LDX

public static final BPFCode MN_LDX

MN_ST

public static final BPFCode MN_ST

MN_STX

public static final BPFCode MN_STX

MN_ALU

public static final BPFCode MN_ALU

MN_JMP

public static final BPFCode MN_JMP

MN_RET

public static final BPFCode MN_RET

MN_MISC

public static final BPFCode MN_MISC

MN_W

public static final BPFCode MN_W

MN_H

public static final BPFCode MN_H

MN_B

public static final BPFCode MN_B

MN_IMM

public static final BPFCode MN_IMM

MN_ABS

public static final BPFCode MN_ABS

MN_IND

public static final BPFCode MN_IND

MN_MEM

public static final BPFCode MN_MEM

MN_LEN

public static final BPFCode MN_LEN

MN_MSH

public static final BPFCode MN_MSH

MN_ADD

public static final BPFCode MN_ADD

MN_SUB

public static final BPFCode MN_SUB

MN_MUL

public static final BPFCode MN_MUL

MN_DIV

public static final BPFCode MN_DIV

MN_OR

public static final BPFCode MN_OR

MN_AND

public static final BPFCode MN_AND

MN_LSH

public static final BPFCode MN_LSH

MN_RSH

public static final BPFCode MN_RSH

MN_NEG

public static final BPFCode MN_NEG

MN_JA

public static final BPFCode MN_JA

MN_JEQ

public static final BPFCode MN_JEQ

MN_JGT

public static final BPFCode MN_JGT

MN_JGE

public static final BPFCode MN_JGE

MN_JSET

public static final BPFCode MN_JSET

MN_K

public static final BPFCode MN_K

MN_X

public static final BPFCode MN_X

MN_A

public static final BPFCode MN_A

MN_TAX

public static final BPFCode MN_TAX

MN_TXA

public static final BPFCode MN_TXA
Field Detail

LD

public static final int LD
See Also:
Constant Field Values

LDX

public static final int LDX
See Also:
Constant Field Values

ST

public static final int ST
See Also:
Constant Field Values

STX

public static final int STX
See Also:
Constant Field Values

ALU

public static final int ALU
See Also:
Constant Field Values

JMP

public static final int JMP
See Also:
Constant Field Values

RET

public static final int RET
See Also:
Constant Field Values

MISC

public static final int MISC
See Also:
Constant Field Values

W

public static final int W
See Also:
Constant Field Values

H

public static final int H
See Also:
Constant Field Values

B

public static final int B
See Also:
Constant Field Values

IMM

public static final int IMM
See Also:
Constant Field Values

ABS

public static final int ABS
See Also:
Constant Field Values

IND

public static final int IND
See Also:
Constant Field Values

MEM

public static final int MEM
See Also:
Constant Field Values

LEN

public static final int LEN
See Also:
Constant Field Values

MSH

public static final int MSH
See Also:
Constant Field Values

ADD

public static final int ADD
See Also:
Constant Field Values

SUB

public static final int SUB
See Also:
Constant Field Values

MUL

public static final int MUL
See Also:
Constant Field Values

DIV

public static final int DIV
See Also:
Constant Field Values

OR

public static final int OR
See Also:
Constant Field Values

AND

public static final int AND
See Also:
Constant Field Values

LSH

public static final int LSH
See Also:
Constant Field Values

RSH

public static final int RSH
See Also:
Constant Field Values

NEG

public static final int NEG
See Also:
Constant Field Values

JA

public static final int JA
See Also:
Constant Field Values

JEQ

public static final int JEQ
See Also:
Constant Field Values

JGT

public static final int JGT
See Also:
Constant Field Values

JGE

public static final int JGE
See Also:
Constant Field Values

JSET

public static final int JSET
See Also:
Constant Field Values

K

public static final int K
See Also:
Constant Field Values

X

public static final int X
See Also:
Constant Field Values

A

public static final int A
See Also:
Constant Field Values

TAX

public static final int TAX
See Also:
Constant Field Values

TXA

public static final int TXA
See Also:
Constant Field Values
Method Detail

values

public static final BPFCode[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(BPFCode c : BPFCode.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static BPFCode valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name

op

public final int op()
Returns:
Returns the opcode.

getMask

public final int getMask()
Returns:
Returns the mask.