public class RIP extends BasePacket
Modifier and Type | Class and Description |
---|---|
static class |
RIP.CmdType |
Modifier and Type | Field and Description |
---|---|
protected RIPV2AuthEntry |
authEntry |
protected byte |
cmdType |
static int |
MIN_HEADER_LENGTH
Routing Information Protocol packet.
|
protected byte[] |
rawData |
protected short |
reserved |
protected java.util.List<RIPV2Entry> |
rtEntries |
protected byte |
version |
parent, payload
Constructor and Description |
---|
RIP() |
Modifier and Type | Method and Description |
---|---|
static Deserializer<RIP> |
deserializer()
Deserializer function for RIP packets.
|
boolean |
equals(java.lang.Object obj) |
RIPV2AuthEntry |
getAuthEntry() |
byte |
getCmdType() |
byte[] |
getRawData() |
short |
getReserved() |
java.util.List<RIPV2Entry> |
getRtEntries() |
byte |
getVersion() |
int |
hashCode() |
byte[] |
serialize()
Sets all payloads parent packet if applicable, then serializes this
packet and all payloads.
|
RIP |
setCmdType(byte cmdType) |
RIP |
setReserved(short reserved) |
RIP |
setRtEntries(java.util.List<RIPV2Entry> entries) |
RIP |
setVersion(byte version) |
java.lang.String |
toString() |
clone, getParent, getPayload, resetChecksum, setParent, setPayload
public static final int MIN_HEADER_LENGTH
protected byte cmdType
protected byte version
protected short reserved
protected java.util.List<RIPV2Entry> rtEntries
protected RIPV2AuthEntry authEntry
protected byte[] rawData
public byte getCmdType()
public RIP setCmdType(byte cmdType)
cmdType
- the cmdType to setpublic byte getVersion()
public RIP setVersion(byte version)
version
- the version to setpublic short getReserved()
public RIP setReserved(short reserved)
reserved
- the reserved short to setpublic java.util.List<RIPV2Entry> getRtEntries()
public RIP setRtEntries(java.util.List<RIPV2Entry> entries)
entries
- the route entries to setpublic RIPV2AuthEntry getAuthEntry()
public byte[] getRawData()
public byte[] serialize()
IPacket
public static Deserializer<RIP> deserializer()
public int hashCode()
hashCode
in class BasePacket
public boolean equals(java.lang.Object obj)
equals
in class BasePacket
public java.lang.String toString()
toString
in class java.lang.Object