aboutsummaryrefslogtreecommitdiff
path: root/lib/dpif.h
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2011-01-26 07:11:50 -0800
committerBen Pfaff <blp@nicira.com>2011-01-27 21:08:38 -0800
commitc97fb13280c565f55ed0de7cf0bf06ffe8320b70 (patch)
treec0b24d14a13526edd768dd2fe1c033c0e4c3d0ee /lib/dpif.h
parentfeebdea2e5550a71c7accda936b6a55962f60a04 (diff)
dpif: Eliminate "struct odp_flow_stats" from client-visible interface.
Following this commit, "struct odp_flow_stats" is only used in Linux-specific parts of OVS userspace code. This allows the actual Linux datapath interface to evolve more freely. Reviewed by Justin Pettit.
Diffstat (limited to 'lib/dpif.h')
-rw-r--r--lib/dpif.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/lib/dpif.h b/lib/dpif.h
index 22e35801..390cf671 100644
--- a/lib/dpif.h
+++ b/lib/dpif.h
@@ -30,6 +30,7 @@ extern "C" {
#endif
struct dpif;
+struct ds;
struct netdev;
struct nlattr;
struct ofpbuf;
@@ -107,17 +108,26 @@ int dpif_port_dump_done(struct dpif_port_dump *);
int dpif_port_poll(const struct dpif *, char **devnamep);
void dpif_port_poll_wait(const struct dpif *);
+struct dpif_flow_stats {
+ uint64_t n_packets;
+ uint64_t n_bytes;
+ long long int used;
+ uint8_t tcp_flags;
+};
+
+void dpif_flow_stats_format(const struct dpif_flow_stats *, struct ds *);
+
int dpif_flow_flush(struct dpif *);
int dpif_flow_put(struct dpif *, int flags,
const struct nlattr *key, size_t key_len,
const struct nlattr *actions, size_t actions_len,
- struct odp_flow_stats *);
+ struct dpif_flow_stats *);
int dpif_flow_del(struct dpif *,
const struct nlattr *key, size_t key_len,
- struct odp_flow_stats *);
+ struct dpif_flow_stats *);
int dpif_flow_get(const struct dpif *, int flags,
const struct nlattr *key, size_t key_len,
- struct ofpbuf **actionsp, struct odp_flow_stats *);
+ struct ofpbuf **actionsp, struct dpif_flow_stats *);
struct dpif_flow_dump {
const struct dpif *dpif;
@@ -128,7 +138,7 @@ void dpif_flow_dump_start(struct dpif_flow_dump *, const struct dpif *);
bool dpif_flow_dump_next(struct dpif_flow_dump *,
const struct nlattr **key, size_t *key_len,
const struct nlattr **actions, size_t *actions_len,
- const struct odp_flow_stats **);
+ const struct dpif_flow_stats **);
int dpif_flow_dump_done(struct dpif_flow_dump *);
int dpif_execute(struct dpif *, const struct nlattr *actions,