gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r16509 - in gnunet/src: core include vpn


From: gnunet
Subject: [GNUnet-SVN] r16509 - in gnunet/src: core include vpn
Date: Sun, 14 Aug 2011 22:05:17 +0200

Author: grothoff
Date: 2011-08-14 22:05:17 +0200 (Sun, 14 Aug 2011)
New Revision: 16509

Modified:
   gnunet/src/core/test_core_api_send_to_self.c
   gnunet/src/include/gnunet_protocols.h
   gnunet/src/vpn/gnunet-daemon-exit.c
   gnunet/src/vpn/gnunet-daemon-vpn-dns.c
   gnunet/src/vpn/gnunet-daemon-vpn-helper.c
   gnunet/src/vpn/gnunet-daemon-vpn.c
   gnunet/src/vpn/gnunet-service-dns.c
Log:
stuff

Modified: gnunet/src/core/test_core_api_send_to_self.c
===================================================================
--- gnunet/src/core/test_core_api_send_to_self.c        2011-08-14 20:00:54 UTC 
(rev 16508)
+++ gnunet/src/core/test_core_api_send_to_self.c        2011-08-14 20:05:17 UTC 
(rev 16509)
@@ -110,7 +110,7 @@
   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 @@
      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}
   };
 

Modified: gnunet/src/include/gnunet_protocols.h
===================================================================
--- gnunet/src/include/gnunet_protocols.h       2011-08-14 20:00:54 UTC (rev 
16508)
+++ gnunet/src/include/gnunet_protocols.h       2011-08-14 20:05:17 UTC (rev 
16509)
@@ -759,42 +759,42 @@
 /**
  * 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 @@
 /**
  * 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 @@
 /**
  * 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,8 +1059,13 @@
  */
 #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.
  */

Modified: gnunet/src/vpn/gnunet-daemon-exit.c
===================================================================
--- gnunet/src/vpn/gnunet-daemon-exit.c 2011-08-14 20:00:54 UTC (rev 16508)
+++ gnunet/src/vpn/gnunet-daemon-exit.c 2011-08-14 20:05:17 UTC (rev 16509)
@@ -341,7 +341,7 @@
   *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 @@
   *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 @@
   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 @@
     {
       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 @@
     {
       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++;

Modified: gnunet/src/vpn/gnunet-daemon-vpn-dns.c
===================================================================
--- gnunet/src/vpn/gnunet-daemon-vpn-dns.c      2011-08-14 20:00:54 UTC (rev 
16508)
+++ gnunet/src/vpn/gnunet-daemon-vpn-dns.c      2011-08-14 20:05:17 UTC (rev 
16509)
@@ -156,7 +156,7 @@
       }
 
     /* 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);

Modified: gnunet/src/vpn/gnunet-daemon-vpn-helper.c
===================================================================
--- gnunet/src/vpn/gnunet-daemon-vpn-helper.c   2011-08-14 20:00:54 UTC (rev 
16508)
+++ gnunet/src/vpn/gnunet-daemon-vpn-helper.c   2011-08-14 20:05:17 UTC (rev 
16509)
@@ -277,7 +277,7 @@
                           || 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 @@
                            &&
                            (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 @@
                   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 @@
                     }
                   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 @@
 
           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 @@
                               || 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 @@
                                &&
                                (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 @@
                       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;

Modified: gnunet/src/vpn/gnunet-daemon-vpn.c
===================================================================
--- gnunet/src/vpn/gnunet-daemon-vpn.c  2011-08-14 20:00:54 UTC (rev 16508)
+++ gnunet/src/vpn/gnunet-daemon-vpn.c  2011-08-14 20:05:17 UTC (rev 16509)
@@ -812,7 +812,7 @@
 
       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 @@
       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 @@
 
       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 @@
 
       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 @@
       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 @@
       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 @@
      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}
     };
 

Modified: gnunet/src/vpn/gnunet-service-dns.c
===================================================================
--- gnunet/src/vpn/gnunet-service-dns.c 2011-08-14 20:00:54 UTC (rev 16508)
+++ gnunet/src/vpn/gnunet-service-dns.c 2011-08-14 20:05:17 UTC (rev 16509)
@@ -226,7 +226,7 @@
   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 @@
     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 @@
     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 @@
     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 @@
         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 @@
             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 @@
 {
   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}
   };
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]