aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2012-06-28 17:01:57 +0000
committerGuy Harris <guy@alum.mit.edu>2012-06-28 17:01:57 +0000
commitfde7f31b4f928ad36bb7a5ce37806dd322b78a61 (patch)
tree83d063f1dbbe945305cd5d635f7fc4be2c268bf8
parent1d1391ed47b9b81770f19c13081de78569050eb9 (diff)
No pcap, no interfaces to monitor.
svn path=/trunk/; revision=43522
-rw-r--r--iface_monitor.c5
-rw-r--r--iface_monitor.h6
-rw-r--r--ui/gtk/gtk_iface_monitor.c3
-rw-r--r--ui/gtk/gtk_iface_monitor.h4
4 files changed, 17 insertions, 1 deletions
diff --git a/iface_monitor.c b/iface_monitor.c
index ec65bd4076..b90f760710 100644
--- a/iface_monitor.c
+++ b/iface_monitor.c
@@ -22,6 +22,9 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "config.h"
+
+#ifdef HAVE_LIBPCAP
+
#include "iface_monitor.h"
#ifdef HAVE_LIBNL
@@ -175,3 +178,5 @@ iface_mon_event(void)
}
#endif /* HAVE_LIBNL */
+
+#endif /* HAVE_LIBPCAP */
diff --git a/iface_monitor.h b/iface_monitor.h
index a33df9b904..88bd0a19d8 100644
--- a/iface_monitor.h
+++ b/iface_monitor.h
@@ -24,6 +24,8 @@
#ifndef IFACE_MONITOR_H
#define IFACE_MONITOR_H
+#ifdef HAVE_LIBPCAP
+
typedef void (*iface_mon_cb)(const char *iface, int up);
int
iface_mon_start(iface_mon_cb cb);
@@ -37,4 +39,6 @@ iface_mon_get_sock(void);
void
iface_mon_event(void);
-#endif
+#endif /* HAVE_LIBPCAP */
+
+#endif /* IFACE_MONITOR_H */
diff --git a/ui/gtk/gtk_iface_monitor.c b/ui/gtk/gtk_iface_monitor.c
index 553c707b66..fffc5f32e4 100644
--- a/ui/gtk/gtk_iface_monitor.c
+++ b/ui/gtk/gtk_iface_monitor.c
@@ -24,6 +24,8 @@
#include "config.h"
+#ifdef HAVE_LIBPCAP
+
#include "../../iface_monitor.h"
#include <gtk/gtk.h>
@@ -91,3 +93,4 @@ gtk_iface_mon_stop(void)
return 0;
}
+#endif /* HAVE_LIBPCAP */
diff --git a/ui/gtk/gtk_iface_monitor.h b/ui/gtk/gtk_iface_monitor.h
index c5ef1f92f5..dbbc15416a 100644
--- a/ui/gtk/gtk_iface_monitor.h
+++ b/ui/gtk/gtk_iface_monitor.h
@@ -25,10 +25,14 @@
#ifndef GTK_IFACE_MONITOR_H
#define GTK_IFACE_MONITOR_H
+#ifdef HAVE_LIBPCAP
+
int
gtk_iface_mon_start(void);
int
gtk_iface_mon_stop(void);
+#endif /* HAVE_LIBPCAP */
+
#endif