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 byteHEADER_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 RouterSolicitationaddOption(byte type, byte[] data)Adds a Neighbor Discovery Protocol packet option.static Deserializer<RouterSolicitation>deserializer()Deserializer function for router solicitation packets.booleanequals(java.lang.Object obj)java.util.List<NeighborDiscoveryOptions.Option>getOptions()Gets the Neighbor Discovery Protocol packet options.inthashCode()byte[]serialize()Sets all payloads parent packet if applicable, then serializes this packet and all payloads.java.lang.StringtoString()-
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:IPacketSets 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:
hashCodein classBasePacket
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classBasePacket
-
deserializer
public static Deserializer<RouterSolicitation> deserializer()
Deserializer function for router solicitation packets.- Returns:
- deserializer function
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-