public class RIPV2Entry extends BasePacket
Modifier and Type | Field and Description |
---|---|
protected short |
addressFamilyId |
static short |
AFI_IP |
static int |
ENTRY_LEN |
static byte |
INFINITY_METRIC |
protected Ip4Address |
ipAddress |
protected int |
metric |
protected Ip4Address |
nextHop |
static byte |
NEXTHOP_METRIC |
protected short |
routeTag |
protected Ip4Address |
subnetMask |
parent, payload
Constructor and Description |
---|
RIPV2Entry() |
Modifier and Type | Method and Description |
---|---|
static Deserializer<RIPV2Entry> |
deserializer()
Deserializer function for RIPv2 entry.
|
boolean |
equals(java.lang.Object obj) |
short |
getAddressFamilyId() |
Ip4Address |
getipAddress() |
int |
getMetric() |
Ip4Address |
getNextHop() |
short |
getRouteTag() |
Ip4Address |
getSubnetMask() |
int |
hashCode() |
byte[] |
serialize()
Sets all payloads parent packet if applicable, then serializes this
packet and all payloads.
|
RIPV2Entry |
setAddressFamilyId(short addressFamilyIdentifier) |
RIPV2Entry |
setIpAddress(Ip4Address ipaddress) |
RIPV2Entry |
setMetric(int metric) |
RIPV2Entry |
setNextHop(Ip4Address nexthop) |
RIPV2Entry |
setRouteTag(short routetag) |
RIPV2Entry |
setSubnetMask(Ip4Address subnetmask) |
java.lang.String |
toString() |
clone, getParent, getPayload, resetChecksum, setParent, setPayload
public static final int ENTRY_LEN
public static final short AFI_IP
public static final byte INFINITY_METRIC
public static final byte NEXTHOP_METRIC
protected short addressFamilyId
protected short routeTag
protected Ip4Address ipAddress
protected Ip4Address subnetMask
protected Ip4Address nextHop
protected int metric
public byte[] serialize()
IPacket
public static Deserializer<RIPV2Entry> deserializer()
public int hashCode()
hashCode
in class BasePacket
public boolean equals(java.lang.Object obj)
equals
in class BasePacket
public short getAddressFamilyId()
public RIPV2Entry setAddressFamilyId(short addressFamilyIdentifier)
addressFamilyIdentifier
- the address family identifier to setpublic short getRouteTag()
public RIPV2Entry setRouteTag(short routetag)
routetag
- the route tag to setpublic Ip4Address getipAddress()
public RIPV2Entry setIpAddress(Ip4Address ipaddress)
ipaddress
- the Ip Address to setpublic Ip4Address getSubnetMask()
public RIPV2Entry setSubnetMask(Ip4Address subnetmask)
subnetmask
- the subnet mask to setpublic Ip4Address getNextHop()
public RIPV2Entry setNextHop(Ip4Address nexthop)
nexthop
- the ip address if the next hop to setpublic int getMetric()
public RIPV2Entry setMetric(int metric)
metric
- the route metric to setpublic java.lang.String toString()
toString
in class java.lang.Object