Package org.onlab.packet
Class ICMP6
- java.lang.Object
-
- org.onlab.packet.BasePacket
-
- org.onlab.packet.ICMP6
-
- All Implemented Interfaces:
IPacket
public class ICMP6 extends BasePacket
Implements ICMPv6 packet format. (RFC 4443)
-
-
Field Summary
Fields Modifier and Type Field Description static byte
ADDR_UNREACH
Address unreachable.static byte
BEYOND_SCOPE
Beyond scope of source address.protected short
checksum
static byte
COMM_PROHIBIT
Communication with destination administratively prohibited.static byte
DEFRAG_TIME_EXCEED
Fragment reassembly time exceeded.static byte
DEST_UNREACH
Destination Unreachable.static byte
ECHO_REPLY
Echo Reply.static byte
ECHO_REQUEST
Echo Request.static byte
FAIL_POLICY
Source address failed ingress/egress policy.static byte
HDR_FIELD_ERR
Erroneous header field encountered.static byte
HEADER_LENGTH
static byte
HOP_LIMIT_EXCEED
Hop limit exceeded in transit.protected byte
icmpCode
protected byte
icmpType
static byte
IPV6_OPT_ERR
Unrecognized IPv6 option encountered.static byte
MCAST_DONE
Multicast Listener Done.static byte
MCAST_QUERY
Multicast Listener Query.static byte
MCAST_REPORT
Multicast Listener Report.static byte
NEIGHBOR_ADVERTISEMENT
Neighbor Advertisement.static byte
NEIGHBOR_SOLICITATION
Neighbor Solicitation.static byte
NEXT_HEADER_ERR
Unrecognized Next Header type encountered.static byte
NO_ROUTE
No route to destination.static byte
PARAM_ERR
Parameter Problem.static byte
PKT_TOO_BIG
Packet Too Big.static byte
PORT_UNREACH
Port unreachable.static byte
REDIRECT
Redirect Message.static byte
REJECT_ROUTE
Reject route to destination.static byte
ROUTER_ADVERTISEMENT
Router Advertisement.static byte
ROUTER_SOLICITATION
Router Solicitation.static byte
SRC_ROUTING_HEADER_ERR
Error in Source Routing Header.static byte
TIME_EXCEED
Time Exceeded.static java.util.Map<java.lang.Byte,Deserializer<? extends IPacket>>
TYPE_DESERIALIZER_MAP
-
Fields inherited from class org.onlab.packet.BasePacket
parent, payload
-
-
Constructor Summary
Constructors Constructor Description ICMP6()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Ethernet
buildIcmp6Reply(Ethernet ethRequest)
Builds an ICMPv6 reply using the supplied ICMPv6 request.static Deserializer<ICMP6>
deserializer()
Deserializer function for ICMPv6 packets.boolean
equals(java.lang.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.java.lang.String
toString()
-
Methods inherited from class org.onlab.packet.BasePacket
clone, getParent, getPayload, resetChecksum, setParent, setPayload
-
-
-
-
Field Detail
-
HEADER_LENGTH
public static final byte HEADER_LENGTH
- See Also:
- Constant Field Values
-
DEST_UNREACH
public static final byte DEST_UNREACH
Destination Unreachable.- See Also:
- Constant Field Values
-
PKT_TOO_BIG
public static final byte PKT_TOO_BIG
Packet Too Big.- See Also:
- Constant Field Values
-
TIME_EXCEED
public static final byte TIME_EXCEED
Time Exceeded.- See Also:
- Constant Field Values
-
PARAM_ERR
public static final byte PARAM_ERR
Parameter Problem.- See Also:
- Constant Field Values
-
ECHO_REQUEST
public static final byte ECHO_REQUEST
Echo Request.- See Also:
- Constant Field Values
-
ECHO_REPLY
public static final byte ECHO_REPLY
Echo Reply.- See Also:
- Constant Field Values
-
MCAST_QUERY
public static final byte MCAST_QUERY
Multicast Listener Query.- See Also:
- Constant Field Values
-
MCAST_REPORT
public static final byte MCAST_REPORT
Multicast Listener Report.- See Also:
- Constant Field Values
-
MCAST_DONE
public static final byte MCAST_DONE
Multicast Listener Done.- See Also:
- Constant Field Values
-
ROUTER_SOLICITATION
public static final byte ROUTER_SOLICITATION
Router Solicitation.- See Also:
- Constant Field Values
-
ROUTER_ADVERTISEMENT
public static final byte ROUTER_ADVERTISEMENT
Router Advertisement.- See Also:
- Constant Field Values
-
NEIGHBOR_SOLICITATION
public static final byte NEIGHBOR_SOLICITATION
Neighbor Solicitation.- See Also:
- Constant Field Values
-
NEIGHBOR_ADVERTISEMENT
public static final byte NEIGHBOR_ADVERTISEMENT
Neighbor Advertisement.- See Also:
- Constant Field Values
-
REDIRECT
public static final byte REDIRECT
Redirect Message.- See Also:
- Constant Field Values
-
NO_ROUTE
public static final byte NO_ROUTE
No route to destination.- See Also:
- Constant Field Values
-
COMM_PROHIBIT
public static final byte COMM_PROHIBIT
Communication with destination administratively prohibited.- See Also:
- Constant Field Values
-
BEYOND_SCOPE
public static final byte BEYOND_SCOPE
Beyond scope of source address.- See Also:
- Constant Field Values
-
ADDR_UNREACH
public static final byte ADDR_UNREACH
Address unreachable.- See Also:
- Constant Field Values
-
PORT_UNREACH
public static final byte PORT_UNREACH
Port unreachable.- See Also:
- Constant Field Values
-
FAIL_POLICY
public static final byte FAIL_POLICY
Source address failed ingress/egress policy.- See Also:
- Constant Field Values
-
REJECT_ROUTE
public static final byte REJECT_ROUTE
Reject route to destination.- See Also:
- Constant Field Values
-
SRC_ROUTING_HEADER_ERR
public static final byte SRC_ROUTING_HEADER_ERR
Error in Source Routing Header.- See Also:
- Constant Field Values
-
HOP_LIMIT_EXCEED
public static final byte HOP_LIMIT_EXCEED
Hop limit exceeded in transit.- See Also:
- Constant Field Values
-
DEFRAG_TIME_EXCEED
public static final byte DEFRAG_TIME_EXCEED
Fragment reassembly time exceeded.- See Also:
- Constant Field Values
-
HDR_FIELD_ERR
public static final byte HDR_FIELD_ERR
Erroneous header field encountered.- See Also:
- Constant Field Values
-
NEXT_HEADER_ERR
public static final byte NEXT_HEADER_ERR
Unrecognized Next Header type encountered.- See Also:
- Constant Field Values
-
IPV6_OPT_ERR
public static final byte IPV6_OPT_ERR
Unrecognized IPv6 option encountered.- See Also:
- Constant Field Values
-
TYPE_DESERIALIZER_MAP
public static final java.util.Map<java.lang.Byte,Deserializer<? extends IPacket>> TYPE_DESERIALIZER_MAP
-
icmpType
protected byte icmpType
-
icmpCode
protected byte icmpCode
-
checksum
protected short checksum
-
-
Method Detail
-
getIcmpType
public byte getIcmpType()
Gets ICMP6 type.- Returns:
- the ICMP6 type
-
setIcmpType
public ICMP6 setIcmpType(byte icmpType)
Sets ICMP6 type.- Parameters:
icmpType
- the ICMP type to set- Returns:
- this
-
getIcmpCode
public byte getIcmpCode()
Gets ICMP6 code.- Returns:
- the ICMP6 code
-
setIcmpCode
public ICMP6 setIcmpCode(byte icmpCode)
Sets ICMP6 code.- Parameters:
icmpCode
- the ICMP6 code to set- Returns:
- this
-
getChecksum
public short getChecksum()
Gets checksum.- Returns:
- the checksum
-
setChecksum
public ICMP6 setChecksum(short checksum)
Sets checksum.- Parameters:
checksum
- the checksum to set- Returns:
- this
-
serialize
public byte[] serialize()
Description copied from interface:IPacket
Sets all payloads parent packet if applicable, then serializes this packet and all payloads.- Returns:
- a byte[] containing this packet and payloads
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classBasePacket
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classBasePacket
-
deserializer
public static Deserializer<ICMP6> deserializer()
Deserializer function for ICMPv6 packets.- Returns:
- deserializer function
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-