Package org.onlab.packet.ndp
Class RouterSolicitation
- java.lang.Object
-
- org.onlab.packet.BasePacket
-
- org.onlab.packet.ndp.RouterSolicitation
-
- All Implemented Interfaces:
IPacket
public class RouterSolicitation extends BasePacket
Implements ICMPv6 Router Solicitation packet format. (RFC 4861)
-
-
Field Summary
Fields Modifier and Type Field Description static byte
HEADER_LENGTH
-
Fields inherited from class org.onlab.packet.BasePacket
parent, payload
-
-
Constructor Summary
Constructors Constructor Description RouterSolicitation()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description RouterSolicitation
addOption(byte type, byte[] data)
Adds a Neighbor Discovery Protocol packet option.static Deserializer<RouterSolicitation>
deserializer()
Deserializer function for router solicitation packets.boolean
equals(java.lang.Object obj)
java.util.List<NeighborDiscoveryOptions.Option>
getOptions()
Gets the Neighbor Discovery Protocol packet options.int
hashCode()
byte[]
serialize()
Sets all payloads parent packet if applicable, then serializes this packet and all payloads.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
-
-
Method Detail
-
getOptions
public java.util.List<NeighborDiscoveryOptions.Option> getOptions()
Gets the Neighbor Discovery Protocol packet options.- Returns:
- the Neighbor Discovery Protocol packet options
-
addOption
public RouterSolicitation addOption(byte type, byte[] data)
Adds a Neighbor Discovery Protocol packet option.- Parameters:
type
- the option typedata
- the option data- 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<RouterSolicitation> deserializer()
Deserializer function for router solicitation packets.- Returns:
- deserializer function
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-