summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMinoru TAKAHASHI <takahashi.minoru7@gmail.com>2015-09-17 13:04:15 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-09-18 08:27:42 +0900
commit950a50649461058c09b0809e58c92ef9896cc4ce (patch)
treefb99249930540e074db1a4dadfd10b2d27306a3f
parentc36bafea262663f24550dba00e531bc25ad2d247 (diff)
doc/ofproto_v1_4_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_4_ref.rst11
-rw-r--r--ryu/ofproto/ofproto_v1_4_parser.py28
2 files changed, 36 insertions, 3 deletions
diff --git a/doc/source/ofproto_v1_4_ref.rst b/doc/source/ofproto_v1_4_ref.rst
index 10c58235..8e84790e 100644
--- a/doc/source/ofproto_v1_4_ref.rst
+++ b/doc/source/ofproto_v1_4_ref.rst
@@ -355,7 +355,7 @@ Bundle Messages
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-70-ofp_bundle_add_msg.packet.json
-
+
Set Asynchronous Configuration Message
--------------------------------------
@@ -435,8 +435,8 @@ Request Forward Message
JSON Example:
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-71-ofp_requestforward.packet.json
-
-
+
+
Symmetric Messages
==================
@@ -487,6 +487,11 @@ Experimenter
.. literalinclude:: ../../ryu/tests/unit/ofproto/json/of14/5-16-ofp_experimenter.packet.json
+Port Structures
+===============
+
+.. autoclass:: OFPPort
+
Flow Match Structure
====================
diff --git a/ryu/ofproto/ofproto_v1_4_parser.py b/ryu/ofproto/ofproto_v1_4_parser.py
index b23ce855..68b789f8 100644
--- a/ryu/ofproto/ofproto_v1_4_parser.py
+++ b/ryu/ofproto/ofproto_v1_4_parser.py
@@ -1860,6 +1860,34 @@ class OFPFlowRemoved(MsgBase):
class OFPPort(StringifyMixin):
+
+ """
+ Description of a port
+
+ ========== =========================================================
+ Attribute Description
+ ========== =========================================================
+ port_no Port number and it uniquely identifies a port within
+ a switch.
+ length Length of ofp_port (excluding padding).
+ 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
+ properties List of ``OFPPortDescProp`` subclass instance
+ ========== =========================================================
+ """
+
_TYPE = {
'ascii': [
'hw_addr',