--------------------- PatchSet 4146 Date: 2007/04/04 08:15:16 Author: amosjeffries Branch: squid3-ipv6 Tag: (none) Log: Fully rollout old converson from rfc1035.c * this is meant to be a pure IPv4 DNS resolver * conversion code caused it to cease being RFC1035 compliant * alternative library rfc3596.c is planned for protcol upgrade Members: lib/rfc1035.c:1.5.2.13->1.5.2.14 Index: squid3/lib/rfc1035.c =================================================================== RCS file: /cvsroot/squid-sf//squid3/lib/rfc1035.c,v retrieving revision 1.5.2.13 retrieving revision 1.5.2.14 diff -u -r1.5.2.13 -r1.5.2.14 --- squid3/lib/rfc1035.c 25 Mar 2007 13:19:09 -0000 1.5.2.13 +++ squid3/lib/rfc1035.c 4 Apr 2007 08:15:16 -0000 1.5.2.14 @@ -1,6 +1,6 @@ /* - * $Id: rfc1035.c,v 1.5.2.13 2007/03/25 13:19:09 amosjeffries Exp $ + * $Id: rfc1035.c,v 1.5.2.14 2007/04/04 08:15:16 amosjeffries Exp $ * * Low level DNS protocol routines * AUTHOR: Duane Wessels @@ -671,7 +671,7 @@ * Returns the size of the query */ ssize_t -rfc1035BuildPTRQuery(const struct IN_ADDR addr, char *buf, size_t sz, unsigned short qid, rfc1035_query * query) +rfc1035BuildPTRQuery(const struct in_addr addr, char *buf, size_t sz, unsigned short qid, rfc1035_query * query) { static rfc1035_message h; size_t offset = 0; @@ -746,7 +746,7 @@ S.sin_port = htons(atoi(argv[2])); S.sin_addr.s_addr = inet_addr(argv[1]); while (fgets(input, 512, stdin)) { - struct IN_ADDR junk; + struct in_addr junk; strtok(input, "\r\n"); memset(buf, '\0', 512); sz = 512; @@ -788,7 +788,7 @@ printf("%d answers\n", n); for (i = 0; i < n; i++) { if (answers[i].type == RFC1035_TYPE_A) { - struct IN_ADDR a; + struct in_addr a; memcpy(&a, answers[i].rdata, 4); printf("A\t%d\t%s\n", answers[i].ttl, inet_ntoa(a)); } else if (answers[i].type == RFC1035_TYPE_PTR) {