wip
[oweals/gnunet.git] / src / transport / Makefile.am
index 5b9346d9d9a3103cc502cf0c8678f33e1378f0d1..699e8efcaba7c758f1909e3a576194195db43ee6 100644 (file)
@@ -37,10 +37,16 @@ if LINUX
  WANBIN = gnunet-transport-wlan-helper
  WLAN_PLUGIN_LA = libgnunet_plugin_transport_wlan.la
  WLAN_API_TEST = test_transport_api_wlan
+ WLAN_REL_TEST = test_transport_api_reliability_wlan
 endif
 endif
 
 if LINUX
+UNIX_PLUGIN_LA = libgnunet_plugin_transport_unix.la
+UNIX_PLUGIN_TEST = test_transport_api_unix
+UNIX_REL_TEST = test_transport_api_unreliability_unix
+UNIX_QUOTA_TEST = test_quota_compliance_unix \
+     test_quota_compliance_unix_asymmetric_recv_constant
 NATBIN = gnunet-nat-server gnunet-nat-client
 install-exec-hook:
        chown root $(bindir)/gnunet-nat-server $(bindir)/gnunet-nat-client $(bindir)/gnunet-wlan || true
@@ -78,9 +84,13 @@ bin_SCRIPTS = \
 gnunet_nat_server_SOURCES = \
  $(NATSERVER)
 
-    
+
 gnunet_transport_wlan_helper_SOURCES = \
+ wlan/radiotap-parser.c \
+ wlan/helper_common.c \
+ wlan/loopback_helper.c \
  gnunet-transport-wlan-helper.c
+
 gnunet_transport_wlan_helper_LDADD = \
   $(top_builddir)/src/util/libgnunetutil.la \
  -lpcap
@@ -97,21 +107,26 @@ gnunet_transport_LDADD = \
 gnunet_transport_DEPENDENCIES = \
   libgnunettransport.la                                
 
+if HAVE_LIBGLPK
+  GN_GLPK = -lglpk
+endif
+
 gnunet_service_transport_SOURCES = \
- gnunet-service-transport.c plugin_transport.h 
+ gnunet-service-transport.c
 gnunet_service_transport_LDADD = \
   $(top_builddir)/src/hello/libgnunethello.la \
   $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
   $(top_builddir)/src/statistics/libgnunetstatistics.la \
   $(top_builddir)/src/util/libgnunetutil.la \
+  $(GN_GLPK) \
   $(GN_LIBINTL)
 gnunet_service_transport_DEPENDENCIES = \
-  libgnunettransport.la                                
-
+  libgnunettransport.la                                  
 
 plugin_LTLIBRARIES = \
   libgnunet_plugin_transport_tcp.la \
   libgnunet_plugin_transport_udp.la \
+  $(UNIX_PLUGIN_LA) \
   $(HTTP_PLUGIN_LA) \
   $(HTTPS_PLUGIN_LA) \
   $(WLAN_PLUGIN_LA) \
@@ -136,8 +151,6 @@ libgnunet_plugin_transport_template_la_LIBADD = \
 libgnunet_plugin_transport_template_la_LDFLAGS = \
  $(GN_PLUGIN_LDFLAGS)
 
-if HAVE_PCAP
-if LINUX
 libgnunet_plugin_transport_wlan_la_SOURCES = \
        plugin_transport_wlan.c
 libgnunet_plugin_transport_wlan_la_LIBADD = \
@@ -147,8 +160,6 @@ libgnunet_plugin_transport_wlan_la_LIBADD = \
        $(top_builddir)/src/util/libgnunetutil.la 
 libgnunet_plugin_transport_wlan_la_LDFLAGS = \
        $(GN_PLUGIN_LDFLAGS)
-endif
-endif
 
 libgnunet_plugin_transport_udp_la_SOURCES = \
   plugin_transport_udp.c
@@ -159,18 +170,17 @@ libgnunet_plugin_transport_udp_la_LIBADD = \
   $(top_builddir)/src/util/libgnunetutil.la 
 libgnunet_plugin_transport_udp_la_LDFLAGS = \
  $(GN_PLUGIN_LDFLAGS)
