2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

ofp-util: New function ofputil_decode_flow_stats_reply().

This function will see more use later in this series.  This commit just
starts using it to make ofp-print output entirely consistent for
OFPST_FLOW and NXST_FLOW replies.
This commit is contained in:
Ben Pfaff
2011-03-10 15:02:05 -08:00
parent f9cbfbe4f4
commit 4ffd1b437c
4 changed files with 163 additions and 139 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2009, 2010 Nicira Networks.
* Copyright (c) 2008, 2009, 2010, 2011 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -157,6 +157,25 @@ int ofputil_decode_flow_stats_request(struct flow_stats_request *,
struct ofpbuf *ofputil_encode_flow_stats_request(
const struct flow_stats_request *, enum nx_flow_format);
/* Flow stats reply, independent of flow format. */
struct ofputil_flow_stats {
struct cls_rule rule;
ovs_be64 cookie;
uint8_t table_id;
uint32_t duration_sec;
uint32_t duration_nsec;
uint16_t idle_timeout;
uint16_t hard_timeout;
uint64_t packet_count;
uint64_t byte_count;
union ofp_action *actions;
size_t n_actions;
};
int ofputil_decode_flow_stats_reply(struct ofputil_flow_stats *,
struct ofpbuf *msg,
enum nx_flow_format);
/* Flow removed message, independent of flow format. */
struct ofputil_flow_removed {
struct cls_rule rule;