return ofconn->type;
}
+/* If a master election id is defined, stores it into '*idp' and returns
+ * true. Otherwise, stores UINT64_MAX into '*idp' and returns false. */
+bool
+ofconn_get_master_election_id(const struct ofconn *ofconn, uint64_t *idp)
+{
+ *idp = (ofconn->connmgr->master_election_id_defined
+ ? ofconn->connmgr->master_election_id
+ : UINT64_MAX);
+ return ofconn->connmgr->master_election_id_defined;
+}
+
/* Sets the master election id.
*
* Returns true if successful, false if the id is stale
hmap_remove(&ofconn->connmgr->controllers, &ofconn->hmap_node);
}
+ hmap_destroy(&ofconn->monitors);
list_remove(&ofconn->node);
rconn_destroy(ofconn->rconn);
rconn_packet_counter_destroy(ofconn->packet_in_counter);
/* In-band implementation. */
bool
-connmgr_msg_in_hook(struct connmgr *mgr, const struct flow *flow,
- const struct ofpbuf *packet)
-{
- return mgr->in_band && in_band_msg_in_hook(mgr->in_band, flow, packet);
-}
-
-bool
-connmgr_may_set_up_flow(struct connmgr *mgr, const struct flow *flow,
- uint32_t local_odp_port,
- const struct nlattr *odp_actions,
- size_t actions_len)
+connmgr_must_output_local(struct connmgr *mgr, const struct flow *flow,
+ uint32_t local_odp_port,
+ const struct nlattr *odp_actions,
+ size_t actions_len)
{
return !mgr->in_band || in_band_rule_check(flow, local_odp_port,
odp_actions, actions_len);