org.jnetpcap.protocol.network
Class Ip4.IpOption

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.packet.JSubHeader<Ip4>
                  extended by org.jnetpcap.protocol.network.Ip4.IpOption
All Implemented Interfaces:
JByteBuffer
Direct Known Subclasses:
Ip4.NoOp, Ip4.Routing, Ip4.Security, Ip4.StreamId, Ip4.Timestamp
Enclosing class:
Ip4

public abstract static class Ip4.IpOption
extends JSubHeader<Ip4>

Baseclass for all Ip option headers

Author:
Mark Bednarczyk, Sly Technologies, Inc.

Nested Class Summary
static class Ip4.IpOption.OptionCode
          A table of IpOption types and their names
 
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
 
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
Ip4.IpOption()
           
 
Method Summary
 int code()
          Gets the Ip4.code field.
 void code(int value)
          Sets the Ip4.code field.
 Ip4.IpOption.OptionCode codeEnum()
          Gets the Ip4.code field.
static int headerLength(JBuffer buffer, int offset)
           
 void optionCode(Ip4.IpOption.OptionCode value)
          Sets the Ip4.code field.
 
Methods inherited from class org.jnetpcap.packet.JSubHeader
getLength, getOffset, getParent, setLength, setOffset, setParent
 
Methods inherited from class org.jnetpcap.packet.JHeader
addAnalysis, decode, decodeHeader, getAnalysis, getAnalysisIterable, getAnnotatedHeader, getDescription, getFields, getId, getName, getNicname, getPacket, getState, getSubHeaders, getType, hasAnalysis, hasAnalysis, hasAnalysis, hasDescription, hasSubHeaders, peer, peer, setPacket, setSubHeaders, sizeof, toString, 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
 

Constructor Detail

Ip4.IpOption

public Ip4.IpOption()
Method Detail

headerLength

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

code

@Field(offset=0,
       length=3,
       format="%d")
public int code()
Gets the Ip4.code field. Specifies the optional header type.

Header Spec

Protocol Header: Ip4
Protocol Family: Networking
OSI Layer: 3
Field Property: constant offset
Field Offset: getUByte(0) & 0x1F

Header Diagram

 +------+-----------------+
 | CODE | optional header |
 +------+-----------------+
 

Returns:
code field value

code

@FieldSetter
public void code(int value)
Sets the Ip4.code field. Specifies the optional header type.

Header Spec

Protocol Header: Ip4
Protocol Family: Networking
OSI Layer: 3
Field Property: constant offset
Field Offset: getUByte(0) & 0x1F

Header Diagram

 +------+-----------------+
 | CODE | optional header |
 +------+-----------------+
 

Parameters:
value - new code value

codeEnum

public Ip4.IpOption.OptionCode codeEnum()
Gets the Ip4.code field. Specifies the optional header type.

Header Spec

Protocol Header: Ip4
Protocol Family: Networking
OSI Layer: 3
Field Property: constant offset
Field Offset: getUByte(0) & 0x1F

Header Diagram

 +------+-----------------+
 | CODE | optional header |
 +------+-----------------+
 

Returns:
code field value

optionCode

public void optionCode(Ip4.IpOption.OptionCode value)
Sets the Ip4.code field. Specifies the optional header type.

Header Spec

Protocol Header: Ip4
Protocol Family: Networking
OSI Layer: 3
Field Property: constant offset
Field Offset: getUByte(0) & 0x1F

Header Diagram

 +------+-----------------+
 | CODE | optional header |
 +------+-----------------+
 

Parameters:
value - new code value