-enum bundle_state {
- BS_OPEN,
- BS_CLOSED
-};
-
-struct ofp_bundle {
- struct hmap_node node; /* In struct ofconn's "bundles" hmap. */
- uint32_t id;
- uint16_t flags;
- enum bundle_state state;
-
- /* List of 'struct bundle_message's */
- struct ovs_list msg_list;
-};
-
-struct bundle_message {
- struct ofp_header *msg;
- struct ovs_list node; /* Element in 'struct ofp_bundles's msg_list */
-};
-
-static uint32_t
-bundle_hash(uint32_t id)
-{
- return hash_int(id, 0);
-}
-
-static struct ofp_bundle *
-ofp_bundle_find(struct hmap *bundles, uint32_t id)
-{
- struct ofp_bundle *bundle;
-
- HMAP_FOR_EACH_IN_BUCKET(bundle, node, bundle_hash(id), bundles) {
- if (bundle->id == id) {
- return bundle;
- }
- }
-
- return NULL;
-}
-