Package org.onlab.packet
Class RIPng
- java.lang.Object
-
- org.onlab.packet.BasePacket
-
- org.onlab.packet.RIPng
-
- All Implemented Interfaces:
IPacket
public class RIPng extends BasePacket
Representation of an RIPng Packet.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RIPng.CmdType
-
Field Summary
Fields Modifier and Type Field Description protected byte
cmdType
static int
MIN_HEADER_LENGTH
Routing Information Protocol Next Generation packet.protected short
reserved
protected java.util.List<RIPngEntry>
rtEntries
protected byte
version
-
Fields inherited from class org.onlab.packet.BasePacket
parent, payload
-
-
Constructor Summary
Constructors Constructor Description RIPng()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Deserializer<RIPng>
deserializer()
Deserializer function for RIPng packets.boolean
equals(java.lang.Object obj)
byte
getCmdType()
short
getReserved()
java.util.List<RIPngEntry>
getRtEntries()
byte
getVersion()
int
hashCode()
byte[]
serialize()
Sets all payloads parent packet if applicable, then serializes this packet and all payloads.RIPng
setCmdType(byte cmdType)
RIPng
setReserved(short reserved)
RIPng
setRtEntries(java.util.List<RIPngEntry> entries)
RIPng
setVersion(byte version)
java.lang.String
toString()
-
Methods inherited from class org.onlab.packet.BasePacket
clone, getParent, getPayload, resetChecksum, setParent, setPayload
-
-
-
-
Field Detail
-
MIN_HEADER_LENGTH
public static final int MIN_HEADER_LENGTH
Routing Information Protocol Next Generation packet. ------------------------------------------ |cmdType (1) | version(1) | ------------------------------------------ |reserved (2) | ------------------------------------------ | route entries (n*20) | ------------------------------------------- See Also:
- Constant Field Values
-
cmdType
protected byte cmdType
-
version
protected byte version
-
reserved
protected short reserved
-
rtEntries
protected java.util.List<RIPngEntry> rtEntries
-
-
Method Detail
-
getCmdType
public byte getCmdType()
- Returns:
- the cmdType
-
setCmdType
public RIPng setCmdType(byte cmdType)
- Parameters:
cmdType
- the cmdType to set- Returns:
- this
-
getVersion
public byte getVersion()
- Returns:
- the version
-
setVersion
public RIPng setVersion(byte version)
- Parameters:
version
- the version to set- Returns:
- this
-
getReserved
public short getReserved()
- Returns:
- the reserved short
-
setReserved
public RIPng setReserved(short reserved)
- Parameters:
reserved
- the reserved short to set- Returns:
- this
-
getRtEntries
public java.util.List<RIPngEntry> getRtEntries()
- Returns:
- the route entries
-
setRtEntries
public RIPng setRtEntries(java.util.List<RIPngEntry> entries)
- Parameters:
entries
- the route entries to set- 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
-
deserializer
public static Deserializer<RIPng> deserializer()
Deserializer function for RIPng packets.- Returns:
- deserializer function
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classBasePacket
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classBasePacket
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-