This seems like a more reasonable way to do things given that we will soon
need "OpenFlow 1.1 and later" and "OpenFlow 1.1 only" keywords.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Reviewed-by: Simon Horman <horms@verge.net.au>
names.append(enum)
for dst in dsts.split(', '):
names.append(enum)
for dst in dsts.split(', '):
- m = re.match(r'([A-Z0-9.]+)\((\d+)(?:,(\d+))?\)$', dst)
+ m = re.match(r'([A-Z0-9.+]+)\((\d+)(?:,(\d+))?\)$', dst)
if not m:
fatal("%s: syntax error in destination" % dst)
targets = m.group(1)
if not m:
fatal("%s: syntax error in destination" % dst)
targets = m.group(1)
- target_map = {"OF": ("OF1.0", "OF1.1"),
- "OF1.0": ("OF1.0",),
- "OF1.1": ("OF1.1",),
- "NX": ("OF1.0", "OF1.1"),
- "NX1.0": ("OF1.0",),
- "NX1.1": ("OF1.1",)}
+ target_map = {"OF1.0+": ("OF1.0", "OF1.1"),
+ "OF1.1+": ("OF1.1",),
+ "OF1.0": ("OF1.0",),
+ "OF1.1": ("OF1.1",),
+ "NX1.0+": ("OF1.0", "OF1.1"),
+ "NX1.0": ("OF1.0",),
+ "NX1.1": ("OF1.1",)}
if targets not in target_map:
fatal("%s: unknown error domain" % targets)
for target in target_map[targets]:
if targets not in target_map:
fatal("%s: unknown error domain" % targets)
for target in target_map[targets]:
/* ## OFPET_HELLO_FAILED ## */
/* ## ------------------ ## */
/* ## OFPET_HELLO_FAILED ## */
/* ## ------------------ ## */
- /* OF(0). Hello protocol failed. */
+ /* OF1.0+(0). Hello protocol failed. */
OFPERR_OFPET_HELLO_FAILED = OFPERR_OFS,
OFPERR_OFPET_HELLO_FAILED = OFPERR_OFS,
- /* OF(0,0). No compatible version. */
+ /* OF1.0+(0,0). No compatible version. */
OFPERR_OFPHFC_INCOMPATIBLE,
OFPERR_OFPHFC_INCOMPATIBLE,
- /* OF(0,1). Permissions error. */
+ /* OF1.0+(0,1). Permissions error. */
OFPERR_OFPHFC_EPERM,
/* ## ----------------- ## */
/* ## OFPET_BAD_REQUEST ## */
/* ## ----------------- ## */
OFPERR_OFPHFC_EPERM,
/* ## ----------------- ## */
/* ## OFPET_BAD_REQUEST ## */
/* ## ----------------- ## */
- /* OF(1). Request was not understood. */
+ /* OF1.0+(1). Request was not understood. */
OFPERR_OFPET_BAD_REQUEST,
OFPERR_OFPET_BAD_REQUEST,
- /* OF(1,0). ofp_header.version not supported. */
+ /* OF1.0+(1,0). ofp_header.version not supported. */
OFPERR_OFPBRC_BAD_VERSION,
OFPERR_OFPBRC_BAD_VERSION,
- /* OF(1,1). ofp_header.type not supported. */
+ /* OF1.0+(1,1). ofp_header.type not supported. */
- /* OF(1,2). ofp_stats_msg.type not supported. */
+ /* OF1.0+(1,2). ofp_stats_msg.type not supported. */
- /* OF(1,3). Vendor not supported (in ofp_vendor_header or
+ /* OF1.0+(1,3). Vendor not supported (in ofp_vendor_header or
* ofp_stats_msg). */
OFPERR_OFPBRC_BAD_VENDOR,
* ofp_stats_msg). */
OFPERR_OFPBRC_BAD_VENDOR,
- /* OF(1,4). Vendor subtype not supported. */
+ /* OF1.0+(1,4). Vendor subtype not supported. */
OFPERR_OFPBRC_BAD_SUBTYPE,
OFPERR_OFPBRC_BAD_SUBTYPE,
- /* OF(1,5). Permissions error. */
+ /* OF1.0+(1,5). Permissions error. */
- /* OF(1,6). Wrong request length for type. */
+ /* OF1.0+(1,6). Wrong request length for type. */
- /* OF(1,7). Specified buffer has already been used. */
+ /* OF1.0+(1,7). Specified buffer has already been used. */
OFPERR_OFPBRC_BUFFER_EMPTY,
OFPERR_OFPBRC_BUFFER_EMPTY,
- /* OF(1,8). Specified buffer does not exist. */
+ /* OF1.0+(1,8). Specified buffer does not exist. */
OFPERR_OFPBRC_BUFFER_UNKNOWN,
/* OF1.1(1,9). Specified table-id invalid or does not exist. */
OFPERR_OFPBRC_BAD_TABLE_ID,
OFPERR_OFPBRC_BUFFER_UNKNOWN,
/* OF1.1(1,9). Specified table-id invalid or does not exist. */
OFPERR_OFPBRC_BAD_TABLE_ID,
- /* NX(1,256). Invalid NXM flow match. */
+ /* NX1.0+(1,256). Invalid NXM flow match. */
OFPERR_NXBRC_NXM_INVALID,
OFPERR_NXBRC_NXM_INVALID,
- /* NX(1,257). The nxm_type, or nxm_type taken in combination with
+ /* NX1.0+(1,257). The nxm_type, or nxm_type taken in combination with
* nxm_hasmask or nxm_length or both, is invalid or not implemented. */
OFPERR_NXBRC_NXM_BAD_TYPE,
* nxm_hasmask or nxm_length or both, is invalid or not implemented. */
OFPERR_NXBRC_NXM_BAD_TYPE,
- /* NX(1,258). Invalid nxm_value. */
+ /* NX1.0+(1,258). Invalid nxm_value. */
OFPERR_NXBRC_NXM_BAD_VALUE,
OFPERR_NXBRC_NXM_BAD_VALUE,
- /* NX(1,259). Invalid nxm_mask. */
+ /* NX1.0+(1,259). Invalid nxm_mask. */
OFPERR_NXBRC_NXM_BAD_MASK,
OFPERR_NXBRC_NXM_BAD_MASK,
- /* NX(1,260). A prerequisite was not met. */
+ /* NX1.0+(1,260). A prerequisite was not met. */
OFPERR_NXBRC_NXM_BAD_PREREQ,
OFPERR_NXBRC_NXM_BAD_PREREQ,
- /* NX(1,261). A given nxm_type was specified more than once. */
+ /* NX1.0+(1,261). A given nxm_type was specified more than once. */
OFPERR_NXBRC_NXM_DUP_TYPE,
OFPERR_NXBRC_NXM_DUP_TYPE,
- /* NX(1,512). A request specified a nonexistent table ID. */
+ /* NX1.0+(1,512). A request specified a nonexistent table ID. */
OFPERR_NXBRC_BAD_TABLE_ID,
OFPERR_NXBRC_BAD_TABLE_ID,
- /* NX(1,513). NXT_ROLE_REQUEST specified an invalid role. */
+ /* NX1.0+(1,513). NXT_ROLE_REQUEST specified an invalid role. */
- /* NX(1,514). The in_port in an ofp_packet_out request is invalid. */
+ /* NX1.0+(1,514). The in_port in an ofp_packet_out request is invalid. */
OFPERR_NXBRC_BAD_IN_PORT,
OFPERR_NXBRC_BAD_IN_PORT,
- /* NX(1,515). Must-be-zero field had nonzero value. */
+ /* NX1.0+(1,515). Must-be-zero field had nonzero value. */
OFPERR_NXBRC_MUST_BE_ZERO,
OFPERR_NXBRC_MUST_BE_ZERO,
- /* NX(1,516). The reason in an ofp_port_status message is not valid. */
+ /* NX1.0+(1,516). The reason in an ofp_port_status message is not
+ * valid. */
OFPERR_NXBRC_BAD_REASON,
/* ## ---------------- ## */
/* ## OFPET_BAD_ACTION ## */
/* ## ---------------- ## */
OFPERR_NXBRC_BAD_REASON,
/* ## ---------------- ## */
/* ## OFPET_BAD_ACTION ## */
/* ## ---------------- ## */
- /* OF(2). Error in action description. */
+ /* OF1.0+(2). Error in action description. */
- /* OF(2,0). Unknown action type. */
+ /* OF1.0+(2,0). Unknown action type. */
- /* OF(2,1). Length problem in actions. */
+ /* OF1.0+(2,1). Length problem in actions. */
- /* OF(2,2). Unknown experimenter id specified. */
+ /* OF1.0+(2,2). Unknown experimenter id specified. */
OFPERR_OFPBAC_BAD_VENDOR,
OFPERR_OFPBAC_BAD_VENDOR,
- /* OF(2,3). Unknown action type for experimenter id. */
+ /* OF1.0+(2,3). Unknown action type for experimenter id. */
OFPERR_OFPBAC_BAD_VENDOR_TYPE,
OFPERR_OFPBAC_BAD_VENDOR_TYPE,
- /* OF(2,4). Problem validating output port. */
+ /* OF1.0+(2,4). Problem validating output port. */
OFPERR_OFPBAC_BAD_OUT_PORT,
OFPERR_OFPBAC_BAD_OUT_PORT,
- /* OF(2,5). Bad action argument. */
+ /* OF1.0+(2,5). Bad action argument. */
OFPERR_OFPBAC_BAD_ARGUMENT,
OFPERR_OFPBAC_BAD_ARGUMENT,
- /* OF(2,6). Permissions error. */
+ /* OF1.0+(2,6). Permissions error. */
- /* OF(2,7). Can't handle this many actions. */
+ /* OF1.0+(2,7). Can't handle this many actions. */
- /* OF(2,8). Problem validating output queue. */
+ /* OF1.0+(2,8). Problem validating output queue. */
OFPERR_OFPBAC_BAD_QUEUE,
/* OF1.1(2,9). Invalid group id in forward action. */
OFPERR_OFPBAC_BAD_QUEUE,
/* OF1.1(2,9). Invalid group id in forward action. */
/* OF1.1(2,12). Actions uses an unsupported tag/encap. */
OFPERR_OFPBAC_BAD_TAG,
/* OF1.1(2,12). Actions uses an unsupported tag/encap. */
OFPERR_OFPBAC_BAD_TAG,
- /* NX(2,256). Must-be-zero action argument had nonzero value. */
+ /* NX1.0+(2,256). Must-be-zero action argument had nonzero value. */
OFPERR_NXBAC_MUST_BE_ZERO,
/* ## --------------------- ## */
OFPERR_NXBAC_MUST_BE_ZERO,
/* ## --------------------- ## */