org.jnetpcap.protocol.network
Enum Icmp.IcmpCode

java.lang.Object
  extended by java.lang.Enum<Icmp.IcmpCode>
      extended by org.jnetpcap.protocol.network.Icmp.IcmpCode
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Icmp.IcmpCode>
Enclosing class:
Icmp

public static enum Icmp.IcmpCode
extends java.lang.Enum<Icmp.IcmpCode>

A table of Icmp sub-codes per Icmp type.

Author:
Mark Bednarczyk, Sly Technologies, Inc.

Enum Constant Summary
DESTINATION_HOST_ADMIN_PROHIBITED
          The DESTINATIO n_ hos t_ admi n_ prohibited.
DESTINATION_HOST_ISOLATED
          The DESTINATIO n_ hos t_ isolated.
DESTINATION_HOST_UNKNOWN
          The DESTINATIO n_ hos t_ unknown.
DESTINATION_HOST_UNREACHABLE_FOR_SERVICE
          The DESTINATIO n_ hos t_ unreachabl e_ fo r_ service.
DESTINATION_NETWORK_ADMIN_PROHIBITED
          The DESTINATIO n_ networ k_ admi n_ prohibited.
DESTINATION_NETWORK_REDIRECT
          The DESTINATIO n_ networ k_ redirect.
DESTINATION_NETWORK_UNREACHABLE
          The DESTINATIO n_ networ k_ unreachable.
DESTINATION_NETWORK_UNREACHABLE_FOR_SERVICE
          The DESTINATIO n_ networ k_ unreachabl e_ fo r_ service.
DESTINATION_NO_FRAG
          The DESTINATIO n_ n o_ frag.
DESTINATION_PORT_UNREACHABLE
          The DESTINATIO n_ por t_ unreachable.
DESTINATION_PROTOCOL_UNREACHABLE
          The DESTINATIO n_ protoco l_ unreachable.
DESTINATION_SOURCE_ROUTE
          The DESTINATIO n_ sourc e_ route.
PARAMETER_PROBLEM_MISSING_OPTION
          The PARAMETE r_ proble m_ missin g_ option.
PARAMETER_PROBLEM_WITH_DATAGRAM
          The PARAMETE r_ proble m_ wit h_ datagram.
REDIRECT_HOST
          The REDIREC t_ host.
REDIRECT_NETWORK
          The REDIREC t_ network.
REDIRECT_SERVICE_AND_HOST
          The REDIREC t_ servic e_ an d_ host.
REDIRECT_SERVICE_AND_NETWORK
          The REDIREC t_ servic e_ an d_ network.
TIME_EXCEEDED_DURING_FRAG_REASSEMBLY
          The TIM e_ exceede d_ durin g_ fra g_ reassembly.
TIME_EXCEEDED_IN_TRANSIT
          The TIM e_ exceede d_ i n_ transit.
 
Method Summary
 int getCode()
          Gets the code.
 java.lang.String getDescription()
          Gets the description.
 Icmp.IcmpType getType()
          Gets the type.
static java.lang.String toString(int type, int code)
          To string.
static Icmp.IcmpCode valueOf(int type, int code)
          Value of.
static Icmp.IcmpCode valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Icmp.IcmpCode[] 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

DESTINATION_HOST_ADMIN_PROHIBITED

public static final Icmp.IcmpCode DESTINATION_HOST_ADMIN_PROHIBITED
The DESTINATIO n_ hos t_ admi n_ prohibited.


DESTINATION_HOST_ISOLATED

public static final Icmp.IcmpCode DESTINATION_HOST_ISOLATED
The DESTINATIO n_ hos t_ isolated.


DESTINATION_HOST_UNKNOWN

public static final Icmp.IcmpCode DESTINATION_HOST_UNKNOWN
The DESTINATIO n_ hos t_ unknown.


DESTINATION_HOST_UNREACHABLE_FOR_SERVICE

public static final Icmp.IcmpCode DESTINATION_HOST_UNREACHABLE_FOR_SERVICE
The DESTINATIO n_ hos t_ unreachabl e_ fo r_ service.


