Suggested-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Justin Pettit <jpettit@nicira.com>
struct collectors *collectors;
SFLAgent *sflow_agent;
struct ofproto_sflow_options *options;
- struct dpif *dpif;
time_t next_tick;
size_t n_flood, n_all;
struct hmap ports; /* Contains "struct dpif_sflow_port"s. */
}
struct dpif_sflow *
-dpif_sflow_create(struct dpif *dpif)
+dpif_sflow_create(void)
{
struct dpif_sflow *ds;
ds = xcalloc(1, sizeof *ds);
- ds->dpif = dpif;
ds->next_tick = time_now() + 1;
hmap_init(&ds->ports);
ds->probability = 0;
struct ofproto_sflow_options;
struct ofport;
-struct dpif_sflow *dpif_sflow_create(struct dpif *);
+struct dpif_sflow *dpif_sflow_create(void);
uint32_t dpif_sflow_get_probability(const struct dpif_sflow *);
void dpif_sflow_destroy(struct dpif_sflow *);
if (!ds) {
struct ofport_dpif *ofport;
- ds = ofproto->sflow = dpif_sflow_create(ofproto->dpif);
+ ds = ofproto->sflow = dpif_sflow_create();
HMAP_FOR_EACH (ofport, up.hmap_node, &ofproto->up.ports) {
dpif_sflow_add_port(ds, &ofport->up, ofport->odp_port);
}