Package nl.sidnlabs.pcap.util
Class ICMPv4Util
java.lang.Object
nl.sidnlabs.pcap.util.ICMPv4Util
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final int -
Method Summary
Modifier and TypeMethodDescriptionstatic shortdecodeCode(byte[] packetData) static shortdecodeType(byte[] packetData) static byte[]extractEchoRequestPayload(byte[] packetData) static byte[]extractPayload(byte[] packetData) static byte[]extractRestOfHeader(byte[] packetData)
-
Field Details
-
ICMP_TYPE_OFFSET
public static final int ICMP_TYPE_OFFSET- See Also:
-
ICMP_CODE_OFFSET
public static final int ICMP_CODE_OFFSET- See Also:
-
ICMP_REST_OF_HDR_OFFSET
public static final int ICMP_REST_OF_HDR_OFFSET- See Also:
-
ICMP_REST_OF_HDR_LEN
public static final int ICMP_REST_OF_HDR_LEN- See Also:
-
ICMP_DATA_OFFSET
public static final int ICMP_DATA_OFFSET- See Also:
-
ICMP_HDR_LEN
public static final int ICMP_HDR_LEN- See Also:
-
ICMP_ECHO_REQUEST_ID_OFFSET
public static final int ICMP_ECHO_REQUEST_ID_OFFSET- See Also:
-
ICMP_ECHO_REQUEST_SEQ_OFFSET
public static final int ICMP_ECHO_REQUEST_SEQ_OFFSET- See Also:
-
ICMP_ECHO_REQUEST_PAYLOAD_OFFSET
public static final int ICMP_ECHO_REQUEST_PAYLOAD_OFFSET- See Also:
-
-
Method Details
-
decodeType
public static short decodeType(byte[] packetData) -
decodeCode
public static short decodeCode(byte[] packetData) -
extractRestOfHeader
public static byte[] extractRestOfHeader(byte[] packetData) -
extractPayload
public static byte[] extractPayload(byte[] packetData) -
extractEchoRequestPayload
public static byte[] extractEchoRequestPayload(byte[] packetData)
-