DESTINATION_NETWORK_ADMIN_PROHIBITED

public static final Icmp.IcmpCode DESTINATION_NETWORK_ADMIN_PROHIBITED
The DESTINATIO n_ networ k_ admi n_ prohibited.


DESTINATION_NETWORK_REDIRECT

public static final Icmp.IcmpCode DESTINATION_NETWORK_REDIRECT
The DESTINATIO n_ networ k_ redirect.


DESTINATION_NETWORK_UNREACHABLE

public static final Icmp.IcmpCode DESTINATION_NETWORK_UNREACHABLE
The DESTINATIO n_ networ k_ unreachable.


DESTINATION_NETWORK_UNREACHABLE_FOR_SERVICE

public static final Icmp.IcmpCode DESTINATION_NETWORK_UNREACHABLE_FOR_SERVICE
The DESTINATIO n_ networ k_ unreachabl e_ fo r_ service.


DESTINATION_NO_FRAG

public static final Icmp.IcmpCode DESTINATION_NO_FRAG
The DESTINATIO n_ n o_ frag.


DESTINATION_PORT_UNREACHABLE

public static final Icmp.IcmpCode DESTINATION_PORT_UNREACHABLE
The DESTINATIO n_ por t_ unreachable.


DESTINATION_PROTOCOL_UNREACHABLE

public static final Icmp.IcmpCode DESTINATION_PROTOCOL_UNREACHABLE
The DESTINATIO n_ protoco l_ unreachable.


DESTINATION_SOURCE_ROUTE

public static final Icmp.IcmpCode DESTINATION_SOURCE_ROUTE
The DESTINATIO n_ sourc e_ route.


PARAMETER_PROBLEM_MISSING_OPTION

public static final Icmp.IcmpCode PARAMETER_PROBLEM_MISSING_OPTION
The PARAMETE r_ proble m_ missin g_ option.


PARAMETER_PROBLEM_WITH_DATAGRAM

public static final Icmp.IcmpCode PARAMETER_PROBLEM_WITH_DATAGRAM
The PARAMETE r_ proble m_ wit h_ datagram.


REDIRECT_HOST

public static final Icmp.IcmpCode REDIRECT_HOST
The REDIREC t_ host.


REDIRECT_NETWORK

public static final Icmp.IcmpCode REDIRECT_NETWORK
The REDIREC t_ network.


REDIRECT_SERVICE_AND_HOST

public static final Icmp.IcmpCode REDIRECT_SERVICE_AND_HOST
The REDIREC t_ servic e_ an d_ host.


REDIRECT_SERVICE_AND_NETWORK

public static final Icmp.IcmpCode REDIRECT_SERVICE_AND_NETWORK
The REDIREC t_ servic e_ an d_ network.


TIME_EXCEEDED_DURING_FRAG_REASSEMBLY

public static final Icmp.IcmpCode TIME_EXCEEDED_DURING_FRAG_REASSEMBLY
The TIM e_ exceede d_ durin g_ fra g_ reassembly.


TIME_EXCEEDED_IN_TRANSIT

public static final Icmp.IcmpCode TIME_EXCEEDED_IN_TRANSIT
The TIM e_ exceede d_ i n_ transit.

Method Detail

values

public static Icmp.IcmpCode[] 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 (Icmp.IcmpCode c : Icmp.IcmpCode.values())
    System.out.println(c);

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

valueOf

public static Icmp.IcmpCode 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

toString

public static java.lang.String toString(int type,
                                        int code)
To string.

Parameters:
type - the type
code - the code
Returns:
the string

valueOf

public static Icmp.IcmpCode valueOf(int type,
                                    int code)
Value of.

Parameters:
type - the type
code - the code
Returns:
the icmp code

getCode

public final int getCode()
Gets the code.

Returns:
the code

getDescription

public final java.lang.String getDescription()
Gets the description.

Returns:
the description

getType

public final Icmp.IcmpType getType()
Gets the type.

Returns:
the type