- htons => htonl
[oweals/gnunet.git] / src / vpn / gnunet-vpn.c
index a68fdc45b785e64e2e767715c6fd5b46932d230e..d2e5eec4e229d2e4d3d032d1ec64060727354e2f 100644 (file)
@@ -26,6 +26,7 @@
 
 #include "platform.h"
 #include "gnunet_util_lib.h"
+#include "gnunet_tun_lib.h"
 #include "gnunet_vpn_service.h"
 
 
@@ -227,16 +228,16 @@ run (void *cls, char *const *args, const char *cfgfile,
       protocol = IPPROTO_UDP;
     if (GNUNET_OK !=
        GNUNET_CRYPTO_eddsa_public_key_from_string (peer_id,
-                                                      strlen (peer_id),
-                                                      &peer.public_key))
+                                                    strlen (peer_id),
+                                                    &peer.public_key))
     {
-      FPRINTF (stderr, _("`%s' is not a valid peer identifier.\n"),
+      FPRINTF (stderr,
+               _("`%s' is not a valid peer identifier.\n"),
                peer_id);
       goto error;
     }
-    GNUNET_CRYPTO_hash (service_name,
-                       strlen (service_name),
-                       &sd);
+    GNUNET_TUN_service_name_to_hash (service_name,
+                                     &sd);
     request = GNUNET_VPN_redirect_to_peer (handle,
                                           req_af,
                                           protocol,