static enum nx_role ofconn_get_role(const struct ofconn *);
static void ofconn_set_role(struct ofconn *, enum nx_role);
+static int ofconn_pktbuf_retrieve(struct ofconn *, uint32_t id,
+ struct ofpbuf **bufferp, uint16_t *in_port);
+
+
static void queue_tx(struct ofpbuf *msg, const struct ofconn *ofconn,
struct rconn_packet_counter *counter);
{
ofconn->role = role;
}
+
+static int
+ofconn_pktbuf_retrieve(struct ofconn *ofconn, uint32_t id,
+ struct ofpbuf **bufferp, uint16_t *in_port)
+{
+ return pktbuf_retrieve(ofconn->pktbuf, id, bufferp, in_port);
+}
\f
static void
ofservice_reconfigure(struct ofservice *ofservice,
/* Get payload. */
if (opo->buffer_id != htonl(UINT32_MAX)) {
- error = pktbuf_retrieve(ofconn->pktbuf, ntohl(opo->buffer_id),
- &buffer, &in_port);
+ error = ofconn_pktbuf_retrieve(ofconn, ntohl(opo->buffer_id),
+ &buffer, &in_port);
if (error || !buffer) {
return error;
}
error = 0;
if (fm->buffer_id != UINT32_MAX) {
- error = pktbuf_retrieve(ofconn->pktbuf, fm->buffer_id,
- &packet, &in_port);
+ error = ofconn_pktbuf_retrieve(ofconn, fm->buffer_id,
+ &packet, &in_port);
} else {
packet = NULL;
in_port = UINT16_MAX;
return 0;
}
- error = pktbuf_retrieve(ofconn->pktbuf, buffer_id, &packet, &in_port);
+ error = ofconn_pktbuf_retrieve(ofconn, buffer_id, &packet, &in_port);
if (error) {
return error;
}