org.jnetstream.capture.file.pcap
Enum PcapDLT

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

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

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
EN10
           
 
Method Summary
static Protocol asConst(long rawLinkType)
           
static PcapDLT 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 PcapDLT valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static PcapDLT[] 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

EN10

public static final PcapDLT EN10
Method Detail

values

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

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

valueOf

public static PcapDLT 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 PcapDLT 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 rawLinkType)
Parameters:
rawLinkType -
Returns: