org.jnetpcap.protocol.tcpip
Enum Tcp.AlternateChecksumRequest.Algorithm

java.lang.Object
  extended by java.lang.Enum<Tcp.AlternateChecksumRequest.Algorithm>
      extended by org.jnetpcap.protocol.tcpip.Tcp.AlternateChecksumRequest.Algorithm
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Tcp.AlternateChecksumRequest.Algorithm>
Enclosing class:
Tcp.AlternateChecksumRequest

public static enum Tcp.AlternateChecksumRequest.Algorithm
extends java.lang.Enum<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. The acknowledging SYN-ACK segment may also carry the option.

Author:
Mark Bednarczyk, Sly Technologies, Inc.

Enum Constant Summary
AVOIDANCE
          Redundant Checksum Avoidance.
FLETCHER_16BIT
          16-bit Fletcher's algorithm.
FLETCHER_8BIT
          8-bit Fletcher's algorithm.
TCP_CHECKSUM
          TCP checksum.
 
Field Summary
 int type
          Numerical type for this algorithm constant.
 
Method Summary
static Tcp.AlternateChecksumRequest.Algorithm valueOf(int type)
          Converts a numerical algorithm type to enum constant.
static Tcp.AlternateChecksumRequest.Algorithm valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Tcp.AlternateChecksumRequest.Algorithm[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

TCP_CHECKSUM

public static final Tcp.AlternateChecksumRequest.Algorithm TCP_CHECKSUM
TCP checksum.


FLETCHER_8BIT

public static final Tcp.AlternateChecksumRequest.Algorithm FLETCHER_8BIT
8-bit Fletcher's algorithm.


FLETCHER_16BIT

public static final Tcp.AlternateChecksumRequest.Algorithm FLETCHER_16BIT
16-bit Fletcher's algorithm.


AVOIDANCE

public static final Tcp.AlternateChecksumRequest.Algorithm AVOIDANCE
Redundant Checksum Avoidance.

Field Detail

type

public final int type
Numerical type for this algorithm constant.

Method Detail

values

public static Tcp.AlternateChecksumRequest.Algorithm[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (Tcp.AlternateChecksumRequest.Algorithm c : Tcp.AlternateChecksumRequest.Algorithm.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Tcp.AlternateChecksumRequest.Algorithm valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

valueOf

public static Tcp.AlternateChecksumRequest.Algorithm valueOf(int type)
Converts a numerical algorithm type to enum constant.

Parameters:
type - numerical type
Returns:
enum constant type