From a6e7d44a2898694662497e81c742579161ea0e3e Mon Sep 17 00:00:00 2001 From: Sebastian Date: Sat, 1 Oct 2016 10:51:47 +0200 Subject: [PATCH] - libusipp: _mode after pcap_set_immediate --- README.md | 2 +- src/config.h.in | 4 ++-- src/configure.ac | 6 +++--- src/datalink.cc | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 415ad3f..94b9780 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ you prefer. In such case, you have to edit the generated `Makefile` to point to as well as setting/unsetting the defines you need in `config.h`. Having more than one libpcap install is not uncommon, since various functions such -as `pcap_set_immediate()` or mmapped packet sockets just appeared recently. +as `pcap_set_immediate_mode()` or mmapped packet sockets just appeared recently. 3. Compiling the examples diff --git a/src/config.h.in b/src/config.h.in index 5edfc0f..9acedea 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -45,8 +45,8 @@ /* Define to 1 if you have the `pcap_inject' function. */ #undef HAVE_PCAP_INJECT -/* Define if you have pcap_set_immediate. */ -#undef HAVE_PCAP_SET_IMMEDIATE +/* Define if you have pcap_set_immediate_mode. */ +#undef HAVE_PCAP_SET_IMMEDIATE_MODE /* Define if radiotap exists. */ #undef HAVE_RADIOTAP diff --git a/src/configure.ac b/src/configure.ac index d6da07c..9f79a9b 100644 --- a/src/configure.ac +++ b/src/configure.ac @@ -73,11 +73,11 @@ case "$r" in *) esac -r=`grep pcap_set_immediate /usr/include/pcap/pcap.h 2>/dev/null` -r+=`grep pcap_set_immediate /usr/local/include/pcap/pcap.h 2>/dev/null` +r=`grep pcap_set_immediate_mode /usr/include/pcap/pcap.h 2>/dev/null` +r+=`grep pcap_set_immediate_mode /usr/local/include/pcap/pcap.h 2>/dev/null` case "$r" in *pcap_set_immediate*) - AC_DEFINE([HAVE_PCAP_SET_IMMEDIATE], [1], [Define if you have pcap_set_immediate.]) + AC_DEFINE([HAVE_PCAP_SET_IMMEDIATE_MODE], [1], [Define if you have pcap_set_immediate_mode.]) echo "Enabling pcap_set_immediate" ;; *) diff --git a/src/datalink.cc b/src/datalink.cc index b948f52..f6e86b4 100644 --- a/src/datalink.cc +++ b/src/datalink.cc @@ -263,7 +263,7 @@ int pcap::init_device(const string &dev, int promisc, size_t snaplen) e += ebuf; return die(e, STDERR, -1); } -#ifdef HAVE_PCAP_SET_IMMEDIATE +#ifdef HAVE_PCAP_SET_IMMEDIATE_MODE if (pcap_set_immediate_mode(d_pd, 1) < 0) return die("pcap::init_device: Unable to set immediate mode.", STDERR, -1); #endif