diff options
author | Martin Schanzenbach <mschanzenbach@posteo.de> | 2012-06-26 17:40:39 +0000 |
---|---|---|
committer | Martin Schanzenbach <mschanzenbach@posteo.de> | 2012-06-26 17:40:39 +0000 |
commit | 142c6d9fcf13d947b9fa51b2434e6d0f9cdc5cf2 (patch) | |
tree | 10c85e3bdade16b6e8ba05da236e16843fb1d092 /src/vpn | |
parent | 223e11a9ea8f5b5fad42b406f8f04d7dc901107d (diff) | |
download | gnunet-142c6d9fcf13d947b9fa51b2434e6d0f9cdc5cf2.tar.gz gnunet-142c6d9fcf13d947b9fa51b2434e6d0f9cdc5cf2.zip |
-test now working
Diffstat (limited to 'src/vpn')
-rw-r--r-- | src/vpn/Makefile.am | 20 | ||||
-rw-r--r-- | src/vpn/test_gns_vpn.c | 9 |
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 |
30 | endif | 30 | endif |
31 | else | 31 | else |
32 | install-exec-hook: | 32 | install-exec-hook: |
@@ -82,14 +82,14 @@ libgnunetvpn_la_LIBADD = \ | |||
82 | libgnunetvpn_la_LDFLAGS = \ | 82 | libgnunetvpn_la_LDFLAGS = \ |
83 | $(GN_LIB_LDFLAGS) | 83 | $(GN_LIB_LDFLAGS) |
84 | 84 | ||
85 | #test_gns_vpn_SOURCES = \ | 85 | test_gns_vpn_SOURCES = \ |
86 | # test_gns_vpn.c | 86 | test_gns_vpn.c |
87 | #test_gns_vpn_LDADD = -lmicrohttpd @LIBCURL@ \ | 87 | test_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 = \ | 91 | test_gnunet_vpn_4_over_CPPFLAGS = \ |
92 | # @LIBCURL_CPPFLAGS@ | 92 | @LIBCURL_CPPFLAGS@ |
93 | 93 | ||
94 | test_gnunet_vpn_4_over_SOURCES = \ | 94 | test_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 | |||
371 | static void | 369 | static void |
372 | run (void *cls, | 370 | run (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", |