- /* Add a single sampler to represent the datapath (special <ifIndex>:0
- * datasource). The alternative is to model a physical switch more closely
- * and instantiate a separate sampler object for each interface, but then
- * unicasts would have to be offered to two samplers, and
- * broadcasts/multicasts would have to be offered to all of them. Doing it
- * this way with a single <ifindex>:0 sampler is much more efficient for a
- * virtual switch, and is allowed by the sFlow standard.
- */
- SFL_DS_SET(dsi, 0, 0, 0);
- sampler = sfl_agent_addSampler(os->sflow_agent, &dsi);
- sfl_sampler_set_sFlowFsReceiver(sampler, RECEIVER_INDEX);
- sfl_sampler_set_sFlowFsPacketSamplingRate(sampler, options->sampling_rate);
- sfl_sampler_set_sFlowFsMaximumHeaderSize(sampler, options->header_len);
-