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 byte
HEADER_LENGTH
protected int
securityParamIndex
protected int
sequence
-
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.boolean
equals(Object obj)
int
getSecurityParamIndex()
Gets the security parameter index of this header.int
getSequence()
Gets the sequence number of this header.int
hashCode()
byte[]
serialize()
Sets all payloads parent packet if applicable, then serializes this packet and all payloads.EncapSecurityPayload
setSecurityParamIndex(int securityParamIndex)
Sets the security parameter index of this header.EncapSecurityPayload
setSequence(int sequence)
Sets the sequence number of this header.String
toString()
-
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:IPacket
Sets 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:
hashCode
in classBasePacket
-
equals
public boolean equals(Object obj)
- Overrides:
equals
in classBasePacket
-
deserializer
public static Deserializer<EncapSecurityPayload> deserializer()
Deserializer function for encapsulated security payload headers.- Returns:
- deserializer function
-
-