diff options
author | Philipp Tölke <toelke@in.tum.de> | 2010-09-07 13:37:26 +0000 |
---|---|---|
committer | Philipp Tölke <toelke@in.tum.de> | 2010-09-07 13:37:26 +0000 |
commit | cbb7beca521c7f311229b74b056051af1a6bb201 (patch) | |
tree | f2fd829db17ed3800eb44e3aa143e1c919b5407d | |
parent | 020498bd6a5314554abebfe56e74499fce1adaed (diff) | |
download | gnunet-cbb7beca521c7f311229b74b056051af1a6bb201.tar.gz gnunet-cbb7beca521c7f311229b74b056051af1a6bb201.zip |
removed a few debug-outputs and changed the remaining to GNUNET_log
-rw-r--r-- | src/vpn/gnunet-daemon-vpn.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/vpn/gnunet-daemon-vpn.c b/src/vpn/gnunet-daemon-vpn.c index 9587bc824..8575345e0 100644 --- a/src/vpn/gnunet-daemon-vpn.c +++ b/src/vpn/gnunet-daemon-vpn.c | |||
@@ -101,7 +101,7 @@ static void helper_read(void* cls, const struct GNUNET_SCHEDULER_TaskContext* ts | |||
101 | 101 | ||
102 | int t = GNUNET_DISK_file_read(mycls.fh_from_helper, &buf, 65535); | 102 | int t = GNUNET_DISK_file_read(mycls.fh_from_helper, &buf, 65535); |
103 | if (t<=0) { | 103 | if (t<=0) { |
104 | fprintf(stderr, "Read error for header: %m\n"); | 104 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Read error for header: %m\n"); |
105 | GNUNET_SCHEDULER_add_now(mycls.sched, restart_helper, cls); | 105 | GNUNET_SCHEDULER_add_now(mycls.sched, restart_helper, cls); |
106 | return; | 106 | return; |
107 | } | 107 | } |
@@ -116,8 +116,6 @@ static void message_token(void *cls, void *client, const struct GNUNET_MessageHe | |||
116 | 116 | ||
117 | struct tun_pkt *pkt_tun = (struct tun_pkt*) message; | 117 | struct tun_pkt *pkt_tun = (struct tun_pkt*) message; |
118 | 118 | ||
119 | fprintf(stderr, "Packet, Type: %x\n", ntohs(pkt_tun->tun.type)); | ||
120 | |||
121 | if (ntohs(pkt_tun->tun.type) == 0x86dd) { | 119 | if (ntohs(pkt_tun->tun.type) == 0x86dd) { |
122 | struct ip6_pkt *pkt6 = (struct ip6_pkt*) message; | 120 | struct ip6_pkt *pkt6 = (struct ip6_pkt*) message; |
123 | struct ip6_tcp *pkt6_tcp; | 121 | struct ip6_tcp *pkt6_tcp; |
@@ -140,9 +138,7 @@ static void message_token(void *cls, void *client, const struct GNUNET_MessageHe | |||
140 | } else if (ntohs(pkt_tun->tun.type) == 0x0800) { | 138 | } else if (ntohs(pkt_tun->tun.type) == 0x0800) { |
141 | struct ip_pkt *pkt = (struct ip_pkt*) message; | 139 | struct ip_pkt *pkt = (struct ip_pkt*) message; |
142 | struct ip_udp *udp = (struct ip_udp*) message; | 140 | struct ip_udp *udp = (struct ip_udp*) message; |
143 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "IPv4\n"); | ||
144 | if (pkt->ip_hdr.proto == 0x11 && ntohl(udp->ip_hdr.dadr) == 0x0a0a0a02 && ntohs(udp->udp_hdr.dpt) == 53 ) { | 141 | if (pkt->ip_hdr.proto == 0x11 && ntohl(udp->ip_hdr.dadr) == 0x0a0a0a02 && ntohs(udp->udp_hdr.dpt) == 53 ) { |
145 | pkt_printf_ipdns((struct ip_udp_dns*)udp); | ||
146 | struct query_packet* query = alloca((sizeof query) + ntohs(udp->udp_hdr.len) - 7); /* 7 = 8 for the udp-header - 1 for the unsigned char data[1]; */ | 142 | struct query_packet* query = alloca((sizeof query) + ntohs(udp->udp_hdr.len) - 7); /* 7 = 8 for the udp-header - 1 for the unsigned char data[1]; */ |
147 | query->hdr.type = htons(GNUNET_MESSAGE_TYPE_LOCAL_QUERY_DNS); | 143 | query->hdr.type = htons(GNUNET_MESSAGE_TYPE_LOCAL_QUERY_DNS); |
148 | query->hdr.size = htons((sizeof query) + ntohs(udp->udp_hdr.len) - 7); | 144 | query->hdr.size = htons((sizeof query) + ntohs(udp->udp_hdr.len) - 7); |