From dfc77282c52f324c19a6819372c2ec17675bc7ce Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Fri, 16 Feb 2018 14:03:51 -0800 Subject: 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 Acked-by: Justin Pettit --- utilities/ovs-ofctl.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'utilities/ovs-ofctl.c') 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); -- cgit v1.2.1