summaryrefslogtreecommitdiff
path: root/promisc.c
diff options
context:
space:
mode:
Diffstat (limited to 'promisc.c')
-rw-r--r--promisc.c27
1 files changed, 0 insertions, 27 deletions
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 <string.h>
-#include <sys/socket.h>
-#include <linux/if.h>
-
-#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);
-}