public class ICMP6 extends BasePacket
| Modifier and Type | Field and Description |
|---|---|
protected short |
checksum |
static byte |
HEADER_LENGTH |
protected byte |
icmpCode |
protected byte |
icmpType |
static byte |
NEIGHBOR_ADVERTISEMENT |
static byte |
NEIGHBOR_SOLICITATION |
static Map<Byte,Class<? extends IPacket>> |
PROTOCOL_CLASS_MAP |
static byte |
REDIRECT |
static byte |
ROUTER_ADVERTISEMENT |
static byte |
ROUTER_SOLICITATION |
parent, payload| Constructor and Description |
|---|
ICMP6() |
| Modifier and Type | Method and Description |
|---|---|
IPacket |
deserialize(byte[] data,
int offset,
int length)
Deserializes this packet layer and all possible payloads.
|
boolean |
equals(Object obj) |
short |
getChecksum()
Gets checksum.
|
byte |
getIcmpCode()
Gets ICMP6 code.
|
byte |
getIcmpType()
Gets ICMP6 type.
|
int |
hashCode() |
byte[] |
serialize()
Sets all payloads parent packet if applicable, then serializes this
packet and all payloads.
|
ICMP6 |
setChecksum(short checksum)
Sets checksum.
|
ICMP6 |
setIcmpCode(byte icmpCode)
Sets ICMP6 code.
|
ICMP6 |
setIcmpType(byte icmpType)
Sets ICMP6 type.
|
clone, getParent, getPayload, resetChecksum, setParent, setPayloadpublic static final byte HEADER_LENGTH
public static final byte ROUTER_SOLICITATION
public static final byte ROUTER_ADVERTISEMENT
public static final byte NEIGHBOR_SOLICITATION
public static final byte NEIGHBOR_ADVERTISEMENT
public static final byte REDIRECT
protected byte icmpType
protected byte icmpCode
protected short checksum
public byte getIcmpType()
public ICMP6 setIcmpType(byte icmpType)
icmpType - the ICMP type to setpublic byte getIcmpCode()
public ICMP6 setIcmpCode(byte icmpCode)
icmpCode - the ICMP6 code to setpublic short getChecksum()
public ICMP6 setChecksum(short checksum)
checksum - the checksum to setpublic byte[] serialize()
IPacketpublic int hashCode()
hashCode in class BasePacketpublic boolean equals(Object obj)
equals in class BasePacketpublic IPacket deserialize(byte[] data, int offset, int length)
IPacketdata - bytes to deserializeoffset - offset to start deserializing fromlength - length of the data to deserializeCopyright © 2015. All rights reserved.