X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fdpif.h;h=7d0881fab3127640fc9fcc0b275c0daa636a7381;hb=29c7a2b26ed005902b2179d7fe242eb711184b88;hp=768934b15563852ce4ea11b6df9ae3fc3e923e0b;hpb=b99d3ceeedd2c5533c13f9794616fc6d9c49c0de;p=openvswitch diff --git a/lib/dpif.h b/lib/dpif.h index 768934b1..7d0881fa 100644 --- a/lib/dpif.h +++ b/lib/dpif.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, 2010, 2011, 2012 Nicira Networks. + * Copyright (c) 2008, 2009, 2010, 2011, 2012 Nicira, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -57,10 +57,11 @@ void dpif_wait(struct dpif *); const char *dpif_name(const struct dpif *); const char *dpif_base_name(const struct dpif *); +const char *dpif_type(const struct dpif *); int dpif_delete(struct dpif *); -/* Statisticss for a dpif as a whole. */ +/* Statistics for a dpif as a whole. */ struct dpif_dp_stats { uint64_t n_hit; /* Number of flow table matches. */ uint64_t n_missed; /* Number of flow table misses. */ @@ -72,8 +73,8 @@ int dpif_get_dp_stats(const struct dpif *, struct dpif_dp_stats *); /* Port operations. */ -int dpif_port_add(struct dpif *, struct netdev *, uint16_t *port_nop); -int dpif_port_del(struct dpif *, uint16_t port_no); +int dpif_port_add(struct dpif *, struct netdev *, uint32_t *port_nop); +int dpif_port_del(struct dpif *, uint32_t port_no); /* A port within a datapath. * @@ -85,14 +86,15 @@ struct dpif_port { }; void dpif_port_clone(struct dpif_port *, const struct dpif_port *); void dpif_port_destroy(struct dpif_port *); -int dpif_port_query_by_number(const struct dpif *, uint16_t port_no, +bool dpif_port_exists(const struct dpif *dpif, const char *devname); +int dpif_port_query_by_number(const struct dpif *, uint32_t port_no, struct dpif_port *); int dpif_port_query_by_name(const struct dpif *, const char *devname, struct dpif_port *); -int dpif_port_get_name(struct dpif *, uint16_t port_no, +int dpif_port_get_name(struct dpif *, uint32_t port_no, char *name, size_t name_size); int dpif_get_max_ports(const struct dpif *); -uint32_t dpif_port_get_pid(const struct dpif *, uint16_t port_no); +uint32_t dpif_port_get_pid(const struct dpif *, uint32_t port_no); struct dpif_port_dump { const struct dpif *dpif; @@ -129,7 +131,7 @@ struct dpif_flow_stats { }; void dpif_flow_stats_extract(const struct flow *, const struct ofpbuf *packet, - struct dpif_flow_stats *); + long long int used, struct dpif_flow_stats *); void dpif_flow_stats_format(const struct dpif_flow_stats *, struct ds *); enum dpif_flow_put_flags { @@ -251,7 +253,7 @@ struct dpif_upcall { }; int dpif_recv_set(struct dpif *, bool enable); -int dpif_recv(struct dpif *, struct dpif_upcall *); +int dpif_recv(struct dpif *, struct dpif_upcall *, struct ofpbuf *); void dpif_recv_purge(struct dpif *); void dpif_recv_wait(struct dpif *);