org.jnetpcap.protocol.vpn
Class L2TP

java.lang.Object
  extended by org.jnetpcap.nio.JMemory
      extended by org.jnetpcap.nio.JBuffer
          extended by org.jnetpcap.packet.JHeader
              extended by org.jnetpcap.protocol.vpn.L2TP
All Implemented Interfaces:
JByteBuffer, JPayloadAccessor

@Header
public class L2TP
extends JHeader

Layer 2 Tunneling Protocol header definition

Author:
Mark Bednarczyk, Sly Technologies, Inc.

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jnetpcap.packet.JHeader
JHeader.State
 
Nested classes/interfaces inherited from class org.jnetpcap.nio.JMemory
JMemory.Type
 
Field Summary
static int FLAG_L
           
static int FLAG_O
           
static int FLAG_P
           
static int FLAG_S
           
static int FLAG_T
           
static int ID
           
static int MASK_FLAGS
           
static int MASK_VERSION
           
 
Fields inherited from class org.jnetpcap.packet.JHeader
annotatedHeader, EMPTY_HEADER_ARRAY, isSubHeader, packet, state
 
Fields inherited from class org.jnetpcap.nio.JMemory
JNETPCAP_LIBRARY_NAME
 
Constructor Summary
L2TP()
           
 
Method Summary
 void decodeHeader()
          Allows a header to decode its complex fields
 int flags()
           
 boolean hasLength()
           
 boolean hasN()
           
 boolean hasOffset()
           
static int headerLength(JBuffer buffer, int offset)
           
 int length()
           
 int lengthOffset()
           
 int nr()
           
 int nrOffset()
           
 int ns()
           
 int nsOffset()
           
 int offset()
           
 int offsetOffset()
           
 int pad()
           
 int padOffset()
           
 int sessionId()
           
 int sessionIdOffset()
           
 int tunnelId()
           
 int tunnelIdOffset()
           
 int version()
           
 
Methods inherited from class org.jnetpcap.packet.JHeader
addAnalysis, decode, getAnalysis, getAnalysisIterable, getAnnotatedHeader, getDescription, getFields, getId, getLength, getName, getNicname, getOffset, getPacket, getParent, getPayload, getState, getSubHeaders, getType, hasAnalysis, hasAnalysis, hasAnalysis, hasDescription, hasSubHeaders, peer, peer, peerPayloadTo, setPacket, setSubHeaders, sizeof, toString, transferPayloadTo, transferPayloadTo, transferPayloadTo, validateHeader
 
Methods inherited from class org.jnetpcap.nio.JBuffer
findUTF8String, getByte, getByteArray, getByteArray, getDouble, getFloat, getInt, getLong, getShort, getUByte, getUInt, getUShort, getUTF8Char, getUTF8String, getUTF8String, getUTF8String, getUTF8String, isReadonly, order, order, peer, peer, peer, peer, setByte, setByteArray, setByteBuffer, setDouble, setFloat, setInt, setLong, setShort, setUByte, setUInt, setUShort, transferFrom, transferFrom, transferFrom, transferTo, transferTo, transferTo
 
Methods inherited from class org.jnetpcap.nio.JMemory
check, cleanup, finalize, isInitialized, isJMemoryBasedOwner, isOwner, peer, setSize, size, toDebugString, toHexdump, toHexdump, totalActiveAllocated, totalAllocateCalls, totalAllocated, totalAllocatedSegments0To255Bytes, totalAllocatedSegments256OrAbove, totalDeAllocateCalls, totalDeAllocated, transferFrom, transferFrom, transferFromDirect, transferOwnership, transferTo, transferTo, transferTo, transferTo, transferTo
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jnetpcap.nio.JByteBuffer
size
 

Field Detail

FLAG_L

public static final int FLAG_L
See Also:
Constant Field Values

FLAG_O

public static final int FLAG_O
See Also:
Constant Field Values

FLAG_P

public static final int FLAG_P
See Also:
Constant Field Values

FLAG_S

public static final int FLAG_S
See Also:
Constant Field Values

FLAG_T

public static final int FLAG_T
See Also:
Constant Field Values

ID

public static final int ID
See Also:
Constant Field Values

MASK_VERSION

public static final int MASK_VERSION
See Also:
Constant Field Values

MASK_FLAGS

public static final int MASK_FLAGS
See Also:
Constant Field Values
Constructor Detail

L2TP

public L2TP()
Method Detail

headerLength

@HeaderLength
public static int headerLength(JBuffer buffer,
                                            int offset)

decodeHeader

public void decodeHeader()
Description copied from class: JHeader
Allows a header to decode its complex fields

Overrides:
decodeHeader in class JHeader

flags

@Field(offset=0,
       length=12,
       format="%x")
public int flags()

hasLength

@Dynamic(value=CHECK)
public boolean hasLength()

hasN

@Dynamic(value=CHECK)
public boolean hasN()

hasOffset

@Dynamic(value=CHECK)
public boolean hasOffset()

lengthOffset

@Dynamic(value=OFFSET)
public int lengthOffset()

length

@Field(length=16)
public int length()

nrOffset

@Dynamic(value=OFFSET)
public int nrOffset()

nr

@Field(length=16)
public int nr()

nsOffset

@Dynamic(value=OFFSET)
public int nsOffset()

ns

@Field(length=16)
public int ns()

offsetOffset

@Dynamic(value=OFFSET)
public int offsetOffset()

offset

@Field(length=16)
public int offset()

padOffset

@Dynamic(value=OFFSET)
public int padOffset()

pad

@Field(length=16)
public int pad()

sessionIdOffset

@Dynamic(value=OFFSET)
public int sessionIdOffset()

sessionId

@Field(length=16)
public int sessionId()

tunnelIdOffset

@Dynamic(value=OFFSET)
public int tunnelIdOffset()

tunnelId

@Field(length=16)
public int tunnelId()

version

@Field(offset=13,
       length=3)
public int version()