ofproto_sflow_options_equal(const struct ofproto_sflow_options *a,
const struct ofproto_sflow_options *b)
{
ofproto_sflow_options_equal(const struct ofproto_sflow_options *a,
const struct ofproto_sflow_options *b)
{
&& a->sampling_rate == b->sampling_rate
&& a->polling_interval == b->polling_interval
&& a->header_len == b->header_len
&& a->sampling_rate == b->sampling_rate
&& a->polling_interval == b->polling_interval
&& a->header_len == b->header_len
ofproto_sflow_options_clone(const struct ofproto_sflow_options *old)
{
struct ofproto_sflow_options *new = xmemdup(old, sizeof *old);
ofproto_sflow_options_clone(const struct ofproto_sflow_options *old)
{
struct ofproto_sflow_options *new = xmemdup(old, sizeof *old);
new->agent_device = old->agent_device ? xstrdup(old->agent_device) : NULL;
new->control_ip = old->control_ip ? xstrdup(old->control_ip) : NULL;
return new;
new->agent_device = old->agent_device ? xstrdup(old->agent_device) : NULL;
new->control_ip = old->control_ip ? xstrdup(old->control_ip) : NULL;
return new;
* collectors (which indicates that opening one or more of the configured
* collectors failed, so that we should retry). */
if (options_changed
* collectors (which indicates that opening one or more of the configured
* collectors failed, so that we should retry). */
if (options_changed
collectors_destroy(os->collectors);
collectors_create(&options->targets, SFL_DEFAULT_COLLECTOR_PORT,
&os->collectors);
collectors_destroy(os->collectors);
collectors_create(&options->targets, SFL_DEFAULT_COLLECTOR_PORT,
&os->collectors);