+libgnunet_plugin_transport_unix_la_SOURCES = \
+  plugin_transport_unix.c
+libgnunet_plugin_transport_unix_la_LIBADD = \
+  $(top_builddir)/src/hello/libgnunethello.la \
+  $(top_builddir)/src/statistics/libgnunetstatistics.la \
+  $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
+  $(top_builddir)/src/util/libgnunetutil.la 
+libgnunet_plugin_transport_unix_la_LDFLAGS = \
+ $(GN_PLUGIN_LDFLAGS)
 
-#libgnunet_plugin_transport_udp_nat_la_SOURCES = \
-#  plugin_transport_udp_nat.c
-#libgnunet_plugin_transport_udp_nat_la_LIBADD = \
-#  $(top_builddir)/src/hello/libgnunethello.la \
-#  $(top_builddir)/src/statistics/libgnunetstatistics.la \
-#  $(top_builddir)/src/peerinfo/libgnunetpeerinfo.la \
-#  $(top_builddir)/src/util/libgnunetutil.la 
-#libgnunet_plugin_transport_udp_nat_la_LDFLAGS = \
-# $(GN_PLUGIN_LDFLAGS)
-
-if HAVE_MHD 
 libgnunet_plugin_transport_http_la_SOURCES = \
   plugin_transport_http.c
 libgnunet_plugin_transport_http_la_LIBADD = \
@@ -196,99 +206,138 @@ libgnunet_plugin_transport_https_la_LDFLAGS = \
  $(GN_PLUGIN_LDFLAGS)
 libgnunet_plugin_transport_https_la_CFLAGS = \
  $(CFLAGS) -DBUILD_HTTPS  
-endif
 
 
 check_PROGRAMS = \
+ test_transport_ats \
+ test_transport_ats_perf \
  test_transport_api_tcp \
  test_transport_api_tcp_nat \
  test_transport_api_udp \
+ $(UNIX_PLUGIN_TEST) \
  test_transport_api_udp_nat \
  $(HTTP_PLUGIN_TEST) \
  $(HTTP_API_TEST) \
  $(HTTPS_PLUGIN_TEST) \
  $(HTTPS_API_TEST) \
  $(WLAN_API_TEST) \
+ $(WLAN_REL_TEST) \
  test_transport_api_multi \
  test_transport_api_reliability_tcp \
  test_transport_api_reliability_tcp_nat \
- test_transport_api_reliability_udp \
+ test_transport_api_unreliability_udp \
+ test_transport_api_unreliability_unix \
+ $(UNIX_REL_TEST) \
  $(HTTP_REL_TEST) \
  $(HTTPS_REL_TEST) \
  test_quota_compliance_tcp \
  test_quota_compliance_tcp_asymmetric_recv_constant \
  test_quota_compliance_udp \
  test_quota_compliance_udp_asymmetric_recv_constant \
+ $(UNIX_QUOTA_TEST) \
  $(HTTP_QUOTA_TEST) \
- $(HTTPS_QUOTA_TEST) \
- test_plugin_transport_wlan
+ $(HTTPS_QUOTA_TEST)
 # TODO: add tests for nat, etc.
 
 if !DISABLE_TEST_RUN
 TESTS = \
+ test_transport_ats \
+ test_transport_ats_perf \
  test_transport_api_tcp \
  test_transport_api_tcp_nat \
  test_transport_api_udp \
+ $(UNIX_PLUGIN_TEST) \
  test_transport_api_udp_nat \
  $(HTTP_PLUGIN_TEST) \
  $(HTTP_API_TEST) \
  $(HTTPS_PLUGIN_TEST) \
  $(HTTPS_API_TEST) \
test_transport_api_wlan \
$(WLAN_API_TEST) \
  test_transport_api_multi \
  test_transport_api_reliability_tcp \
  test_transport_api_reliability_tcp_nat \
+ test_transport_api_unreliability_udp \
+ test_transport_api_unreliability_unix \
  $(HTTP_REL_TEST) \
  $(HTTPS_REL_TEST) \
  test_quota_compliance_tcp \
  test_quota_compliance_tcp_asymmetric_recv_constant \
  test_quota_compliance_udp \
  test_quota_compliance_udp_asymmetric_recv_constant \
