public enum PortState extends Enum<PortState> implements OfpBitmapEnum
All port state flags are read-only and cannot be changed by the
controller. When the port flags are changed, the switch sends a
PORT_STATUS
message to notify the
controller of the change.
From version 1.1 onwards, the spanning tree state flags
(STP_*
constants) were dropped.
Enum Constant and Description |
---|
BLOCKED
Port is blocked; Since 1.1.
|
LINK_DOWN
No physical link present; Since 1.0.
|
LIVE
Live for Fast Failover Group; Since 1.1.
|
STP_BLOCK
Not part of spanning tree; Since 1.0; Removed at 1.1.
|
STP_FORWARD
Learning and relaying frames; Since 1.0; Removed at 1.1.
|
STP_LEARN
Learning but not relaying frames; Since 1.0; Removed at 1.1.
|
STP_LISTEN
Not learning or relaying frames; Since 1.0; Removed at 1.1.
|
Modifier and Type | Method and Description |
---|---|
int |
getBit(ProtocolVersion pv)
Returns the bit value for the constant, under the given protocol
version.
|
String |
toDisplayString()
Returns a string representation of this constant suitable for
display.
|
String |
toString() |
static PortState |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static PortState[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PortState LINK_DOWN
public static final PortState BLOCKED
Indicates that a switch protocol outside of OpenFlow, such as
802.1D Spanning Tree, is preventing the use of that port with
Port.FLOOD
.
public static final PortState LIVE
public static final PortState STP_LISTEN
public static final PortState STP_LEARN
public static final PortState STP_FORWARD
public static final PortState STP_BLOCK
public static PortState[] values()
for (PortState c : PortState.values()) System.out.println(c);
public static PortState valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic int getBit(ProtocolVersion pv)
OfpBitmapEnum
getBit
in interface OfpBitmapEnum
pv
- the protocol versionpublic String toDisplayString()
STP_LISTEN.toDisplayString()
returns:
"STP Listen"
toDisplayString
in interface OfpBitmapEnum
Copyright © 2015. All Rights Reserved.