org.jnetpcap.protocol.network
Class Ip6

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.network.Ip6
All Implemented Interfaces:
JPayloadAccessor

@Header(length=40)
public class Ip6
extends JHeader

IP version 6 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 ID
          The Constant ID.
 
Fields inherited from class org.jnetpcap.packet.JHeader
annotatedHeader, BYTE, EMPTY_HEADER_ARRAY, isSubHeader, packet, state
 
Fields inherited from class org.jnetpcap.nio.JMemory
JNETPCAP_LIBRARY_NAME, MAX_DIRECT_MEMORY_DEFAULT, POINTER
 
Constructor Summary
Ip6()
           
 
Method Summary
 byte[] destination()
          Destination.
 byte[] destinationToByteArray(byte[] address)
          Destination to byte array.
 int flowLabel()
          Flow label.
 int hopLimit()
          Hop limit.
 int length()
          Length.
 int next()
          Next.
 byte[] source()
          Source.
 byte[] sourceToByteArray(byte[] address)
          Source to byte array.
 int trafficClass()
          Traffic class.
 int version()
          Version.
 
Methods inherited from class org.jnetpcap.packet.JHeader
decode, decodeHeader, getAnnotatedHeader, getDescription, getFields, getGap, getGapLength, getGapOffset, getHeader, getHeaderLength, getHeaderOffset, getId, getIndex, getLength, getName, getNextHeaderId, getNextHeaderOffset, getNicname, getOffset, getPacket, getParent, getPayload, getPayloadLength, getPayloadOffset, getPostfix, getPostfixLength, getPostfixOffset, getPrefix, getPrefixLength, getPrefixOffset, getPreviousHeaderId, getPreviousHeaderOffset, getState, getSubHeaders, hasDescription, hasGap, hasNextHeader, hasPayload, hasPostfix, hasPrefix, hasPreviousHeader, hasSubHeaders, isFragmented, isGapTruncated, isHeaderTruncated, isPayloadTruncated, isPostfixTruncated, isPrefixTruncated, peer, peer, peerPayloadTo, setPacket, setSubHeaders, sizeof, toString, transferPayloadTo, transferPayloadTo, transferPayloadTo, validateHeader
 
Methods inherited from class org.jnetpcap.nio.JBuffer
findUTF8String, getByte, getByteArray, 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, setShort0, setUByte, setUInt, setUShort, transferFrom, transferFrom, transferFrom, transferTo, transferTo, transferTo
 
Methods inherited from class org.jnetpcap.nio.JMemory
availableDirectMemory, check, cleanup, createReference, isInitialized, isJMemoryBasedOwner, isOwner, maxDirectMemory, peer, reservedDirectMemory, setSize, size, softDirectMemory, toDebugString, toHexdump, toHexdump, totalActiveAllocated, totalAllocateCalls, totalAllocated, totalAllocatedSegments0To255Bytes, totalAllocatedSegments256OrAbove, totalDeAllocateCalls, totalDeAllocated, transferFrom, transferFrom, transferFromDirect, transferOwnership, transferTo, transferTo, transferTo, transferTo, transferTo, transferTo0
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ID

public static final int ID
The Constant ID.

See Also:
Constant Field Values
Constructor Detail

Ip6

public Ip6()
Method Detail

version

@Field(offset=0,
       length=4)
public int version()
Version.

Returns:
the int

trafficClass

@Field(offset=4,
       length=8)
public int trafficClass()
Traffic class.

Returns:
the int

flowLabel

@Field(offset=12,
       length=20)
public int flowLabel()
Flow label.

Returns:
the int

length

@Field(offset=32,
       length=16)
public int length()
Length.

Returns:
the int

next

@Field(offset=48,
       length=8)
@FlowKey(index=1)
public int next()
Next.

Returns:
the int

hopLimit

@Field(offset=56,
       length=8)
public int hopLimit()
Hop limit.

Returns:
the int

source

@Field(offset=64,
       length=128,
       format="#ip6#")
@FlowKey(index=0)
public byte[] source()
Source.

Returns:
the byte[]

sourceToByteArray

public byte[] sourceToByteArray(byte[] address)
Source to byte array.

Parameters:
address - the address
Returns:
the byte[]

destination

@Field(offset=64,
       length=128,
       format="#ip6#")
@FlowKey(index=0)
public byte[] destination()
Destination.

Returns:
the byte[]

destinationToByteArray

public byte[] destinationToByteArray(byte[] address)
Destination to byte array.

Parameters:
address - the address
Returns:
the byte[]