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(Object obj)
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.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 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(Object obj)
- Overrides:
equals
in classBasePacket
-
deserializer
public static Deserializer<RouterSolicitation> deserializer()
Deserializer function for router solicitation packets.- Returns:
- deserializer function
-
-