2 This file is part of GNUnet.
3 (C) 2010, 2012 Christian Grothoff
5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version.
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with GNUnet; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA.
22 * @file pt/gnunet-daemon-pt.c
23 * @brief tool to manipulate DNS and VPN services to perform protocol translation (IPvX over GNUnet)
24 * @author Christian Grothoff
27 #include "gnunet_util_lib.h"
28 #include "gnunet_dns_service.h"
29 #include "gnunet_dnsparser_lib.h"
30 #include "gnunet_mesh_service.h"
31 #include "gnunet_tun_lib.h"
32 #include "gnunet_dht_service.h"
33 #include "gnunet_vpn_service.h"
34 #include "gnunet_statistics_service.h"
35 #include "gnunet_applications.h"
36 #include "block_dns.h"
38 #define PORT_PT 4242 // FIXME
42 * After how long do we time out if we could not get an IP from VPN or MESH?
44 #define TIMEOUT GNUNET_TIME_UNIT_MINUTES
48 * How many bytes of payload do we allow at most for a DNS reply?
49 * Given that this is pretty much limited to loopback, we can be
50 * pretty high (Linux loopback defaults to 16k, most local UDP packets
51 * should survive up to 9k (NFS), so 8k should be pretty safe in
54 #define MAX_DNS_SIZE (8 * 1024)
58 * Which group of DNS records are we currently processing?
68 * DNS authority records
70 AUTHORITY_RECORDS = 1,
73 * DNS additional records
75 ADDITIONAL_RECORDS = 2,
78 * We're done processing.
85 * Information tracked per DNS reply that we are processing.
90 * Handle to submit the final result.
92 struct GNUNET_DNS_RequestHandle *rh;
95 * DNS packet that is being modified.
97 struct GNUNET_DNSPARSER_Packet *dns;
100 * Active redirection request with the VPN.
102 struct GNUNET_VPN_RedirectionRequest *rr;
105 * Record for which we have an active redirection request.
107 struct GNUNET_DNSPARSER_Record *rec;
110 * Offset in the current record group that is being modified.
115 * Group that is being modified
117 enum RequestGroup group;
123 * State we keep for a request that is going out via MESH.
125 struct RequestContext
128 * We keep these in a DLL.
130 struct RequestContext *next;
133 * We keep these in a DLL.
135 struct RequestContext *prev;
138 * Handle for interaction with DNS service.
140 struct GNUNET_DNS_RequestHandle *rh;
143 * Message we're sending out via MESH, allocated at the
144 * end of this struct.
146 const struct GNUNET_MessageHeader *mesh_message;
149 * Task used to abort this operation with timeout.
151 GNUNET_SCHEDULER_TaskIdentifier timeout_task;
154 * ID of the original DNS request (used to match the reply).
159 * #GNUNET_NO if this request is still in the transmit_queue,
160 * #GNUNET_YES if we are in the receive_queue.
162 int16_t was_transmitted;
168 * The handle to the configuration used throughout the process
170 static const struct GNUNET_CONFIGURATION_Handle *cfg;
173 * The handle to the VPN
175 static struct GNUNET_VPN_Handle *vpn_handle;
178 * The handle to the MESH service
180 static struct GNUNET_MESH_Handle *mesh_handle;
183 * Tunnel we use for DNS requests over MESH.
184 * FIXME: we might want to keep multiple tunnels open
187 static struct GNUNET_MESH_Tunnel *mesh_tunnel;
190 * Active transmission request with MESH (or NULL).
192 static struct GNUNET_MESH_TransmitHandle *mesh_th;
195 * Head of DLL of requests to be transmitted to mesh_tunnel.
197 static struct RequestContext *transmit_queue_head;
200 * Tail of DLL of requests to be transmitted to mesh_tunnel.
202 static struct RequestContext *transmit_queue_tail;
205 * Head of DLL of requests waiting for a response.
207 static struct RequestContext *receive_queue_head;
210 * Tail of DLL of requests waiting for a response.
212 static struct RequestContext *receive_queue_tail;
217 static struct GNUNET_STATISTICS_Handle *stats;
220 * The handle to DNS post-resolution modifications.
222 static struct GNUNET_DNS_Handle *dns_post_handle;
225 * The handle to DNS pre-resolution modifications.
227 static struct GNUNET_DNS_Handle *dns_pre_handle;
230 * Handle to access the DHT.
232 static struct GNUNET_DHT_Handle *dht;
235 * Our DHT GET operation to find DNS exits.
237 static struct GNUNET_DHT_GetHandle *dht_get;
240 * Are we doing IPv4-pt?
245 * Are we doing IPv6-pt?
250 * Are we tunneling DNS queries?
252 static int dns_tunnel;
255 * Number of DNS exit peers we currently have in the mesh tunnel.
256 * Used to see if using the mesh tunnel makes any sense right now.
258 static unsigned int dns_exit_available;
262 * We're done modifying all records in the response. Submit the reply
263 * and free the resources of the rc.
265 * @param rc context to process
268 finish_request (struct ReplyContext *rc)
274 GNUNET_DNSPARSER_pack (rc->dns,
279 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
280 _("Failed to pack DNS request. Dropping.\n"));
281 GNUNET_DNS_request_drop (rc->rh);
285 GNUNET_STATISTICS_update (stats,
286 gettext_noop ("# DNS requests mapped to VPN"),
288 GNUNET_DNS_request_answer (rc->rh,
292 GNUNET_DNSPARSER_free_packet (rc->dns);
298 * Process the next record of the given request context.
299 * When done, submit the reply and free the resources of
302 * @param rc context to process
305 submit_request (struct ReplyContext *rc);
309 * Callback invoked from the VPN service once a redirection is
310 * available. Provides the IP address that can now be used to
311 * reach the requested destination. We substitute the active
312 * record and then continue with 'submit_request' to look at
315 * @param cls our 'struct ReplyContext'
316 * @param af address family, AF_INET or AF_INET6; AF_UNSPEC on error;
317 * will match 'result_af' from the request
318 * @param address IP address (struct in_addr or struct in_addr6, depending on 'af')
319 * that the VPN allocated for the redirection;
320 * traffic to this IP will now be redirected to the
321 * specified target peer; NULL on error
324 vpn_allocation_callback (void *cls,
328 struct ReplyContext *rc = cls;
333 GNUNET_DNS_request_drop (rc->rh);
334 GNUNET_DNSPARSER_free_packet (rc->dns);
338 GNUNET_STATISTICS_update (stats,
339 gettext_noop ("# DNS records modified"),
341 switch (rc->rec->type)
343 case GNUNET_DNSPARSER_TYPE_A:
344 GNUNET_assert (AF_INET == af);
345 memcpy (rc->rec->data.raw.data, address, sizeof (struct in_addr));
347 case GNUNET_DNSPARSER_TYPE_AAAA:
348 GNUNET_assert (AF_INET6 == af);
349 memcpy (rc->rec->data.raw.data, address, sizeof (struct in6_addr));
361 * Modify the given DNS record by asking VPN to create a tunnel
362 * to the given address. When done, continue with submitting
363 * other records from the request context ('submit_request' is
366 * @param rc context to process
367 * @param rec record to modify
370 modify_address (struct ReplyContext *rc,
371 struct GNUNET_DNSPARSER_Record *rec)
377 case GNUNET_DNSPARSER_TYPE_A:
379 GNUNET_assert (rec->data.raw.data_len == sizeof (struct in_addr));
381 case GNUNET_DNSPARSER_TYPE_AAAA:
383 GNUNET_assert (rec->data.raw.data_len == sizeof (struct in6_addr));
390 rc->rr = GNUNET_VPN_redirect_to_ip (vpn_handle,
393 GNUNET_TIME_relative_to_absolute (TIMEOUT),
394 &vpn_allocation_callback,
400 * Process the next record of the given request context.
401 * When done, submit the reply and free the resources of
404 * @param rc context to process
407 submit_request (struct ReplyContext *rc)
409 struct GNUNET_DNSPARSER_Record *ra;
418 ra = rc->dns->answers;
419 ra_len = rc->dns->num_answers;
421 case AUTHORITY_RECORDS:
422 ra = rc->dns->authority_records;
423 ra_len = rc->dns->num_authority_records;
425 case ADDITIONAL_RECORDS:
426 ra = rc->dns->additional_records;
427 ra_len = rc->dns->num_additional_records;
435 for (i=rc->offset;i<ra_len;i++)
439 case GNUNET_DNSPARSER_TYPE_A:
443 modify_address (rc, &ra[i]);
447 case GNUNET_DNSPARSER_TYPE_AAAA:
451 modify_address (rc, &ra[i]);
463 * Test if any of the given records need protocol-translation work.
465 * @param ra array of records
466 * @param ra_len number of entries in ra
467 * @return GNUNET_YES if any of the given records require protocol-translation
470 work_test (const struct GNUNET_DNSPARSER_Record *ra,
475 for (i=0;i<ra_len;i++)
479 case GNUNET_DNSPARSER_TYPE_A:
483 case GNUNET_DNSPARSER_TYPE_AAAA:
494 * This function is called AFTER we got an IP address for a
495 * DNS request. Now, the PT daemon has the chance to substitute
496 * the IP address with one from the VPN range to tunnel requests
497 * destined for this IP address via VPN and MESH.
500 * @param rh request handle to user for reply
501 * @param request_length number of bytes in request
502 * @param request udp payload of the DNS request
505 dns_post_request_handler (void *cls,
506 struct GNUNET_DNS_RequestHandle *rh,
507 size_t request_length,
510 struct GNUNET_DNSPARSER_Packet *dns;
511 struct ReplyContext *rc;
514 GNUNET_STATISTICS_update (stats,
515 gettext_noop ("# DNS replies intercepted"),
517 dns = GNUNET_DNSPARSER_parse (request, request_length);
520 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
521 _("Failed to parse DNS request. Dropping.\n"));
522 GNUNET_DNS_request_drop (rh);
526 work |= work_test (dns->answers, dns->num_answers);
527 work |= work_test (dns->authority_records, dns->num_authority_records);
528 work |= work_test (dns->additional_records, dns->num_additional_records);
531 GNUNET_DNS_request_forward (rh);
532 GNUNET_DNSPARSER_free_packet (dns);
535 rc = GNUNET_new (struct ReplyContext);
545 * Transmit a DNS request via MESH and move the request
546 * handle to the receive queue.
549 * @param size number of bytes available in buf
550 * @param buf where to copy the message
551 * @return number of bytes written to buf
554 transmit_dns_request_to_mesh (void *cls,
558 struct RequestContext *rc;
562 if (NULL == (rc = transmit_queue_head))
564 mlen = ntohs (rc->mesh_message->size);
567 mesh_th = GNUNET_MESH_notify_transmit_ready (mesh_tunnel,
571 &transmit_dns_request_to_mesh,
575 GNUNET_assert (GNUNET_NO == rc->was_transmitted);
576 memcpy (buf, rc->mesh_message, mlen);
577 GNUNET_CONTAINER_DLL_remove (transmit_queue_head,
580 rc->was_transmitted = GNUNET_YES;
581 GNUNET_CONTAINER_DLL_insert (receive_queue_head,
584 rc = transmit_queue_head;
586 mesh_th = GNUNET_MESH_notify_transmit_ready (mesh_tunnel,
589 ntohs (rc->mesh_message->size),
590 &transmit_dns_request_to_mesh,
597 * Task run if the time to answer a DNS request via MESH is over.
599 * @param cls the 'struct RequestContext' to abort
600 * @param tc scheduler context
603 timeout_request (void *cls,
604 const struct GNUNET_SCHEDULER_TaskContext *tc)
606 struct RequestContext *rc = cls;
608 if (rc->was_transmitted)
609 GNUNET_CONTAINER_DLL_remove (receive_queue_head,
613 GNUNET_CONTAINER_DLL_remove (transmit_queue_head,
616 GNUNET_STATISTICS_update (stats,
617 gettext_noop ("# DNS requests dropped (timeout)"),
619 GNUNET_DNS_request_drop (rc->rh);
625 * This function is called *before* the DNS request has been
626 * given to a "local" DNS resolver. Tunneling for DNS requests
627 * was enabled, so we now need to send the request via some MESH
628 * tunnel to a DNS EXIT for resolution.
631 * @param rh request handle to user for reply
632 * @param request_length number of bytes in request
633 * @param request udp payload of the DNS request
636 dns_pre_request_handler (void *cls,
637 struct GNUNET_DNS_RequestHandle *rh,
638 size_t request_length,
641 struct RequestContext *rc;
643 struct GNUNET_MessageHeader hdr;
644 struct GNUNET_TUN_DnsHeader dns;
646 GNUNET_STATISTICS_update (stats,
647 gettext_noop ("# DNS requests intercepted"),
649 if (0 == dns_exit_available)
651 GNUNET_STATISTICS_update (stats,
652 gettext_noop ("# DNS requests dropped (DNS mesh tunnel down)"),
654 GNUNET_DNS_request_drop (rh);
657 if (request_length < sizeof (dns))
659 GNUNET_STATISTICS_update (stats,
660 gettext_noop ("# DNS requests dropped (malformed)"),
662 GNUNET_DNS_request_drop (rh);
665 memcpy (&dns, request, sizeof (dns));
666 GNUNET_assert (NULL != mesh_tunnel);
667 mlen = sizeof (struct GNUNET_MessageHeader) + request_length;
668 rc = GNUNET_malloc (sizeof (struct RequestContext) + mlen);
670 rc->mesh_message = (const struct GNUNET_MessageHeader*) &rc[1];
671 rc->timeout_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT,
675 hdr.type = htons (GNUNET_MESSAGE_TYPE_VPN_DNS_TO_INTERNET);
676 hdr.size = htons (mlen);
677 memcpy (&rc[1], &hdr, sizeof (struct GNUNET_MessageHeader));
678 memcpy (&(((char*)&rc[1])[sizeof (struct GNUNET_MessageHeader)]),
681 GNUNET_CONTAINER_DLL_insert_tail (transmit_queue_head,
685 mesh_th = GNUNET_MESH_notify_transmit_ready (mesh_tunnel,
689 &transmit_dns_request_to_mesh,
695 * Process a request via mesh to perform a DNS query.
697 * @param cls closure, NULL
698 * @param tunnel connection to the other end
699 * @param tunnel_ctx pointer to our 'struct TunnelState *'
700 * @param message the actual message
702 * @return GNUNET_OK to keep the connection open,
703 * GNUNET_SYSERR to close it (signal serious error)
706 receive_dns_response (void *cls GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel,
708 const struct GNUNET_MessageHeader *message)
710 struct GNUNET_TUN_DnsHeader dns;
712 struct RequestContext *rc;
714 mlen = ntohs (message->size);
715 mlen -= sizeof (struct GNUNET_MessageHeader);
716 if (mlen < sizeof (struct GNUNET_TUN_DnsHeader))
719 return GNUNET_SYSERR;
721 memcpy (&dns, &message[1], sizeof (dns));
722 for (rc = receive_queue_head; NULL != rc; rc = rc->next)
724 GNUNET_assert (GNUNET_YES == rc->was_transmitted);
725 if (dns.id == rc->dns_id)
727 GNUNET_STATISTICS_update (stats,
728 gettext_noop ("# DNS replies received"),
730 GNUNET_DNS_request_answer (rc->rh,
732 (const void*) &message[1]);
733 GNUNET_CONTAINER_DLL_remove (receive_queue_head,
736 GNUNET_SCHEDULER_cancel (rc->timeout_task);
741 GNUNET_STATISTICS_update (stats,
742 gettext_noop ("# DNS replies dropped (too late?)"),
749 * The MESH DNS tunnel went down. Abort all pending DNS
750 * requests (we're unlikely to get an answer in time).
753 abort_all_requests ()
755 struct RequestContext *rc;
757 while (NULL != (rc = receive_queue_head))
759 GNUNET_STATISTICS_update (stats,
760 gettext_noop ("# DNS requests aborted (tunnel down)"),
762 GNUNET_CONTAINER_DLL_remove (receive_queue_head,
765 GNUNET_DNS_request_drop (rc->rh);
766 GNUNET_SCHEDULER_cancel (rc->timeout_task);
769 while (NULL != (rc = transmit_queue_head))
771 GNUNET_STATISTICS_update (stats,
772 gettext_noop ("# DNS requests aborted (tunnel down)"),
774 GNUNET_CONTAINER_DLL_remove (transmit_queue_head,
777 GNUNET_DNS_request_drop (rc->rh);
778 GNUNET_SCHEDULER_cancel (rc->timeout_task);
785 * Function scheduled as very last function, cleans up after us
787 * @param cls closure, NULL
788 * @param tskctx scheduler context, unused
792 const struct GNUNET_SCHEDULER_TaskContext *tskctx)
794 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
795 "Protocol translation daemon is shutting down now\n");
796 if (NULL != vpn_handle)
798 GNUNET_VPN_disconnect (vpn_handle);
803 GNUNET_MESH_notify_transmit_ready_cancel (mesh_th);
806 if (NULL != mesh_tunnel)
808 GNUNET_MESH_tunnel_destroy (mesh_tunnel);
811 if (NULL != mesh_handle)
813 GNUNET_MESH_disconnect (mesh_handle);
816 abort_all_requests ();
817 if (NULL != dns_post_handle)
819 GNUNET_DNS_disconnect (dns_post_handle);
820 dns_post_handle = NULL;
822 if (NULL != dns_pre_handle)
824 GNUNET_DNS_disconnect (dns_pre_handle);
825 dns_pre_handle = NULL;
829 GNUNET_STATISTICS_destroy (stats, GNUNET_YES);
834 GNUNET_DHT_get_stop (dht_get);
839 GNUNET_DHT_disconnect (dht);
847 * Function called whenever a tunnel is destroyed. Should clean up
848 * the associated state and attempt to build a new one.
850 * It must NOT call #GNUNET_MESH_tunnel_destroy on the tunnel.
852 * @param cls closure (set from #GNUNET_MESH_connect)
853 * @param tunnel connection to the other end (henceforth invalid)
854 * @param tunnel_ctx place where local state associated
855 * with the tunnel is stored
858 mesh_tunnel_end_cb (void *cls,
859 const struct GNUNET_MESH_Tunnel *tunnel,
862 // FIXME: do cleanup here!
867 * Function called whenever we find an advertisement for a
868 * DNS exit in the DHT. If we don't have a mesh tunnel,
869 * we should build one; otherwise, we should save the
870 * advertisement for later use.
873 * @param exp when will this value expire
874 * @param key key of the result
875 * @param get_path peers on reply path (or NULL if not recorded)
876 * [0] = datastore's first neighbor, [length - 1] = local peer
877 * @param get_path_length number of entries in @a get_path
878 * @param put_path peers on the PUT path (or NULL if not recorded)
879 * [0] = origin, [length - 1] = datastore
880 * @param put_path_length number of entries in @a put_path
881 * @param type type of the result
882 * @param size number of bytes in @a data
883 * @param data pointer to the result data
886 handle_dht_result (void *cls,
887 struct GNUNET_TIME_Absolute exp,
888 const struct GNUNET_HashCode *key,
889 const struct GNUNET_PeerIdentity *get_path,
890 unsigned int get_path_length,
891 const struct GNUNET_PeerIdentity *put_path,
892 unsigned int put_path_length,
893 enum GNUNET_BLOCK_Type type,
894 size_t size, const void *data)
896 const struct GNUNET_DNS_Advertisement *ad;
897 struct GNUNET_PeerIdentity pid;
899 if (sizeof (struct GNUNET_DNS_Advertisement) != size)
905 GNUNET_CRYPTO_hash (&ad->peer,
906 sizeof (struct GNUNET_CRYPTO_EccPublicSignKey),
908 /* FIXME: decide between creating more mesh tunnels and
909 just remembering the peer ID */
910 mesh_tunnel = GNUNET_MESH_tunnel_create (mesh_handle,
911 NULL /* FIXME: tunnel ctx */,
913 PORT_PT, /* FIXME: DNS port, right? */
914 GNUNET_YES /* no buffer */,
915 GNUNET_NO /* reliable */);
921 * @brief Main function that will be run by the scheduler.
924 * @param args remaining command-line arguments
925 * @param cfgfile name of the configuration file used (for saving, can be NULL!)
926 * @param cfg_ configuration
929 run (void *cls, char *const *args GNUNET_UNUSED,
930 const char *cfgfile GNUNET_UNUSED,
931 const struct GNUNET_CONFIGURATION_Handle *cfg_)
933 struct GNUNET_HashCode dns_key;
936 stats = GNUNET_STATISTICS_create ("pt", cfg);
937 ipv4_pt = GNUNET_CONFIGURATION_get_value_yesno (cfg, "pt", "TUNNEL_IPV4");
938 ipv6_pt = GNUNET_CONFIGURATION_get_value_yesno (cfg, "pt", "TUNNEL_IPV6");
939 dns_tunnel = GNUNET_CONFIGURATION_get_value_yesno (cfg, "pt", "TUNNEL_DNS");
940 if (! (ipv4_pt || ipv6_pt || dns_tunnel))
942 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
943 _("No useful service enabled. Exiting.\n"));
944 GNUNET_SCHEDULER_shutdown ();
947 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &cleanup, cls);
948 if (ipv4_pt || ipv6_pt)
951 = GNUNET_DNS_connect (cfg,
952 GNUNET_DNS_FLAG_POST_RESOLUTION,
953 &dns_post_request_handler, NULL);
954 if (NULL == dns_post_handle)
956 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
957 _("Failed to connect to %s service. Exiting.\n"),
959 GNUNET_SCHEDULER_shutdown ();
962 vpn_handle = GNUNET_VPN_connect (cfg);
963 if (NULL == vpn_handle)
965 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
966 _("Failed to connect to %s service. Exiting.\n"),
968 GNUNET_SCHEDULER_shutdown ();
974 static struct GNUNET_MESH_MessageHandler mesh_handlers[] = {
975 {&receive_dns_response, GNUNET_MESSAGE_TYPE_VPN_DNS_FROM_INTERNET, 0},
980 = GNUNET_DNS_connect (cfg,
981 GNUNET_DNS_FLAG_PRE_RESOLUTION,
982 &dns_pre_request_handler, NULL);
983 if (NULL == dns_pre_handle)
985 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
986 _("Failed to connect to %s service. Exiting.\n"),
988 GNUNET_SCHEDULER_shutdown ();
991 mesh_handle = GNUNET_MESH_connect (cfg, NULL, NULL,
993 mesh_handlers, NULL);
994 if (NULL == mesh_handle)
996 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
997 _("Failed to connect to %s service. Exiting.\n"),
999 GNUNET_SCHEDULER_shutdown ();
1002 dht = GNUNET_DHT_connect (cfg, 1);
1005 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
1006 _("Failed to connect to %s service. Exiting.\n"),
1008 GNUNET_SCHEDULER_shutdown ();
1011 GNUNET_CRYPTO_hash ("dns", strlen ("dns"), &dns_key);
1012 dht_get = GNUNET_DHT_get_start (dht,
1013 GNUNET_BLOCK_TYPE_DNS,
1016 GNUNET_DHT_RO_DEMULTIPLEX_EVERYWHERE,
1018 &handle_dht_result, NULL);
1026 * @param argc number of arguments from the command line
1027 * @param argv command line arguments
1028 * @return 0 ok, 1 on error
1031 main (int argc, char *const *argv)
1033 static const struct GNUNET_GETOPT_CommandLineOption options[] = {
1034 GNUNET_GETOPT_OPTION_END
1038 if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
1041 GNUNET_PROGRAM_run (argc, argv, "gnunet-daemon-pt",
1043 ("Daemon to run to perform IP protocol translation to GNUnet"),
1044 options, &run, NULL)) ? 0 : 1;
1045 GNUNET_free ((void*) argv);
1050 /* end of gnunet-daemon-pt.c */