Package org.pcap4j.packet.namednumber
Class IcmpV4Code
- java.lang.Object
-
- org.pcap4j.packet.namednumber.NamedNumber<java.lang.Byte,IcmpV4Code>
-
- org.pcap4j.packet.namednumber.IcmpV4Code
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<IcmpV4Code>
public final class IcmpV4Code extends NamedNumber<java.lang.Byte,IcmpV4Code>
ICMPv4 Code- Since:
- pcap4j 0.9.11
- Author:
- Kaito Yamada
- See Also:
- IANA Registry, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static IcmpV4Code
ALTERNATE_ADDRESS_FOR_HOST
[Type 6 — Alternate Host Address] Alternate Address for Host: 0static IcmpV4Code
AUTHENTICATION_FAILED
[Type 40 — Photuris] Authentication Failed: 1static IcmpV4Code
BAD_LENGTH
[Type 12 — Parameter Problem] Bad Length: 2static IcmpV4Code
BAD_SPI
[Type 40 — Photuris] Bad SPI: 0static IcmpV4Code
COMMUNICATION_PROHIBITED
[Type 3 — Destination Unreachable] Communication administratively prohibited by filtering: 13static IcmpV4Code
DECOMPRESSION_FAILED
[Type 40 — Photuris] Decompression Failed: 2static IcmpV4Code
DECRYPTION_FAILED
[Type 40 — Photuris] Decryption Failed: 3static IcmpV4Code
DOES_NOT_ROUTE_COMMON_TRAFFIC
[Type 9 — Router Advertisement] Alternate Address for Host: 16static IcmpV4Code
DST_HOST_PROHIBITED
[Type 3 — Destination Unreachable] Destination host administratively prohibited: 10static IcmpV4Code
DST_HOST_UNKNOWN
[Type 3 — Destination Unreachable] Destination host unknown: 7static IcmpV4Code
DST_HOST_UNREACHABLE_FOR_TOS
[Type 3 — Destination Unreachable] Host unreachable for TOS: 12static IcmpV4Code
DST_NETWORK_PROHIBITED
[Type 3 — Destination Unreachable] Destination network administratively prohibited: 9static IcmpV4Code
DST_NETWORK_UNKNOWN
[Type 3 — Destination Unreachable] Destination network unknown: 6static IcmpV4Code
DST_NETWORK_UNREACHABLE_FOR_TOS
[Type 3 — Destination Unreachable] Network unreachable for TOS: 11static IcmpV4Code
FRAGMENT_REASSEMBLY_TIME_EXCEEDED
[Type 11 — Time Exceeded] Fragment Reassembly Time Exceeded: 1static IcmpV4Code
FRAGMENTATION_BLOCKED
[Type 3 — Destination Unreachable] Fragmentation needed but no fragment bit set: 4static IcmpV4Code
HOST_PRECEDENCE_VIOLATION
[Type 3 — Destination Unreachable] Host precedence violation: 14static IcmpV4Code
HOST_UNREACHABLE
[Type 3 — Destination Unreachable] Host Unreachable: 1static IcmpV4Code
MISSING_REQUIRED_OPTION
[Type 12 — Parameter Problem] Missing a Required Option: 1static IcmpV4Code
NEED_AUTHENTICATION
[Type 40 — Photuris] Need Authentication: 4static IcmpV4Code
NEED_AUTHORIZATION
[Type 40 — Photuris] Need Authorization: 5static IcmpV4Code
NETWORK_UNREACHABLE
[Type 3 — Destination Unreachable] Network Unreachable: 0static IcmpV4Code
NO_CODE
No Code: 0static IcmpV4Code
NORMAL_ROUTER_ADVERTISEMENT
[Type 9 — Router Advertisement] Normal router advertisement: 0static IcmpV4Code
POINTER_INDICATES_ERROR
[Type 12 — Parameter Problem] Pointer indicates the error: 0static IcmpV4Code
PORT_UNREACHABLE
[Type 3 — Destination Unreachable] Port Unreachable: 3static IcmpV4Code
PRECEDENCE_CUTOFF_IN_EFFECT
[Type 3 — Destination Unreachable] Precedence cutoff in effect: 15static IcmpV4Code
PROTOCOL_UNREACHABLE
[Type 3 — Destination Unreachable] Protocol Unreachable: 2static IcmpV4Code
REDIRECT_DATAGRAMS_FOR_HOST
[Type 5 — Redirect] Redirect datagrams for the Host: 1static IcmpV4Code
REDIRECT_DATAGRAMS_FOR_NETWORK
[Type 5 — Redirect] Redirect datagrams for the Network: 0static IcmpV4Code
REDIRECT_DATAGRAMS_FOR_TOS_AND_HOST
[Type 5 — Redirect] Redirect datagrams for the Type of Service and Host: 3static IcmpV4Code
REDIRECT_DATAGRAMS_FOR_TOS_AND_NETWORK
[Type 5 — Redirect] Redirect datagrams for the Type of Service and Network: 2static IcmpV4Code
SRC_HOST_ISOLATED
[Type 3 — Destination Unreachable] Source host isolated: 8static IcmpV4Code
SRC_ROUTE_FAILED
[Type 3 — Destination Unreachable] Source routing failed: 5static IcmpV4Code
TIME_TO_LIVE_EXCEEDED
[Type 11 — Time Exceeded] Time to Live exceeded during transit: 0
-
Constructor Summary
Constructors Constructor Description IcmpV4Code(java.lang.Byte value, java.lang.String name)
-
Method Summary
Modifier and Type Method Description int
compareTo(IcmpV4Code o)
static IcmpV4Code
getInstance(java.lang.Byte type, java.lang.Byte value)
static IcmpV4Code
register(IcmpV4Type type, IcmpV4Code code)
java.lang.String
valueAsString()
-
-
-
Field Detail
-
NO_CODE
public static final IcmpV4Code NO_CODE
No Code: 0
-
NETWORK_UNREACHABLE
public static final IcmpV4Code NETWORK_UNREACHABLE
[Type 3 — Destination Unreachable] Network Unreachable: 0
-
HOST_UNREACHABLE
public static final IcmpV4Code HOST_UNREACHABLE
[Type 3 — Destination Unreachable] Host Unreachable: 1
-
PROTOCOL_UNREACHABLE
public static final IcmpV4Code PROTOCOL_UNREACHABLE
[Type 3 — Destination Unreachable] Protocol Unreachable: 2
-
PORT_UNREACHABLE
public static final IcmpV4Code PORT_UNREACHABLE
[Type 3 — Destination Unreachable] Port Unreachable: 3
-
FRAGMENTATION_BLOCKED
public static final IcmpV4Code FRAGMENTATION_BLOCKED
[Type 3 — Destination Unreachable] Fragmentation needed but no fragment bit set: 4
-
SRC_ROUTE_FAILED
public static final IcmpV4Code SRC_ROUTE_FAILED
[Type 3 — Destination Unreachable] Source routing failed: 5
-
DST_NETWORK_UNKNOWN
public static final IcmpV4Code DST_NETWORK_UNKNOWN
[Type 3 — Destination Unreachable] Destination network unknown: 6
-
DST_HOST_UNKNOWN
public static final IcmpV4Code DST_HOST_UNKNOWN
[Type 3 — Destination Unreachable] Destination host unknown: 7
-
SRC_HOST_ISOLATED
public static final IcmpV4Code SRC_HOST_ISOLATED
[Type 3 — Destination Unreachable] Source host isolated: 8
-
DST_NETWORK_PROHIBITED
public static final IcmpV4Code DST_NETWORK_PROHIBITED
[Type 3 — Destination Unreachable] Destination network administratively prohibited: 9
-
DST_HOST_PROHIBITED
public static final IcmpV4Code DST_HOST_PROHIBITED
[Type 3 — Destination Unreachable] Destination host administratively prohibited: 10
-
DST_NETWORK_UNREACHABLE_FOR_TOS
public static final IcmpV4Code DST_NETWORK_UNREACHABLE_FOR_TOS
[Type 3 — Destination Unreachable] Network unreachable for TOS: 11
-
DST_HOST_UNREACHABLE_FOR_TOS
public static final IcmpV4Code DST_HOST_UNREACHABLE_FOR_TOS
[Type 3 — Destination Unreachable] Host unreachable for TOS: 12
-
COMMUNICATION_PROHIBITED
public static final IcmpV4Code COMMUNICATION_PROHIBITED
[Type 3 — Destination Unreachable] Communication administratively prohibited by filtering: 13
-
HOST_PRECEDENCE_VIOLATION
public static final IcmpV4Code HOST_PRECEDENCE_VIOLATION
[Type 3 — Destination Unreachable] Host precedence violation: 14
-
PRECEDENCE_CUTOFF_IN_EFFECT
public static final IcmpV4Code PRECEDENCE_CUTOFF_IN_EFFECT
[Type 3 — Destination Unreachable] Precedence cutoff in effect: 15
-
REDIRECT_DATAGRAMS_FOR_NETWORK
public static final IcmpV4Code REDIRECT_DATAGRAMS_FOR_NETWORK
[Type 5 — Redirect] Redirect datagrams for the Network: 0
-
REDIRECT_DATAGRAMS_FOR_HOST
public static final IcmpV4Code REDIRECT_DATAGRAMS_FOR_HOST
[Type 5 — Redirect] Redirect datagrams for the Host: 1
-
REDIRECT_DATAGRAMS_FOR_TOS_AND_NETWORK
public static final IcmpV4Code REDIRECT_DATAGRAMS_FOR_TOS_AND_NETWORK
[Type 5 — Redirect] Redirect datagrams for the Type of Service and Network: 2
-
REDIRECT_DATAGRAMS_FOR_TOS_AND_HOST
public static final IcmpV4Code REDIRECT_DATAGRAMS_FOR_TOS_AND_HOST
[Type 5 — Redirect] Redirect datagrams for the Type of Service and Host: 3
-
ALTERNATE_ADDRESS_FOR_HOST
public static final IcmpV4Code ALTERNATE_ADDRESS_FOR_HOST
[Type 6 — Alternate Host Address] Alternate Address for Host: 0
-
NORMAL_ROUTER_ADVERTISEMENT
public static final IcmpV4Code NORMAL_ROUTER_ADVERTISEMENT
[Type 9 — Router Advertisement] Normal router advertisement: 0
-
DOES_NOT_ROUTE_COMMON_TRAFFIC
public static final IcmpV4Code DOES_NOT_ROUTE_COMMON_TRAFFIC
[Type 9 — Router Advertisement] Alternate Address for Host: 16
-
TIME_TO_LIVE_EXCEEDED
public static final IcmpV4Code TIME_TO_LIVE_EXCEEDED
[Type 11 — Time Exceeded] Time to Live exceeded during transit: 0
-
FRAGMENT_REASSEMBLY_TIME_EXCEEDED
public static final IcmpV4Code FRAGMENT_REASSEMBLY_TIME_EXCEEDED
[Type 11 — Time Exceeded] Fragment Reassembly Time Exceeded: 1
-
POINTER_INDICATES_ERROR
public static final IcmpV4Code POINTER_INDICATES_ERROR
[Type 12 — Parameter Problem] Pointer indicates the error: 0
-
MISSING_REQUIRED_OPTION
public static final IcmpV4Code MISSING_REQUIRED_OPTION
[Type 12 — Parameter Problem] Missing a Required Option: 1
-
BAD_LENGTH
public static final IcmpV4Code BAD_LENGTH
[Type 12 — Parameter Problem] Bad Length: 2
-
BAD_SPI
public static final IcmpV4Code BAD_SPI
[Type 40 — Photuris] Bad SPI: 0
-
AUTHENTICATION_FAILED
public static final IcmpV4Code AUTHENTICATION_FAILED
[Type 40 — Photuris] Authentication Failed: 1
-
DECOMPRESSION_FAILED
public static final IcmpV4Code DECOMPRESSION_FAILED
[Type 40 — Photuris] Decompression Failed: 2
-
DECRYPTION_FAILED
public static final IcmpV4Code DECRYPTION_FAILED
[Type 40 — Photuris] Decryption Failed: 3
-
NEED_AUTHENTICATION
public static final IcmpV4Code NEED_AUTHENTICATION
[Type 40 — Photuris] Need Authentication: 4
-
NEED_AUTHORIZATION
public static final IcmpV4Code NEED_AUTHORIZATION
[Type 40 — Photuris] Need Authorization: 5
-
-
Method Detail
-
getInstance
public static IcmpV4Code getInstance(java.lang.Byte type, java.lang.Byte value)
- Parameters:
type
- ICMPv4 typevalue
- value- Returns:
- a IcmpV4Code object.
-
register
public static IcmpV4Code register(IcmpV4Type type, IcmpV4Code code)
- Parameters:
type
- typecode
- code- Returns:
- a IcmpV4Code object.
-
valueAsString
public java.lang.String valueAsString()
- Overrides:
valueAsString
in classNamedNumber<java.lang.Byte,IcmpV4Code>
- Returns:
- a string representation of this value.
-
compareTo
public int compareTo(IcmpV4Code o)
- Specified by:
compareTo
in interfacejava.lang.Comparable<IcmpV4Code>
- Specified by:
compareTo
in classNamedNumber<java.lang.Byte,IcmpV4Code>
-
-