summaryrefslogtreecommitdiff
path: root/netsniff-ng.c
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2013-08-09 12:04:49 +0200
committerTobias Klauser <tklauser@distanz.ch>2013-08-09 12:04:49 +0200
commita2e70ae5b06ac6fa09cce3848c2ed795967b174f (patch)
tree214b9c1e15a502f4cb57939fceec371c1a970f83 /netsniff-ng.c
parentaf0c1f5f89750f16054c988937e180764c411c20 (diff)
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 <tklauser@distanz.ch>
Diffstat (limited to 'netsniff-ng.c')
-rw-r--r--netsniff-ng.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/netsniff-ng.c b/netsniff-ng.c
index 8e8b263..0f35d04 100644
--- a/netsniff-ng.c
+++ b/netsniff-ng.c
@@ -26,7 +26,7 @@
#include "ring_rx.h"
#include "ring_tx.h"
#include "mac80211.h"
-#include "promisc.h"
+#include "dev.h"
#include "built_in.h"
#include "pcap_io.h"
#include "privs.h"
@@ -394,7 +394,7 @@ static void receive_to_xmit(struct ctx *ctx)
dissector_init_all(ctx->print_mode);
if (ctx->promiscuous)
- ifflags = enter_promiscuous_mode(ctx->device_in);
+ ifflags = device_enter_promiscuous_mode(ctx->device_in);
if (ctx->kpull)
interval = ctx->kpull;
@@ -490,7 +490,7 @@ static void receive_to_xmit(struct ctx *ctx)
destroy_rx_ring(rx_sock, &rx_ring);
if (ctx->promiscuous)
- leave_promiscuous_mode(ctx->device_in, ifflags);
+ device_leave_promiscuous_mode(ctx->device_in, ifflags);
close(tx_sock);
close(rx_sock);
@@ -938,7 +938,7 @@ static void recv_only_or_dump(struct ctx *ctx)
}
if (ctx->promiscuous)
- ifflags = enter_promiscuous_mode(ctx->device_in);
+ ifflags = device_enter_promiscuous_mode(ctx->device_in);
if (dump_to_pcap(ctx) && __pcap_io->init_once_pcap)
__pcap_io->init_once_pcap();
@@ -1003,7 +1003,7 @@ static void recv_only_or_dump(struct ctx *ctx)
destroy_rx_ring(sock, &rx_ring);
if (ctx->promiscuous)
- leave_promiscuous_mode(ctx->device_in, ifflags);
+ device_leave_promiscuous_mode(ctx->device_in, ifflags);
if (ctx->rfraw)
leave_rfmon_mac80211(ctx->device_in);