varia. now correctly sniffs in non-blocking mode (essential for multi-interface

sniffing), while requires at least libpcap 0.8
This commit is contained in:
Arnout Engelen
2005-04-03 09:31:26 +00:00
parent a142648f45
commit c66bc829ea
11 changed files with 56 additions and 28 deletions

View File

@@ -3,6 +3,7 @@
#include <netinet/ip.h>
#include <netinet/ip6.h>
#include <netinet/tcp.h>
#include <string.h> // for memcpy
#include <pcap.h>
#include "decpcap.h"
@@ -222,3 +223,7 @@ int dp_dispatch (struct dp_handle * handle, int count, u_char *user, int size) {
handle->userdata_size = size;
return pcap_dispatch (handle->pcap_handle, count, dp_pcap_callback, (u_char *)handle);
}
int dp_setnonblock (struct dp_handle * handle, int i, char * errbuf) {
return pcap_setnonblock (handle->pcap_handle, i, errbuf);
}