org.jnetpcap.protocol.network
Class Ip4.IpOption
java.lang.Object
org.jnetpcap.nio.JMemory
org.jnetpcap.nio.JBuffer
org.jnetpcap.packet.JHeader
org.jnetpcap.packet.JSubHeader<Ip4>
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.
| 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 |
Ip4.IpOption
public Ip4.IpOption()
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