Package org.onlab.packet.ndp
Class NeighborDiscoveryOptions
- java.lang.Object
-
- org.onlab.packet.BasePacket
-
- org.onlab.packet.ndp.NeighborDiscoveryOptions
-
- All Implemented Interfaces:
IPacket
public class NeighborDiscoveryOptions extends BasePacket
Neighbor Discovery Protocol packet options.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
NeighborDiscoveryOptions.Option
Packet option.
-
Field Summary
Fields Modifier and Type Field Description static byte
INITIAL_HEADER_REQUIRED
static byte
TYPE_MTU
static byte
TYPE_PREFIX_INFORMATION
static byte
TYPE_REDIRECTED_HEADER
static byte
TYPE_SOURCE_LL_ADDRESS
static byte
TYPE_TARGET_LL_ADDRESS
-
Fields inherited from class org.onlab.packet.BasePacket
parent, payload
-
-
Constructor Summary
Constructors Constructor Description NeighborDiscoveryOptions()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description NeighborDiscoveryOptions
addOption(byte type, byte[] data)
Adds a Neighbor Discovery Protocol packet option.static Deserializer<NeighborDiscoveryOptions>
deserializer()
boolean
equals(java.lang.Object obj)
int
hashCode()
boolean
hasOptions()
Checks whether any options are included.java.util.List<NeighborDiscoveryOptions.Option>
options()
Gets the Neighbor Discovery Protocol packet options.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
-
TYPE_SOURCE_LL_ADDRESS
public static final byte TYPE_SOURCE_LL_ADDRESS
- See Also:
- Constant Field Values
-
TYPE_TARGET_LL_ADDRESS
public static final byte TYPE_TARGET_LL_ADDRESS
- See Also:
- Constant Field Values
-
TYPE_PREFIX_INFORMATION
public static final byte TYPE_PREFIX_INFORMATION
- See Also:
- Constant Field Values
-
TYPE_REDIRECTED_HEADER
public static final byte TYPE_REDIRECTED_HEADER
- See Also:
- Constant Field Values
-
TYPE_MTU
public static final byte TYPE_MTU
- See Also:
- Constant Field Values
-
INITIAL_HEADER_REQUIRED
public static final byte INITIAL_HEADER_REQUIRED
- See Also:
- Constant Field Values
-
-
Method Detail
-
addOption
public NeighborDiscoveryOptions addOption(byte type, byte[] data)
Adds a Neighbor Discovery Protocol packet option.- Parameters:
type
- the option typedata
- the option data- Returns:
- this
-
options
public java.util.List<NeighborDiscoveryOptions.Option> options()
Gets the Neighbor Discovery Protocol packet options.- Returns:
- the Neighbor Discovery Protocol packet options
-
hasOptions
public boolean hasOptions()
Checks whether any options are included.- Returns:
- true if options are included, otherwise false
-
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<NeighborDiscoveryOptions> deserializer()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-