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. */
if (!netdev_get_features(dsp->ofport->netdev, ¤t, NULL, NULL, NULL)) {
/* The values of ifDirection come from MAU MIB (RFC 2668): 0 = unknown,
1 = full-duplex, 2 = half-duplex, 3 = in, 4=out */
- counters->ifSpeed = netdev_features_to_bps(current);
+ counters->ifSpeed = netdev_features_to_bps(current, 0);
counters->ifDirection = (netdev_features_is_full_duplex(current)
? 1 : 2);
} else {
}
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;