public class MBodyTableFeatures extends OpenflowStructure implements MultipartBody
Modifier and Type | Class and Description |
---|---|
static class |
MBodyTableFeatures.Array
Represents an array of table features elements.
|
static class |
MBodyTableFeatures.MutableArray
A mutable array of table features elements.
|
Modifier and Type | Field and Description |
---|---|
static long |
ALL_META_BITS
The 64-bit value where all bits are set.
|
parseErrorCause, version
Constructor and Description |
---|
MBodyTableFeatures(ProtocolVersion pv)
Constructs an OpenFlow structure.
|
Modifier and Type | Method and Description |
---|---|
Set<TableConfig> |
getConfig()
Returns the set of config flags representing the configuration set on
the table; Since 1.3.
|
long |
getMaxEntries()
Returns the maximum number of flow entries that can be inserted into
this table; Since 1.3.
|
long |
getMetadataMatch()
Returns the metadata match value; Since 1.3.
|
long |
getMetadataWrite()
Returns the metadata write value; Since 1.3.
|
String |
getName()
Returns the table name; Since 1.3.
|
List<TableFeatureProp> |
getProps()
Returns the list of table feature properties describing various
capabilities of the table; Since 1.3.
|
TableId |
getTableId()
Returns the table ID; Since 1.3.
|
int |
getTotalLength()
Returns the total length of the body, in bytes.
|
String |
toDebugString()
Returns a string representation useful for debugging.
|
String |
toDebugString(int indent)
Returns a multi-line representation of this Table Features object.
|
String |
toString() |
void |
validate()
Validates this structure for completeness and throws an exception
if the structure is considered "not complete".
|
getVersion, hex, hex, incomplete, parseErrorCause
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getVersion
public static final long ALL_META_BITS
public MBodyTableFeatures(ProtocolVersion pv)
pv
- the protocol versionpublic String toString()
toString
in class OpenflowStructure
public String toDebugString()
OpenflowStructure
OpenflowStructure.toString()
, but
subclasses are free to override this behavior.toDebugString
in interface Structure
toDebugString
in class OpenflowStructure
public String toDebugString(int indent)
indent
- the additional indent (number of spaces)public int getTotalLength()
MultipartBody
getTotalLength
in interface MultipartBody
public void validate() throws IncompleteStructureException
OpenflowStructure
This default implementation does nothing, i.e. default behavior is that structures are considered complete.
Subclasses should override this method to check that mandatory fields or other internal state is present, throwing an exception if it is not.
validate
in interface MultipartBody
validate
in class OpenflowStructure
IncompleteStructureException
- if the structure is not completepublic TableId getTableId()
public String getName()
Note that the table name is stored in a 32 character field.
public long getMetadataMatch()
The value returned indicates the bits of the metadata field that the
table can match on, when using the
metadata
match field. A value of ALL_META_BITS
indicates that the
table can match the full metadata field.
public long getMetadataWrite()
The value returned indicates the bits of the metadata field that the
table can write using the
write-metadata
instruction. A value of ALL_META_BITS
indicates that the
table can write the full metadata field.
public Set<TableConfig> getConfig()
Note that, as of version 1.3, there are no flags defined so this method will always return an empty set.
public long getMaxEntries()
Due to limitations imposed by modern hardware, this value should be considered advisory and a best effort approximation of the capacity of the table. Despite the high-level abstraction of a table, in practice the resource consumed by a single flow table entry is not constant.
For example, a flow table entry might consume more than one entry, depending on its match parameters (e.g. IPv4 vs. IPv6). Also, tables that appear distinct at an OpenFlow-level might in fact share the same underlying physical resources. Further, on OpenFlow hybrid switches, those tables may be shared with non-OpenFlow functions. The result is that switch implementations should report an approximation of the total flow entries supported and controller writers should not treat this value as a fixed, physical constant.
public List<TableFeatureProp> getProps()
Copyright © 2015. All Rights Reserved.