aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Schanzenbach <mschanzenbach@posteo.de>2012-06-26 17:40:39 +0000
committerMartin Schanzenbach <mschanzenbach@posteo.de>2012-06-26 17:40:39 +0000
commit142c6d9fcf13d947b9fa51b2434e6d0f9cdc5cf2 (patch)
tree10c85e3bdade16b6e8ba05da236e16843fb1d092 /src
parent223e11a9ea8f5b5fad42b406f8f04d7dc901107d (diff)
downloadgnunet-142c6d9fcf13d947b9fa51b2434e6d0f9cdc5cf2.tar.gz
gnunet-142c6d9fcf13d947b9fa51b2434e6d0f9cdc5cf2.zip
-test now working
Diffstat (limited to 'src')
-rw-r--r--src/vpn/Makefile.am20
-rw-r--r--src/vpn/test_gns_vpn.c9
2 files changed, 11 insertions, 18 deletions
diff --git a/src/vpn/Makefile.am b/src/vpn/Makefile.am
index 91cb95640..c079f3711 100644
--- a/src/vpn/Makefile.am
+++ b/src/vpn/Makefile.am
@@ -25,8 +25,8 @@ if HAVE_MHD
25 test_gnunet_vpn-4_to_6 \ 25 test_gnunet_vpn-4_to_6 \
26 test_gnunet_vpn-6_to_4 \ 26 test_gnunet_vpn-6_to_4 \
27 test_gnunet_vpn-6_over \ 27 test_gnunet_vpn-6_over \
28 test_gnunet_vpn-4_over 28 test_gnunet_vpn-4_over \
29 #test_gns_vpn 29 test_gns_vpn
30endif 30endif
31else 31else
32install-exec-hook: 32install-exec-hook:
@@ -82,14 +82,14 @@ libgnunetvpn_la_LIBADD = \
82libgnunetvpn_la_LDFLAGS = \ 82libgnunetvpn_la_LDFLAGS = \
83 $(GN_LIB_LDFLAGS) 83 $(GN_LIB_LDFLAGS)
84 84
85#test_gns_vpn_SOURCES = \ 85test_gns_vpn_SOURCES = \
86# test_gns_vpn.c 86 test_gns_vpn.c
87#test_gns_vpn_LDADD = -lmicrohttpd @LIBCURL@ \ 87test_gns_vpn_LDADD = -lmicrohttpd @LIBCURL@ \
88# $(top_builddir)/src/namestore/libgnunetnamestore.la \ 88 $(top_builddir)/src/namestore/libgnunetnamestore.la \
89# $(top_builddir)/src/testing/libgnunettesting.la \ 89 $(top_builddir)/src/testing/libgnunettesting.la \
90# $(top_builddir)/src/util/libgnunetutil.la 90 $(top_builddir)/src/util/libgnunetutil.la
91#test_gnunet_vpn_4_over_CPPFLAGS = \ 91test_gnunet_vpn_4_over_CPPFLAGS = \
92# @LIBCURL_CPPFLAGS@ 92 @LIBCURL_CPPFLAGS@
93 93
94test_gnunet_vpn_4_over_SOURCES = \ 94test_gnunet_vpn_4_over_SOURCES = \
95 test_gnunet_vpn.c 95 test_gnunet_vpn.c
diff --git a/src/vpn/test_gns_vpn.c b/src/vpn/test_gns_vpn.c
index fb498cd83..f1295903d 100644
--- a/src/vpn/test_gns_vpn.c
+++ b/src/vpn/test_gns_vpn.c
@@ -366,8 +366,6 @@ mhd_main ()
366 NULL); 366 NULL);
367} 367}
368 368
369#include "../dns/dnsparser.h"
370
371static void 369static void
372run (void *cls, 370run (void *cls,
373 const struct GNUNET_CONFIGURATION_Handle *cfg, 371 const struct GNUNET_CONFIGURATION_Handle *cfg,
@@ -416,18 +414,13 @@ run (void *cls,
416 414
417 host_key = GNUNET_CRYPTO_rsa_key_create_from_file (zone_keyfile); 415 host_key = GNUNET_CRYPTO_rsa_key_create_from_file (zone_keyfile);
418 rd.expiration_time = GNUNET_TIME_UNIT_FOREVER_ABS.abs_value; 416 rd.expiration_time = GNUNET_TIME_UNIT_FOREVER_ABS.abs_value;
419 GNUNET_asprintf (&rd_string, "6 %s %s", (char*)&peername, "localhost4"); 417 GNUNET_asprintf (&rd_string, "6 %s %s", (char*)&peername, "www.gnunet.");
420 GNUNET_assert (GNUNET_OK == GNUNET_NAMESTORE_string_to_value (GNUNET_GNS_RECORD_VPN, 418 GNUNET_assert (GNUNET_OK == GNUNET_NAMESTORE_string_to_value (GNUNET_GNS_RECORD_VPN,
421 rd_string, 419 rd_string,
422 (void**)&rd.data, 420 (void**)&rd.data,
423 &rd.data_size)); 421 &rd.data_size));
424 rd.record_type = GNUNET_GNS_RECORD_VPN; 422 rd.record_type = GNUNET_GNS_RECORD_VPN;
425 423
426 struct vpn_data* vpn = (struct vpn_data*)rd.data;
427
428 printf ("%hu %s %s\n", ntohs (vpn->proto), GNUNET_h2s (&vpn->peer),
429 (char*)&vpn[1]);
430
431 GNUNET_NAMESTORE_record_create (namestore, 424 GNUNET_NAMESTORE_record_create (namestore,
432 host_key, 425 host_key,
433 "www", 426 "www",