net.floodlightcontroller.packet
Class LLDP

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

public class LLDP
extends BasePacket

Author:
David Erickson (daviderickson@cs.stanford.edu)

Field Summary
protected  LLDPTLV chassisId
           
protected  short ethType
           
protected  java.util.List<LLDPTLV> optionalTLVList
           
protected  LLDPTLV portId
           
protected  LLDPTLV ttl
           
 
Fields inherited from class net.floodlightcontroller.packet.BasePacket
log, parent, payload
 
Constructor Summary
LLDP()
           
 
Method Summary
 IPacket deserialize(byte[] data, int offset, int length)
          Deserializes this packet layer and all possible payloads
 boolean equals(java.lang.Object obj)
           
 LLDPTLV getChassisId()
           
 java.util.List<LLDPTLV> getOptionalTLVList()
           
 LLDPTLV getPortId()
           
 LLDPTLV getTtl()
           
 int hashCode()
           
 byte[] serialize()
          Sets all payloads parent packet if applicable, then serializes this packet and all payloads
 LLDP setChassisId(LLDPTLV chassisId)
           
 LLDP setOptionalTLVList(java.util.List<LLDPTLV> optionalTLVList)
           
 LLDP setPortId(LLDPTLV portId)
           
 LLDP setTtl(LLDPTLV ttl)
           
 java.lang.String toString()
           
 
Methods inherited from class net.floodlightcontroller.packet.BasePacket
clone, getParent, getPayload, resetChecksum, setParent, setPayload
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

chassisId

protected LLDPTLV chassisId

portId

protected LLDPTLV portId

ttl

protected LLDPTLV ttl

optionalTLVList

protected java.util.List<LLDPTLV> optionalTLVList

ethType

protected short ethType
Constructor Detail

LLDP

public LLDP()
Method Detail

getChassisId

public LLDPTLV getChassisId()
Returns:
the chassisId

setChassisId

public LLDP setChassisId(LLDPTLV chassisId)
Parameters:
chassisId - the chassisId to set

getPortId

public LLDPTLV getPortId()
Returns:
the portId

setPortId

public LLDP setPortId(LLDPTLV portId)
Parameters:
portId - the portId to set

getTtl

public LLDPTLV getTtl()
Returns:
the ttl

setTtl

public LLDP setTtl(LLDPTLV ttl)
Parameters:
ttl - the ttl to set

getOptionalTLVList

public java.util.List<LLDPTLV> getOptionalTLVList()
Returns:
the optionalTLVList

setOptionalTLVList

public LLDP setOptionalTLVList(java.util.List<LLDPTLV> optionalTLVList)
Parameters:
optionalTLVList - the optionalTLVList to set

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

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