From a2e70ae5b06ac6fa09cce3848c2ed795967b174f Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Fri, 9 Aug 2013 12:04:49 +0200 Subject: dev: Integrate `promisc' module into `dev' module Since entering/leaving promiscuous mode also is a device specific function and all users of the `promisc' module also use `dev', integrate it there. Also rename the functions to have a `device_' prefix like the other functions in the module. Signed-off-by: Tobias Klauser --- promisc.c | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 promisc.c (limited to 'promisc.c') diff --git a/promisc.c b/promisc.c deleted file mode 100644 index 56f6e4b..0000000 --- a/promisc.c +++ /dev/null @@ -1,27 +0,0 @@ -#include -#include -#include - -#include "promisc.h" -#include "dev.h" - -short enter_promiscuous_mode(const char *ifname) -{ - short ifflags; - - if (!strncmp("any", ifname, strlen("any"))) - return 0; - - ifflags = device_get_flags(ifname); - device_set_flags(ifname, ifflags | IFF_PROMISC); - - return ifflags; -} - -void leave_promiscuous_mode(const char *ifname, short oldflags) -{ - if (!strncmp("any", ifname, strlen("any"))) - return; - - device_set_flags(ifname, oldflags); -} -- cgit v1.2.3-54-g00ecf