net.floodlightcontroller.packet
Class BPDU

java.lang.Object
  extended by net.floodlightcontroller.packet.BasePacket
      extended by net.floodlightcontroller.packet.BPDU
All Implemented Interfaces:
IPacket

public class BPDU
extends BasePacket

This class is a Rapid Spanning Tree Protocol Bridge Protocol Data Unit

Author:
alexreimers

Nested Class Summary
static class BPDU.BPDUType
           
 
Field Summary
 
Fields inherited from class net.floodlightcontroller.packet.BasePacket
log, parent, payload
 
Constructor Summary
BPDU(BPDU.BPDUType type)
           
 
Method Summary
 IPacket deserialize(byte[] data, int offset, int length)
          Deserializes this packet layer and all possible payloads
 long getDestMac()
           
 byte[] serialize()
          Sets all payloads parent packet if applicable, then serializes this packet and all payloads
 
Methods inherited from class net.floodlightcontroller.packet.BasePacket
clone, equals, getParent, getPayload, hashCode, resetChecksum, setParent, setPayload
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BPDU

public BPDU(BPDU.BPDUType type)
Method Detail

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)
Description copied from interface: IPacket
Deserializes this packet layer and all possible payloads

offset - offset to start deserializing from
length - length of the data to deserialize
Returns:
the deserialized data

getDestMac

public long getDestMac()