+ $(UNIX_QUOTA_TEST) \
  $(HTTP_QUOTA_TEST) \
  $(HTTPS_QUOTA_TEST)
 endif
 
+test_transport_ats_SOURCES = \
+ test_transport_ats.c
+test_transport_ats_LDADD = \
+ $(top_builddir)/src/testing/libgnunettesting.la \
+ $(top_builddir)/src/util/libgnunetutil.la  
+
+test_transport_ats_perf_SOURCES = \
+ test_transport_ats_perf.c
+test_transport_ats_perf_LDADD = \
+ $(top_builddir)/src/testing/libgnunettesting.la \
+ $(GN_GLPK) \
+ $(top_builddir)/src/util/libgnunetutil.la  
+
 test_transport_api_tcp_SOURCES = \
  test_transport_api.c
 test_transport_api_tcp_LDADD = \
  $(top_builddir)/src/transport/libgnunettransport.la \
+ $(top_builddir)/src/hello/libgnunethello.la \
  $(top_builddir)/src/util/libgnunetutil.la  
 
 test_transport_api_tcp_nat_SOURCES = \
  test_transport_api.c
 test_transport_api_tcp_nat_LDADD = \
  $(top_builddir)/src/transport/libgnunettransport.la \
+ $(top_builddir)/src/hello/libgnunethello.la \
  $(top_builddir)/src/util/libgnunetutil.la  
 
 test_transport_api_reliability_tcp_SOURCES = \
  test_transport_api_reliability.c
 test_transport_api_reliability_tcp_LDADD = \
  $(top_builddir)/src/transport/libgnunettransport.la \
+ $(top_builddir)/src/hello/libgnunethello.la \
  $(top_builddir)/src/util/libgnunetutil.la  
 
 test_transport_api_reliability_tcp_nat_SOURCES = \
  test_transport_api_reliability.c
 test_transport_api_reliability_tcp_nat_LDADD = \
  $(top_builddir)/src/transport/libgnunettransport.la \
+ $(top_builddir)/src/hello/libgnunethello.la \
  $(top_builddir)/src/util/libgnunetutil.la 
 
-test_transport_api_reliability_udp_SOURCES = \
+test_transport_api_reliability_wlan_SOURCES = \
  test_transport_api_reliability.c
-test_transport_api_reliability_udp_LDADD = \
+test_transport_api_reliability_wlan_LDADD = \
  $(top_builddir)/src/transport/libgnunettransport.la \
- $(top_builddir)/src/util/libgnunetutil.la   
+ $(top_builddir)/src/hello/libgnunethello.la \
+ $(top_builddir)/src/util/libgnunetutil.la
+
 
 test_transport_api_udp_SOURCES = \
  test_transport_api.c
 test_transport_api_udp_LDADD = \
  $(top_builddir)/src/transport/libgnunettransport.la \
+ $(top_builddir)/src/hello/libgnunethello.la \
  $(top_builddir)/src/util/libgnunetutil.la  
 
 test_transport_api_udp_nat_SOURCES = \
  test_transport_api.c
 test_transport_api_udp_nat_LDADD = \
  $(top_builddir)/src/transport/libgnunettransport.la \
- $(top_builddir)/src/util/libgnunetutil.la  
+ $(top_builddir)/src/hello/libgnunethello.la \
+ $(top_builddir)/src/util/libgnunetutil.la   
+
+test_transport_api_unix_SOURCES = \
+ test_transport_api.c
+test_transport_api_unix_LDADD = \
+ $(top_builddir)/src/transport/libgnunettransport.la \
+ $(top_builddir)/src/hello/libgnunethello.la \
+ $(top_builddir)/src/util/libgnunetutil.la 
 
 test_plugin_transport_http_SOURCES = \
  test_plugin_transport_http.c
@@ -296,18 +345,21 @@ test_plugin_transport_http_LDADD = \
  $(top_builddir)/src/transport/libgnunettransport.la \
  $(top_builddir)/src/statistics/libgnunetstatistics.la \
  @LIBCURL@ \
+ $(top_builddir)/src/hello/libgnunethello.la \
  $(top_builddir)/src/util/libgnunetutil.la  
 
 test_transport_api_http_SOURCES = \
  test_transport_api.c
 test_transport_api_http_LDADD = \
  $(top_builddir)/src/transport/libgnunettransport.la \
