Package org.onlab.packet.ipv6
Class EncapSecurityPayload
- java.lang.Object
-
- org.onlab.packet.BasePacket
-
- org.onlab.packet.ipv6.EncapSecurityPayload
-
- All Implemented Interfaces:
IPacket
public class EncapSecurityPayload extends BasePacket
Implements IPv6 Encapsulating Security Payload (ESP) extension header format. (RFC 4303)
-
-
Field Summary
Fields Modifier and Type Field Description static byteHEADER_LENGTHprotected intsecurityParamIndexprotected intsequence-
Fields inherited from class org.onlab.packet.BasePacket
parent, payload
-
-
Constructor Summary
Constructors Constructor Description EncapSecurityPayload()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Deserializer<EncapSecurityPayload>deserializer()Deserializer function for encapsulated security payload headers.booleanequals(java.lang.Object obj)intgetSecurityParamIndex()Gets the security parameter index of this header.intgetSequence()Gets the sequence number of this header.inthashCode()byte[]serialize()Sets all payloads parent packet if applicable, then serializes this packet and all payloads.EncapSecurityPayloadsetSecurityParamIndex(int securityParamIndex)Sets the security parameter index of this header.EncapSecurityPayloadsetSequence(int sequence)Sets the sequence number of this header.java.lang.StringtoString()-
Methods inherited from class org.onlab.packet.BasePacket
clone, getParent, getPayload, resetChecksum, setParent, setPayload
-
-
-
-
Field Detail
-
HEADER_LENGTH
public static final byte HEADER_LENGTH
- See Also:
- Constant Field Values
-
securityParamIndex
protected int securityParamIndex
-
sequence
protected int sequence
-
-
Method Detail
-
getSecurityParamIndex
public int getSecurityParamIndex()
Gets the security parameter index of this header.- Returns:
- the security parameter index
-
setSecurityParamIndex
public EncapSecurityPayload setSecurityParamIndex(int securityParamIndex)
Sets the security parameter index of this header.- Parameters:
securityParamIndex- the security parameter index to set- Returns:
- this
-
getSequence
public int getSequence()
Gets the sequence number of this header.- Returns:
- the sequence number
-
setSequence
public EncapSecurityPayload setSequence(int sequence)
Sets the sequence number of this header.- Parameters:
sequence- the sequence number to set- Returns:
- this
-
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
-
hashCode
public int hashCode()
- Overrides:
hashCodein classBasePacket
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classBasePacket
-
deserializer
public static Deserializer<EncapSecurityPayload> deserializer()
Deserializer function for encapsulated security payload headers.- Returns:
- deserializer function
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-