#include <arpa/inet.h>
#include <errno.h>
#include <inttypes.h>
+#include <sys/socket.h>
#include <net/if.h>
#include <string.h>
#include <stdlib.h>
#include "poll-loop.h"
#include "status.h"
#include "timeval.h"
-
-#define THIS_MODULE VLM_in_band
#include "vlog.h"
+VLOG_DEFINE_THIS_MODULE(in_band)
+
/* In-band control allows a single network to be used for OpenFlow
* traffic and other data traffic. Refer to ovs-vswitchd.conf(5) and
* secchan(8) for a description of configuring in-band control.
void
in_band_wait(struct in_band *in_band)
{
- time_t now = time_now();
- time_t wakeup
+ long long int wakeup
= MIN(in_band->next_remote_refresh, in_band->next_local_refresh);
- if (wakeup > now) {
- poll_timer_wait((wakeup - now) * 1000);
- } else {
- poll_immediate_wake();
- }
+ poll_timer_wait_until(wakeup * 1000);
}
/* ofproto has flushed all flows from the flow table and it is calling us back