--------------------- PatchSet 6736 Date: 2008/02/05 12:21:47 Author: amosjeffries Branch: ayjwork Tag: (none) Log: Drop last direct IN_ADDR references from WCCPv2 and Squid. All uses are now properly in_addr or neutral IPAddress. Members: include/IPAddress.h:1.1.6.2->1.1.6.3 src/wccp2.cc:1.14.4.5->1.14.4.6 Index: squid3/include/IPAddress.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/include/IPAddress.h,v retrieving revision 1.1.6.2 retrieving revision 1.1.6.3 diff -u -r1.1.6.2 -r1.1.6.3 --- squid3/include/IPAddress.h 22 Jan 2008 22:34:11 -0000 1.1.6.2 +++ squid3/include/IPAddress.h 5 Feb 2008 12:21:47 -0000 1.1.6.3 @@ -1,5 +1,5 @@ /* - * $Id: IPAddress.h,v 1.1.6.2 2008/01/22 22:34:11 amosjeffries Exp $ + * $Id: IPAddress.h,v 1.1.6.3 2008/02/05 12:21:47 amosjeffries Exp $ * * DEBUG: section 14 IP Storage and Handling * AUTHOR: Amos Jeffries @@ -414,7 +414,6 @@ // Macros for Old IPv4-Only code that still needs to use IN_ADDR #define ANY_ADDR (struct in_addr)0x00000000 #define NO_ADDR (struct_in_addr)0xFFFFFFFF -#define IN_ADDR in_addr // WAS _sockaddr_in_list in an earlier incarnation /* INET6 : this could possibly be an addrinfo structure now IFF it needs to be in a generic raw form. */ Index: squid3/src/wccp2.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/wccp2.cc,v retrieving revision 1.14.4.5 retrieving revision 1.14.4.6 diff -u -r1.14.4.5 -r1.14.4.6 --- squid3/src/wccp2.cc 8 Jan 2008 06:08:56 -0000 1.14.4.5 +++ squid3/src/wccp2.cc 5 Feb 2008 12:21:48 -0000 1.14.4.6 @@ -1,6 +1,6 @@ /* - * $Id: wccp2.cc,v 1.14.4.5 2008/01/08 06:08:56 amosjeffries Exp $ + * $Id: wccp2.cc,v 1.14.4.6 2008/02/05 12:21:48 amosjeffries Exp $ * * DEBUG: section 80 WCCP Support * AUTHOR: Steven Wilton @@ -362,7 +362,7 @@ struct wccp2_router_id_element_t router_id_element; - struct IN_ADDR router_address; + struct in_addr router_address; uint32_t number_caches; }; @@ -1155,7 +1155,7 @@ struct sockaddr_in from; - struct IN_ADDR cache_address; + struct in_addr cache_address; int len, found; short int data_length, offset; uint32_t tmp; @@ -1407,7 +1407,7 @@ /* skip the number plus all the ip's */ - ptr += sizeof(tmp) + (ntohl(tmp) * sizeof(struct IN_ADDR)); + ptr += sizeof(tmp) + (ntohl(tmp) * sizeof(struct in_addr)); /* Then read the number of caches */ memcpy(&tmp, ptr, sizeof(tmp)); @@ -1427,7 +1427,7 @@ ptr += sizeof(struct wccp2_cache_identity_info_t); - memcpy(&cache_address, &cache_identity->addr, sizeof(struct IN_ADDR)); + memcpy(&cache_address, &cache_identity->addr, sizeof(struct in_addr)); cache_list_ptr->weight = ntohs(cache_identity->weight); break; @@ -1444,12 +1444,12 @@ ptr += sizeof(struct wccp2_cache_mask_identity_info_t); - memcpy(&cache_address, &cache_mask_identity->addr, sizeof(struct IN_ADDR)); + memcpy(&cache_address, &cache_mask_identity->addr, sizeof(struct in_addr)); } else { ptr += sizeof(struct cache_mask_info_t); - memcpy(&cache_address, &cache_mask_info->addr, sizeof(struct IN_ADDR)); + memcpy(&cache_address, &cache_mask_info->addr, sizeof(struct in_addr)); } cache_list_ptr->weight = 0; @@ -1633,7 +1633,7 @@ struct wccp2_router_assign_element_t *router_assign; /* number of caches */ - struct IN_ADDR *cache_address; + struct in_addr *cache_address; /* Alternative assignement mask/values */ int num_maskval; @@ -1785,13 +1785,13 @@ for (cache = 0, cache_list_ptr = &router_list_ptr->cache_list_head; cache_list_ptr->next; cache_list_ptr = cache_list_ptr->next, cache++) { /* add caches */ - cache_address = (struct IN_ADDR *) &wccp_packet[offset]; + cache_address = (struct in_addr *) &wccp_packet[offset]; - xmemcpy(cache_address, &cache_list_ptr->cache_ip, sizeof(struct IN_ADDR)); + xmemcpy(cache_address, &cache_list_ptr->cache_ip, sizeof(struct in_addr)); total_weight += cache_list_ptr->weight << 12; weight[cache] = cache_list_ptr->weight << 12; - offset += sizeof(struct IN_ADDR); + offset += sizeof(struct in_addr); } }