diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-01-30 12:44:32 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-01-30 12:44:32 +0000 |
commit | 0cccabf5c6afcff54573de1b4ed761085a27310d (patch) | |
tree | b64756aa7ace520419f102c50f6dbeb771040463 /src/dns | |
parent | 9ff99f23db620008bc3525f798bc395915c2e68b (diff) | |
download | gnunet-0cccabf5c6afcff54573de1b4ed761085a27310d.tar.gz gnunet-0cccabf5c6afcff54573de1b4ed761085a27310d.zip |
-renaming some fields, fixing byte order issues
Diffstat (limited to 'src/dns')
-rw-r--r-- | src/dns/gnunet-service-dns.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/dns/gnunet-service-dns.c b/src/dns/gnunet-service-dns.c index a30c6582b..74d3d25ac 100644 --- a/src/dns/gnunet-service-dns.c +++ b/src/dns/gnunet-service-dns.c | |||
@@ -384,8 +384,8 @@ request_done (struct RequestRecord *rr) | |||
384 | { | 384 | { |
385 | struct GNUNET_MessageHeader *hdr; | 385 | struct GNUNET_MessageHeader *hdr; |
386 | size_t reply_len; | 386 | size_t reply_len; |
387 | uint16_t spt; | 387 | uint16_t source_port; |
388 | uint16_t dpt; | 388 | uint16_t destination_port; |
389 | 389 | ||
390 | GNUNET_array_grow (rr->client_wait_list, | 390 | GNUNET_array_grow (rr->client_wait_list, |
391 | rr->client_wait_list_length, | 391 | rr->client_wait_list_length, |
@@ -455,8 +455,8 @@ request_done (struct RequestRecord *rr) | |||
455 | struct sockaddr_in *src = (struct sockaddr_in *) &rr->src_addr; | 455 | struct sockaddr_in *src = (struct sockaddr_in *) &rr->src_addr; |
456 | struct sockaddr_in *dst = (struct sockaddr_in *) &rr->dst_addr; | 456 | struct sockaddr_in *dst = (struct sockaddr_in *) &rr->dst_addr; |
457 | 457 | ||
458 | spt = dst->sin_port; | 458 | source_port = dst->sin_port; |
459 | dpt = src->sin_port; | 459 | destination_port = src->sin_port; |
460 | GNUNET_TUN_initialize_ipv4_header (&ip4, | 460 | GNUNET_TUN_initialize_ipv4_header (&ip4, |
461 | IPPROTO_UDP, | 461 | IPPROTO_UDP, |
462 | reply_len - off - sizeof (struct GNUNET_TUN_IPv4Header), | 462 | reply_len - off - sizeof (struct GNUNET_TUN_IPv4Header), |
@@ -471,8 +471,8 @@ request_done (struct RequestRecord *rr) | |||
471 | struct sockaddr_in6 *src = (struct sockaddr_in6 *) &rr->src_addr; | 471 | struct sockaddr_in6 *src = (struct sockaddr_in6 *) &rr->src_addr; |
472 | struct sockaddr_in6 *dst = (struct sockaddr_in6 *) &rr->dst_addr; | 472 | struct sockaddr_in6 *dst = (struct sockaddr_in6 *) &rr->dst_addr; |
473 | 473 | ||
474 | spt = dst->sin6_port; | 474 | source_port = dst->sin6_port; |
475 | dpt = src->sin6_port; | 475 | destination_port = src->sin6_port; |
476 | GNUNET_TUN_initialize_ipv6_header (&ip6, | 476 | GNUNET_TUN_initialize_ipv6_header (&ip6, |
477 | IPPROTO_UDP, | 477 | IPPROTO_UDP, |
478 | reply_len - sizeof (struct GNUNET_TUN_IPv6Header), | 478 | reply_len - sizeof (struct GNUNET_TUN_IPv6Header), |
@@ -490,8 +490,8 @@ request_done (struct RequestRecord *rr) | |||
490 | { | 490 | { |
491 | struct GNUNET_TUN_UdpHeader udp; | 491 | struct GNUNET_TUN_UdpHeader udp; |
492 | 492 | ||
493 | udp.spt = spt; | 493 | udp.source_port = source_port; |
494 | udp.dpt = dpt; | 494 | udp.destination_port = destination_port; |
495 | udp.len = htons (reply_len - off); | 495 | udp.len = htons (reply_len - off); |
496 | if (AF_INET == rr->src_addr.ss_family) | 496 | if (AF_INET == rr->src_addr.ss_family) |
497 | GNUNET_TUN_calculate_udp4_checksum (&ip4, | 497 | GNUNET_TUN_calculate_udp4_checksum (&ip4, |
@@ -1235,8 +1235,8 @@ process_helper_messages (void *cls GNUNET_UNUSED, void *client, | |||
1235 | dsta4->sin_family = AF_INET; | 1235 | dsta4->sin_family = AF_INET; |
1236 | srca4->sin_addr = ip4->source_address; | 1236 | srca4->sin_addr = ip4->source_address; |
1237 | dsta4->sin_addr = ip4->destination_address; | 1237 | dsta4->sin_addr = ip4->destination_address; |
1238 | srca4->sin_port = udp->spt; | 1238 | srca4->sin_port = udp->source_port; |
1239 | dsta4->sin_port = udp->dpt; | 1239 | dsta4->sin_port = udp->destination_port; |
1240 | #if HAVE_SOCKADDR_IN_SIN_LEN | 1240 | #if HAVE_SOCKADDR_IN_SIN_LEN |
1241 | srca4->sin_len = sizeof (struct sockaddr_in)) | 1241 | srca4->sin_len = sizeof (struct sockaddr_in)) |
1242 | dsta4->sin_len = sizeof (struct sockaddr_in); | 1242 | dsta4->sin_len = sizeof (struct sockaddr_in); |
@@ -1253,8 +1253,8 @@ process_helper_messages (void *cls GNUNET_UNUSED, void *client, | |||
1253 | dsta6->sin6_family = AF_INET6; | 1253 | dsta6->sin6_family = AF_INET6; |
1254 | srca6->sin6_addr = ip6->source_address; | 1254 | srca6->sin6_addr = ip6->source_address; |
1255 | dsta6->sin6_addr = ip6->destination_address; | 1255 | dsta6->sin6_addr = ip6->destination_address; |
1256 | srca6->sin6_port = udp->spt; | 1256 | srca6->sin6_port = udp->source_port; |
1257 | dsta6->sin6_port = udp->dpt; | 1257 | dsta6->sin6_port = udp->destination_port; |
1258 | #if HAVE_SOCKADDR_IN_SIN_LEN | 1258 | #if HAVE_SOCKADDR_IN_SIN_LEN |
1259 | srca6->sin6_len = sizeof (struct sockaddr_in6); | 1259 | srca6->sin6_len = sizeof (struct sockaddr_in6); |
1260 | dsta6->sin6_len = sizeof (struct sockaddr_in6); | 1260 | dsta6->sin6_len = sizeof (struct sockaddr_in6); |