public class ICMP extends BasePacket
| Modifier and Type | Field and Description | 
|---|---|
protected short | 
checksum  | 
static byte | 
CODE_ECHO_REPLY  | 
static byte | 
CODE_ECHO_REQEUST  | 
static short | 
ICMP_HEADER_LENGTH  | 
protected byte | 
icmpCode  | 
protected byte | 
icmpType  | 
static byte | 
TYPE_ECHO_REPLY  | 
static byte | 
TYPE_ECHO_REQUEST  | 
parent, payload| Constructor and Description | 
|---|
ICMP()  | 
| Modifier and Type | Method and Description | 
|---|---|
static Ethernet | 
buildIcmpReply(Ethernet ethRequest)
Builds an ICMP reply using the supplied ICMP request. 
 | 
static Deserializer<ICMP> | 
deserializer()
Deserializer function for ICMP packets. 
 | 
boolean | 
equals(Object obj)  | 
short | 
getChecksum()  | 
byte | 
getIcmpCode()  | 
byte | 
getIcmpType()  | 
int | 
hashCode()  | 
byte[] | 
serialize()
Serializes the packet. 
 | 
ICMP | 
setChecksum(short checksum)  | 
ICMP | 
setIcmpCode(byte icmpCode)  | 
ICMP | 
setIcmpType(byte icmpType)  | 
String | 
toString()  | 
clone, getParent, getPayload, resetChecksum, setParent, setPayloadprotected byte icmpType
protected byte icmpCode
protected short checksum
public static final byte TYPE_ECHO_REQUEST
public static final byte TYPE_ECHO_REPLY
public static final byte CODE_ECHO_REPLY
public static final byte CODE_ECHO_REQEUST
public static final short ICMP_HEADER_LENGTH
public byte getIcmpType()
public ICMP setIcmpType(byte icmpType)
icmpType - to setpublic byte getIcmpCode()
public ICMP setIcmpCode(byte icmpCode)
icmpCode - code to setpublic short getChecksum()
public ICMP setChecksum(short checksum)
checksum - the checksum to setpublic byte[] serialize()
public int hashCode()
hashCode in class BasePacketpublic boolean equals(Object obj)
equals in class BasePacketpublic static Deserializer<ICMP> deserializer()