Package org.onlab.packet.lacp
Class Lacp
- java.lang.Object
-
- org.onlab.packet.BasePacket
-
- org.onlab.packet.lacp.Lacp
-
- All Implemented Interfaces:
IPacket
public class Lacp extends BasePacket
-
-
Field Summary
Fields Modifier and Type Field Description static int
HEADER_LENGTH
static byte
TYPE_ACTOR
static byte
TYPE_COLLECTOR
static byte
TYPE_PARTNER
static byte
TYPE_TERMINATOR
-
Fields inherited from class org.onlab.packet.BasePacket
parent, payload
-
-
Constructor Summary
Constructors Constructor Description Lacp()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Deserializer<Lacp>
deserializer()
Deserializer function for LACP packets.boolean
equals(java.lang.Object obj)
byte
getLacpVersion()
Gets LACP version.java.util.Map<java.lang.Byte,LacpTlv>
getTlv()
Gets LACP TLV.int
hashCode()
byte[]
serialize()
Sets all payloads parent packet if applicable, then serializes this packet and all payloads.Lacp
setLacpVersion(byte lacpVersion)
Sets LACP version.Lacp
setTlv(java.util.Map<java.lang.Byte,LacpTlv> tlv)
Sets LACP TLV.java.lang.String
toString()
-
Methods inherited from class org.onlab.packet.BasePacket
clone, getParent, getPayload, resetChecksum, setParent, setPayload
-
-
-
-
Field Detail
-
HEADER_LENGTH
public static final int HEADER_LENGTH
- See Also:
- Constant Field Values
-
TYPE_ACTOR
public static final byte TYPE_ACTOR
- See Also:
- Constant Field Values
-
TYPE_PARTNER
public static final byte TYPE_PARTNER
- See Also:
- Constant Field Values
-
TYPE_COLLECTOR
public static final byte TYPE_COLLECTOR
- See Also:
- Constant Field Values
-
TYPE_TERMINATOR
public static final byte TYPE_TERMINATOR
- See Also:
- Constant Field Values
-
-
Method Detail
-
getLacpVersion
public byte getLacpVersion()
Gets LACP version.- Returns:
- LACP version
-
setLacpVersion
public Lacp setLacpVersion(byte lacpVersion)
Sets LACP version.- Parameters:
lacpVersion
- LACP version- Returns:
- this
-
getTlv
public java.util.Map<java.lang.Byte,LacpTlv> getTlv()
Gets LACP TLV.- Returns:
- LACP TLV
-
setTlv
public Lacp setTlv(java.util.Map<java.lang.Byte,LacpTlv> tlv)
Sets LACP TLV.- Parameters:
tlv
- LACP TLV- Returns:
- this
-
deserializer
public static Deserializer<Lacp> deserializer()
Deserializer function for LACP packets.- Returns:
- deserializer function
-
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(java.lang.Object obj)
- Overrides:
equals
in classBasePacket
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-