stuff
authorChristian Grothoff <christian@grothoff.org>
Sun, 14 Aug 2011 20:05:17 +0000 (20:05 +0000)
committerChristian Grothoff <christian@grothoff.org>
Sun, 14 Aug 2011 20:05:17 +0000 (20:05 +0000)
src/core/test_core_api_send_to_self.c
src/include/gnunet_protocols.h
src/vpn/gnunet-daemon-exit.c
src/vpn/gnunet-daemon-vpn-dns.c
src/vpn/gnunet-daemon-vpn-helper.c
src/vpn/gnunet-daemon-vpn.c
src/vpn/gnunet-service-dns.c

index b287ecf05c9b19d7320e4b2bd2e1c254e2fedcf1..f2ddeb9fefef62aafcc77cd450d91eb1bb4f7598 100644 (file)
@@ -110,7 +110,7 @@ send_message (void* cls, size_t size, void* buf)
   GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Sending!\n");
   struct GNUNET_MessageHeader *hdr = buf;
   hdr->size = htons(sizeof(struct GNUNET_MessageHeader));
-  hdr->type = htons(GNUNET_MESSAGE_TYPE_SERVICE_UDP);
+  hdr->type = htons(GNUNET_MESSAGE_TYPE_VPN_SERVICE_UDP);
   return ntohs(hdr->size);
 }
 
