--------------------- PatchSet 1314 Date: 2005/04/25 13:24:46 Author: rmartinez Branch: squid3-ipv6 Tag: (none) Log: Fixing some update conflicts with HEAD. Renaming inet_toa into INET_TOA Members: src/ACLDestinationDomain.cc:1.7.6.3->1.7.6.4 src/ACLIP.cc:1.8.2.1->1.8.2.2 src/ACLSourceDomain.cc:1.3->1.3.12.1 src/AccessLogEntry.h:1.3.10.4->1.3.10.5 src/AuthUserRequest.cc:1.2.4.4->1.2.4.5 src/AuthUserRequest.h:1.1.8.4->1.1.8.5 src/ConnectionDetail.h:1.3->1.3.8.1 src/HttpRequest.h:1.10.6.4->1.10.6.5 src/ICP.h:1.6->1.6.8.1 src/IPInterception.cc:1.4->1.4.4.1 src/IPInterception.h:1.2->1.2.10.1 src/PeerSelectState.h:1.1->1.1.12.1 src/access_log.cc:1.23.4.3->1.23.4.4 Index: squid3/src/ACLDestinationDomain.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/ACLDestinationDomain.cc,v retrieving revision 1.7.6.3 retrieving revision 1.7.6.4 diff -u -r1.7.6.3 -r1.7.6.4 --- squid3/src/ACLDestinationDomain.cc 2 Mar 2005 23:50:47 -0000 1.7.6.3 +++ squid3/src/ACLDestinationDomain.cc 25 Apr 2005 13:24:46 -0000 1.7.6.4 @@ -1,5 +1,5 @@ /* - * $Id: ACLDestinationDomain.cc,v 1.7.6.3 2005/03/02 23:50:47 mediumnet Exp $ + * $Id: ACLDestinationDomain.cc,v 1.7.6.4 2005/04/25 13:24:46 rmartinez Exp $ * * DEBUG: section 28 Access Control * AUTHOR: Duane Wessels @@ -81,21 +81,13 @@ return data->match(checklist->request->host); const char *fqdn = NULL; -#if ENABLE_IPV6 - fqdn = fqdncache_gethostbyaddr(&ia->in_addr6s[0], FQDN_LOOKUP_IF_MISS); -#else fqdn = fqdncache_gethostbyaddr(ia->in_addrs[0], FQDN_LOOKUP_IF_MISS); -#endif if (fqdn) return data->match(fqdn); if (!checklist->destinationDomainChecked()) { -#if ENABLE_IPV6 - debug(28, 3) ("aclMatchAcl: Can't yet compare '%s' ACL for '%s'\n",name, inet6_network_byte_order_to_address_string_force(&ia->in_addr6s[0])); -#else - debug(28, 3) ("aclMatchAcl: Can't yet compare '%s' ACL for '%s'\n",name, inet_ntoa(ia->in_addrs[0])); -#endif + debug(28, 3) ("aclMatchAcl: Can't yet compare '%s' ACL for '%s'\n",name, INET_NTOA(ia->in_addrs[0])); checklist->changeState(DestinationDomainLookup::Instance()); return 0; } @@ -136,13 +128,8 @@ checklist->changeState (ACLChecklist::NullState::Instance()); } else { checklist->asyncInProgress(true); -#if ENABLE_IPV6 - checklist->dst_addr6 = ia->in_addr6s[0]; - fqdncache_nbgethostbyaddr(&checklist->dst_addr6,LookupDone, checklist); -#else checklist->dst_addr = ia->in_addrs[0]; fqdncache_nbgethostbyaddr(checklist->dst_addr,LookupDone, checklist); -#endif } } Index: squid3/src/ACLIP.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/ACLIP.cc,v retrieving revision 1.8.2.1 retrieving revision 1.8.2.2 diff -u -r1.8.2.1 -r1.8.2.2 --- squid3/src/ACLIP.cc 19 Apr 2005 10:57:55 -0000 1.8.2.1 +++ squid3/src/ACLIP.cc 25 Apr 2005 13:25:08 -0000 1.8.2.2 @@ -1,5 +1,5 @@ /* - * $Id: ACLIP.cc,v 1.8.2.1 2005/04/19 10:57:55 rmartinez Exp $ + * $Id: ACLIP.cc,v 1.8.2.2 2005/04/25 13:25:08 rmartinez Exp $ * * DEBUG: section 28 Access Control * AUTHOR: Duane Wessels @@ -56,13 +56,13 @@ MemBuf mb; wordlist **W = static_cast(state); memBufDefInit(&mb); - memBufPrintf(&mb, "%s", inet_ntoa(ip->addr1)); + memBufPrintf(&mb, "%s", INET_NTOA(ip->addr1)); if (ip->addr2.s_addr != any_addr.s_addr) - memBufPrintf(&mb, "-%s", inet_ntoa(ip->addr2)); + memBufPrintf(&mb, "-%s", INET_NTOA(ip->addr2)); if (ip->mask.s_addr != no_addr.s_addr) - memBufPrintf(&mb, "/%s", inet_ntoa(ip->mask)); + memBufPrintf(&mb, "/%s", INET_NTOA(ip->mask)); wordlistAdd(W, mb.buf); @@ -79,15 +79,15 @@ char b1[20]; char b2[20]; char b3[20]; - snprintf(b1, 20, "%s", inet_ntoa(addr1)); + snprintf(b1, 20, "%s", INET_NTOA(addr1)); if (addr2.s_addr != any_addr.s_addr) - snprintf(b2, 20, "-%s", inet_ntoa(addr2)); + snprintf(b2, 20, "-%s", INET_NTOA(addr2)); else b2[0] = '\0'; if (mask.s_addr != no_addr.s_addr) - snprintf(b3, 20, "/%s", inet_ntoa(mask)); + snprintf(b3, 20, "/%s", INET_NTOA(mask)); else b3[0] = '\0'; @@ -273,7 +273,7 @@ Q = &r->next; - debug(28, 3) ("%s --> %s\n", addr1, inet_ntoa(r->addr1)); + debug(28, 3) ("%s --> %s\n", addr1, INET_NTOA(r->addr1)); } if (*Q != NULL) { @@ -374,7 +374,7 @@ acl_ip_data *ClientAddressPointer = &ClientAddress; data = data->splay(ClientAddressPointer, aclIpAddrNetworkCompare); debug(28, 3) ("aclMatchIp: '%s' %s\n", - inet_ntoa(clientip), splayLastResult ? "NOT found" : "found"); + INET_NTOA(clientip), splayLastResult ? "NOT found" : "found"); return !splayLastResult; } Index: squid3/src/ACLSourceDomain.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/ACLSourceDomain.cc,v retrieving revision 1.3 retrieving revision 1.3.12.1 diff -u -r1.3 -r1.3.12.1 --- squid3/src/ACLSourceDomain.cc 22 Feb 2003 03:14:29 -0000 1.3 +++ squid3/src/ACLSourceDomain.cc 25 Apr 2005 13:25:29 -0000 1.3.12.1 @@ -1,5 +1,5 @@ /* - * $Id: ACLSourceDomain.cc,v 1.3 2003/02/22 03:14:29 squidadm Exp $ + * $Id: ACLSourceDomain.cc,v 1.3.12.1 2005/04/25 13:25:29 rmartinez Exp $ * * DEBUG: section 28 Access Control * AUTHOR: Duane Wessels @@ -83,7 +83,7 @@ } else if (!checklist->sourceDomainChecked()) { /* FIXME: reinstate a means to get to "name" debug(28, 3) ("aclMatchAcl: Can't yet compare '%s' ACL for '%s'\n", - name, inet_ntoa(checklist->src_addr)); + name, INET_NTOA(checklist->src_addr)); */ checklist->changeState(SourceDomainLookup::Instance()); return 0; Index: squid3/src/AccessLogEntry.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/AccessLogEntry.h,v retrieving revision 1.3.10.4 retrieving revision 1.3.10.5 diff -u -r1.3.10.4 -r1.3.10.5 --- squid3/src/AccessLogEntry.h 19 Apr 2005 10:57:55 -0000 1.3.10.4 +++ squid3/src/AccessLogEntry.h 25 Apr 2005 13:25:44 -0000 1.3.10.5 @@ -1,6 +1,6 @@ /* - * $Id: AccessLogEntry.h,v 1.3.10.4 2005/04/19 10:57:55 rmartinez Exp $ + * $Id: AccessLogEntry.h,v 1.3.10.5 2005/04/25 13:25:44 rmartinez Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -86,23 +86,11 @@ #if USE_SSL ,ssluser(NULL) #endif -#if ENABLE_IPV6 - { - memset(&caddr6, '\0', sizeof(caddr6)); - } - - struct inaddr_storage caddr6; -#else { memset(&caddr, '\0', sizeof(caddr)); } -<<<<<<< AccessLogEntry.h - struct in_addr caddr; -#endif -======= struct IN_ADDR caddr; ->>>>>>> 1.6 size_t size; off_t highOffset; size_t objectSize; Index: squid3/src/AuthUserRequest.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/AuthUserRequest.cc,v retrieving revision 1.2.4.4 retrieving revision 1.2.4.5 diff -u -r1.2.4.4 -r1.2.4.5 --- squid3/src/AuthUserRequest.cc 19 Apr 2005 10:57:55 -0000 1.2.4.4 +++ squid3/src/AuthUserRequest.cc 25 Apr 2005 13:25:56 -0000 1.2.4.5 @@ -1,6 +1,6 @@ /* - * $Id: AuthUserRequest.cc,v 1.2.4.4 2005/04/19 10:57:55 rmartinez Exp $ + * $Id: AuthUserRequest.cc,v 1.2.4.5 2005/04/25 13:25:56 rmartinez Exp $ * * DO NOT MODIFY NEXT 2 LINES: * arch-tag: 6803fde1-d5a2-4c29-9034-1c0c9f650eb4 @@ -257,7 +257,7 @@ auth_user->ipcount++; - ip1 = xstrdup(inet_ntoa(ipaddr)); + ip1 = xstrdup(INET_NTOA(ipaddr)); debug(29, 2) ("authenticateAuthUserRequestSetIp: user '%s' has been seen at a new IP address (%s)\n", auth_user->username(), ip1); @@ -615,16 +615,8 @@ } auth_acl_t -<<<<<<< AuthUserRequest.cc -#if ENABLE_IPV6 -AuthUserRequest::tryToAuthenticateAndSetAuthUser(auth_user_request_t ** auth_user_request, http_hdr_type headertype, HttpRequest * request, ConnStateData::Pointer conn, struct inaddr_storage * src_addr6) -#else -AuthUserRequest::tryToAuthenticateAndSetAuthUser(auth_user_request_t ** auth_user_request, http_hdr_type headertype, HttpRequest * request, ConnStateData::Pointer conn, struct in_addr src_addr) -#endif -======= AuthUserRequest::tryToAuthenticateAndSetAuthUser(auth_user_request_t ** auth_user_request, http_hdr_type headertype, HttpRequest * request, ConnStateData::Pointer conn, struct IN_ADDR src_addr) ->>>>>>> 1.5 { /* If we have already been called, return the cached value */ auth_user_request_t *t = authTryGetUser (auth_user_request, conn, request); Index: squid3/src/AuthUserRequest.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/AuthUserRequest.h,v retrieving revision 1.1.8.4 retrieving revision 1.1.8.5 diff -u -r1.1.8.4 -r1.1.8.5 --- squid3/src/AuthUserRequest.h 19 Apr 2005 10:57:55 -0000 1.1.8.4 +++ squid3/src/AuthUserRequest.h 25 Apr 2005 13:26:22 -0000 1.1.8.5 @@ -1,6 +1,6 @@ /* - * $Id: AuthUserRequest.h,v 1.1.8.4 2005/04/19 10:57:55 rmartinez Exp $ + * $Id: AuthUserRequest.h,v 1.1.8.5 2005/04/25 13:26:22 rmartinez Exp $ * * DO NOT MODIFY NEXT 2 LINES: * arch-tag: 674533af-8b21-4641-b71a-74c4639072a0 @@ -80,16 +80,8 @@ virtual void user (AuthUser *aUser) {_auth_user=aUser;} public: -<<<<<<< AuthUserRequest.h -#if ENABLE_IPV6 - static auth_acl_t tryToAuthenticateAndSetAuthUser(auth_user_request_t **, http_hdr_type, HttpRequest *, ConnStateData::Pointer, struct inaddr_storage *); -#else - static auth_acl_t tryToAuthenticateAndSetAuthUser(auth_user_request_t **, http_hdr_type, HttpRequest *, ConnStateData::Pointer, struct in_addr); -#endif -======= static auth_acl_t tryToAuthenticateAndSetAuthUser(auth_user_request_t **, http_hdr_type, HttpRequest *, ConnStateData::Pointer, struct IN_ADDR); ->>>>>>> 1.4 static void addReplyAuthHeader(HttpReply * rep, auth_user_request_t * auth_user_request, HttpRequest * request, int accelerated, int internal); AuthUserRequest(); Index: squid3/src/ConnectionDetail.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/ConnectionDetail.h,v retrieving revision 1.3 retrieving revision 1.3.8.1 diff -u -r1.3 -r1.3.8.1 --- squid3/src/ConnectionDetail.h 9 Mar 2003 03:14:00 -0000 1.3 +++ squid3/src/ConnectionDetail.h 25 Apr 2005 13:26:36 -0000 1.3.8.1 @@ -1,5 +1,5 @@ /* - * $Id: ConnectionDetail.h,v 1.3 2003/03/09 03:14:00 squidadm Exp $ + * $Id: ConnectionDetail.h,v 1.3.8.1 2005/04/25 13:26:36 rmartinez Exp $ * * DEBUG: section 5 Socket Functions * AUTHOR: Robert Collins @@ -44,9 +44,9 @@ ConnectionDetail(); - struct sockaddr_in me; + struct SOCKADDR_IN me; - struct sockaddr_in peer; + struct SOCKADDR_IN peer; }; #endif Index: squid3/src/HttpRequest.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/HttpRequest.h,v retrieving revision 1.10.6.4 retrieving revision 1.10.6.5 diff -u -r1.10.6.4 -r1.10.6.5 --- squid3/src/HttpRequest.h 19 Apr 2005 10:57:55 -0000 1.10.6.4 +++ squid3/src/HttpRequest.h 25 Apr 2005 13:26:54 -0000 1.10.6.5 @@ -1,6 +1,6 @@ /* - * $Id: HttpRequest.h,v 1.10.6.4 2005/04/19 10:57:55 rmartinez Exp $ + * $Id: HttpRequest.h,v 1.10.6.5 2005/04/25 13:26:54 rmartinez Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -82,20 +82,11 @@ int max_forwards; /* these in_addr's could probably be sockaddr_in's */ -<<<<<<< HttpRequest.h -#if ENABLE_IPV6 - struct sockaddr_storage client_sockaddr; - struct sockaddr_storage my_sockaddr; -#else - struct in_addr client_addr; -======= struct IN_ADDR client_addr; ->>>>>>> 1.13 struct IN_ADDR my_addr; unsigned short my_port; unsigned short client_port; -#endif HttpHeader header; ConnStateData::Pointer body_connection; /* used by clientReadBody() */ int content_length; Index: squid3/src/ICP.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/ICP.h,v retrieving revision 1.6 retrieving revision 1.6.8.1 diff -u -r1.6 -r1.6.8.1 --- squid3/src/ICP.h 11 Aug 2003 02:13:02 -0000 1.6 +++ squid3/src/ICP.h 25 Apr 2005 13:27:20 -0000 1.6.8.1 @@ -1,6 +1,6 @@ /* - * $Id: ICP.h,v 1.6 2003/08/11 02:13:02 squidadm Exp $ + * $Id: ICP.h,v 1.6.8.1 2005/04/25 13:27:20 rmartinez Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -55,7 +55,7 @@ _icp_common_t(); _icp_common_t(char *buf, unsigned int len); - void handleReply(char *buf, struct sockaddr_in *from); + void handleReply(char *buf, struct SOCKADDR_IN *from); static _icp_common_t *createMessage(icp_opcode opcode, int flags, const char *url, int reqnum, int pad); icp_opcode getOpCode() const; #endif @@ -83,7 +83,7 @@ HttpRequest *request; int fd; - struct sockaddr_in from; + struct SOCKADDR_IN from; char *url; }; @@ -94,7 +94,7 @@ struct _icpUdpData { - struct sockaddr_in address; + struct SOCKADDR_IN address; void *msg; size_t len; icpUdpData *next; @@ -111,21 +111,21 @@ HttpRequest * -icpGetRequest(char *url, int reqnum, int fd, struct sockaddr_in *from); +icpGetRequest(char *url, int reqnum, int fd, struct SOCKADDR_IN *from); -int icpAccessAllowed(struct sockaddr_in *from, HttpRequest * icp_request); +int icpAccessAllowed(struct SOCKADDR_IN *from, HttpRequest * icp_request); -SQUIDCEXTERN void icpCreateAndSend(icp_opcode, int flags, char const *url, int reqnum, int pad, int fd, const struct sockaddr_in *from); +SQUIDCEXTERN void icpCreateAndSend(icp_opcode, int flags, char const *url, int reqnum, int pad, int fd, const struct SOCKADDR_IN *from); extern icp_opcode icpGetCommonOpcode(); -SQUIDCEXTERN int icpUdpSend(int, const struct sockaddr_in *, icp_common_t *, log_type, int); +SQUIDCEXTERN int icpUdpSend(int, const struct SOCKADDR_IN *, icp_common_t *, log_type, int); SQUIDCEXTERN log_type icpLogFromICPCode(icp_opcode opcode); -void icpDenyAccess(struct sockaddr_in *from, char *url, int reqnum, int fd); +void icpDenyAccess(struct SOCKADDR_IN *from, char *url, int reqnum, int fd); SQUIDCEXTERN PF icpHandleUdp; SQUIDCEXTERN PF icpUdpSendQueue; -SQUIDCEXTERN void icpHandleIcpV3(int, struct sockaddr_in, char *, int); +SQUIDCEXTERN void icpHandleIcpV3(int, struct SOCKADDR_IN, char *, int); SQUIDCEXTERN int icpCheckUdpHit(StoreEntry *, HttpRequest * request); SQUIDCEXTERN void icpConnectionsOpen(void); SQUIDCEXTERN void icpConnectionShutdown(void); Index: squid3/src/IPInterception.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/IPInterception.cc,v retrieving revision 1.4 retrieving revision 1.4.4.1 diff -u -r1.4 -r1.4.4.1 --- squid3/src/IPInterception.cc 21 Dec 2004 16:37:16 -0000 1.4 +++ squid3/src/IPInterception.cc 25 Apr 2005 13:27:39 -0000 1.4.4.1 @@ -1,6 +1,6 @@ /* - * $Id: IPInterception.cc,v 1.4 2004/12/21 16:37:16 squidadm Exp $ + * $Id: IPInterception.cc,v 1.4.4.1 2005/04/25 13:27:39 rmartinez Exp $ * * DEBUG: section 89 NAT / IP Interception * AUTHOR: Robert Collins @@ -81,7 +81,7 @@ #if IPF_TRANSPARENT int -clientNatLookup(int fd, struct sockaddr_in me, struct sockaddr_in peer, struct sockaddr_in *dst) +clientNatLookup(int fd, struct SOCKADDR_IN me, struct SOCKADDR_IN peer, struct SOCKADDR_IN *dst) { struct natlookup natLookup; @@ -141,7 +141,7 @@ } else { if (me.sin_addr.s_addr != natLookup.nl_realip.s_addr) - dst->sin_family = AF_INET; + FAMILY_FROM_SA(*dst) = AF_INET; dst->sin_port = natLookup.nl_realport; @@ -154,7 +154,7 @@ #elif LINUX_NETFILTER int -clientNatLookup(int fd, struct sockaddr_in me, struct sockaddr_in peer, struct sockaddr_in *dst) +clientNatLookup(int fd, struct SOCKADDR_IN me, struct SOCKADDR_IN peer, struct SOCKADDR_IN *dst) { size_t sock_sz = sizeof(*dst); memcpy(dst, &me, sizeof(*dst)); @@ -162,7 +162,7 @@ if (getsockopt(fd, SOL_IP, SO_ORIGINAL_DST, dst, &sock_sz) != 0) return -1; - debug(33, 5) ("clientNatLookup: addr = %s", inet_ntoa(dst->sin_addr)); + debug(33, 5) ("clientNatLookup: addr = %s", INET_NTOA(dst->sin_addr)); if (me.sin_addr.s_addr != dst->sin_addr.s_addr) return 0; @@ -173,7 +173,7 @@ #elif PF_TRANSPARENT int -clientNatLookup(int fd, struct sockaddr_in me, struct sockaddr_in peer, struct sockaddr_in *dst) +clientNatLookup(int fd, struct SOCKADDR_IN me, struct SOCKADDR_IN peer, struct SOCKADDR_IN *dst) { struct pfioc_natlook nl; @@ -212,7 +212,7 @@ } else { int natted = me.sin_addr.s_addr != nl.rdaddr.v4.s_addr; - dst->sin_family = AF_INET; + FAMILY_FROM_SA(*dst) = AF_INET; dst->sin_port = nl.rdport; dst->sin_addr = nl.rdaddr.v4; @@ -226,7 +226,7 @@ #else int -clientNatLookup(int fd, struct sockaddr_in me, struct sockaddr_in peer, struct sockaddr_in *dst) +clientNatLookup(int fd, struct SOCKADDR_IN me, struct SOCKADDR_IN peer, struct SOCKADDR_IN *dst) { debug(33, 1) ("WARNING: transparent proxying not supported\n"); return -1; Index: squid3/src/IPInterception.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/IPInterception.h,v retrieving revision 1.2 retrieving revision 1.2.10.1 diff -u -r1.2 -r1.2.10.1 --- squid3/src/IPInterception.h 22 Feb 2003 03:14:30 -0000 1.2 +++ squid3/src/IPInterception.h 25 Apr 2005 13:28:09 -0000 1.2.10.1 @@ -1,6 +1,6 @@ /* - * $Id: IPInterception.h,v 1.2 2003/02/22 03:14:30 squidadm Exp $ + * $Id: IPInterception.h,v 1.2.10.1 2005/04/25 13:28:09 rmartinez Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -36,6 +36,6 @@ SQUIDCEXTERN int -clientNatLookup(int fd, struct sockaddr_in me, struct sockaddr_in peer, struct sockaddr_in *dst); +clientNatLookup(int fd, struct SOCKADDR_IN me, struct SOCKADDR_IN peer, struct SOCKADDR_IN *dst); #endif /* SQUID_IPINTERCEPTION_H */ Index: squid3/src/PeerSelectState.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/PeerSelectState.h,v retrieving revision 1.1 retrieving revision 1.1.12.1 diff -u -r1.1 -r1.1.12.1 --- squid3/src/PeerSelectState.h 17 Oct 2003 02:12:32 -0000 1.1 +++ squid3/src/PeerSelectState.h 25 Apr 2005 13:28:23 -0000 1.1.12.1 @@ -1,6 +1,6 @@ /* - * $Id: PeerSelectState.h,v 1.1 2003/10/17 02:12:32 squidadm Exp $ + * $Id: PeerSelectState.h,v 1.1.12.1 2005/04/25 13:28:23 rmartinez Exp $ * * AUTHOR: Robert Collins * @@ -53,16 +53,16 @@ void *callback_data; FwdServer *servers; /* - * Why are these struct sockaddr_in instead of peer *? Because a + * Why are these struct SOCKADDR_IN instead of peer *? Because a * peer structure can become invalid during the peer selection * phase, specifically after a reconfigure. Thus we need to lookup * the peer * based on the address when we are finally ready to * reference the peer structure. */ - struct sockaddr_in first_parent_miss; + struct SOCKADDR_IN first_parent_miss; - struct sockaddr_in closest_parent_miss; + struct SOCKADDR_IN closest_parent_miss; /* * ->hit and ->secho can be peer* because they should only be * accessed during the thread when they are set Index: squid3/src/access_log.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/access_log.cc,v retrieving revision 1.23.4.3 retrieving revision 1.23.4.4 diff -u -r1.23.4.3 -r1.23.4.4 --- squid3/src/access_log.cc 2 Mar 2005 23:50:47 -0000 1.23.4.3 +++ squid3/src/access_log.cc 25 Apr 2005 13:28:37 -0000 1.23.4.4 @@ -1,6 +1,6 @@ /* - * $Id: access_log.cc,v 1.23.4.3 2005/03/02 23:50:47 mediumnet Exp $ + * $Id: access_log.cc,v 1.23.4.4 2005/04/25 13:28:37 rmartinez Exp $ * * DEBUG: section 46 Access Log * AUTHOR: Duane Wessels @@ -55,7 +55,7 @@ #if MULTICAST_MISS_STREAM static int mcast_miss_fd = -1; -static struct sockaddr_in mcast_miss_to; +static struct SOCKADDR_IN mcast_miss_to; static void mcast_encode(unsigned int *, size_t, const unsigned int *); #endif @@ -531,25 +531,14 @@ break; case LFT_CLIENT_IP_ADDRESS: -#if ENABLE_IPV6 - out = inet6_network_byte_order_to_address_string_force(&al->cache.caddr6); -#else - out = inet_ntoa(al->cache.caddr); -#endif + out = INET_NTOA(al->cache.caddr); break; case LFT_CLIENT_FQDN: -#if ENABLE_IPV6 - out = fqdncache_gethostbyaddr(&al->cache.caddr6, FQDN_LOOKUP_IF_MISS); - - if (!out) - out = inet6_network_byte_order_to_address_string_force(&al->cache.caddr6); -#else out = fqdncache_gethostbyaddr(al->cache.caddr, FQDN_LOOKUP_IF_MISS); if (!out) - out = inet_ntoa(al->cache.caddr); -#endif + out = INET_NTOA(al->cache.caddr); break; @@ -566,23 +555,14 @@ /* case LFT_SERVER_PORT: */ case LFT_LOCAL_IP: -#if ENABLE_IPV6 - if (al->request) - out = sockaddr_host_address_to_address_string_force(&al->request->my_sockaddr); -#else if (al->request) - out = inet_ntoa(al->request->my_addr); -#endif + out = INET_NTOA(al->request->my_addr); break; case LFT_LOCAL_PORT: if (al->request) { -#if ENABLE_IPV6 - outint = sockaddr_storage_port(&al->request->my_sockaddr); -#else outint = al->request->my_port; -#endif doint = 1; } @@ -1236,19 +1216,11 @@ const char *user = NULL; if (Config.onoff.log_fqdn) { -#if ENABLE_IPV6 - client = fqdncache_gethostbyaddr(&al->cache.caddr6, FQDN_LOOKUP_IF_MISS); -#else client = fqdncache_gethostbyaddr(al->cache.caddr, FQDN_LOOKUP_IF_MISS); -#endif } if (client == NULL) { -#if ENABLE_IPV6 - client = inet6_network_byte_order_to_address_string_force(&al->cache.caddr6); -#else - client = inet_ntoa(al->cache.caddr); -#endif + client = INET_NTOA(al->cache.caddr); } user = accessLogFormatName(al->cache.authuser); @@ -1306,19 +1278,11 @@ char *user1 = NULL, *user2 = NULL; if (Config.onoff.log_fqdn) { -#if ENABLE_IPV6 - client = fqdncache_gethostbyaddr(&al->cache.caddr6, 0); -#else client = fqdncache_gethostbyaddr(al->cache.caddr, 0); -#endif } if (client == NULL) { -#if ENABLE_IPV6 - client = inet6_network_byte_order_to_address_string_force(&al->cache.caddr6); -#else - client = inet_ntoa(al->cache.caddr); -#endif + client = INET_NTOA(al->cache.caddr); } user1 = accessLogFormatName(al->cache.authuser); @@ -1552,8 +1516,8 @@ if (Config.mcast_miss.addr.s_addr != no_addr.s_addr) { memset(&mcast_miss_to, '\0', sizeof(mcast_miss_to)); - mcast_miss_to.sin_family = AF_INET; - mcast_miss_to.sin_port = htons(Config.mcast_miss.port); + FAMILY_FROM_SA(mcast_miss_to) = AF_INET; + PORT_FROM_SA(mcast_miss_to) = htons(Config.mcast_miss.port); mcast_miss_to.sin_addr.s_addr = Config.mcast_miss.addr.s_addr; mcast_miss_fd = comm_open(SOCK_DGRAM, IPPROTO_UDP,