com.bigswitch.floodlight.vendor
Class OFInterfaceIPReplyVendorData

java.lang.Object
  extended by com.bigswitch.floodlight.vendor.OFBigSwitchVendorData
      extended by com.bigswitch.floodlight.vendor.OFInterfaceIPReplyVendorData
All Implemented Interfaces:
OFVendorData

public class OFInterfaceIPReplyVendorData
extends OFBigSwitchVendorData


Field Summary
static int BSN_GET_INTERFACE_IP_REPLY
          Opcode/dataType to reply with IP addresses of all interfaces
protected static Instantiable<OFVendorData> instantiable
           
protected  java.util.List<OFInterfaceVendorData> interfaces
           
protected  int length
           
 
Fields inherited from class com.bigswitch.floodlight.vendor.OFBigSwitchVendorData
BSN_VENDOR_ID, dataType
 
Constructor Summary
OFInterfaceIPReplyVendorData()
          Construct an interface IP reply vendor data
 
Method Summary
static Instantiable<OFVendorData> getInstantiable()
           
 java.util.List<OFInterfaceVendorData> getInterfaces()
           
 int getLength()
          Get the length of the vendor data.
 void readFrom(java.nio.ByteBuffer data, int length)
          Read from the ByteBuffer
 void setInterfaces(java.util.List<OFInterfaceVendorData> intfs)
           
 void setLength(int length)
          Set the length of this message
 void writeTo(java.nio.ByteBuffer data)
          Write to the ByteBuffer
 
Methods inherited from class com.bigswitch.floodlight.vendor.OFBigSwitchVendorData
equals, getDataType, hashCode, setDataType
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

interfaces

protected java.util.List<OFInterfaceVendorData> interfaces

length

protected int length

instantiable

protected static Instantiable<OFVendorData> instantiable

BSN_GET_INTERFACE_IP_REPLY

public static final int BSN_GET_INTERFACE_IP_REPLY
Opcode/dataType to reply with IP addresses of all interfaces

See Also:
Constant Field Values
Constructor Detail

OFInterfaceIPReplyVendorData

public OFInterfaceIPReplyVendorData()
Construct an interface IP reply vendor data

Method Detail

getInstantiable

public static Instantiable<OFVendorData> getInstantiable()
Returns:
a subclass of Instantiable that instantiates an instance of OFInterfaceIPReplyVendorData.

getLength

public int getLength()
Description copied from class: OFBigSwitchVendorData
Get the length of the vendor data. This implementation will normally be the superclass for another class that will override this to return the overall vendor data length. This implementation just returns the length of the part that includes the 4-byte integer data type value at the beginning of the vendor data

Specified by:
getLength in interface OFVendorData
Overrides:
getLength in class OFBigSwitchVendorData
Returns:
the total length of the vendor-data part of the interface IP reply message. The OF header (8B) and vendor (4B) are taken care of by the OFVendor class MINIMUM_LENGTH. This method returns the length of the vendor-extension-subtype (4B) + the length of the interfaces

setLength

public void setLength(int length)
Set the length of this message

Parameters:
length -

getInterfaces

public java.util.List<OFInterfaceVendorData> getInterfaces()
Returns:
the interfaces

setInterfaces

public void setInterfaces(java.util.List<OFInterfaceVendorData> intfs)
Parameters:
intfs - the ones to set

readFrom

public void readFrom(java.nio.ByteBuffer data,
                     int length)
Read from the ByteBuffer

Specified by:
readFrom in interface OFVendorData
Overrides:
readFrom in class OFBigSwitchVendorData
Parameters:
data - the channel buffer from which we're deserializing
length - the length to the end of the enclosing message

writeTo

public void writeTo(java.nio.ByteBuffer data)
Write to the ByteBuffer

Specified by:
writeTo in interface OFVendorData
Overrides:
writeTo in class OFBigSwitchVendorData
Parameters:
data - the channel buffer to which we're serializing