Ejemplo n.º 1
0
void *interface_thread_start(void *arg)
{
	struct interface_config *cfg = arg;

	uinet_initialize_thread();

	ev_run(cfg->loop, 0);

	uinet_finalize_thread();

	return (NULL);
}
Ejemplo n.º 2
0
void *interface_thread_start(void *arg)
{
	struct interface_config *cfg = arg;
	ev_timer if_stats_timer;

	uinet_initialize_thread();

	if (cfg->stats) {
		ev_init(&if_stats_timer, if_stats_timer_cb);
		ev_timer_set(&if_stats_timer, 1.0, 2.0);
		if_stats_timer.data = cfg;
		ev_timer_start(cfg->loop, &if_stats_timer);
	}

	ev_run(cfg->loop, 0);

	uinet_finalize_thread();

	return (NULL);
}