+ $(top_builddir)/src/hello/libgnunethello.la \
  $(top_builddir)/src/util/libgnunetutil.la  
 
 test_transport_api_reliability_http_SOURCES = \
  test_transport_api_reliability.c
 test_transport_api_reliability_http_LDADD = \
  $(top_builddir)/src/transport/libgnunettransport.la \
+ $(top_builddir)/src/hello/libgnunethello.la \
  $(top_builddir)/src/util/libgnunetutil.la
 
 test_plugin_transport_https_SOURCES = \
@@ -316,18 +368,35 @@ test_plugin_transport_https_LDADD = \
  $(top_builddir)/src/transport/libgnunettransport.la \
  $(top_builddir)/src/statistics/libgnunetstatistics.la \
  @LIBCURL@ \
+ $(top_builddir)/src/hello/libgnunethello.la \
  $(top_builddir)/src/util/libgnunetutil.la  
 
 test_transport_api_https_SOURCES = \
  test_transport_api.c
 test_transport_api_https_LDADD = \
  $(top_builddir)/src/transport/libgnunettransport.la \
+ $(top_builddir)/src/hello/libgnunethello.la \
  $(top_builddir)/src/util/libgnunetutil.la  
 
 test_transport_api_reliability_https_SOURCES = \
  test_transport_api_reliability.c
 test_transport_api_reliability_https_LDADD = \
  $(top_builddir)/src/transport/libgnunettransport.la \
+ $(top_builddir)/src/hello/libgnunethello.la \
+ $(top_builddir)/src/util/libgnunetutil.la
+
+test_transport_api_unreliability_unix_SOURCES = \
+ test_transport_api_unreliability.c
+test_transport_api_unreliability_unix_LDADD = \
+ $(top_builddir)/src/transport/libgnunettransport.la \
+ $(top_builddir)/src/hello/libgnunethello.la \
+ $(top_builddir)/src/util/libgnunetutil.la
+
+test_transport_api_unreliability_udp_SOURCES = \
+ test_transport_api_unreliability.c
+test_transport_api_unreliability_udp_LDADD = \
+ $(top_builddir)/src/transport/libgnunettransport.la \
+ $(top_builddir)/src/hello/libgnunethello.la \
  $(top_builddir)/src/util/libgnunetutil.la
 
 if HAVE_PCAP
@@ -336,6 +405,7 @@ test_transport_api_wlan_SOURCES = \
  test_transport_api.c
 test_transport_api_wlan_LDADD = \
  $(top_builddir)/src/transport/libgnunettransport.la \
+ $(top_builddir)/src/hello/libgnunethello.la \
  $(top_builddir)/src/util/libgnunetutil.la  
 endif
 endif
@@ -344,12 +414,14 @@ test_quota_compliance_tcp_SOURCES = \
  test_quota_compliance.c
 test_quota_compliance_tcp_LDADD = \
  $(top_builddir)/src/transport/libgnunettransport.la \
+ $(top_builddir)/src/hello/libgnunethello.la \
  $(top_builddir)/src/util/libgnunetutil.la
 
 test_quota_compliance_tcp_asymmetric_recv_constant_SOURCES = \
  test_quota_compliance.c
 test_quota_compliance_tcp_asymmetric_recv_constant_LDADD = \
  $(top_builddir)/src/transport/libgnunettransport.la \
+ $(top_builddir)/src/hello/libgnunethello.la \
  $(top_builddir)/src/util/libgnunetutil.la
 
 #test_quota_compliance_tcp_asymmetric_send_constant_SOURCES = \
@@ -362,12 +434,14 @@ test_quota_compliance_http_SOURCES = \
  test_quota_compliance.c
 test_quota_compliance_http_LDADD = \
  $(top_builddir)/src/transport/libgnunettransport.la \
+ $(top_builddir)/src/hello/libgnunethello.la \
  $(top_builddir)/src/util/libgnunetutil.la
 
  test_quota_compliance_http_asymmetric_recv_constant_SOURCES = \
  test_quota_compliance.c
 test_quota_compliance_http_asymmetric_recv_constant_LDADD = \
  $(top_builddir)/src/transport/libgnunettransport.la \
