Signed-off-by: Alexandru Copot <alex.miha...@gmail.com> Cc: Daniel Baluta <dbal...@ixiacom.com> --- include/openflow/openflow-1.4.h | 114 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+)
diff --git a/include/openflow/openflow-1.4.h b/include/openflow/openflow-1.4.h index 332a0d3..a6645b9 100644 --- a/include/openflow/openflow-1.4.h +++ b/include/openflow/openflow-1.4.h @@ -153,4 +153,118 @@ struct ofp14_role_prop_experimenter { }; OFP_ASSERT(sizeof(struct ofp14_role_prop_experimenter) == 12); +/* OFPET_EXPERIMENTER: Error message (datapath -> controller). */ +struct ofp_error_experimenter_msg { + ovs_be16 type; /* OFPET_EXPERIMENTER. */ + ovs_be16 exp_type; /* Experimenter defined. */ + ovs_be32 experimenter; /* Experimenter ID which takes the same form + as in struct ofp_experimenter_header. */ + + /* Variable-length data. Interpreted based on + the type and code. No padding. */ + uint8_t data[0]; +}; +OFP_ASSERT(sizeof(struct ofp_error_experimenter_msg) == 8); + + +/* Message types */ +enum ofp14_exp_type { + ONF_ET_BUNDLE_CONTROL = 2300, + ONF_ET_BUNDLE_ADD_MESSAGE = 2301, +}; + +/* Bundle control message types */ +enum ofp14_bundle_ctrl_type { + OFPBCT_OPEN_REQUEST = 0, + OFPBCT_OPEN_REPLY = 1, + OFPBCT_CLOSE_REQUEST = 2, + OFPBCT_CLOSE_REPLY = 3, + OFPBCT_COMMIT_REQUEST = 4, + OFPBCT_COMMIT_REPLY = 5, + OFPBCT_DISCARD_REQUEST = 6, + OFPBCT_DISCARD_REPLY = 7, +}; + +/* Bundle configuration flags. */ +enum ofp14_bundle_flags { + OFPBF_ATOMIC = 1 << 0, /* Execute atomically. */ + OFPBF_ORDERED = 1 << 1, /* Execute in specified order. */ +}; + +/* Bundle property types. */ +enum ofp14_bundle_prop_type { + OFPBPT_EXPERIMENTER = 0xFFFF, /* Experimenter property. */ +}; + +/* Common header for all Bundle Properties */ +struct ofp14_bundle_prop_header { + ovs_be16 type; /* One of OFPBPT_*. */ + ovs_be16 length; /* Length in bytes of this property. */ +}; +OFP_ASSERT(sizeof(struct ofp14_bundle_prop_header) == 4); + +/* Message structure for ONF_ET_BUNDLE_CONTROL. */ +struct ofp14_bundle_ctrl_msg { + ovs_be32 bundle_id; /* Identify the bundle. */ + ovs_be16 type; /* OFPBCT_*. */ + ovs_be16 flags; /* Bitmap of OFPBF_* flags. */ + /* Bundle Property list. */ + /* struct ofp14_bundle_prop_header properties[0]; */ +}; +OFP_ASSERT(sizeof(struct ofp14_bundle_ctrl_msg) == 8); + +/* Message structure for OFP_BUNDLE_ADD_MESSAGE. +* Adding a message in a bundle is done with. */ +struct ofp14_bundle_add_msg { + ovs_be32 bundle_id; /* Identify the bundle. */ + uint8_t pad[2]; /* Align to 64 bits. */ + ovs_be16 flags; /* Bitmap of ONF_BF_* flags. */ + + struct ofp_header message; /* Message added to the bundle. */ + + /* If there is one property or more, ’message’ is followed by: + * - Exactly (message.length + 7)/8*8 - (message.length) (between 0 and 7) + * bytes of all-zero bytes */ + + /* Bundle Property list. */ + /* struct ofp14_bundle_prop_header properties[0]; */ +}; +OFP_ASSERT(sizeof(struct ofp14_bundle_add_msg) == 16); + +/* Experimenter bundle property */ +struct ofp14_bundle_prop_experimenter { + ovs_be16 type; /* OFPBPT_EXPERIMENTER. */ + ovs_be16 length; /* Length in bytes of this property. */ + ovs_be32 experimenter; /* Experimenter ID which takes the same + form as in struct + ofp_experimenter_header. */ + ovs_be32 exp_type; /* Experimenter defined. */ + /* Followed by: + * - Exactly (length - 12) bytes containing the experimenter data, then + * - Exactly (length + 7)/8*8 - (length) (between 0 and 7) + * bytes of all-zero bytes */ + /* ovs_be32 experimenter_data[0]; */ +}; +OFP_ASSERT(sizeof(struct ofp14_bundle_prop_experimenter) == 12); + +/* ofp_error_msg ’code’ values for OFPET_BUNDLE_FAILED. ’data’ contains + * at least the first 64 bytes of the failed request. */ +enum ofp14_bundle_failed_code { + OFPBFC_UNKNOWN = 2300, /* Unspecified error. */ + OFPBFC_EPERM = 2301, /* Permissions error. */ + OFPBFC_BAD_ID = 2302, /* Bundle ID doesn’t exist. */ + OFPBFC_BUNDLE_EXIST = 2303, /* Bundle ID already exist. */ + OFPBFC_BUNDLE_CLOSED = 2304, /* Bundle ID is closed. */ + OFPBFC_OUT_OF_BUNDLES = 2305, /* Too many bundles IDs. */ + OFPBFC_BAD_TYPE = 2306, /* Unsupported or unknown message control type. */ + OFPBFC_BAD_FLAGS = 2307, /* Unsupported, unknown, or inconsistent flags. */ + OFPBFC_MSG_BAD_LEN = 2308, /* Length problem in included message. */ + OFPBFC_MSG_BAD_XID = 2309, /* Inconsistent or duplicate XID. */ + OFPBFC_MSG_UNSUP = 2310, /* Unsupported message in this bundle. */ + OFPBFC_MSG_CONFLICT = 2311, /* Unsupported message combination in this bundle. */ + OFPBFC_MSG_TOO_MANY = 2312, /* Cant handle this many messages in bundle. */ + OFPBFC_MSG_FAILED = 2313, /* One message in bundle failed. */ + OFPBFC_TIMEOUT = 2314, /* Bundle is taking too long. */ + OFPBFC_BUNDLE_IN_PROGRESS = 2315, /* Bundle is locking the resource. */ +}; #endif /* openflow/openflow-1.4.h */ -- 1.9.0 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev