org.jnetpcap.protocol.tcpip
Class Tcp.AlternateChecksumRequest
java.lang.Object
org.jnetpcap.nio.JMemory
org.jnetpcap.nio.JBuffer
org.jnetpcap.packet.JHeader
org.jnetpcap.packet.JSubHeader<Tcp>
org.jnetpcap.protocol.tcpip.Tcp.TcpOption
org.jnetpcap.protocol.tcpip.Tcp.AlternateChecksumRequest
- All Implemented Interfaces:
- JPayloadAccessor
- Enclosing class:
- Tcp
@Header(id=14)
public static class Tcp.AlternateChecksumRequest
- extends Tcp.TcpOption
The option described in this memo provides a mechanism to negotiate the use
of an alternate checksum at connection-establishment time, as well as a
mechanism to carry additional checksum information for algorithms that
utilize checksums that are longer than 16 bits.
Definition of the option: the TCP Alternate Checksum Request Option may be
sent in a SYN segment by a TCP to indicate that the TCP is prepared to both
generate and receive checksums based on an alternate algorithm. During
communication, the alternate checksum replaces the regular TCP checksum in
the checksum field of the TCP header. Should the alternate checksum require
more than 2 bytes to transmit, the checksum may either be moved into a TCP
Alternate Checksum Data Option and the checksum field of the TCP header be
sent as 0, or the data may be split between the header field and the
option. Alternate checksums are computed over the same data as the regular
TCP checksum.
- Author:
- Mark Bednarczyk, Sly Technologies, Inc.
|
Nested Class Summary |
static class |
Tcp.AlternateChecksumRequest.Algorithm
A SYN segment used to originate a connection may contain the Alternate
Checksum Request Option, which specifies an alternate
checksum-calculation algorithm to be used for the connection. |
| Methods inherited from class org.jnetpcap.packet.JHeader |
decode, decodeHeader, getAnnotatedHeader, getDescription, getFields, getGap, getGapLength, getGapOffset, getHeader, getHeaderLength, getHeaderOffset, getId, getIndex, getName, getNextHeaderId, getNextHeaderOffset, getNicname, getPacket, 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 |
Tcp.AlternateChecksumRequest
public Tcp.AlternateChecksumRequest()
algorithm
@Field(offset=16,
length=8)
public int algorithm()
- Specifies the checksum algorithm to be used.
- Returns:
- type of algorithm
algorithmEnum
public Tcp.AlternateChecksumRequest.Algorithm algorithmEnum()
- Returns the algorithm type as enum constant.
- Returns:
- constant representing the algorithm or null if unrecognized
algorithm
public void algorithm(int value)
- Sets a new value for algorithm field.
- Parameters:
value - new value to set