}
static struct ofpbuf *
-make_stats_reply(ovs_be32 xid, ovs_be16 type, size_t body_len)
+make_ofp_stats_reply(ovs_be32 xid, ovs_be16 type, size_t body_len)
{
struct ofp_stats_reply *osr;
struct ofpbuf *msg;
}
static struct ofpbuf *
-start_stats_reply(const struct ofp_stats_request *request, size_t body_len)
+start_ofp_stats_reply(const struct ofp_stats_request *request, size_t body_len)
{
- return make_stats_reply(request->header.xid, request->type, body_len);
+ return make_ofp_stats_reply(request->header.xid, request->type, body_len);
}
static void *
-append_stats_reply(size_t nbytes, struct ofconn *ofconn, struct ofpbuf **msgp)
+append_ofp_stats_reply(size_t nbytes, struct ofconn *ofconn,
+ struct ofpbuf **msgp)
{
struct ofpbuf *msg = *msgp;
assert(nbytes <= UINT16_MAX - sizeof(struct ofp_stats_reply));
if (nbytes + msg->size > UINT16_MAX) {
struct ofp_stats_reply *reply = msg->data;
reply->flags = htons(OFPSF_REPLY_MORE);
- *msgp = make_stats_reply(reply->header.xid, reply->type, nbytes);
+ *msgp = make_ofp_stats_reply(reply->header.xid, reply->type, nbytes);
queue_tx(msg, ofconn, ofconn->reply_counter);
}
return ofpbuf_put_uninit(*msgp, nbytes);
struct ofp_desc_stats *ods;
struct ofpbuf *msg;
- msg = start_stats_reply(request, sizeof *ods);
- ods = append_stats_reply(sizeof *ods, ofconn, &msg);
+ msg = start_ofp_stats_reply(request, sizeof *ods);
+ ods = append_ofp_stats_reply(sizeof *ods, ofconn, &msg);
memset(ods, 0, sizeof *ods);
ovs_strlcpy(ods->mfr_desc, p->mfr_desc, sizeof ods->mfr_desc);
ovs_strlcpy(ods->hw_desc, p->hw_desc, sizeof ods->hw_desc);
struct rule *rule;
int n_rules;
- msg = start_stats_reply(request, sizeof *ots * 2);
+ msg = start_ofp_stats_reply(request, sizeof *ots * 2);
/* Count rules other than subrules. */
n_rules = classifier_count(&p->cls);
}
/* Classifier table. */
- ots = append_stats_reply(sizeof *ots, ofconn, &msg);
+ ots = append_ofp_stats_reply(sizeof *ots, ofconn, &msg);
memset(ots, 0, sizeof *ots);
strcpy(ots->name, "classifier");
ots->wildcards = (ofconn->flow_format == NXFF_OPENFLOW10
* netdev_get_stats() will log errors. */
netdev_get_stats(port->netdev, &stats);
- ops = append_stats_reply(sizeof *ops, ofconn, msgp);
+ ops = append_ofp_stats_reply(sizeof *ops, ofconn, msgp);
ops->port_no = htons(port->opp.port_no);
memset(ops->pad, 0, sizeof ops->pad);
ops->rx_packets = htonll(stats.rx_packets);
}
psr = (struct ofp_port_stats_request *) osr->body;
- msg = start_stats_reply(osr, sizeof *ops * 16);
+ msg = start_ofp_stats_reply(osr, sizeof *ops * 16);
if (psr->port_no != htons(OFPP_NONE)) {
port = get_port(p, ofp_port_to_odp_port(ntohs(psr->port_no)));
if (port) {
query_stats(cbdata->ofconn->ofproto, rule, &packet_count, &byte_count);
- ofs = append_stats_reply(len, cbdata->ofconn, &cbdata->msg);
+ ofs = append_ofp_stats_reply(len, cbdata->ofconn, &cbdata->msg);
ofs->length = htons(len);
ofs->table_id = 0;
ofs->pad = 0;
COVERAGE_INC(ofproto_flows_req);
cbdata.ofconn = ofconn;
cbdata.out_port = fsr->out_port;
- cbdata.msg = start_stats_reply(osr, 1024);
+ cbdata.msg = start_ofp_stats_reply(osr, 1024);
cls_rule_from_match(&fsr->match, 0, NXFF_OPENFLOW10, 0, &target);
classifier_for_each_match(&ofconn->ofproto->cls, &target,
table_id_to_include(fsr->table_id),
cls_rule_from_match(&request->match, 0, NXFF_OPENFLOW10, 0, &target);
- msg = start_stats_reply(osr, sizeof *reply);
- reply = append_stats_reply(sizeof *reply, ofconn, &msg);
+ msg = start_ofp_stats_reply(osr, sizeof *reply);
+ reply = append_ofp_stats_reply(sizeof *reply, ofconn, &msg);
query_aggregate_stats(ofconn->ofproto, &target, request->out_port,
request->table_id, reply);
queue_tx(msg, ofconn, ofconn->reply_counter);
{
struct ofp_queue_stats *reply;
- reply = append_stats_reply(sizeof *reply, cbdata->ofconn, &cbdata->msg);
+ reply = append_ofp_stats_reply(sizeof *reply, cbdata->ofconn, &cbdata->msg);
reply->port_no = htons(cbdata->ofport->opp.port_no);
memset(reply->pad, 0, sizeof reply->pad);
reply->queue_id = htonl(queue_id);
COVERAGE_INC(ofproto_queue_req);
cbdata.ofconn = ofconn;
- cbdata.msg = start_stats_reply(osr, 128);
+ cbdata.msg = start_ofp_stats_reply(osr, 128);
port_no = ntohs(qsr->port_no);
queue_id = ntohl(qsr->queue_id);