static void ofconn_run(struct ofconn *,
bool (*handle_openflow)(struct ofconn *,
- struct ofpbuf *ofp_msg));
+ const struct ofpbuf *ofp_msg));
static void ofconn_wait(struct ofconn *, bool handling_openflow);
static const char *ofconn_get_target(const struct ofconn *);
* fail-open processing) are suppressed too. */
void
connmgr_run(struct connmgr *mgr,
- bool (*handle_openflow)(struct ofconn *, struct ofpbuf *ofp_msg))
+ bool (*handle_openflow)(struct ofconn *,
+ const struct ofpbuf *ofp_msg))
{
struct ofconn *ofconn, *next_ofconn;
struct ofservice *ofservice;
ofconn_set_rate_limit(ofconn, ofservice->rate_limit,
ofservice->burst_limit);
} else if (retval != EAGAIN) {
- VLOG_WARN_RL(&rl, "accept failed (%s)", strerror(retval));
+ VLOG_WARN_RL(&rl, "accept failed (%s)", ovs_strerror(retval));
}
}
if (!retval) {
add_snooper(mgr, vconn);
} else if (retval != EAGAIN) {
- VLOG_WARN_RL(&rl, "accept failed (%s)", strerror(retval));
+ VLOG_WARN_RL(&rl, "accept failed (%s)", ovs_strerror(retval));
}
}
}
if (!error) {
pvconns[n_pvconns++] = pvconn;
} else {
- VLOG_ERR("failed to listen on %s: %s", name, strerror(error));
+ VLOG_ERR("failed to listen on %s: %s", name, ovs_strerror(error));
if (!retval) {
retval = error;
}
/* Same as pktbuf_retrieve(), using the pktbuf owned by 'ofconn'. */
enum ofperr
ofconn_pktbuf_retrieve(struct ofconn *ofconn, uint32_t id,
- struct ofpbuf **bufferp, uint16_t *in_port)
+ struct ofpbuf **bufferp, ofp_port_t *in_port)
{
return pktbuf_retrieve(ofconn->pktbuf, id, bufferp, in_port);
}
static void
ofconn_run(struct ofconn *ofconn,
- bool (*handle_openflow)(struct ofconn *, struct ofpbuf *ofp_msg))
+ bool (*handle_openflow)(struct ofconn *,
+ const struct ofpbuf *ofp_msg))
{
struct connmgr *mgr = ofconn->connmgr;
size_t i;
/* In-band implementation. */
bool
-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)
+connmgr_has_in_band(struct connmgr *mgr)
{
- return !mgr->in_band || in_band_rule_check(flow, local_odp_port,
- odp_actions, actions_len);
+ return mgr->in_band != NULL;
}
\f
/* Fail-open and in-band implementation. */