summaryrefslogtreecommitdiff
path: root/utilities/ovs-ofctl.c
diff options
context:
space:
mode:
authorBen Pfaff <blp@ovn.org>2018-02-16 14:03:51 -0800
committerBen Pfaff <blp@ovn.org>2018-03-14 11:41:22 -0700
commitdfc77282c52f324c19a6819372c2ec17675bc7ce (patch)
tree9d74343cd057c7c90babead22c2b75f9726fb307 /utilities/ovs-ofctl.c
parent11b1e59f3af06a3ab02496abbb65564a077744a7 (diff)
downloadopenvswitch-dfc77282c52f324c19a6819372c2ec17675bc7ce.tar.gz
ofp-print: Move much of the printing code into message-specific files.
Until now, the ofp-print code has had a lot of logic specific to individual messages. This code is better put with the other code specific to those messages, so this commit starts to migrate it. There is more work of a similar type to do, but this is a reasonable start. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
Diffstat (limited to 'utilities/ovs-ofctl.c')
-rw-r--r--utilities/ovs-ofctl.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/utilities/ovs-ofctl.c b/utilities/ovs-ofctl.c
index 77aa49649..b5e2b4093 100644
--- a/utilities/ovs-ofctl.c
+++ b/utilities/ovs-ofctl.c
@@ -926,9 +926,9 @@ ofctl_dump_table_features(struct ovs_cmdl_context *ctx)
}
struct ds s = DS_EMPTY_INITIALIZER;
- ofp_print_table_features(&s, &tf, n ? &prev : NULL,
- NULL, NULL,
- tables_to_show(ctx->argv[1]));
+ ofputil_table_features_format(
+ &s, &tf, n ? &prev : NULL, NULL, NULL,
+ tables_to_show(ctx->argv[1]));
puts(ds_cstr(&s));
ds_destroy(&s);
@@ -1571,8 +1571,10 @@ ofctl_dump_flows(struct ovs_cmdl_context *ctx)
struct ds s = DS_EMPTY_INITIALIZER;
for (size_t i = 0; i < n_fses; i++) {
ds_clear(&s);
- ofp_print_flow_stats(&s, &fses[i], ports_to_show(ctx->argv[1]),
- tables_to_show(ctx->argv[1]), show_stats);
+ ofputil_flow_stats_format(&s, &fses[i],
+ ports_to_show(ctx->argv[1]),
+ tables_to_show(ctx->argv[1]),
+ show_stats);
printf(" %s\n", ds_cstr(&s));
}
ds_destroy(&s);