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 shortaddressFamilyIdstatic shortAFI_IPstatic intENTRY_LENstatic byteINFINITY_METRICprotected Ip4AddressipAddressprotected intmetricprotected Ip4AddressnextHopstatic byteNEXTHOP_METRICprotected shortrouteTagprotected Ip4AddresssubnetMask-
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.booleanequals(java.lang.Object obj)shortgetAddressFamilyId()Ip4AddressgetipAddress()intgetMetric()Ip4AddressgetNextHop()shortgetRouteTag()Ip4AddressgetSubnetMask()inthashCode()byte[]serialize()Sets all payloads parent packet if applicable, then serializes this packet and all payloads.RIPV2EntrysetAddressFamilyId(short addressFamilyIdentifier)RIPV2EntrysetIpAddress(Ip4Address ipaddress)RIPV2EntrysetMetric(int metric)RIPV2EntrysetNextHop(Ip4Address nexthop)RIPV2EntrysetRouteTag(short routetag)RIPV2EntrysetSubnetMask(Ip4Address subnetmask)java.lang.StringtoString()-
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:IPacketSets 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:
hashCodein classBasePacket
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin 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:
toStringin classjava.lang.Object
-
-