net.floodlightcontroller.packet
Class BSN
java.lang.Object
net.floodlightcontroller.packet.BasePacket
net.floodlightcontroller.packet.BSN
- All Implemented Interfaces:
- IPacket
public class BSN
- extends BasePacket
- Author:
- Shudong Zhou (shudong.zhou@bigswitch.com)
Constructor Summary |
BSN()
|
BSN(short type)
|
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
BSN_MAGIC
public static final int BSN_MAGIC
- See Also:
- Constant Field Values
BSN_VERSION_CURRENT
public static final short BSN_VERSION_CURRENT
- See Also:
- Constant Field Values
BSN_TYPE_PROBE
public static final short BSN_TYPE_PROBE
- See Also:
- Constant Field Values
BSN_TYPE_BDDP
public static final short BSN_TYPE_BDDP
- See Also:
- Constant Field Values
typeClassMap
public static java.util.Map<java.lang.Short,java.lang.Class<? extends IPacket>> typeClassMap
type
protected short type
version
protected short version
BSN
public BSN()
BSN
public BSN(short type)
getType
public short getType()
setType
public BSN setType(short type)
getVersion
public short getVersion()
setVersion
public BSN setVersion(short version)
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
deserialize
public IPacket deserialize(byte[] data,
int offset,
int length)
throws PacketParsingException
- Description copied from interface:
IPacket
- Deserializes this packet layer and all possible payloads
offset
- offset to start deserializing fromlength
- length of the data to deserialize
- Returns:
- the deserialized data
- Throws:
PacketParsingException
hashCode
public int hashCode()
- Overrides:
hashCode
in class BasePacket
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class BasePacket
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object