summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMinoru TAKAHASHI <takahashi.minoru7@gmail.com>2015-09-17 13:04:37 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-09-18 08:27:42 +0900
commit2079d06d6f5e7551bcee0c400606dda2006a12d8 (patch)
treec91153756f2de1cebee459d6d0a87ae288e6f956
parent950a50649461058c09b0809e58c92ef9896cc4ce (diff)
doc/ofproto_v1_3_ref: Add description for Port Structures
Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r--doc/source/ofproto_v1_3_ref.rst5
-rw-r--r--ryu/ofproto/ofproto_v1_3_parser.py30
2 files changed, 35 insertions, 0 deletions
diff --git a/doc/source/ofproto_v1_3_ref.rst b/doc/source/ofproto_v1_3_ref.rst
index 6d1ae371..e48bb485 100644
--- a/doc/source/ofproto_v1_3_ref.rst
+++ b/doc/source/ofproto_v1_3_ref.rst
@@ -396,6 +396,11 @@ Experimenter
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of13/4-16-ofp_experimenter.packet.json
+Port Structures
+===============
+
+.. autoclass:: OFPPort
+
Flow Match Structure
====================
diff --git a/ryu/ofproto/ofproto_v1_3_parser.py b/ryu/ofproto/ofproto_v1_3_parser.py
index 204da9b3..bfdd6075 100644
--- a/ryu/ofproto/ofproto_v1_3_parser.py
+++ b/ryu/ofproto/ofproto_v1_3_parser.py
@@ -2368,6 +2368,36 @@ class OFPFlowRemoved(MsgBase):
class OFPPort(ofproto_parser.namedtuple('OFPPort', (
'port_no', 'hw_addr', 'name', 'config', 'state', 'curr',
'advertised', 'supported', 'peer', 'curr_speed', 'max_speed'))):
+ """
+ Description of a port
+
+ ========== =========================================================
+ Attribute Description
+ ========== =========================================================
+ port_no Port number and it uniquely identifies a port within
+ a switch.
+ hw_addr MAC address for the port.
+ name Null-terminated string containing a human-readable name
+ for the interface.
+ config Bitmap of port configration flags.
+
+ | OFPPC_PORT_DOWN
+ | OFPPC_NO_RECV
+ | OFPPC_NO_FWD
+ | OFPPC_NO_PACKET_IN
+ state Bitmap of port state flags.
+
+ | OFPPS_LINK_DOWN
+ | OFPPS_BLOCKED
+ | OFPPS_LIVE
+ curr Current features.
+ advertised Features being advertised by the port.
+ supported Features supported by the port.
+ peer Features advertised by peer.
+ curr_speed Current port bitrate in kbps.
+ max_speed Max port bitrate in kbps.
+ ========== =========================================================
+ """
_TYPE = {
'ascii': [