- struct ofpbuf *reply;
-
- run(vconn_transact(vconn, request, &reply), "talking to %s",
- vconn_get_name(vconn));
- ofp_print(stdout, reply->data, reply->size, verbosity + 1);
- ofpbuf_delete(reply);
-}
-
-static void
-dump_trivial_transaction(const char *vconn_name, enum ofpraw raw)
-{
- struct ofpbuf *request;
- struct vconn *vconn;
-
- open_vconn(vconn_name, &vconn);
- request = ofpraw_alloc(raw, vconn_get_version(vconn), 0);
- dump_transaction(vconn, request);
- vconn_close(vconn);
-}
-
-static void
-dump_stats_transaction(struct vconn *vconn, struct ofpbuf *request)
-{
- const struct ofp_header *request_oh = request->data;
- ovs_be32 send_xid = request_oh->xid;
- enum ofpraw request_raw;
- enum ofpraw reply_raw;
- bool done = false;
+ const struct ofp_header *oh = request->data;
+ if (ofpmsg_is_stat_request(oh)) {
+ ovs_be32 send_xid = oh->xid;
+ enum ofpraw request_raw;
+ enum ofpraw reply_raw;
+ bool done = false;