Package org.onlab.packet
Class RIPngEntry
- java.lang.Object
-
- org.onlab.packet.BasePacket
-
- org.onlab.packet.RIPngEntry
-
- All Implemented Interfaces:
IPacket
public class RIPngEntry extends BasePacket
Default DHCP option.
-
-
Field Summary
Fields Modifier and Type Field Description static int
ENTRY_LEN
static byte
INFINITY_METRIC
protected int
metric
static int
NEXTHOP_METRIC
static int
OPT_CODE_LEN
protected byte[]
prefix
protected int
prefixLen
protected short
routeTag
-
Fields inherited from class org.onlab.packet.BasePacket
parent, payload
-
-
Constructor Summary
Constructors Constructor Description RIPngEntry()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Deserializer<RIPngEntry>
deserializer()
Deserializer function for RIPng entry.boolean
equals(java.lang.Object obj)
int
getMetric()
byte[]
getPrefix()
int
getPrefixLen()
short
getRouteTag()
int
hashCode()
byte[]
serialize()
Sets all payloads parent packet if applicable, then serializes this packet and all payloads.RIPngEntry
setMetric(int metric)
RIPngEntry
setPrefix(byte[] prefix)
RIPngEntry
setPrefixLen(int prefixlen)
RIPngEntry
setRouteTag(short routetag)
java.lang.String
toString()
-
Methods inherited from class org.onlab.packet.BasePacket
clone, getParent, getPayload, resetChecksum, setParent, setPayload
-
-
-
-
Field Detail
-
OPT_CODE_LEN
public static final int OPT_CODE_LEN
- See Also:
- Constant Field Values
-
ENTRY_LEN
public static final int ENTRY_LEN
- See Also:
- Constant Field Values
-
INFINITY_METRIC
public static final byte INFINITY_METRIC
- See Also:
- Constant Field Values
-
NEXTHOP_METRIC
public static final int NEXTHOP_METRIC
- See Also:
- Constant Field Values
-
prefix
protected byte[] prefix
-
routeTag
protected short routeTag
-
prefixLen
protected int prefixLen
-
metric
protected int metric
-
-
Method Detail
-
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
-
deserializer
public static Deserializer<RIPngEntry> deserializer()
Deserializer function for RIPng entry.- Returns:
- deserializer function
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classBasePacket
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classBasePacket
-
getPrefix
public byte[] getPrefix()
- Returns:
- the IPv6 prefix
-
setPrefix
public RIPngEntry setPrefix(byte[] prefix)
- Parameters:
prefix
- the IPv6 prefix to set- Returns:
- this
-
getRouteTag
public short getRouteTag()
- Returns:
- the route tag
-
setRouteTag
public RIPngEntry setRouteTag(short routetag)
- Parameters:
routetag
- the route tag to set- Returns:
- this
-
getPrefixLen
public int getPrefixLen()
- Returns:
- the prefix length
-
setPrefixLen
public RIPngEntry setPrefixLen(int prefixlen)
- Parameters:
prefixlen
- the prefix length to set- Returns:
- this
-
getMetric
public int getMetric()
- Returns:
- the metric
-
setMetric
public RIPngEntry setMetric(int metric)
- Parameters:
metric
- the route metric to set- Returns:
- this
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-