Package nl.sidnlabs.pcap.util
Class ICMPv4Util
- java.lang.Object
-
- nl.sidnlabs.pcap.util.ICMPv4Util
-
public class ICMPv4Util extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static intICMP_CODE_OFFSETstatic intICMP_DATA_OFFSETstatic intICMP_ECHO_REQUEST_ID_OFFSETstatic intICMP_ECHO_REQUEST_PAYLOAD_OFFSETstatic intICMP_ECHO_REQUEST_SEQ_OFFSETstatic intICMP_HDR_LENstatic intICMP_REST_OF_HDR_LENstatic intICMP_REST_OF_HDR_OFFSETstatic intICMP_TYPE_OFFSET
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static shortdecodeCode(byte[] packetData)static shortdecodeType(byte[] packetData)static byte[]extractEchoRequestPayload(byte[] packetData)static byte[]extractPayload(byte[] packetData)static byte[]extractRestOfHeader(byte[] packetData)
-
-
-
Field Detail
-
ICMP_TYPE_OFFSET
public static final int ICMP_TYPE_OFFSET
- See Also:
- Constant Field Values
-
ICMP_CODE_OFFSET
public static final int ICMP_CODE_OFFSET
- See Also:
- Constant Field Values
-
ICMP_REST_OF_HDR_OFFSET
public static final int ICMP_REST_OF_HDR_OFFSET
- See Also:
- Constant Field Values
-
ICMP_REST_OF_HDR_LEN
public static final int ICMP_REST_OF_HDR_LEN
- See Also:
- Constant Field Values
-
ICMP_DATA_OFFSET
public static final int ICMP_DATA_OFFSET
- See Also:
- Constant Field Values
-
ICMP_HDR_LEN
public static final int ICMP_HDR_LEN
- See Also:
- Constant Field Values
-
ICMP_ECHO_REQUEST_ID_OFFSET
public static final int ICMP_ECHO_REQUEST_ID_OFFSET
- See Also:
- Constant Field Values
-
ICMP_ECHO_REQUEST_SEQ_OFFSET
public static final int ICMP_ECHO_REQUEST_SEQ_OFFSET
- See Also:
- Constant Field Values
-
ICMP_ECHO_REQUEST_PAYLOAD_OFFSET
public static final int ICMP_ECHO_REQUEST_PAYLOAD_OFFSET
- See Also:
- Constant Field Values
-
-
Method Detail
-
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)
-
-