Package org.onlab.packet
Class RIPV2Entry
- java.lang.Object
-
- org.onlab.packet.BasePacket
-
- org.onlab.packet.RIPV2Entry
-
- All Implemented Interfaces:
IPacket
public class RIPV2Entry extends BasePacket
-
-
Field Summary
Fields Modifier and Type Field 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
-
Fields inherited from class org.onlab.packet.BasePacket
parent, payload
-
-
Constructor Summary
Constructors Constructor Description RIPV2Entry()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method 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()
-
Methods inherited from class org.onlab.packet.BasePacket
clone, getParent, getPayload, resetChecksum, setParent, setPayload
-
-
-
-
Field Detail
-
ENTRY_LEN
public static final int ENTRY_LEN
- See Also:
- Constant Field Values
-
AFI_IP
public static final short AFI_IP
- See Also:
- Constant Field Values
-
INFINITY_METRIC
public static final byte INFINITY_METRIC
- See Also:
- Constant Field Values
-
NEXTHOP_METRIC
public static final byte NEXTHOP_METRIC
- See Also:
- Constant Field Values
-
addressFamilyId
protected short addressFamilyId
-
routeTag
protected short routeTag
-
ipAddress
protected Ip4Address ipAddress
-
subnetMask
protected Ip4Address subnetMask
-
nextHop
protected Ip4Address nextHop
-
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<RIPV2Entry> deserializer()
Deserializer function for RIPv2 entry.- Returns:
- deserializer function
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classBasePacket
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classBasePacket
-
getAddressFamilyId
public short getAddressFamilyId()
- Returns:
- the Address Family Identifier
-
setAddressFamilyId
public RIPV2Entry setAddressFamilyId(short addressFamilyIdentifier)
- Parameters:
addressFamilyIdentifier
- the address family identifier to set- Returns:
- this
-
getRouteTag
public short getRouteTag()
- Returns:
- the route tag
-
setRouteTag
public RIPV2Entry setRouteTag(short routetag)
- Parameters:
routetag
- the route tag to set- Returns:
- this
-
getipAddress
public Ip4Address getipAddress()
- Returns:
- the ip address
-
setIpAddress
public RIPV2Entry setIpAddress(Ip4Address ipaddress)
- Parameters:
ipaddress
- the Ip Address to set- Returns:
- this
-
getSubnetMask
public Ip4Address getSubnetMask()
- Returns:
- the subnet mask
-
setSubnetMask
public RIPV2Entry setSubnetMask(Ip4Address subnetmask)
- Parameters:
subnetmask
- the subnet mask to set- Returns:
- this
-
getNextHop
public Ip4Address getNextHop()
- Returns:
- the next hop
-
setNextHop
public RIPV2Entry setNextHop(Ip4Address nexthop)
- Parameters:
nexthop
- the ip address if the next hop to set- Returns:
- this
-
getMetric
public int getMetric()
- Returns:
- the metric
-
setMetric
public RIPV2Entry setMetric(int metric)
- Parameters:
metric
- the route metric to set- Returns:
- this
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-