@@ -165,7 +165,7 @@ run (void *cls,
      const struct GNUNET_CONFIGURATION_Handle *cfg)
 {
   const static struct GNUNET_CORE_MessageHandler handlers[] = {
-    {&receive, GNUNET_MESSAGE_TYPE_SERVICE_UDP, 0},
+    {&receive, GNUNET_MESSAGE_TYPE_VPN_SERVICE_UDP, 0},
     {NULL, 0, 0}
   };
 
index 59db0cd78af18cc28558c17f0ff0c4efb88bf77b..b37c920916348d13bd334e8aa0a303ab359509fb 100644 (file)
@@ -759,42 +759,42 @@ extern "C"
 /**
  * Type of messages containing an UDP packet for a service
  */
-#define GNUNET_MESSAGE_TYPE_SERVICE_UDP 186
+#define GNUNET_MESSAGE_TYPE_VPN_SERVICE_UDP 186
 
 /**
  * Type of messages containing an UDP packet from a service
  */
-#define GNUNET_MESSAGE_TYPE_SERVICE_UDP_BACK 187
+#define GNUNET_MESSAGE_TYPE_VPN_SERVICE_UDP_BACK 187
 
 /**
  * Type of messages containing an TCP packet for a service
  */
-#define GNUNET_MESSAGE_TYPE_SERVICE_TCP 188
+#define GNUNET_MESSAGE_TYPE_VPN_SERVICE_TCP 188
 
 /**
  * Type of messages containing an TCP packet from a service
  */
-#define GNUNET_MESSAGE_TYPE_SERVICE_TCP_BACK 189
+#define GNUNET_MESSAGE_TYPE_VPN_SERVICE_TCP_BACK 189
 
 /**
  * Type of messages containing an UDP packet for a remote host
  */
-#define GNUNET_MESSAGE_TYPE_REMOTE_UDP 190
+#define GNUNET_MESSAGE_TYPE_VPN_REMOTE_UDP 190
 
 /**
  * Type of messages containing an UDP packet from a remote host
  */
-#define GNUNET_MESSAGE_TYPE_REMOTE_UDP_BACK 191
+#define GNUNET_MESSAGE_TYPE_VPN_REMOTE_UDP_BACK 191
 
 /**
  * Type of messages containing an TCP packet for a remote host
  */
-#define GNUNET_MESSAGE_TYPE_REMOTE_TCP 192
+#define GNUNET_MESSAGE_TYPE_VPN_REMOTE_TCP 192
 
 /**
  * Type of messages containing an TCP packet from a remote host
  */
-#define GNUNET_MESSAGE_TYPE_REMOTE_TCP_BACK 193
+#define GNUNET_MESSAGE_TYPE_VPN_REMOTE_TCP_BACK 193
 
 
 /*******************************************************************************
@@ -804,11 +804,11 @@ extern "C"
 /**
  * Type of messages to query the local service-dns
  */
-#define GNUNET_MESSAGE_TYPE_LOCAL_QUERY_DNS 205
+#define GNUNET_MESSAGE_TYPE_VPN_DNS_LOCAL_QUERY_DNS 205
 /**
  * Type of messages the local service-dns responds with
  */
-#define GNUNET_MESSAGE_TYPE_LOCAL_RESPONSE_DNS 206
+#define GNUNET_MESSAGE_TYPE_VPN_DNS_LOCAL_RESPONSE_DNS 206
 /**
  * Type of messages to instruct the local service-dns to rehijack the dns
  */
@@ -816,11 +816,11 @@ extern "C"
 /**
  * Type of messages to send a DNS-query to another peer
  */
-#define GNUNET_MESSAGE_TYPE_REMOTE_QUERY_DNS 208
+#define GNUNET_MESSAGE_TYPE_VPN_REMOTE_QUERY_DNS 208
 /**
  * Type of messages to send a DNS-answer to another peer
  */
-#define GNUNET_MESSAGE_TYPE_REMOTE_ANSWER_DNS 209
+#define GNUNET_MESSAGE_TYPE_VPN_REMOTE_ANSWER_DNS 209
 
 
 
@@ -1059,7 +1059,12 @@ extern "C"
  */
 #define GNUNET_MESSAGE_TYPE_PEERINFO_NOTIFY 334
 
-
+/*******************************************************************************
+ * TODO: we need a way to register message types centrally (via some webpage).
+ * For now: unofficial extensions should start at 48k, internal extensions
+ * define here should leave some room (4-10 additional messages to the previous
+ * extension).
+ ******************************************************************************/
 
 /**
  * Type used to match 'all' message types.
index 19101e6e131f3859eae1f8488356a5d9a6810b5c..ac07dd4d5c2aa4abb8ed0b5050be0885746c8369 100644 (file)
@@ -341,7 +341,7 @@ udp_from_helper (struct udp_pkt *udp, unsigned char *dadr, size_t addrlen)
   *ctunnel = tunnel;
   msg = (struct GNUNET_MessageHeader*)(ctunnel + 1);
   msg->size = htons (len);
-  msg->type = htons (state->type == SERVICE ? GNUNET_MESSAGE_TYPE_SERVICE_UDP_BACK : GNUNET_MESSAGE_TYPE_REMOTE_UDP_BACK);
+  msg->type = htons (state->type == SERVICE ? GNUNET_MESSAGE_TYPE_VPN_SERVICE_UDP_BACK : GNUNET_MESSAGE_TYPE_VPN_REMOTE_UDP_BACK);
   GNUNET_HashCode *desc = (GNUNET_HashCode *) (msg + 1);
   if (state->type == SERVICE)
     memcpy (desc, &state->desc, sizeof (GNUNET_HashCode));
@@ -443,7 +443,7 @@ tcp_from_helper (struct tcp_pkt *tcp, unsigned char *dadr, size_t addrlen,
   *ctunnel = tunnel;
   msg = (struct GNUNET_MessageHeader*)(ctunnel + 1);
   msg->size = htons (len);
-  msg->type = htons (state->type == SERVICE ? GNUNET_MESSAGE_TYPE_SERVICE_TCP_BACK : GNUNET_MESSAGE_TYPE_REMOTE_TCP_BACK);
+  msg->type = htons (state->type == SERVICE ? GNUNET_MESSAGE_TYPE_VPN_SERVICE_TCP_BACK : GNUNET_MESSAGE_TYPE_VPN_REMOTE_TCP_BACK);
   GNUNET_HashCode *desc = (GNUNET_HashCode *) (msg + 1);
   if (state->type == SERVICE)
     memcpy (desc, &state->desc, sizeof (GNUNET_HashCode));
@@ -1265,8 +1265,8 @@ connect_to_mesh()
   tcp = GNUNET_CONFIGURATION_get_value_yesno(cfg, "exit", "ENABLE_TCP");
 
   static struct GNUNET_MESH_MessageHandler handlers[] = {
-    {receive_udp_service, GNUNET_MESSAGE_TYPE_SERVICE_UDP, 0},
-    {receive_tcp_service, GNUNET_MESSAGE_TYPE_SERVICE_TCP, 0},
+    {receive_udp_service, GNUNET_MESSAGE_TYPE_VPN_SERVICE_UDP, 0},
+    {receive_tcp_service, GNUNET_MESSAGE_TYPE_VPN_SERVICE_TCP, 0},
     {NULL, 0, 0},
     {NULL, 0, 0},
     {NULL, 0, 0}
@@ -1286,7 +1286,7 @@ connect_to_mesh()
     {
       handlers[handler_idx].callback = receive_udp_remote;
       handlers[handler_idx].expected_size = 0;
-      handlers[handler_idx].type = GNUNET_MESSAGE_TYPE_REMOTE_UDP;
+      handlers[handler_idx].type = GNUNET_MESSAGE_TYPE_VPN_REMOTE_UDP;
       apptypes[app_idx] = GNUNET_APPLICATION_TYPE_INTERNET_UDP_GATEWAY;
       handler_idx++;
       app_idx++;
@@ -1296,7 +1296,7 @@ connect_to_mesh()
     {
       handlers[handler_idx].callback = receive_tcp_remote;
       handlers[handler_idx].expected_size = 0;
-      handlers[handler_idx].type = GNUNET_MESSAGE_TYPE_REMOTE_TCP;
+      handlers[handler_idx].type = GNUNET_MESSAGE_TYPE_VPN_REMOTE_TCP;
       apptypes[app_idx] = GNUNET_APPLICATION_TYPE_INTERNET_TCP_GATEWAY;
       handler_idx++;
       app_idx++;
index 6f319c0f69f0958b8678cef6839dc8b800f0b3d6..6ccef5869af52ef9c58a278f7754e251691fd53f 100644 (file)
@@ -156,7 +156,7 @@ dns_answer_handler(void* cls __attribute__((unused)), const struct GNUNET_Messag
       }
 
     /* the service did something strange, reconnect immediately */
-    if (msg->type != htons(GNUNET_MESSAGE_TYPE_LOCAL_RESPONSE_DNS))
+    if (msg->type != htons(GNUNET_MESSAGE_TYPE_VPN_DNS_LOCAL_RESPONSE_DNS))
       {
        GNUNET_break (0);
        GNUNET_CLIENT_disconnect(dns_connection, GNUNET_NO);
index f99e38ce0f4b65f56f45534f3acdb17cec9c5827..05e2bd0819f51489fbe9a93e6bc404b3061608eb 100644 (file)
@@ -277,7 +277,7 @@ message_token (void *cls __attribute__((unused)),
                           || testBit (me->additional_ports,
                                       ntohs (pkt6_udp->udp_hdr.dpt))))
                     {
-                      hdr->type = ntohs (GNUNET_MESSAGE_TYPE_SERVICE_UDP);
+                      hdr->type = ntohs (GNUNET_MESSAGE_TYPE_VPN_SERVICE_UDP);
 
                       memcpy (hc + 1, &pkt6_udp->udp_hdr,
                               ntohs (pkt6_udp->udp_hdr.len));
@@ -289,7 +289,7 @@ message_token (void *cls __attribute__((unused)),
                            &&
                            (port_in_ports (me->desc.ports, pkt6_tcp->tcp_hdr.dpt)))
                     {
-                      hdr->type = ntohs (GNUNET_MESSAGE_TYPE_SERVICE_TCP);
+                      hdr->type = ntohs (GNUNET_MESSAGE_TYPE_VPN_SERVICE_TCP);
 
                       memcpy (hc + 1, &pkt6_tcp->tcp_hdr,
                               ntohs (pkt6->ip6_hdr.paylgth));
@@ -327,7 +327,7 @@ message_token (void *cls __attribute__((unused)),
                   s->proto= pkt6->ip6_hdr.nxthdr;
                   if (s->proto == 0x11)
                     {
-                      hdr->type = htons(GNUNET_MESSAGE_TYPE_REMOTE_UDP);
+                      hdr->type = htons(GNUNET_MESSAGE_TYPE_VPN_REMOTE_UDP);
                       memcpy (hc + 1, &pkt6_udp->udp_hdr,
                               ntohs (pkt6_udp->udp_hdr.len));
                       app_type = GNUNET_APPLICATION_TYPE_INTERNET_UDP_GATEWAY;
@@ -336,7 +336,7 @@ message_token (void *cls __attribute__((unused)),
                     }
                   else if (s->proto == 0x06)
                     {
-                      hdr->type = htons(GNUNET_MESSAGE_TYPE_REMOTE_TCP);
+                      hdr->type = htons(GNUNET_MESSAGE_TYPE_VPN_REMOTE_TCP);
                       memcpy (hc + 1, &pkt6_tcp->tcp_hdr,
                               ntohs (pkt6->ip6_hdr.paylgth));
                       app_type = GNUNET_APPLICATION_TYPE_INTERNET_TCP_GATEWAY;
@@ -418,7 +418,7 @@ message_token (void *cls __attribute__((unused)),
 
           struct query_packet_list *query =
             GNUNET_malloc (len + 2 * sizeof (struct query_packet_list *));
-          query->pkt.hdr.type = htons (GNUNET_MESSAGE_TYPE_LOCAL_QUERY_DNS);
+          query->pkt.hdr.type = htons (GNUNET_MESSAGE_TYPE_VPN_DNS_LOCAL_QUERY_DNS);
           query->pkt.hdr.size = htons (len);
           query->pkt.orig_to = pkt->ip_hdr.dadr;
           query->pkt.orig_from = pkt->ip_hdr.sadr;
@@ -487,7 +487,7 @@ message_token (void *cls __attribute__((unused)),
                               || testBit (me->additional_ports,
                                           ntohs (pkt_udp->udp_hdr.dpt))))
                         {
-                          hdr->type = ntohs (GNUNET_MESSAGE_TYPE_SERVICE_UDP);
+                          hdr->type = ntohs (GNUNET_MESSAGE_TYPE_VPN_SERVICE_UDP);
 
                           memcpy (hc + 1, &pkt_udp->udp_hdr,
                                   ntohs (pkt_udp->udp_hdr.len));
@@ -499,7 +499,7 @@ message_token (void *cls __attribute__((unused)),
                                &&
                                (port_in_ports (me->desc.ports, pkt_tcp->tcp_hdr.dpt)))
                         {
-                          hdr->type = ntohs (GNUNET_MESSAGE_TYPE_SERVICE_TCP);
+                          hdr->type = ntohs (GNUNET_MESSAGE_TYPE_VPN_SERVICE_TCP);
 
                           memcpy (hc + 1, &pkt_tcp->tcp_hdr,
                                   ntohs (pkt->ip_hdr.tot_lngth) - 4*pkt->ip_hdr.hdr_lngth);
@@ -537,14 +537,14 @@ message_token (void *cls __attribute__((unused)),
                       s->proto= pkt->ip_hdr.proto;
                       if (s->proto == 0x11)
                         {
-                          hdr->type = htons(GNUNET_MESSAGE_TYPE_REMOTE_UDP);
+                          hdr->type = htons(GNUNET_MESSAGE_TYPE_VPN_REMOTE_UDP);
                           memcpy (hc + 1, &pkt_udp->udp_hdr,
                                   ntohs (pkt_udp->udp_hdr.len));
                           app_type = GNUNET_APPLICATION_TYPE_INTERNET_UDP_GATEWAY;
                         }
                       else if (s->proto == 0x06)
                         {
-                          hdr->type = htons(GNUNET_MESSAGE_TYPE_REMOTE_TCP);
+                          hdr->type = htons(GNUNET_MESSAGE_TYPE_VPN_REMOTE_TCP);
                           memcpy (hc + 1, &pkt_tcp->tcp_hdr,
                               ntohs (pkt->ip_hdr.tot_lngth) - 4*pkt->ip_hdr.hdr_lngth);
                           app_type = GNUNET_APPLICATION_TYPE_INTERNET_TCP_GATEWAY;
index 1e1e957d8c6bfc89ac365f45fa2ec2753049046a..15ed379df556289140b13a91c54c6bb59d66be26 100644 (file)
@@ -812,7 +812,7 @@ receive_udp_back (void *cls
 
       GNUNET_assert (pkt6 != NULL);
 
-      if (ntohs (message->type) == GNUNET_MESSAGE_TYPE_SERVICE_UDP_BACK)
+      if (ntohs (message->type) == GNUNET_MESSAGE_TYPE_VPN_SERVICE_UDP_BACK)
         new_ip6addr (pkt6->ip6_hdr.sadr, &other->hashPubKey, desc);
       else
         new_ip6addr_remote (pkt6->ip6_hdr.sadr, s->addr, s->addrlen);
@@ -857,7 +857,7 @@ receive_udp_back (void *cls
       GNUNET_free (key);
 
       GNUNET_assert (me != NULL);
-      if (ntohs (message->type) == GNUNET_MESSAGE_TYPE_SERVICE_UDP_BACK)
+      if (ntohs (message->type) == GNUNET_MESSAGE_TYPE_VPN_SERVICE_UDP_BACK)
         {
           GNUNET_assert (me->desc.
                          service_type & htonl (GNUNET_DNS_SERVICE_TYPE_UDP));
@@ -897,7 +897,7 @@ receive_udp_back (void *cls
 
       GNUNET_assert (pkt4 != NULL);
 
-      GNUNET_assert (ntohs (message->type) == GNUNET_MESSAGE_TYPE_REMOTE_UDP_BACK);
+      GNUNET_assert (ntohs (message->type) == GNUNET_MESSAGE_TYPE_VPN_REMOTE_UDP_BACK);
       uint32_t sadr;
       new_ip4addr_remote ((unsigned char*)&sadr, s->addr, s->addrlen);
       pkt4->ip_hdr.sadr = sadr;
@@ -984,7 +984,7 @@ receive_tcp_back (void *cls __attribute__((unused)), struct GNUNET_MESH_Tunnel*
 
       GNUNET_assert (pkt6 != NULL);
 
-      if (ntohs (message->type) == GNUNET_MESSAGE_TYPE_SERVICE_TCP_BACK)
+      if (ntohs (message->type) == GNUNET_MESSAGE_TYPE_VPN_SERVICE_TCP_BACK)
         new_ip6addr (pkt6->ip6_hdr.sadr, &other->hashPubKey, desc);
       else
         new_ip6addr_remote (pkt6->ip6_hdr.sadr, s->addr, s->addrlen);
@@ -1025,7 +1025,7 @@ receive_tcp_back (void *cls __attribute__((unused)), struct GNUNET_MESH_Tunnel*
       GNUNET_free (key);
 
       GNUNET_assert (me != NULL);
-      if (ntohs (message->type) == GNUNET_MESSAGE_TYPE_SERVICE_UDP_BACK)
+      if (ntohs (message->type) == GNUNET_MESSAGE_TYPE_VPN_SERVICE_UDP_BACK)
         GNUNET_assert (me->desc.
                        service_type & htonl (GNUNET_DNS_SERVICE_TYPE_TCP));
 
@@ -1058,7 +1058,7 @@ receive_tcp_back (void *cls __attribute__((unused)), struct GNUNET_MESH_Tunnel*
       GNUNET_assert (pkt4 != NULL);
       memset (pkt4, 0, size);
 
-      GNUNET_assert (ntohs (message->type) == GNUNET_MESSAGE_TYPE_REMOTE_TCP_BACK);
+      GNUNET_assert (ntohs (message->type) == GNUNET_MESSAGE_TYPE_VPN_REMOTE_TCP_BACK);
       uint32_t sadr;
       new_ip4addr_remote ((unsigned char*)&sadr, s->addr, s->addrlen);
       pkt4->ip_hdr.sadr = sadr;
@@ -1149,10 +1149,10 @@ run (void *cls,
      const struct GNUNET_CONFIGURATION_Handle *cfg_)
 {
     static const struct GNUNET_MESH_MessageHandler handlers[] = {
-         {receive_udp_back, GNUNET_MESSAGE_TYPE_SERVICE_UDP_BACK, 0},
-         {receive_tcp_back, GNUNET_MESSAGE_TYPE_SERVICE_TCP_BACK, 0},
-         {receive_udp_back, GNUNET_MESSAGE_TYPE_REMOTE_UDP_BACK, 0},
-         {receive_tcp_back, GNUNET_MESSAGE_TYPE_REMOTE_TCP_BACK, 0},
+         {receive_udp_back, GNUNET_MESSAGE_TYPE_VPN_SERVICE_UDP_BACK, 0},
+         {receive_tcp_back, GNUNET_MESSAGE_TYPE_VPN_SERVICE_TCP_BACK, 0},
+         {receive_udp_back, GNUNET_MESSAGE_TYPE_VPN_REMOTE_UDP_BACK, 0},
+         {receive_tcp_back, GNUNET_MESSAGE_TYPE_VPN_REMOTE_TCP_BACK, 0},
          {NULL, 0, 0}
     };
 
index 351e6671adc559bcfb13133e89f0b4e362195ae0..fca21ee4d3f41301f6d4dd5f900f37f3b88ef41f 100644 (file)
@@ -226,7 +226,7 @@ mesh_send_response (void *cls, size_t size, void *buf)
   uint32_t *sz = cls;
   struct GNUNET_MESH_Tunnel **tunnel = (struct GNUNET_MESH_Tunnel**)(sz+1);
   struct dns_pkt *dns = (struct dns_pkt *) (tunnel + 1);
-  hdr->type = htons (GNUNET_MESSAGE_TYPE_REMOTE_ANSWER_DNS);
+  hdr->type = htons (GNUNET_MESSAGE_TYPE_VPN_REMOTE_ANSWER_DNS);
   hdr->size = htons (*sz + sizeof (struct GNUNET_MessageHeader));
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -426,7 +426,7 @@ receive_mesh_answer (void *cls __attribute__((unused)),
     GNUNET_malloc (len + 2 * sizeof (struct answer_packet_list *));
   memset (answer, 0, len + 2 * sizeof (struct answer_packet_list *));
 
-  answer->pkt.hdr.type = htons (GNUNET_MESSAGE_TYPE_LOCAL_RESPONSE_DNS);
+  answer->pkt.hdr.type = htons (GNUNET_MESSAGE_TYPE_VPN_DNS_LOCAL_RESPONSE_DNS);
   answer->pkt.hdr.size = htons (len);
 
   struct dns_pkt_parsed* pdns = parse_dns_packet(dns);
@@ -541,7 +541,7 @@ send_rev_query(void * cls, const struct GNUNET_SCHEDULER_TaskContext *tc) {
     struct answer_packet_list* answer = GNUNET_malloc(len + 2*sizeof(struct answer_packet_list*));
     memset(answer, 0, len + 2*sizeof(struct answer_packet_list*));
 
-    answer->pkt.hdr.type = htons(GNUNET_MESSAGE_TYPE_LOCAL_RESPONSE_DNS);
+    answer->pkt.hdr.type = htons(GNUNET_MESSAGE_TYPE_VPN_DNS_LOCAL_RESPONSE_DNS);
     answer->pkt.hdr.size = htons(len);
     answer->pkt.subtype = GNUNET_DNS_ANSWER_TYPE_REV;
 
@@ -633,7 +633,7 @@ receive_dht(void *cls,
     struct answer_packet_list* answer = GNUNET_malloc(len + 2*sizeof(struct answer_packet_list*));
     memset(answer, 0, len + 2*sizeof(struct answer_packet_list*));
 
-    answer->pkt.hdr.type = htons(GNUNET_MESSAGE_TYPE_LOCAL_RESPONSE_DNS);
+    answer->pkt.hdr.type = htons(GNUNET_MESSAGE_TYPE_VPN_DNS_LOCAL_RESPONSE_DNS);
     answer->pkt.hdr.size = htons(len);
     answer->pkt.subtype = GNUNET_DNS_ANSWER_TYPE_SERVICE;
 
@@ -851,7 +851,7 @@ receive_query(void *cls __attribute__((unused)),
         struct tunnel_cls *cls_ =  GNUNET_malloc(size);
         cls_->hdr.size = size - sizeof(struct GNUNET_MESH_Tunnel*);
 
-        cls_->hdr.type = ntohs(GNUNET_MESSAGE_TYPE_REMOTE_QUERY_DNS);
+        cls_->hdr.type = ntohs(GNUNET_MESSAGE_TYPE_VPN_REMOTE_QUERY_DNS);
         GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "size: %d\n", size);
 
         memcpy(&cls_->dns, dns, cls_->hdr.size - sizeof(struct GNUNET_MessageHeader));
@@ -1020,7 +1020,7 @@ read_response (void *cls
             struct answer_packet_list *answer =
               GNUNET_malloc (len + 2 * sizeof (struct answer_packet_list *));
             answer->pkt.hdr.type =
-              htons (GNUNET_MESSAGE_TYPE_LOCAL_RESPONSE_DNS);
+              htons (GNUNET_MESSAGE_TYPE_VPN_DNS_LOCAL_RESPONSE_DNS);
             answer->pkt.hdr.size = htons (len);
             answer->pkt.subtype = GNUNET_DNS_ANSWER_TYPE_IP;
             answer->pkt.from = addr.sin_addr.s_addr;
@@ -1287,15 +1287,15 @@ run (void *cls,
 {
   static const struct GNUNET_SERVER_MessageHandler handlers[] = {
     /* callback, cls, type, size */
-    {&receive_query, NULL, GNUNET_MESSAGE_TYPE_LOCAL_QUERY_DNS, 0},
+    {&receive_query, NULL, GNUNET_MESSAGE_TYPE_VPN_DNS_LOCAL_QUERY_DNS, 0},
     {&rehijack, NULL, GNUNET_MESSAGE_TYPE_REHIJACK,
      sizeof (struct GNUNET_MessageHeader)},
     {NULL, NULL, 0, 0}
   };
 
   static const struct GNUNET_MESH_MessageHandler mesh_handlers[] = {
-    {receive_mesh_query, GNUNET_MESSAGE_TYPE_REMOTE_QUERY_DNS, 0},
-    {receive_mesh_answer, GNUNET_MESSAGE_TYPE_REMOTE_ANSWER_DNS, 0},
+    {receive_mesh_query, GNUNET_MESSAGE_TYPE_VPN_REMOTE_QUERY_DNS, 0},
+    {receive_mesh_answer, GNUNET_MESSAGE_TYPE_VPN_REMOTE_ANSWER_DNS, 0},
     {NULL, 0, 0}
   };