From a10efc53a2b10f9f1c316c852e32ada81afb44a2 Mon Sep 17 00:00:00 2001
From: Sriram Natarajan <natarajan.sriram@gmail.com>
Date: Tue, 16 Sep 2014 13:55:50 -0700
Subject: [PATCH] Fix Enum Names and Values in OpenFlow Header files Update no
 matching name in packet-in reason as specified in OpenFlow 1.4 Update queeu
 stats name in in multipart type as specified in OpenFlow 1.4 Add additional
 constants as defined in OpenFlow 1.4

---
 ryu/ofproto/ofproto_v1_3.py        |  2 +-
 ryu/ofproto/ofproto_v1_4.py        | 10 ++++++----
 ryu/ofproto/ofproto_v1_4_parser.py |  4 ++--
 3 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/ryu/ofproto/ofproto_v1_3.py b/ryu/ofproto/ofproto_v1_3.py
index 418bab1..99d44b9 100644
--- a/ryu/ofproto/ofproto_v1_3.py
+++ b/ryu/ofproto/ofproto_v1_3.py
@@ -939,7 +939,7 @@ OFPBIC_UNSUP_METADATA_MASK = 4  # Metadata mask value unsupported by
                                 # datapath.
 OFPBIC_BAD_EXPERIMENTER = 5     # Unknown experimenter id specified.
 OFPBIC_BAD_EXP_TYPE = 6         # Unknown instruction for experimenter id.
-OFPBIC_BAD_EXP_LEN = 7          # Length problem in instrucitons.
+OFPBIC_BAD_LEN = 7              # Length problem in instrucitons.
 OFPBIC_EPERM = 8                # Permissions error.
 
 # enum ofp_bad_match_code
diff --git a/ryu/ofproto/ofproto_v1_4.py b/ryu/ofproto/ofproto_v1_4.py
index 610a34e..d0f9610 100644
--- a/ryu/ofproto/ofproto_v1_4.py
+++ b/ryu/ofproto/ofproto_v1_4.py
@@ -320,6 +320,7 @@ OFPXMC_EXPERIMENTER = 0xFFFF    # Experimenter class
 
 # enum ofp_vlan_id
 OFPVID_PRESENT = 0x1000     # bit that indicate that a VLAN id is set.
+OFPVID_NONE = 0X0000        # No VLAN id was set.
 
 
 def _oxm_tlv_header(class_, field, hasmask, length):
@@ -587,7 +588,7 @@ assert (calcsize(OFP_PACKET_OUT_PACK_STR) + OFP_HEADER_SIZE ==
         OFP_PACKET_OUT_SIZE)
 
 # enum ofp_packet_in_reason
-OFPR_NO_MATCH = 0       # No matching flow (table-miss flow entry).
+OFPR_TABLE_MISS = 0     # No matching flow (table-miss flow entry).
 OFPR_APPLY_ACTION = 1   # Output to controller in apply-actions.
 OFPR_INVALID_TTL = 2    # Packet has invalid TTL.
 OFPR_ACTION_SET = 3     # Output to controller in action set.
@@ -760,7 +761,7 @@ OFPBIC_UNSUP_METADATA_MASK = 4  # Metadata mask value unsupported by
                                 # datapath.
 OFPBIC_BAD_EXPERIMENTER = 5     # Unknown experimenter id specified.
 OFPBIC_BAD_EXP_TYPE = 6         # Unknown instruction for experimenter id.
-OFPBIC_BAD_EXP_LEN = 7          # Length problem in instrucitons.
+OFPBIC_BAD_LEN = 7              # Length problem in instrucitons.
 OFPBIC_EPERM = 8                # Permissions error.
 OFPBIC_DUP_INST = 9             # Duplicate instruction.
 
@@ -950,7 +951,7 @@ OFPMP_FLOW = 1
 OFPMP_AGGREGATE = 2
 OFPMP_TABLE = 3
 OFPMP_PORT_STATS = 4
-OFPMP_QUEUE = 5
+OFPMP_QUEUE_STATS = 5
 OFPMP_GROUP = 6
 OFPMP_GROUP_DESC = 7
 OFPMP_GROUP_FEATURES = 8
@@ -1469,5 +1470,6 @@ assert (calcsize(OFP_BUNDLE_ADD_MSG_PACK_STR) + OFP_HEADER_SIZE ==
 
 # define constants
 OFP_VERSION = 0x05
-OFP_TCP_PORT = 6633
+OFP_TCP_PORT = 6653
+OFP_SSL_PORT = 6653
 MAX_XID = 0xffffffff
diff --git a/ryu/ofproto/ofproto_v1_4_parser.py b/ryu/ofproto/ofproto_v1_4_parser.py
index 5394be5..babbcd6 100644
--- a/ryu/ofproto/ofproto_v1_4_parser.py
+++ b/ryu/ofproto/ofproto_v1_4_parser.py
@@ -2673,7 +2673,7 @@ class OFPQueueStats(StringifyMixin):
         return stats
 
 
-@_set_stats_type(ofproto.OFPMP_QUEUE, OFPQueueStats)
+@_set_stats_type(ofproto.OFPMP_QUEUE_STATS, OFPQueueStats)
 @_set_msg_type(ofproto.OFPT_MULTIPART_REQUEST)
 class OFPQueueStatsRequest(OFPMultipartRequest):
     """
@@ -2713,7 +2713,7 @@ class OFPQueueStatsRequest(OFPMultipartRequest):
 
 
 @OFPMultipartReply.register_stats_type()
-@_set_stats_type(ofproto.OFPMP_QUEUE, OFPQueueStats)
+@_set_stats_type(ofproto.OFPMP_QUEUE_STATS, OFPQueueStats)
 @_set_msg_type(ofproto.OFPT_MULTIPART_REPLY)
 class OFPQueueStatsReply(OFPMultipartReply):
     """
-- 
1.8.5.2 (Apple Git-48)

