org.jnetstream.capture.file.snoop
Enum SnoopDLT

java.lang.Object
  extended by java.lang.Enum<SnoopDLT>
      extended by org.jnetstream.capture.file.snoop.SnoopDLT
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<SnoopDLT>

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

Pcap data link type that specified the type of the first protocol found within the packet's content buffer.

Author:
Mark Bednarczyk, Sly Technologies, Inc.

Enum Constant Summary
CharSynchronous
           
Ethernet
           
FDDI
           
HDLC
           
IBMChannel2Channel
           
IEEE802DOT3
           
IEEE802DOT4
           
IEEE802DOT5
           
IEEE802DOT6
           
Other
           
 
Method Summary
static Protocol asConst(long raw)
           
static SnoopDLT asPcap(Protocol p)
          Converts a jNS protocol constant into a PcapDLT specific value
 Protocol asProtocol()
          Returns the mapped jNS protocol constant for this PcapDLT
 long intValue()
          Returns the integer representation of this DLT
static SnoopDLT valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static SnoopDLT[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

IEEE802DOT3

public static final SnoopDLT IEEE802DOT3

IEEE802DOT4

public static final SnoopDLT IEEE802DOT4

IEEE802DOT5

public static final SnoopDLT IEEE802DOT5

IEEE802DOT6

public static final SnoopDLT IEEE802DOT6

Ethernet

public static final SnoopDLT Ethernet

HDLC

public static final SnoopDLT HDLC

CharSynchronous

public static final SnoopDLT CharSynchronous

IBMChannel2Channel

public static final SnoopDLT IBMChannel2Channel

FDDI

public static final SnoopDLT FDDI

Other

public static final SnoopDLT Other
Method Detail

values

public static final SnoopDLT[] 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(SnoopDLT c : SnoopDLT.values())
        System.out.println(c);

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

valueOf

public static SnoopDLT 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

intValue

public long intValue()
Returns the integer representation of this DLT

Returns:
DLT as a PCAP compatible integer

asProtocol

public Protocol asProtocol()
Returns the mapped jNS protocol constant for this PcapDLT

Returns:

asPcap

public static SnoopDLT asPcap(Protocol p)
Converts a jNS protocol constant into a PcapDLT specific value

Parameters:
p - jNS protocol constant
Returns:
corresponding PcapDLT value

asConst

public static Protocol asConst(long raw)
Parameters:
raw -
Returns: