device: add global flag for disabling offloading

Add global flag to disable offloading or just warn on it.
pull/2266/head
Victor Julien 9 years ago
parent 7004987670
commit 2780fba1d1

@ -39,6 +39,23 @@ static int live_devices_stats = 1;
static int LiveSafeDeviceName(const char *devname,
char *newdevname, size_t destlen);
static int g_live_devices_disable_offloading = 1;
void LiveSetOffloadDisable(void)
{
g_live_devices_disable_offloading = 1;
}
void LiveSetOffloadWarn(void)
{
g_live_devices_disable_offloading = 0;
}
int LiveGetOffload(void)
{
return g_live_devices_disable_offloading;
}
/**
* \brief Add a pcap device for monitoring
*

@ -34,6 +34,9 @@ typedef struct LiveDevice_ {
TAILQ_ENTRY(LiveDevice_) next;
} LiveDevice;
void LiveSetOffloadDisable(void);
void LiveSetOffloadWarn(void);
int LiveGetOffload(void);
int LiveRegisterDevice(const char *dev);
int LiveGetDeviceCount(void);

Loading…
Cancel
Save