From: Christian Grothoff Date: Wed, 28 Jul 2010 11:20:36 +0000 (+0000) Subject: detect pcap X-Git-Tag: initial-import-from-subversion-38251~20826 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=7b7cee05d26d1fe61c8803a454a1d52b502edd4a;p=oweals%2Fgnunet.git detect pcap --- diff --git a/configure.ac b/configure.ac index 19bdb5ee8..fb6856314 100644 --- a/configure.ac +++ b/configure.ac @@ -346,6 +346,38 @@ AM_CONDITIONAL(HAVE_POSTGRES, test x$postgres = xtrue) AC_SUBST(POSTGRES_CPPFLAGS) AC_SUBST(POSTGRES_LDFLAGS) +# test for pcap +pcap=false +AC_MSG_CHECKING(for libpcap) +AC_ARG_WITH(pcap, + [ --with-pcap=PFX base of pcap installation], + [AC_MSG_RESULT("$with_pcap") + case $with_pcap in + no) + ;; + yes) + AC_CHECK_HEADERS(pcap.h, + pcap=true) + ;; + *) + LDFLAGS="-L$with_pcap/lib $LDFLAGS" + CPPFLAGS="-I$with_pcap/include $CPPFLAGS" + AC_CHECK_HEADERS(pcap.h, + EXT_LIB_PATH="-L$with_pcap/lib $EXT_LIB_PATH" + PCAP_LDFLAGS="-L$with_pcap/lib" + PCAP_CPPFLAGS="-I$with_pcap/include" + pcap=true) + LDFLAGS=$SAVE_LDFLAGS + CPPFLAGS=$SAVE_CPPFLAGS + ;; + esac + ], + [AC_MSG_RESULT([--with-pcap not specified]) + AC_CHECK_HEADERS(pcap.h, pcap=true)]) +AM_CONDITIONAL(HAVE_PCAP, test x$pcap = xtrue) +AC_SUBST(PCAP_CPPFLAGS) +AC_SUBST(PCAP_LDFLAGS) + # test for libz (maybe required for linking mysql) zlib=1 diff --git a/src/dht/Makefile.am b/src/dht/Makefile.am index 8f4fec4a9..21192f91c 100644 --- a/src/dht/Makefile.am +++ b/src/dht/Makefile.am @@ -20,7 +20,7 @@ endif lib_LTLIBRARIES = libgnunetdht.la \ libgnunetdhtlog.la - + plugin_LTLIBRARIES = \ libgnunet_plugin_dhtlog_dummy.la $(MYSQL_PLUGIN) @@ -61,7 +61,12 @@ libgnunetdht_la_LDFLAGS = \ $(GN_LIB_LDFLAGS) $(WINFLAGS) \ -version-info 0:0:0 -bin_PROGRAMS = \ +STUD_PROGS = gnunet-service-dht-can \ + gnunet-service-dht-freenet \ + gnunet-service-dht-kademlia \ + gnunet-service-dht-koorde + +bin_PROGRAMS = $(STUD_PROGS) \ gnunet-service-dht \ gnunet-dht-get \ gnunet-dht-get-peer \ @@ -81,6 +86,58 @@ gnunet_service_dht_LDADD = \ $(top_builddir)/src/util/libgnunetutil.la \ $(top_builddir)/src/dht/libgnunetdhtlog.la +gnunet_service_dht_can_SOURCES = \ + dht_can.c dht_can_helper.c dht_can_helper.h +gnunet_service_dht_can_LDADD = \ + $(top_builddir)/src/statistics/libgnunetstatistics.la \ + $(top_builddir)/src/core/libgnunetcore.la \ + $(top_builddir)/src/transport/libgnunettransport.la \ + $(top_builddir)/src/hello/libgnunethello.la \ + $(top_builddir)/src/datacache/libgnunetdatacache.la \ + $(top_builddir)/src/util/libgnunetutil.la + +gnunet_service_dht_freenet_SOURCES = \ + dht_freenet.c +gnunet_service_dht_freenet_LDADD = \ + $(top_builddir)/src/statistics/libgnunetstatistics.la \ + $(top_builddir)/src/core/libgnunetcore.la \ + $(top_builddir)/src/transport/libgnunettransport.la \ + $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \ + $(top_builddir)/src/hello/libgnunethello.la \ + $(top_builddir)/src/datacache/libgnunetdatacache.la \ + $(top_builddir)/src/util/libgnunetutil.la + +gnunet_service_dht_kademlia_SOURCES = \ + dht_kademlia.c dht_kademlia.h +gnunet_service_dht_kademlia_LDADD = \ + $(top_builddir)/src/statistics/libgnunetstatistics.la \ + $(top_builddir)/src/core/libgnunetcore.la \ + $(top_builddir)/src/transport/libgnunettransport.la \ + $(top_builddir)/src/hello/libgnunethello.la \ + $(top_builddir)/src/datacache/libgnunetdatacache.la \ + $(top_builddir)/src/util/libgnunetutil.la + +gnunet_service_dht_koorde_SOURCES = \ + dht_koorde.c dht_koorde.h +gnunet_service_dht_koorde_LDADD = \ + $(top_builddir)/src/statistics/libgnunetstatistics.la \ + $(top_builddir)/src/core/libgnunetcore.la \ + $(top_builddir)/src/transport/libgnunettransport.la \ + $(top_builddir)/src/hello/libgnunethello.la \ + $(top_builddir)/src/datacache/libgnunetdatacache.la \ + $(top_builddir)/src/util/libgnunetutil.la + +#gnunet_service_dht_new_SOURCES = \ +# gnunet-service-dht-new.c +#gnunet_service_dht_new_LDADD = \ +# $(top_builddir)/src/statistics/libgnunetstatistics.la \ +# $(top_builddir)/src/core/libgnunetcore.la \ +# $(top_builddir)/src/transport/libgnunettransport.la \ +# $(top_builddir)/src/hello/libgnunethello.la \ +# $(top_builddir)/src/datacache/libgnunetdatacache.la \ +# $(top_builddir)/src/util/libgnunetutil.la \ +# $(top_builddir)/src/dht/libgnunetdhtlog.la + gnunet_dht_get_SOURCES = \ gnunet-dht-get.c gnunet_dht_get_LDADD = \ @@ -121,7 +178,6 @@ check_PROGRAMS = \ test_dhtlog TESTS = test_dht_api $(check_SCRIPTS) \ - test_dhtlog \ test_dht_twopeer \ test_dht_twopeer_put_get diff --git a/src/transport/Makefile.am b/src/transport/Makefile.am index fb6095fc1..2ec29bb9b 100644 --- a/src/transport/Makefile.am +++ b/src/transport/Makefile.am @@ -12,7 +12,7 @@ if HAVE_MHD HTTP_PLUGIN_TEST = test_plugin_transport_http HTTP_API_TEST = test_transport_api_http HTTP_REL_TEST = test_transport_api_reliability_http - + HTTPS_PLUGIN_LA = libgnunet_plugin_transport_https.la HTTPS_PLUGIN_TEST = test_plugin_transport_https HTTPS_API_TEST = test_transport_api_https @@ -23,9 +23,12 @@ if USE_COVERAGE AM_CFLAGS = --coverage -O0 endif +if HAVE_PCAP +WANBIN = gnunet-transport-wlan-helper +endif + if LINUX NATBIN = gnunet-nat-server gnunet-nat-client -WANBIN = gnunet-wlan install-exec-hook: chown root $(bindir)/gnunet-nat-server $(bindir)/gnunet-nat-client $(bindir)/gnunet-wlan || true chmod u+s $(bindir)/gnunet-nat-server $(bindir)/gnunet-nat-client $(bindir)/gnunet-wlan || true @@ -54,16 +57,16 @@ bin_PROGRAMS = \ gnunet-transport \ $(WANBIN) \ gnunet-service-transport $(NATBIN) - + bin_SCRIPTS = \ gnunet-transport-certificate-creation gnunet_nat_server_SOURCES = \ gnunet-nat-server.c -gnunet_wlan_SOURCES = \ +gnunet_transport_wlan_helper_SOURCES = \ gnunet-transport-wlan-helper.c -gnunet_wlan_LDADD = \ +gnunet_transport_wlan_helper_LDADD = \ -lpcap gnunet_nat_client_SOURCES = \ diff --git a/src/transport/gnunet-transport-wlan-helper.c b/src/transport/gnunet-transport-wlan-helper.c index 6ae31a647..47bea007e 100644 --- a/src/transport/gnunet-transport-wlan-helper.c +++ b/src/transport/gnunet-transport-wlan-helper.c @@ -28,7 +28,7 @@ * gnunet */ -#include "gnunet_wlan.h" +#include "gnunet-transport-wlan-helper.h" #include //#include "radiotap.h" diff --git a/src/transport/gnunet-transport-wlan-helper.h b/src/transport/gnunet-transport-wlan-helper.h index f8fa145f2..2988d76e7 100644 --- a/src/transport/gnunet-transport-wlan-helper.h +++ b/src/transport/gnunet-transport-wlan-helper.h @@ -314,6 +314,7 @@ enum ieee80211_radiotap_type { (((x) == 14) ? 2484 : ((x) * 5) + 2407) : \ ((x) + 1000) * 5) +#if BROKEN /* helpers */ static inline int ieee80211_get_radiotap_len(unsigned char *data) { @@ -322,7 +323,7 @@ static inline int ieee80211_get_radiotap_len(unsigned char *data) return get_unaligned_le16(&hdr->it_len); } - +#endif #endif /* IEEE80211_RADIOTAP_H */