+ $(top_builddir)/src/hello/libgnunethello.la \
  $(top_builddir)/src/util/libgnunetutil.la
 
 #test_quota_compliance_http_asymmetric_send_constant_SOURCES = \
@@ -380,12 +454,14 @@ test_quota_compliance_https_SOURCES = \
  test_quota_compliance.c
 test_quota_compliance_https_LDADD = \
  $(top_builddir)/src/transport/libgnunettransport.la \
+ $(top_builddir)/src/hello/libgnunethello.la \
  $(top_builddir)/src/util/libgnunetutil.la
 
  test_quota_compliance_https_asymmetric_recv_constant_SOURCES = \
  test_quota_compliance.c
 test_quota_compliance_https_asymmetric_recv_constant_LDADD = \
  $(top_builddir)/src/transport/libgnunettransport.la \
+ $(top_builddir)/src/hello/libgnunethello.la \
  $(top_builddir)/src/util/libgnunetutil.la
 
 #test_quota_compliance_https_asymmetric_send_constant_SOURCES = \
@@ -398,12 +474,14 @@ test_quota_compliance_udp_SOURCES = \
  test_quota_compliance.c
 test_quota_compliance_udp_LDADD = \
  $(top_builddir)/src/transport/libgnunettransport.la \
+ $(top_builddir)/src/hello/libgnunethello.la \
  $(top_builddir)/src/util/libgnunetutil.la
 
 test_quota_compliance_udp_asymmetric_recv_constant_SOURCES = \
  test_quota_compliance.c
 test_quota_compliance_udp_asymmetric_recv_constant_LDADD = \
  $(top_builddir)/src/transport/libgnunettransport.la \
+ $(top_builddir)/src/hello/libgnunethello.la \
  $(top_builddir)/src/util/libgnunetutil.la
 
 #test_quota_compliance_udp_asymmetric_send_constant_SOURCES = \
@@ -412,17 +490,36 @@ test_quota_compliance_udp_asymmetric_recv_constant_LDADD = \
 # $(top_builddir)/src/transport/libgnunettransport.la \
 # $(top_builddir)/src/util/libgnunetutil.la 
 
+test_quota_compliance_unix_SOURCES = \
+ test_quota_compliance.c
+test_quota_compliance_unix_LDADD = \
+ $(top_builddir)/src/transport/libgnunettransport.la \
+ $(top_builddir)/src/hello/libgnunethello.la \
+ $(top_builddir)/src/util/libgnunetutil.la
+
+test_quota_compliance_unix_asymmetric_recv_constant_SOURCES = \
+ test_quota_compliance.c
+test_quota_compliance_unix_asymmetric_recv_constant_LDADD = \
+ $(top_builddir)/src/transport/libgnunettransport.la \
+ $(top_builddir)/src/hello/libgnunethello.la \
+ $(top_builddir)/src/util/libgnunetutil.la
+
+
 test_transport_api_multi_SOURCES = \
  test_transport_api.c
 test_transport_api_multi_LDADD = \
  $(top_builddir)/src/transport/libgnunettransport.la \
+ $(top_builddir)/src/hello/libgnunethello.la \
  $(top_builddir)/src/util/libgnunetutil.la  
 EXTRA_DIST = \
+  gnunet-transport-certificate-creation \
   test_transport_api_data.conf \
   test_transport_api_tcp_peer1.conf \
   test_transport_api_tcp_peer2.conf \
   test_transport_api_udp_peer1.conf \
   test_transport_api_udp_peer2.conf \
+  test_transport_api_unix_peer1.conf \
+  test_transport_api_unix_peer2.conf \
   test_transport_api_udp_nat_peer1.conf \
   test_transport_api_udp_nat_peer2.conf \
   test_transport_api_tcp_nat_peer1.conf \
@@ -450,4 +547,6 @@ EXTRA_DIST = \
   test_quota_compliance_https_peer1.conf \
   test_quota_compliance_https_peer2.conf \
   test_quota_compliance_udp_peer1.conf \
-  test_quota_compliance_udp_peer2.conf
+  test_quota_compliance_udp_peer2.conf \
+  test_quota_compliance_unix_peer1.conf \
+  test_quota_compliance_unix_peer2.conf