diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-01-17 19:06:15 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-01-17 19:06:15 +0000 |
commit | 9d077316ac3c6a18a4b13e90d7549188c2fe1f81 (patch) | |
tree | a6bc44ee81a35cf43ffe9c9968dfdc8de82711dd /src/dns/dnsparser.c | |
parent | 87509e6096da2f4c7a8359da338574f939d01f13 (diff) | |
download | gnunet-9d077316ac3c6a18a4b13e90d7549188c2fe1f81.tar.gz gnunet-9d077316ac3c6a18a4b13e90d7549188c2fe1f81.zip |
-renaming TUN structs to follow namnig conventions
Diffstat (limited to 'src/dns/dnsparser.c')
-rw-r--r-- | src/dns/dnsparser.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/dns/dnsparser.c b/src/dns/dnsparser.c index 12253a2e7..63207d5ce 100644 --- a/src/dns/dnsparser.c +++ b/src/dns/dnsparser.c | |||
@@ -32,7 +32,7 @@ | |||
32 | // DNS-Stuff | 32 | // DNS-Stuff |
33 | GNUNET_NETWORK_STRUCT_BEGIN | 33 | GNUNET_NETWORK_STRUCT_BEGIN |
34 | /* FIXME: replace this one with the one from tcpip_tun.h! */ | 34 | /* FIXME: replace this one with the one from tcpip_tun.h! */ |
35 | struct dns_header | 35 | struct GNUNET_TUN_DnsHeader |
36 | { | 36 | { |
37 | uint16_t id GNUNET_PACKED; | 37 | uint16_t id GNUNET_PACKED; |
38 | struct GNUNET_DNSPARSER_Flags flags; | 38 | struct GNUNET_DNSPARSER_Flags flags; |
@@ -306,15 +306,15 @@ GNUNET_DNSPARSER_parse (const char *udp_payload, | |||
306 | size_t udp_payload_length) | 306 | size_t udp_payload_length) |
307 | { | 307 | { |
308 | struct GNUNET_DNSPARSER_Packet *p; | 308 | struct GNUNET_DNSPARSER_Packet *p; |
309 | const struct dns_header *dns; | 309 | const struct GNUNET_TUN_DnsHeader *dns; |
310 | size_t off; | 310 | size_t off; |
311 | unsigned int n; | 311 | unsigned int n; |
312 | unsigned int i; | 312 | unsigned int i; |
313 | 313 | ||
314 | if (udp_payload_length < sizeof (struct dns_header)) | 314 | if (udp_payload_length < sizeof (struct GNUNET_TUN_DnsHeader)) |
315 | return NULL; | 315 | return NULL; |
316 | dns = (const struct dns_header *) udp_payload; | 316 | dns = (const struct GNUNET_TUN_DnsHeader *) udp_payload; |
317 | off = sizeof (struct dns_header); | 317 | off = sizeof (struct GNUNET_TUN_DnsHeader); |
318 | p = GNUNET_malloc (sizeof (struct GNUNET_DNSPARSER_Packet)); | 318 | p = GNUNET_malloc (sizeof (struct GNUNET_DNSPARSER_Packet)); |
319 | p->flags = dns->flags; | 319 | p->flags = dns->flags; |
320 | p->id = dns->id; | 320 | p->id = dns->id; |
@@ -711,7 +711,7 @@ GNUNET_DNSPARSER_pack (const struct GNUNET_DNSPARSER_Packet *p, | |||
711 | char **buf, | 711 | char **buf, |
712 | size_t *buf_length) | 712 | size_t *buf_length) |
713 | { | 713 | { |
714 | struct dns_header dns; | 714 | struct GNUNET_TUN_DnsHeader dns; |
715 | size_t off; | 715 | size_t off; |
716 | char tmp[max]; | 716 | char tmp[max]; |
717 | unsigned int i; | 717 | unsigned int i; |
@@ -730,7 +730,7 @@ GNUNET_DNSPARSER_pack (const struct GNUNET_DNSPARSER_Packet *p, | |||
730 | dns.authority_rcount = htons (p->num_authority_records); | 730 | dns.authority_rcount = htons (p->num_authority_records); |
731 | dns.additional_rcount = htons (p->num_additional_records); | 731 | dns.additional_rcount = htons (p->num_additional_records); |
732 | 732 | ||
733 | off = sizeof (struct dns_header); | 733 | off = sizeof (struct GNUNET_TUN_DnsHeader); |
734 | trc = GNUNET_NO; | 734 | trc = GNUNET_NO; |
735 | for (i=0;i<p->num_queries;i++) | 735 | for (i=0;i<p->num_queries;i++) |
736 | { | 736 | { |
@@ -783,7 +783,7 @@ GNUNET_DNSPARSER_pack (const struct GNUNET_DNSPARSER_Packet *p, | |||
783 | 783 | ||
784 | if (GNUNET_YES == trc) | 784 | if (GNUNET_YES == trc) |
785 | dns.flags.message_truncated = 1; | 785 | dns.flags.message_truncated = 1; |
786 | memcpy (tmp, &dns, sizeof (struct dns_header)); | 786 | memcpy (tmp, &dns, sizeof (struct GNUNET_TUN_DnsHeader)); |
787 | 787 | ||
788 | *buf = GNUNET_malloc (off); | 788 | *buf = GNUNET_malloc (off); |
789 | *buf_length = off; | 789 | *buf_length = off; |