diff options
author | Sriram Natarajan <natarajan.sriram@gmail.com> | 2014-09-16 13:55:50 -0700 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-09-18 14:39:54 +0900 |
commit | 72556a68b45beeb4793ae8903f90d57cf7e63e99 (patch) | |
tree | 477fdfd4a6752d86489fc2588fc54827f468ec07 | |
parent | 33ecedd81e63c6e80cb3ddab8f2f24906d4b3b64 (diff) |
of: Fix Enum Names and Values
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
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | ryu/ofproto/ofproto_v1_3.py | 2 | ||||
-rw-r--r-- | ryu/ofproto/ofproto_v1_4.py | 10 | ||||
-rw-r--r-- | 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 3bb5c6bf..f6c4b74b 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 983132f2..e12dcd66 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 5394be5f..babbcd64 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): """ |