Package org.onlab.packet
Class RIPV2AuthEntry
- java.lang.Object
-
- org.onlab.packet.BasePacket
-
- org.onlab.packet.RIPV2AuthEntry
-
- All Implemented Interfaces:
IPacket
public class RIPV2AuthEntry extends BasePacket
-
-
Field Summary
Fields Modifier and Type Field Description protected shortaddressFamilyIdprotected byteauthLenprotected bytekeyIdprotected shortoffsetprotected intsequenceprotected shorttype-
Fields inherited from class org.onlab.packet.BasePacket
parent, payload
-
-
Constructor Summary
Constructors Constructor Description RIPV2AuthEntry()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Deserializer<RIPV2AuthEntry>deserializer()Deserializer function for RIPv2 entry.booleanequals(Object obj)shortgetAddressFamilyId()bytegetAuthLen()bytegetKeyId()shortgetOffset()intgetSequence()shortgetType()inthashCode()byte[]serialize()Sets all payloads parent packet if applicable, then serializes this packet and all payloads.RIPV2AuthEntrysetAddressFamilyId(short addressFamilyIdentifier)RIPV2AuthEntrysetAuthLen(byte authlen)RIPV2AuthEntrysetKeyId(byte keyId)RIPV2AuthEntrysetOffset(short offset)RIPV2AuthEntrysetSequenceNumber(int sequencenumber)RIPV2AuthEntrysetType(short type)StringtoString()-
Methods inherited from class org.onlab.packet.BasePacket
clone, getParent, getPayload, resetChecksum, setParent, setPayload
-
-
-
-
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<RIPV2AuthEntry> deserializer()
Deserializer function for RIPv2 entry.- Returns:
- deserializer function
-
hashCode
public int hashCode()
- Overrides:
hashCodein classBasePacket
-
equals
public boolean equals(Object obj)
- Overrides:
equalsin classBasePacket
-
getAddressFamilyId
public short getAddressFamilyId()
- Returns:
- the Address Family Identifier
-
setAddressFamilyId
public RIPV2AuthEntry setAddressFamilyId(short addressFamilyIdentifier)
- Parameters:
addressFamilyIdentifier- the address family identifier to set- Returns:
- this
-
getType
public short getType()
- Returns:
- the authentication type
-
setType
public RIPV2AuthEntry setType(short type)
- Parameters:
type- the authentication type to set- Returns:
- this
-
getOffset
public short getOffset()
- Returns:
- the offset of authentication data
-
setOffset
public RIPV2AuthEntry setOffset(short offset)
- Parameters:
offset- the offset of authentication data to set- Returns:
- this
-
getKeyId
public byte getKeyId()
- Returns:
- the subnet mask
-
setKeyId
public RIPV2AuthEntry setKeyId(byte keyId)
- Parameters:
keyId- The key id to set- Returns:
- this
-
getAuthLen
public byte getAuthLen()
- Returns:
- the authentication data length
-
setAuthLen
public RIPV2AuthEntry setAuthLen(byte authlen)
- Parameters:
authlen- the length of the authentication data to set- Returns:
- this
-
getSequence
public int getSequence()
- Returns:
- the sequence number
-
setSequenceNumber
public RIPV2AuthEntry setSequenceNumber(int sequencenumber)
- Parameters:
sequencenumber- sequence number to set- Returns:
- this
-
-