]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
IPv6 preparation by Rafael Martinez Torres <rafael.martinez@novagnet.com>
authorhno <>
Tue, 19 Apr 2005 03:52:40 +0000 (03:52 +0000)
committerhno <>
Tue, 19 Apr 2005 03:52:40 +0000 (03:52 +0000)
- This patch does change literally the term IN_ADDR by in_addr in all the
files containing this term, except the file "inet_ntoa.c", the only one
not including "config.h" (either direct or undirectly).
- The correposding "defines" are in config.h . They are guarded by "INET6"
define, (#ifdef INET6), so branches others that squid3-ipv6 should not be
affected in their compilations.

61 files changed:
doc/Programming-Guide/prog-guide.sgml
helpers/basic_auth/MSNT/rfcnb-priv.h
helpers/basic_auth/MSNT/rfcnb-util.c
helpers/basic_auth/MSNT/rfcnb-util.h
helpers/basic_auth/MSNT/session.c
helpers/ntlm_auth/SMB/smbval/rfcnb-priv.h
helpers/ntlm_auth/SMB/smbval/rfcnb-util.c
helpers/ntlm_auth/SMB/smbval/rfcnb-util.h
helpers/ntlm_auth/SMB/smbval/session.c
include/config.h
include/rfc1035.h
include/util.h
lib/rfc1035.c
lib/safe_inet_addr.c
src/ACLARP.cc
src/ACLASN.h
src/ACLChecklist.cc
src/ACLChecklist.h
src/ACLDestinationASN.h
src/ACLIP.cc
src/ACLIP.h
src/ACLMaxUserIP.cc
src/ACLMaxUserIP.h
src/ACLSourceASN.h
src/AccessLogEntry.h
src/AuthUserRequest.cc
src/AuthUserRequest.h
src/CompositePoolNode.h
src/ESI.cc
src/HttpRequest.cc
src/HttpRequest.h
src/asn.cc
src/auth/digest/auth_digest.cc
src/cache_cf.cc
src/cachemgr.cc
src/client_db.cc
src/client_side.h
src/client_side_reply.cc
src/client_side_reply.h
src/comm.cc
src/delay_pools.cc
src/dns_internal.cc
src/dnsserver.cc
src/fde.h
src/forward.cc
src/fqdncache.cc
src/globals.h
src/icmp.cc
src/icp_v2.cc
src/ipcache.cc
src/main.cc
src/neighbors.cc
src/net_db.cc
src/pinger.cc
src/protos.h
src/redirect.cc
src/snmp_agent.cc
src/snmp_core.cc
src/structs.h
src/tools.cc
src/wccp.cc

index 301b61fb720e0d7451c87535af1f58d24b7c3085..3e4865ddfc37342c22931293b8b91b1fbfae7970 100644 (file)
@@ -2,7 +2,7 @@
 <article>
 <title>Squid Programmers Guide</title>
 <author>Squid Developers</author>
-<date>$Id: prog-guide.sgml,v 1.57 2004/08/11 19:23:21 wessels Exp $</date>
+<date>$Id: prog-guide.sgml,v 1.58 2005/04/18 21:52:40 hno Exp $</date>
 
 <abstract>
 Squid is a WWW Cache application developed by the National Laboratory
@@ -2579,7 +2579,7 @@ struct _auth_user_t {
     } flags;
     long expiretime;
     /* IP addr this user authenticated from */
-    struct in_addr ipaddr;
+    struct IN_ADDR ipaddr;
     time_t ip_expiretime;
     /* how many references are outstanding to this instance*/
     size_t references;
index 1e906b3bdd78e7d67b616bf435d8ac4a25edea23..01f9a5caa0b33ee246b8be0e2bd48048c85052c3 100644 (file)
@@ -55,7 +55,7 @@ typedef struct redirect_addr *redirect_ptr;
 
 struct redirect_addr {
 
-    struct in_addr ip_addr;
+    struct IN_ADDR ip_addr;
     int port;
     redirect_ptr next;
 
index 86ae2d01371714b11d61bb40124c6837089e433e..270fad0f4cd221dafac12a9db53b690680e4c1cb 100644 (file)
@@ -345,7 +345,7 @@ RFCNB_Print_Pkt(FILE * fd, char *dirn, struct RFCNB_Pkt *pkt, int len)
 /* Resolve a name into an address */
 
 int
-RFCNB_Name_To_IP(char *host, struct in_addr *Dest_IP)
+RFCNB_Name_To_IP(char *host, struct IN_ADDR *Dest_IP)
 {
     int addr;                  /* Assumes IP4, 32 bit network addresses */
     struct hostent *hp;
@@ -366,12 +366,12 @@ RFCNB_Name_To_IP(char *host, struct in_addr *Dest_IP)
 
        } else {                /* We got a name */
 
-           memcpy((void *) Dest_IP, (void *) hp->h_addr_list[0], sizeof(struct in_addr));
+           memcpy((void *) Dest_IP, (void *) hp->h_addr_list[0], sizeof(struct IN_ADDR));
 
        }
     } else {                   /* It was an IP address */
 
-       memcpy((void *) Dest_IP, (void *) &addr, sizeof(struct in_addr));
+       memcpy((void *) Dest_IP, (void *) &addr, sizeof(struct IN_ADDR));
 
     }
 
@@ -397,7 +397,7 @@ RFCNB_Close(int socket)
  * Not sure how to handle socket options etc.         */
 
 int
-RFCNB_IP_Connect(struct in_addr Dest_IP, int port)
+RFCNB_IP_Connect(struct IN_ADDR Dest_IP, int port)
 {
     struct sockaddr_in Socket;
     int fd;
@@ -439,7 +439,7 @@ RFCNB_Session_Req(struct RFCNB_Con *con,
     char *Called_Name,
     char *Calling_Name,
     BOOL * redirect,
-    struct in_addr *Dest_IP,
+    struct IN_ADDR *Dest_IP,
     int *port)
 {
     char *sess_pkt;
@@ -539,7 +539,7 @@ RFCNB_Session_Req(struct RFCNB_Con *con,
 
        *redirect = TRUE;       /* Copy port and ip addr       */
 
-       memcpy(Dest_IP, (resp + RFCNB_Pkt_IP_Offset), sizeof(struct in_addr));
+       memcpy(Dest_IP, (resp + RFCNB_Pkt_IP_Offset), sizeof(struct IN_ADDR));
        *port = SVAL(resp, RFCNB_Pkt_Port_Offset);
 
        return (0);
index e19330d4be7b47429e06de060a6b8fb06e7bf703..2db8541b05a54b100602659f2c170948b5bd97f2 100644 (file)
@@ -35,17 +35,17 @@ struct RFCNB_Pkt *RFCNB_Alloc_Pkt(int n);
 
 void RFCNB_Print_Pkt(FILE * fd, char *dirn, struct RFCNB_Pkt *pkt, int len);
 
-int RFCNB_Name_To_IP(char *host, struct in_addr *Dest_IP);
+int RFCNB_Name_To_IP(char *host, struct IN_ADDR *Dest_IP);
 
 int RFCNB_Close(int socket);
 
-int RFCNB_IP_Connect(struct in_addr Dest_IP, int port);
+int RFCNB_IP_Connect(struct IN_ADDR Dest_IP, int port);
 
 int RFCNB_Session_Req(RFCNB_Con * con,
     char *Called_Name,
     char *Calling_Name,
     BOOL * redirect,
-    struct in_addr *Dest_IP,
+    struct IN_ADDR *Dest_IP,
     int *port);
 
 void RFCNB_Free_Pkt(struct RFCNB_Pkt *pkt);
index a1c33bfd1d67bc40f4b2cde342da13bd7c2bc554..f90991db51bf30b1653d533273cd829667024cca 100644 (file)
@@ -56,7 +56,7 @@ RFCNB_Call(char *Called_Name, char *Calling_Name, char *Called_Address,
     int port)
 {
     struct RFCNB_Con *con;
-    struct in_addr Dest_IP;
+    struct IN_ADDR Dest_IP;
     int Client;
     BOOL redirect;
     struct redirect_addr *redir_addr;
index 766a66fb9261bd5146d5a657e0fe5ff9de86bd9a..40141cd81f2519419575c06f82628ee25313ee2f 100644 (file)
@@ -59,7 +59,7 @@ typedef struct redirect_addr *redirect_ptr;
 
 struct redirect_addr {
 
-    struct in_addr ip_addr;
+    struct IN_ADDR ip_addr;
     int port;
     redirect_ptr next;
 
index 887775ed3ee0ec24e97b086b4b78032554649758..14f7255682457d9eca2abea8e3e2ea6a5af5187f 100644 (file)
@@ -320,7 +320,7 @@ RFCNB_Print_Pkt(FILE * fd, char *dirn, struct RFCNB_Pkt *pkt, int len)
 /* Resolve a name into an address */
 
 int
-RFCNB_Name_To_IP(char *host, struct in_addr *Dest_IP)
+RFCNB_Name_To_IP(char *host, struct IN_ADDR *Dest_IP)
 {
     int addr;                  /* Assumes IP4, 32 bit network addresses */
     struct hostent *hp;
@@ -341,12 +341,12 @@ RFCNB_Name_To_IP(char *host, struct in_addr *Dest_IP)
 
        } else {                /* We got a name */
 
-           memcpy((void *) Dest_IP, (void *) hp->h_addr_list[0], sizeof(struct in_addr));
+           memcpy((void *) Dest_IP, (void *) hp->h_addr_list[0], sizeof(struct IN_ADDR));
 
        }
     } else {                   /* It was an IP address */
 
-       memcpy((void *) Dest_IP, (void *) &addr, sizeof(struct in_addr));
+       memcpy((void *) Dest_IP, (void *) &addr, sizeof(struct IN_ADDR));
 
     }
 
@@ -372,7 +372,7 @@ RFCNB_Close(int socket)
  * Not sure how to handle socket options etc.         */
 
 int
-RFCNB_IP_Connect(struct in_addr Dest_IP, int port)
+RFCNB_IP_Connect(struct IN_ADDR Dest_IP, int port)
 {
     struct sockaddr_in Socket;
     int fd;
@@ -414,7 +414,7 @@ RFCNB_Session_Req(struct RFCNB_Con *con,
     char *Called_Name,
     char *Calling_Name,
     BOOL * redirect,
-    struct in_addr *Dest_IP,
+    struct IN_ADDR *Dest_IP,
     int *port)
 {
     char *sess_pkt;
@@ -514,7 +514,7 @@ RFCNB_Session_Req(struct RFCNB_Con *con,
 
        *redirect = TRUE;       /* Copy port and ip addr       */
 
-       memcpy(Dest_IP, (resp + RFCNB_Pkt_IP_Offset), sizeof(struct in_addr));
+       memcpy(Dest_IP, (resp + RFCNB_Pkt_IP_Offset), sizeof(struct IN_ADDR));
        *port = SVAL(resp, RFCNB_Pkt_Port_Offset);
 
        return (0);
index 123c9cba29bae020183701eb73d200de7237c7c3..024586009c56b9be3837a8169461c68c825e5dd2 100644 (file)
@@ -38,15 +38,15 @@ struct RFCNB_Pkt *RFCNB_Alloc_Pkt(int n);
 
 void RFCNB_Print_Pkt(FILE * fd, char *dirn, struct RFCNB_Pkt *pkt, int len);
 
-int RFCNB_Name_To_IP(char *host, struct in_addr *Dest_IP);
+int RFCNB_Name_To_IP(char *host, struct IN_ADDR *Dest_IP);
 
 int RFCNB_Close(int socket);
 
-int RFCNB_IP_Connect(struct in_addr Dest_IP, int port);
+int RFCNB_IP_Connect(struct IN_ADDR Dest_IP, int port);
 
 int RFCNB_Session_Req(struct RFCNB_Con *con,
     char *Called_Name,
     char *Calling_Name,
     BOOL * redirect,
-    struct in_addr *Dest_IP,
+    struct IN_ADDR *Dest_IP,
     int *port);
index 361a8f886aece7bf4b546fe01d127e6ca9f6b54b..cf6131e81925306648b8d793a4576d8a73e86049 100644 (file)
@@ -77,7 +77,7 @@ RFCNB_Call(char *Called_Name, char *Calling_Name, char *Called_Address,
     int port)
 {
     struct RFCNB_Con *con;
-    struct in_addr Dest_IP;
+    struct IN_ADDR Dest_IP;
     int Client;
     BOOL redirect;
     struct redirect_addr *redir_addr;
index 34a682524cba14af0bf4545a43ed9f0a768ebf19..27e076c58b3354237f9dced1633bae97038e585f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: config.h,v 1.16 2004/12/24 01:03:39 hno Exp $
+ * $Id: config.h,v 1.17 2005/04/18 21:52:40 hno Exp $
  *
  * AUTHOR: Duane Wessels
  *
 
 
 
+/* 
+ * This is hack to allow compiling IPv6-IPv4 version,
+ * not disturbing branches others than squid3-ipv6 
+ */
+
+#ifdef INET6 
+#define IN_ADDR in6_addr
+#else
+#define IN_ADDR in_addr
+#endif
+
 /* Typedefs for missing entries on a system */
 
 #include "squid_types.h"
index 4a7010088c9c43b19d3e281d0debc4616dbe92d9..b35637e384ada7550179eb7f59580d4b042d8a9c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: rfc1035.h,v 1.10 2003/12/18 01:16:01 robertc Exp $
+ * $Id: rfc1035.h,v 1.11 2005/04/18 21:52:40 hno Exp $
  *
  * AUTHOR: Duane Wessels
  *
@@ -59,7 +59,7 @@ struct _rfc1035_rr {
 SQUIDCEXTERN unsigned short rfc1035BuildAQuery(const char *hostname,
     char *buf,
     size_t * szp);
-SQUIDCEXTERN unsigned short rfc1035BuildPTRQuery(const struct in_addr,
+SQUIDCEXTERN unsigned short rfc1035BuildPTRQuery(const struct IN_ADDR,
     char *buf,
     size_t * szp);
 SQUIDCEXTERN unsigned short rfc1035RetryQuery(char *);
index 38e7418b1d533326655a6ccced4be5fc92053faf..e63811e4c5fe7fb1d22f1852cd98f6d6ade83520 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: util.h,v 1.71 2003/07/07 22:44:28 robertc Exp $
+ * $Id: util.h,v 1.72 2005/04/18 21:52:40 hno Exp $
  *
  * AUTHOR: Harvest Derived
  *
@@ -126,7 +126,7 @@ extern size_t xmalloc_total;
 extern void xmalloc_find_leaks(void);
 #endif
 
-typedef struct in_addr SIA;
+typedef struct IN_ADDR SIA;
 SQUIDCEXTERN int safe_inet_addr(const char *, SIA *);
 SQUIDCEXTERN time_t parse_iso3307_time(const char *buf);
 SQUIDCEXTERN char *base64_decode(const char *coded);
index 44180b9dafcddef809b482d2d0d98502f756dd09..800b77799130d3e3f36d5c035d0bc1d351921e7f 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: rfc1035.c,v 1.35 2005/01/23 14:59:06 serassio Exp $
+ * $Id: rfc1035.c,v 1.36 2005/04/18 21:52:40 hno Exp $
  *
  * Low level DNS protocol routines
  * AUTHOR: Duane Wessels
@@ -636,7 +636,7 @@ rfc1035BuildAQuery(const char *hostname, char *buf, size_t * szp)
  * Return value is the query ID.
  */
 unsigned short
-rfc1035BuildPTRQuery(const struct in_addr addr, char *buf, size_t * szp)
+rfc1035BuildPTRQuery(const struct IN_ADDR addr, char *buf, size_t * szp)
 {
     static rfc1035_header h;
     size_t offset = 0;
@@ -710,7 +710,7 @@ main(int argc, char *argv[])
     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;
@@ -752,7 +752,7 @@ main(int argc, char *argv[])
                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) {
index 1a0c1453d64b14f2319c5cd3e7ef569466342b49..c03b72c1749ad9d6ca39ad279852a3bdb6228251 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: safe_inet_addr.c,v 1.13 2003/01/23 00:37:01 robertc Exp $
+ * $Id: safe_inet_addr.c,v 1.14 2005/04/18 21:52:40 hno Exp $
  */
 
 #include "config.h"
 #include "snprintf.h"
 
 int
-safe_inet_addr(const char *buf, struct in_addr *addr)
+safe_inet_addr(const char *buf, struct IN_ADDR *addr)
 {
     static char addrbuf[32];
     int a1 = 0, a2 = 0, a3 = 0, a4 = 0;
-    struct in_addr A;
+    struct IN_ADDR A;
     char x;
 #if defined(_SQUID_HPUX_)
     /*
index ffbf303648864c867de3a4df9da52eab34a8f097..bee7ef9cf1f83de773468792c312d68a5d175d6c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ACLARP.cc,v 1.11 2005/01/06 10:44:39 serassio Exp $
+ * $Id: ACLARP.cc,v 1.12 2005/04/18 21:52:41 hno Exp $
  *
  * DEBUG: section 28    Access Control
  * AUTHOR: Duane Wessels
@@ -82,7 +82,7 @@ struct arpreq
 #endif
 static void aclParseArpList(SplayNode<acl_arp_data *> **curlist);
 static int decode_eth(const char *asc, char *eth);
-static int aclMatchArp(SplayNode<acl_arp_data *> **dataptr, struct in_addr c);
+static int aclMatchArp(SplayNode<acl_arp_data *> **dataptr, struct IN_ADDR c);
 static SplayNode<acl_arp_data *>::SPLAYCMP aclArpCompare;
 static SplayNode<acl_arp_data *>::SPLAYWALKEE aclDumpArpListWalkee;
 
@@ -231,7 +231,7 @@ ACLARP::match(ACLChecklist *checklist)
 /* aclMatchArp */
 /***************/
 int
-aclMatchArp(SplayNode<acl_arp_data *> **dataptr, struct in_addr c)
+aclMatchArp(SplayNode<acl_arp_data *> **dataptr, struct IN_ADDR c)
 {
 #if defined(_SQUID_LINUX_)
 
index a09325ce114fb098b6c716cdd4e217f577767e13..7733925d1473c1bbea0d4c89005f60cfd8e63832 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ACLASN.h,v 1.5 2004/08/30 05:12:31 robertc Exp $
+ * $Id: ACLASN.h,v 1.6 2005/04/18 21:52:41 hno Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
 #include "ACLStrategised.h"
 #include "ACLChecklist.h"
 
-SQUIDCEXTERN int asnMatchIp(List<int> *, struct in_addr);
+SQUIDCEXTERN int asnMatchIp(List<int> *, struct IN_ADDR);
 SQUIDCEXTERN void asnInit(void);
 SQUIDCEXTERN void asnFreeMemory(void);
 
-class ACLASN : public ACLData<struct in_addr>
+class ACLASN : public ACLData<struct IN_ADDR>
 {
 
 public:
@@ -52,17 +52,17 @@ public:
 
     virtual ~ACLASN();
 
-    virtual bool match(struct in_addr);
+    virtual bool match(struct IN_ADDR);
     virtual wordlist *dump();
     virtual void parse();
-    virtual ACLData<struct in_addr> *clone() const;
+    virtual ACLData<struct IN_ADDR> *clone() const;
     virtual void prepareForUse();
 
 private:
     static ACL::Prototype SourceRegistryProtoype;
-    static ACLStrategised<struct in_addr> SourceRegistryEntry_;
+    static ACLStrategised<struct IN_ADDR> SourceRegistryEntry_;
     static ACL::Prototype DestinationRegistryProtoype;
-    static ACLStrategised<struct in_addr> DestinationRegistryEntry_;
+    static ACLStrategised<struct IN_ADDR> DestinationRegistryEntry_;
     List<int> *data;
 };
 
index bcb2499a506902a4360547107669122baa020f93..4c13356f58f0b5f8f83268a0710971bf6b4a6298 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ACLChecklist.cc,v 1.25 2004/12/27 15:57:15 hno Exp $
+ * $Id: ACLChecklist.cc,v 1.26 2005/04/18 21:52:41 hno Exp $
  *
  * DEBUG: section 28    Access Control
  * AUTHOR: Duane Wessels
@@ -301,11 +301,11 @@ ACLChecklist::ACLChecklist() : accessList (NULL), my_port (0), request (NULL),
         sourceDomainChecked_(false)
 {
 
-    memset (&src_addr, '\0', sizeof (struct in_addr));
+    memset (&src_addr, '\0', sizeof (struct IN_ADDR));
 
-    memset (&dst_addr, '\0', sizeof (struct in_addr));
+    memset (&dst_addr, '\0', sizeof (struct IN_ADDR));
 
-    memset (&my_addr, '\0', sizeof (struct in_addr));
+    memset (&my_addr, '\0', sizeof (struct IN_ADDR));
     rfc931[0] = '\0';
 }
 
index 0e06f3a46893fe104d1496d13feb30d52850b80e..763bc85e0343e0ba298d39899b200f1b4dcb478b 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ACLChecklist.h,v 1.19 2003/09/21 12:06:06 robertc Exp $
+ * $Id: ACLChecklist.h,v 1.20 2005/04/18 21:52:41 hno Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -114,11 +114,11 @@ class NullState : public AsyncState
 
     const acl_access *accessList;
 
-    struct in_addr src_addr;
+    struct IN_ADDR src_addr;
 
-    struct in_addr dst_addr;
+    struct IN_ADDR dst_addr;
 
-    struct in_addr my_addr;
+    struct IN_ADDR my_addr;
     unsigned short my_port;
     HttpRequest *request;
     /* for acls that look at reply data */
index bdcbbd0a7bf9704bd2663948fff1f7cc918909d3..02e19e843e7c2a0c9f61473326acb04612ea54b3 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ACLDestinationASN.h,v 1.1 2003/02/25 12:22:33 robertc Exp $
+ * $Id: ACLDestinationASN.h,v 1.2 2005/04/18 21:52:41 hno Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -38,7 +38,7 @@
 #include "ACLASN.h"
 #include "ACLStrategy.h"
 
-class ACLDestinationASNStrategy : public ACLStrategy<struct in_addr>
+class ACLDestinationASNStrategy : public ACLStrategy<struct IN_ADDR>
 {
 
 public:
index f4aec2b351369ea6be005e49f46a6e852e179f10..a252612bb28d59adeed943ec73908283fd5c96eb 100644 (file)
@@ -112,11 +112,11 @@ int
 aclIpAddrNetworkCompare(acl_ip_data * const &p, acl_ip_data * const &q)
 {
 
-    struct in_addr A = p->addr1;
+    struct IN_ADDR A = p->addr1;
 
-    const struct in_addr B = q->addr1;
+    const struct IN_ADDR B = q->addr1;
 
-    const struct in_addr C = q->addr2;
+    const struct IN_ADDR C = q->addr2;
     A.s_addr &= q->mask.s_addr;        /* apply netmask */
 
     if (C.s_addr == 0) {       /* single address check */
@@ -181,7 +181,7 @@ acl_ip_data::NetworkCompare(acl_ip_data * const & a, acl_ip_data * const &b)
  */
 bool
 
-acl_ip_data::DecodeMask(const char *asc, struct in_addr *mask)
+acl_ip_data::DecodeMask(const char *asc, struct IN_ADDR *mask)
 {
     char junk;
     int a1 = 0;
@@ -360,7 +360,7 @@ ACLIP::valid () const
 
 int
 
-ACLIP::match(struct in_addr &clientip)
+ACLIP::match(struct IN_ADDR &clientip)
 {
     static acl_ip_data ClientAddress (any_addr, any_addr, no_addr, NULL);
     /*
@@ -380,4 +380,4 @@ ACLIP::match(struct in_addr &clientip)
 
 acl_ip_data::acl_ip_data () :addr1(any_addr), addr2(any_addr), mask (any_addr), next (NULL) {}
 
-acl_ip_data::acl_ip_data (struct in_addr const &anAddress1, struct in_addr const &anAddress2, struct in_addr const &aMask, acl_ip_data *aNext) : addr1(anAddress1), addr2(anAddress2), mask(aMask), next(aNext){}
+acl_ip_data::acl_ip_data (struct IN_ADDR const &anAddress1, struct IN_ADDR const &anAddress2, struct IN_ADDR const &aMask, acl_ip_data *aNext) : addr1(anAddress1), addr2(anAddress2), mask(aMask), next(aNext){}
index f6acf47be4b4ee21acb2b3982c980a6d88badfa9..7de38af0d5262f0423b69f08cfb1dcbc1e73d543 100644 (file)
@@ -48,19 +48,19 @@ public:
 
     acl_ip_data ();
 
-    acl_ip_data (struct in_addr const &, struct in_addr const &, struct in_addr const &, acl_ip_data *);
+    acl_ip_data (struct IN_ADDR const &, struct IN_ADDR const &, struct IN_ADDR const &, acl_ip_data *);
     void toStr(char *buf, int len) const;
 
-    struct in_addr addr1;      /* if addr2 non-zero then its a range */
+    struct IN_ADDR addr1;      /* if addr2 non-zero then its a range */
 
-    struct in_addr addr2;
+    struct IN_ADDR addr2;
 
-    struct in_addr mask;
+    struct IN_ADDR mask;
     acl_ip_data *next;         /* used for parsing, not for storing */
 
 private:
 
-    static bool DecodeMask(const char *asc, struct in_addr *mask);
+    static bool DecodeMask(const char *asc, struct IN_ADDR *mask);
 };
 
 MEMPROXY_CLASS_INLINE(acl_ip_data)
@@ -87,7 +87,7 @@ public:
 
 protected:
 
-    int match(struct in_addr &);
+    int match(struct IN_ADDR &);
     IPSplay *data;
 
 private:
index a8b5565e7a395a16aa1dec1133148d93d99d10d1..1f85f7a3a775ec8f1457e7cae13ea7dbda18a890 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ACLMaxUserIP.cc,v 1.6 2004/08/30 05:12:31 robertc Exp $
+ * $Id: ACLMaxUserIP.cc,v 1.7 2005/04/18 21:52:41 hno Exp $
  *
  * DEBUG: section 28    Access Control
  * AUTHOR: Duane Wessels
@@ -109,7 +109,7 @@ ACLMaxUserIP::parse()
 int
 ACLMaxUserIP::match(auth_user_request_t * auth_user_request,
 
-                    struct in_addr const &src_addr)
+                    struct IN_ADDR const &src_addr)
 {
     /*
      * the logic for flush the ip list when the limit is hit vs keep
index ddc58382199f258f144e95b525d6f8a0d29d89d9..30870b817d23154b22ce42e34257ebb31d28a529 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ACLMaxUserIP.h,v 1.4 2004/08/30 05:12:31 robertc Exp $
+ * $Id: ACLMaxUserIP.h,v 1.5 2005/04/18 21:52:41 hno Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -61,7 +61,7 @@ private:
     static Prototype RegistryProtoype;
     static ACLMaxUserIP RegistryEntry_;
 
-    int match(auth_user_request_t *, struct in_addr const &);
+    int match(auth_user_request_t *, struct IN_ADDR const &);
     char const *class_;
     size_t maximum;
 
index baa8fe6a15580219d14088cc4254a09f00ba7548..7205c2e7c2ad4eadf2fa4fdf03cf8f432e5c2996 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ACLSourceASN.h,v 1.1 2003/02/25 12:22:34 robertc Exp $
+ * $Id: ACLSourceASN.h,v 1.2 2005/04/18 21:52:41 hno Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -38,7 +38,7 @@
 #include "ACLASN.h"
 #include "ACLStrategy.h"
 
-class ACLSourceASNStrategy : public ACLStrategy<struct in_addr>
+class ACLSourceASNStrategy : public ACLStrategy<struct IN_ADDR>
 {
 
 public:
index 0cd23a7c5e900f791595b17c646ca4dcd851aaef..e0ea9128685a8d35011944fc592be39fa7b38241 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: AccessLogEntry.h,v 1.3 2003/10/16 21:40:16 robertc Exp $
+ * $Id: AccessLogEntry.h,v 1.4 2005/04/18 21:52:41 hno Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -90,7 +90,7 @@ public:
             memset(&caddr, '\0', sizeof(caddr));
         }
 
-        struct in_addr caddr;
+        struct IN_ADDR caddr;
         size_t size;
         off_t highOffset;
         size_t objectSize;
index 50d31d5ba4023490b01bb388f7e1c02bcb915654..f9e3f4133b66a88ada4d9d6aa74253bf47e34961 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: AuthUserRequest.cc,v 1.2 2004/12/20 17:35:58 robertc Exp $
+ * $Id: AuthUserRequest.cc,v 1.3 2005/04/18 21:52:41 hno Exp $
  *
  * DO NOT MODIFY NEXT 2 LINES:
  * arch-tag: 6803fde1-d5a2-4c29-9034-1c0c9f650eb4
@@ -201,7 +201,7 @@ AuthUserRequest::denyMessage(char const * const default_message)
 
 static void
 
-authenticateAuthUserRequestSetIp(auth_user_request_t * auth_user_request, struct in_addr ipaddr)
+authenticateAuthUserRequestSetIp(auth_user_request_t * auth_user_request, struct IN_ADDR ipaddr)
 {
     auth_user_ip_t *ipdata, *tempnode;
     auth_user_t *auth_user;
@@ -266,7 +266,7 @@ authenticateAuthUserRequestSetIp(auth_user_request_t * auth_user_request, struct
 
 void
 
-authenticateAuthUserRequestRemoveIp(auth_user_request_t * auth_user_request, struct in_addr ipaddr)
+authenticateAuthUserRequestRemoveIp(auth_user_request_t * auth_user_request, struct IN_ADDR ipaddr)
 {
     auth_user_ip_t *ipdata;
     auth_user_t *auth_user;
@@ -403,7 +403,7 @@ authTryGetUser (auth_user_request_t **auth_user_request, ConnStateData::Pointer
  */
 auth_acl_t
 
-AuthUserRequest::authenticate(auth_user_request_t ** auth_user_request, http_hdr_type headertype, HttpRequest * request, ConnStateData::Pointer conn, struct in_addr src_addr)
+AuthUserRequest::authenticate(auth_user_request_t ** auth_user_request, http_hdr_type headertype, HttpRequest * request, ConnStateData::Pointer conn, struct IN_ADDR src_addr)
 {
     const char *proxy_auth;
     assert(headertype != 0);
@@ -616,7 +616,7 @@ AuthUserRequest::authenticate(auth_user_request_t ** auth_user_request, http_hdr
 
 auth_acl_t
 
-AuthUserRequest::tryToAuthenticateAndSetAuthUser(auth_user_request_t ** auth_user_request, http_hdr_type headertype, HttpRequest * request, ConnStateData::Pointer conn, struct in_addr src_addr)
+AuthUserRequest::tryToAuthenticateAndSetAuthUser(auth_user_request_t ** auth_user_request, http_hdr_type headertype, HttpRequest * request, ConnStateData::Pointer conn, struct IN_ADDR src_addr)
 {
     /* If we have already been called, return the cached value */
     auth_user_request_t *t = authTryGetUser (auth_user_request, conn, request);
index ac248489d3d5e17c4db912daab6414b618e1533d..f93352ce3a8522483a317d31224e79bd979cf163 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: AuthUserRequest.h,v 1.1 2004/08/30 03:28:56 robertc Exp $
+ * $Id: AuthUserRequest.h,v 1.2 2005/04/18 21:52:41 hno Exp $
  *
  * DO NOT MODIFY NEXT 2 LINES:
  * arch-tag: 674533af-8b21-4641-b71a-74c4639072a0
@@ -49,7 +49,7 @@ struct AuthUserIP
     dlink_node node;
     /* IP addr this user authenticated from */
 
-    struct in_addr ipaddr;
+    struct IN_ADDR ipaddr;
     time_t ip_expiretime;
 };
 
@@ -81,7 +81,7 @@ public:
 
 public:
 
-    static auth_acl_t tryToAuthenticateAndSetAuthUser(auth_user_request_t **, http_hdr_type, HttpRequest *, ConnStateData::Pointer, struct in_addr);
+    static auth_acl_t tryToAuthenticateAndSetAuthUser(auth_user_request_t **, http_hdr_type, HttpRequest *, ConnStateData::Pointer, struct IN_ADDR);
     static void addReplyAuthHeader(HttpReply * rep, auth_user_request_t * auth_user_request, HttpRequest * request, int accelerated, int internal);
 
     AuthUserRequest();
@@ -110,7 +110,7 @@ public:
 
 private:
 
-    static auth_acl_t authenticate(auth_user_request_t ** auth_user_request, http_hdr_type headertype, HttpRequest * request, ConnStateData::Pointer conn, struct in_addr src_addr);
+    static auth_acl_t authenticate(auth_user_request_t ** auth_user_request, http_hdr_type headertype, HttpRequest * request, ConnStateData::Pointer conn, struct IN_ADDR src_addr);
 
     /* return a message on the 407 error pages */
     char *message;
@@ -131,7 +131,7 @@ extern size_t authenticateRequestRefCount (auth_user_request_t *);
 extern void authenticateFixHeader(HttpReply *, auth_user_request_t *, HttpRequest *, int, int);
 extern void authenticateAddTrailer(HttpReply *, auth_user_request_t *, HttpRequest *, int);
 
-extern void authenticateAuthUserRequestRemoveIp(auth_user_request_t *, struct in_addr);
+extern void authenticateAuthUserRequestRemoveIp(auth_user_request_t *, struct IN_ADDR);
 extern void authenticateAuthUserRequestClearIp(auth_user_request_t *);
 extern size_t authenticateAuthUserRequestIPCount(auth_user_request_t *);
 extern int authenticateDirection(auth_user_request_t *);
index 95b480c6777d34f7e7b949cddb30ca10a90ec852..6cb057754c6c3ef19b69e48181397d9db610e59d 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: CompositePoolNode.h,v 1.5 2003/08/04 22:14:40 robertc Exp $
+ * $Id: CompositePoolNode.h,v 1.6 2005/04/18 21:52:41 hno Exp $
  *
  * DEBUG: section 77    Delay Pools
  * AUTHOR: Robert Collins <robertc@squid-cache.org>
@@ -76,7 +76,7 @@ public:
     public:
         CompositeSelectionDetails() {}
 
-        struct in_addr src_addr;
+        struct IN_ADDR src_addr;
         AuthUserRequest *user;
         String tag;
     };
index 28c5771bf5791884c55cbc3d99200ba394b064c5..975b1010a7d1092c223946002aad7f4851328071 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ESI.cc,v 1.12 2004/12/21 17:28:28 robertc Exp $
+ * $Id: ESI.cc,v 1.13 2005/04/18 21:52:41 hno Exp $
  *
  * DEBUG: section 86    ESI processing
  * AUTHOR: Robert Collins
@@ -1437,7 +1437,7 @@ ESIContext::freeResources ()
     /* don't touch incoming, it's a pointer into buffered anyway */
 }
 
-extern ErrorState *clientBuildError (err_type, http_status, char const *, struct in_addr *, HttpRequest *);
+extern ErrorState *clientBuildError (err_type, http_status, char const *, struct IN_ADDR *, HttpRequest *);
 
 
 /* This can ONLY be used before we have sent *any* data to the client */
index 651c29bf9f752bd9c0fe902492141d7f966ae4a4..65491831a777e9e2ca9e3aa4c920804d9a52052b 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: HttpRequest.cc,v 1.47 2004/08/30 05:12:31 robertc Exp $
+ * $Id: HttpRequest.cc,v 1.48 2005/04/18 21:52:41 hno Exp $
  *
  * DEBUG: section 73    HTTP Request
  * AUTHOR: Duane Wessels
@@ -63,9 +63,9 @@ HttpRequest::HttpRequest()  : header(hoRequest)
     int max_forwards;
     /* these in_addr's could probably be sockaddr_in's */
 
-    struct in_addr client_addr;
+    struct IN_ADDR client_addr;
 
-    struct in_addr my_addr;
+    struct IN_ADDR my_addr;
     unsigned short my_port;
     unsigned short client_port;
     HttpHeader header;
index bd8ed8f5805ccfde3e53846de5e51c7f5187eabe..86b40f9c86f4c1a0c4bf53a50751352d4c2a160e 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: HttpRequest.h,v 1.10 2004/08/30 05:12:31 robertc Exp $
+ * $Id: HttpRequest.h,v 1.11 2005/04/18 21:52:41 hno Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -82,9 +82,9 @@ public:
     int max_forwards;
     /* these in_addr's could probably be sockaddr_in's */
 
-    struct in_addr client_addr;
+    struct IN_ADDR client_addr;
 
-    struct in_addr my_addr;
+    struct IN_ADDR my_addr;
     unsigned short my_port;
     unsigned short client_port;
     HttpHeader header;
index 93c389d7edbce7fe50d7c8af092a900d675ac005..62eee5f534c3519d7a9753eff3ea908619f95a1c 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: asn.cc,v 1.99 2004/08/30 05:12:31 robertc Exp $
+ * $Id: asn.cc,v 1.100 2005/04/18 21:52:42 hno Exp $
  *
  * DEBUG: section 53    AS Number handling
  * AUTHOR: Duane Wessels, Kostas Anagnostakis
@@ -130,7 +130,7 @@ static OBJH asnStats;
 /* PUBLIC */
 
 int
-asnMatchIp(List<int> *data, struct in_addr addr)
+asnMatchIp(List<int> *data, struct IN_ADDR addr)
 {
     unsigned long lh;
 
@@ -393,7 +393,7 @@ asnAddNet(char *as_string, int as_number)
     List<int> *q = NULL;
     as_info *asinfo = NULL;
 
-    struct in_addr in_a, in_m;
+    struct IN_ADDR in_a, in_m;
     long mask, addr;
     char *t;
     int bitl;
@@ -539,9 +539,9 @@ printRadixNode(struct squid_radix_node *rn, void *_sentry)
     List<int> *q;
     as_info *asinfo;
 
-    struct in_addr addr;
+    struct IN_ADDR addr;
 
-    struct in_addr mask;
+    struct IN_ADDR mask;
     assert(e);
     assert(e->e_info);
     (void) get_m_int(addr.s_addr, e->e_addr);
@@ -567,7 +567,7 @@ ACLASN::~ACLASN()
 
 bool
 
-ACLASN::match(struct in_addr toMatch)
+ACLASN::match(struct IN_ADDR toMatch)
 {
     return asnMatchIp(data, toMatch);
 }
@@ -606,7 +606,7 @@ ACLASN::parse()
     }
 }
 
-ACLData<struct in_addr> *
+ACLData<struct IN_ADDR> *
 ACLASN::clone() const
 {
     if (data)
@@ -617,17 +617,17 @@ ACLASN::clone() const
 
 /* explicit template instantiation required for some systems */
 
-template class ACLStrategised<struct in_addr>
+template class ACLStrategised<struct IN_ADDR>
 
 ;
 
 ACL::Prototype ACLASN::SourceRegistryProtoype(&ACLASN::SourceRegistryEntry_, "src_as");
 
-ACLStrategised<struct in_addr> ACLASN::SourceRegistryEntry_(new ACLASN, ACLSourceASNStrategy::Instance(), "src_as");
+ACLStrategised<struct IN_ADDR> ACLASN::SourceRegistryEntry_(new ACLASN, ACLSourceASNStrategy::Instance(), "src_as");
 
 ACL::Prototype ACLASN::DestinationRegistryProtoype(&ACLASN::DestinationRegistryEntry_, "dst_as");
 
-ACLStrategised<struct in_addr> ACLASN::DestinationRegistryEntry_(new ACLASN, ACLDestinationASNStrategy::Instance(), "dst_as");
+ACLStrategised<struct IN_ADDR> ACLASN::DestinationRegistryEntry_(new ACLASN, ACLDestinationASNStrategy::Instance(), "dst_as");
 
 int
 ACLSourceASNStrategy::match (ACLData<MatchType> * &data, ACLChecklist *checklist)
index 5b26c8c838f0fe96a8f56a4a162505edcbd816cd..8e230b8253c3b9e195ecf3aff4631b63f58c85be 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: auth_digest.cc,v 1.41 2004/12/24 01:03:39 hno Exp $
+ * $Id: auth_digest.cc,v 1.42 2005/04/18 21:52:43 hno Exp $
  *
  * DEBUG: section 29    Authenticator
  * AUTHOR: Robert Collins
@@ -639,7 +639,7 @@ AuthDigestUserRequest::authenticate(HttpRequest * request, ConnStateData::Pointe
             } else {
                 const char *useragent = httpHeaderGetStr(&request->header, HDR_USER_AGENT);
 
-                static struct in_addr last_broken_addr;
+                static struct IN_ADDR last_broken_addr;
                 static int seen_broken_client = 0;
 
                 if (!seen_broken_client) {
index 96b2c6d8971f7439cf691e258fbeaf4d9fda1092..1d10037738c0e848f303dd5600dadd61bd8e6665 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: cache_cf.cc,v 1.468 2005/03/18 17:12:34 hno Exp $
+ * $Id: cache_cf.cc,v 1.469 2005/04/18 21:52:42 hno Exp $
  *
  * DEBUG: section 3     Configuration File Parsing
  * AUTHOR: Harvest Derived
@@ -861,14 +861,14 @@ free_acl_access(acl_access ** head)
 
 static void
 
-dump_address(StoreEntry * entry, const char *name, struct in_addr addr)
+dump_address(StoreEntry * entry, const char *name, struct IN_ADDR addr)
 {
     storeAppendPrintf(entry, "%s %s\n", name, inet_ntoa(addr));
 }
 
 static void
 
-parse_address(struct in_addr *addr)
+parse_address(struct IN_ADDR *addr)
 {
 
     const struct hostent *hp;
@@ -887,10 +887,10 @@ parse_address(struct in_addr *addr)
 
 static void
 
-free_address(struct in_addr *addr)
+free_address(struct IN_ADDR *addr)
 {
 
-    memset(addr, '\0', sizeof(struct in_addr));
+    memset(addr, '\0', sizeof(struct IN_ADDR));
 }
 
 CBDATA_TYPE(acl_address);
index 8697dd4e70da642a5ab794a42b8b865976bc982c..7bb171623eb1641ca7f5bbeb53495cc70c465082 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: cachemgr.cc,v 1.107 2004/12/21 17:28:29 robertc Exp $
+ * $Id: cachemgr.cc,v 1.108 2005/04/18 21:52:42 hno Exp $
  *
  * DEBUG: section 0     CGI Cache Manager
  * AUTHOR: Duane Wessels
@@ -162,7 +162,7 @@ static const char *script_name = "/cgi-bin/cachemgr.cgi";
 static const char *progname = NULL;
 static time_t now;
 
-static struct in_addr no_addr;
+static struct IN_ADDR no_addr;
 
 /*
  * Function prototypes
index 5c96dd2b13424172ec0d56e2aab887cb591cced5..32314b247d310cc187f7ec630fd1cab587b22cbf 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: client_db.cc,v 1.62 2004/12/22 17:37:37 serassio Exp $
+ * $Id: client_db.cc,v 1.63 2005/04/18 21:52:42 hno Exp $
  *
  * DEBUG: section 0     Client Database
  * AUTHOR: Duane Wessels
@@ -39,7 +39,7 @@
 
 static hash_table *client_table = NULL;
 
-static ClientInfo *clientdbAdd(struct in_addr addr);
+static ClientInfo *clientdbAdd(struct IN_ADDR addr);
 static FREE clientdbFreeItem;
 static void clientdbStartGC(void);
 static void clientdbScheduledGC(void *);
@@ -53,7 +53,7 @@ static int cleanup_removed;
 
 static ClientInfo *
 
-clientdbAdd(struct in_addr addr)
+clientdbAdd(struct IN_ADDR addr)
 {
     ClientInfo *c;
     c = (ClientInfo *)memAllocate(MEM_CLIENT_INFO);
@@ -87,7 +87,7 @@ clientdbInit(void)
 
 void
 
-clientdbUpdate(struct in_addr addr, log_type ltype, protocol_t p, size_t size)
+clientdbUpdate(struct IN_ADDR addr, log_type ltype, protocol_t p, size_t size)
 {
     char *key;
     ClientInfo *c;
@@ -135,7 +135,7 @@ clientdbUpdate(struct in_addr addr, log_type ltype, protocol_t p, size_t size)
  */
 int
 
-clientdbEstablished(struct in_addr addr, int delta)
+clientdbEstablished(struct IN_ADDR addr, int delta)
 {
     char *key;
     ClientInfo *c;
@@ -161,7 +161,7 @@ clientdbEstablished(struct in_addr addr, int delta)
 #define CUTOFF_SECONDS 3600
 int
 
-clientdbCutoffDenied(struct in_addr addr)
+clientdbCutoffDenied(struct IN_ADDR addr)
 {
     char *key;
     int NR;
@@ -377,9 +377,9 @@ clientdbStartGC(void)
 
 #if SQUID_SNMP
 
-struct in_addr *
+struct IN_ADDR *
 
-            client_entry(struct in_addr *current)
+            client_entry(struct IN_ADDR *current)
 {
     ClientInfo *c = NULL;
     char *key;
index 775793dc9da8f5e9ae9be99e0406d2c96327b993..539b129f69a7d698bf4867b49404643dbb49fbdb 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: client_side.h,v 1.9 2003/08/14 12:15:04 robertc Exp $
+ * $Id: client_side.h,v 1.10 2005/04/18 21:52:42 hno Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -182,7 +182,7 @@ public:
 
     struct sockaddr_in me;
 
-    struct in_addr log_addr;
+    struct IN_ADDR log_addr;
     char rfc931[USER_IDENT_SZ];
     int nrequests;
 
index 2dd3ab47826a028a81efe6c29c924701015bd4ec..5e0c17d7edc204ae247e481123eb7ddc3fdbcb58 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: client_side_reply.cc,v 1.82 2005/03/09 20:43:38 serassio Exp $
+ * $Id: client_side_reply.cc,v 1.83 2005/04/18 21:52:42 hno Exp $
  *
  * DEBUG: section 88    Client-side Reply Routines
  * AUTHOR: Robert Collins (Originally Duane Wessels in client_side.c)
@@ -59,7 +59,7 @@ CBDATA_CLASS_INIT(clientReplyContext);
 extern "C" CSS clientReplyStatus;
 extern ErrorState *clientBuildError(err_type, http_status, char const *,
 
-                                        struct in_addr *, HttpRequest *);
+                                        struct IN_ADDR *, HttpRequest *);
 
 /* privates */
 
@@ -88,7 +88,7 @@ void
 clientReplyContext::setReplyToError(
     err_type err, http_status status, method_t method, char const *uri,
 
-    struct in_addr *addr, HttpRequest * failedrequest, char *unparsedrequest,
+    struct IN_ADDR *addr, HttpRequest * failedrequest, char *unparsedrequest,
     auth_user_request_t * auth_user_request)
 {
     ErrorState *errstate =
@@ -2167,7 +2167,7 @@ clientReplyContext::createStoreEntry(method_t m, request_flags flags)
 ErrorState *
 clientBuildError(err_type page_id, http_status status, char const *url,
 
-                 struct in_addr * src_addr, HttpRequest * request)
+                 struct IN_ADDR * src_addr, HttpRequest * request)
 {
     ErrorState *err = errorCon(page_id, status);
     err->src_addr = *src_addr;
index fcde7524e120454eaf33d1b081e9f891035f8bc6..93aab8eb80c1fd0c8ed0b59728a3ab5e7d1a801f 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: client_side_reply.h,v 1.6 2003/08/10 11:00:42 robertc Exp $
+ * $Id: client_side_reply.h,v 1.7 2005/04/18 21:52:42 hno Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -73,7 +73,7 @@ public:
     int storeOKTransferDone() const;
     int storeNotOKTransferDone() const;
 
-    void setReplyToError(err_type, http_status, method_t, char const *, struct in_addr *, HttpRequest *, char *, auth_user_request_t *);
+    void setReplyToError(err_type, http_status, method_t, char const *, struct IN_ADDR *, HttpRequest *, char *, auth_user_request_t *);
     void createStoreEntry(method_t m, request_flags flags);
     void removeStoreReference(store_client ** scp, StoreEntry ** ep);
     void removeClientStoreReference(store_client **scp, ClientHttpRequest *http);
index e40e453f5fc158b0d7626b53b60e501f006b70ce..488d916dcc886c906d5d827c230bbed01cebcd47 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: comm.cc,v 1.403 2005/04/06 19:01:01 serassio Exp $
+ * $Id: comm.cc,v 1.404 2005/04/18 21:52:42 hno Exp $
  *
  * DEBUG: section 5     Socket Functions
  * AUTHOR: Harvest Derived
@@ -66,7 +66,7 @@ public:
     struct sockaddr_in S;
     CallBack<CNCB> callback;
 
-    struct in_addr in_addr;
+    struct IN_ADDR in_addr;
     int fd;
     int tries;
     int addrcount;
@@ -78,7 +78,7 @@ private:
 
 /* STATIC */
 
-static comm_err_t commBind(int s, struct in_addr, u_short port);
+static comm_err_t commBind(int s, struct IN_ADDR, u_short port);
 static void commSetReuseAddr(int);
 static void commSetNoLinger(int);
 static void CommWriteStateCallbackAndFree(int fd, comm_err_t code);
@@ -1015,7 +1015,7 @@ comm_local_port(int fd)
 
 static comm_err_t
 
-commBind(int s, struct in_addr in_addr, u_short port)
+commBind(int s, struct IN_ADDR in_addr, u_short port)
 {
 
     struct sockaddr_in S;
@@ -1044,7 +1044,7 @@ int
 comm_open(int sock_type,
           int proto,
 
-          struct in_addr addr,
+          struct IN_ADDR addr,
           u_short port,
           int flags,
           const char *note)
@@ -1064,7 +1064,7 @@ int
 comm_openex(int sock_type,
             int proto,
 
-            struct in_addr addr,
+            struct IN_ADDR addr,
             u_short port,
             int flags,
             unsigned char TOS,
index 2d32f656b1b148747af52e55d56fa678625b611a..6a2fb9f2a6cf4de55dbb8eb063151b19c3f85ec6 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: delay_pools.cc,v 1.42 2003/08/04 22:14:42 robertc Exp $
+ * $Id: delay_pools.cc,v 1.43 2005/04/18 21:52:42 hno Exp $
  *
  * DEBUG: section 77    Delay Pools
  * AUTHOR: Robert Collins <robertc@squid-cache.org>
@@ -149,7 +149,7 @@ protected:
 
     virtual char const *label() const = 0;
 
-    virtual unsigned int const makeKey (struct in_addr &src_addr) const = 0;
+    virtual unsigned int const makeKey (struct IN_ADDR &src_addr) const = 0;
 
     DelaySpec spec;
 
@@ -179,7 +179,7 @@ public:
 protected:
     virtual char const *label() const {return "Individual";}
 
-    virtual unsigned int const makeKey (struct in_addr &src_addr) const;
+    virtual unsigned int const makeKey (struct IN_ADDR &src_addr) const;
 
 };
 
@@ -193,7 +193,7 @@ public:
 protected:
     virtual char const *label() const {return "Network";}
 
-    virtual unsigned int const makeKey (struct in_addr &src_addr) const;
+    virtual unsigned int const makeKey (struct IN_ADDR &src_addr) const;
 };
 
 /* don't use remote storage for these */
@@ -236,9 +236,9 @@ protected:
 
     virtual char const *label() const {return "Individual";}
 
-    virtual unsigned int const makeKey (struct in_addr &src_addr) const;
+    virtual unsigned int const makeKey (struct IN_ADDR &src_addr) const;
 
-    unsigned char const makeHostKey (struct in_addr &src_addr) const;
+    unsigned char const makeHostKey (struct IN_ADDR &src_addr) const;
 
     DelaySpec spec;
     VectorMap<unsigned char, ClassCBucket> buckets;
@@ -837,7 +837,7 @@ VectorPool::Id::bytesIn(int qty)
 
 unsigned int const
 
-IndividualPool::makeKey (struct in_addr &src_addr) const
+IndividualPool::makeKey (struct IN_ADDR &src_addr) const
 {
     unsigned int host;
     host = ntohl(src_addr.s_addr) & 0xff;
@@ -860,7 +860,7 @@ ClassCNetPool::operator delete (void *address)
 
 unsigned int const
 
-ClassCNetPool::makeKey (struct in_addr &src_addr) const
+ClassCNetPool::makeKey (struct IN_ADDR &src_addr) const
 {
     unsigned int net;
     net = (ntohl(src_addr.s_addr) >> 8) & 0xff;
@@ -930,7 +930,7 @@ ClassCHostPool::keyAllocated (unsigned char const key) const
 
 unsigned char const
 
-ClassCHostPool::makeHostKey (struct in_addr &src_addr) const
+ClassCHostPool::makeHostKey (struct IN_ADDR &src_addr) const
 {
     unsigned int host;
     host = ntohl(src_addr.s_addr) & 0xff;
@@ -939,7 +939,7 @@ ClassCHostPool::makeHostKey (struct in_addr &src_addr) const
 
 unsigned int const
 
-ClassCHostPool::makeKey (struct in_addr &src_addr) const
+ClassCHostPool::makeKey (struct IN_ADDR &src_addr) const
 {
     unsigned int net;
     net = (ntohl(src_addr.s_addr) >> 8) & 0xff;
index 2d5ac0b1151288e20490a7176bdc4e2f9ab1447d..3270bb5e12c7b3149965f18a8b440c22a6cbe204 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: dns_internal.cc,v 1.66 2004/12/20 16:30:35 robertc Exp $
+ * $Id: dns_internal.cc,v 1.67 2005/04/18 21:52:42 hno Exp $
  *
  * DEBUG: section 78    DNS lookups; interacts with lib/rfc1035.c
  * AUTHOR: Duane Wessels
@@ -122,7 +122,7 @@ static void
 idnsAddNameserver(const char *buf)
 {
 
-    struct in_addr A;
+    struct IN_ADDR A;
 
     if (!safe_inet_addr(buf, &A)) {
         debug(78, 0) ("WARNING: rejecting '%s' as a name server, because it is not a numeric IP address\n", buf);
@@ -795,7 +795,7 @@ idnsInit(void)
     if (DnsSocket < 0) {
         int port;
 
-        struct in_addr addr;
+        struct IN_ADDR addr;
 
         if (Config.Addrs.udp_outgoing.s_addr != no_addr.s_addr)
             addr = Config.Addrs.udp_outgoing;
@@ -933,7 +933,7 @@ idnsALookup(const char *name, IDNSCB * callback, void *data)
 
 void
 
-idnsPTRLookup(const struct in_addr addr, IDNSCB * callback, void *data)
+idnsPTRLookup(const struct IN_ADDR addr, IDNSCB * callback, void *data)
 {
     idns_query *q;
 
index 0adf260f26292f0fb53ac6bf27c4a1af11e5c0ba..cf1ebd4896d1f738958e443152d4fcb0f82a6d2d 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: dnsserver.cc,v 1.69 2004/12/21 17:28:29 robertc Exp $
+ * $Id: dnsserver.cc,v 1.70 2005/04/18 21:52:42 hno Exp $
  *
  * DEBUG: section 0     DNS Resolver
  * AUTHOR: Harvest Derived
@@ -160,7 +160,7 @@ struct hostent *_res_gethostbyname(char *name);
 #define gethostbyname _res_gethostbyname
 #endif /* _SQUID_NEXT_ */
 
-static struct in_addr no_addr;
+static struct IN_ADDR no_addr;
 
 #ifdef _SQUID_OS2_
 
@@ -198,7 +198,7 @@ lookup(const char *buf)
     int retry = 0;
     int i;
 
-    struct in_addr addr;
+    struct IN_ADDR addr;
 
     if (0 == strcmp(buf, "$shutdown"))
         exit(0);
index c666a4c0f68a71af6c813cf087e1f65ec6932d85..faaf8ee50c77f5cb30f878889f3fadadf621b6de 100644 (file)
--- a/src/fde.h
+++ b/src/fde.h
@@ -1,6 +1,6 @@
 
 /*
- * $Id: fde.h,v 1.7 2005/03/18 15:17:17 hno Exp $
+ * $Id: fde.h,v 1.8 2005/04/18 21:52:42 hno Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -50,7 +50,7 @@ public:
     u_short local_port;
     u_short remote_port;
 
-    struct in_addr local_addr;
+    struct IN_ADDR local_addr;
     unsigned char tos;
     char ipaddr[16];            /* dotted decimal address of peer */
     char desc[FD_DESC_SZ];
index 679204ad2f7815f1ef74bcdf9f9c0e2d03468106..a9ce3e55b4170c8e9ea5213e41802f2e0513d43d 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: forward.cc,v 1.126 2005/03/18 15:22:05 hno Exp $
+ * $Id: forward.cc,v 1.127 2005/04/18 21:52:42 hno Exp $
  *
  * DEBUG: section 17    Request Forwarding
  * AUTHOR: Duane Wessels
@@ -484,12 +484,12 @@ fwdConnectTimeout(int fd, void *data)
     comm_close(fd);
 }
 
-static struct in_addr
+static struct IN_ADDR
             aclMapAddr(acl_address * head, ACLChecklist * ch)
 {
     acl_address *l;
 
-    struct in_addr addr;
+    struct IN_ADDR addr;
 
     for (l = head; l; l = l->next)
     {
@@ -514,7 +514,7 @@ aclMapTOS(acl_tos * head, ACLChecklist * ch)
     return 0;
 }
 
-struct in_addr
+struct IN_ADDR
             getOutgoingAddr(HttpRequest * request)
 {
     ACLChecklist ch;
@@ -559,7 +559,7 @@ fwdConnectStart(void *data)
     int ctimeout;
     int ftimeout = Config.Timeout.forward - (squid_curtime - fwdState->start);
 
-    struct in_addr outgoing;
+    struct IN_ADDR outgoing;
     unsigned short tos;
     assert(fs);
     assert(fwdState->server_fd == -1);
index aa239a47b7c503dfd0c3184739293c2ee9f3f979..cc1f323cfdc4c098231dd7ff4c9f795ff1d3aae6 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: fqdncache.cc,v 1.163 2005/02/13 15:49:50 serassio Exp $
+ * $Id: fqdncache.cc,v 1.164 2005/04/18 21:52:42 hno Exp $
  *
  * DEBUG: section 35    FQDN Cache
  * AUTHOR: Harvest Derived
@@ -432,7 +432,7 @@ fqdncacheHandleReply(void *data, rfc1035_rr * answers, int na, const char *error
 
 void
 
-fqdncache_nbgethostbyaddr(struct in_addr addr, FQDNH * handler, void *handlerData)
+fqdncache_nbgethostbyaddr(struct IN_ADDR addr, FQDNH * handler, void *handlerData)
 {
     fqdncache_entry *f = NULL;
     char *name = inet_ntoa(addr);
@@ -531,12 +531,12 @@ fqdncache_init(void)
 
 const char *
 
-fqdncache_gethostbyaddr(struct in_addr addr, int flags)
+fqdncache_gethostbyaddr(struct IN_ADDR addr, int flags)
 {
     char *name = inet_ntoa(addr);
     fqdncache_entry *f = NULL;
 
-    struct in_addr ip;
+    struct IN_ADDR ip;
     assert(name);
     FqdncacheStats.requests++;
     f = fqdncache_get(name);
@@ -636,7 +636,7 @@ dummy_handler(const char *bufnotused, void *datanotused)
 
 const char *
 
-fqdnFromAddr(struct in_addr addr)
+fqdnFromAddr(struct IN_ADDR addr)
 {
     const char *n;
     static char buf[32];
index 006e131f4c4576037a22ae2bcb5c6abdbfa2c587..ddb0e7866ff2329dceac13b346f933080804057f 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: globals.h,v 1.129 2005/03/18 15:47:41 hno Exp $
+ * $Id: globals.h,v 1.130 2005/04/18 21:52:42 hno Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -103,15 +103,15 @@ extern iostats IOStats;
 
 extern struct _acl_deny_info_list *DenyInfoList;       /* NULL */
 
-extern struct in_addr any_addr;
+extern struct IN_ADDR any_addr;
 
-extern struct in_addr local_addr;
+extern struct IN_ADDR local_addr;
 
-extern struct in_addr no_addr;
+extern struct IN_ADDR no_addr;
 
-extern struct in_addr theOutICPAddr;
+extern struct IN_ADDR theOutICPAddr;
 
-extern struct in_addr theOutSNMPAddr;
+extern struct IN_ADDR theOutSNMPAddr;
 
 extern struct timeval current_time;
 
index 7377d1e0f58fff8a37855540c60819315005e845..abae766c41af22be58ee444a2cb2a0cb0068cdb3 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: icmp.cc,v 1.84 2003/06/12 23:54:17 wessels Exp $
+ * $Id: icmp.cc,v 1.85 2005/04/18 21:52:42 hno Exp $
  *
  * DEBUG: section 37    ICMP Routines
  * AUTHOR: Duane Wessels
@@ -54,7 +54,7 @@ static void icmpHandleSourcePing(const struct sockaddr_in *from, const char *buf
 
 static void
 
-icmpSendEcho(struct in_addr to, int opcode, const char *payload, int len)
+icmpSendEcho(struct IN_ADDR to, int opcode, const char *payload, int len)
 {
     static pingerEchoData pecho;
 
@@ -179,7 +179,7 @@ icmpHandleSourcePing(const struct sockaddr_in *from, const char *buf)
 #if ALLOW_SOURCE_PING
 void
 
-icmpSourcePing(struct in_addr to, const icp_common_t * header, const char *url)
+icmpSourcePing(struct IN_ADDR to, const icp_common_t * header, const char *url)
 {
 #if USE_ICMP
     char *payload;
@@ -211,7 +211,7 @@ icmpSourcePing(struct in_addr to, const icp_common_t * header, const char *url)
 
 void
 
-icmpDomainPing(struct in_addr to, const char *domain)
+icmpDomainPing(struct IN_ADDR to, const char *domain)
 {
 #if USE_ICMP
     debug(37, 3) ("icmpDomainPing: '%s'\n", domain);
index b69255e7042d9ea81bb3288fa8ce0eb58f1b93b5..f6d2eb5b70e66d776ea853e3b6d59f8fb3e8ca9a 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: icp_v2.cc,v 1.84 2003/09/21 00:30:47 robertc Exp $
+ * $Id: icp_v2.cc,v 1.85 2005/04/18 21:52:42 hno Exp $
  *
  * DEBUG: section 12    Internet Cache Protocol
  * AUTHOR: Duane Wessels
@@ -42,7 +42,7 @@
 #include "ACL.h"
 #include "AccessLogEntry.h"
 
-static void icpLogIcp(struct in_addr, log_type, int, const char *, int);
+static void icpLogIcp(struct IN_ADDR, log_type, int, const char *, int);
 
 static void icpHandleIcpV2(int, struct sockaddr_in, char *, int);
 static void icpCount(void *, int, size_t, int);
@@ -155,7 +155,7 @@ ICP2State::created (StoreEntry *newEntry)
 
 static void
 
-icpLogIcp(struct in_addr caddr, log_type logcode, int len, const char *url, int delay)
+icpLogIcp(struct IN_ADDR caddr, log_type logcode, int len, const char *url, int delay)
 {
     AccessLogEntry al;
 
@@ -566,7 +566,7 @@ static void
 icpPktDump(icp_common_t * pkt)
 {
 
-    struct in_addr a;
+    struct IN_ADDR a;
 
     debug(12, 9) ("opcode:     %3d %s\n",
                   (int) pkt->opcode,
@@ -663,7 +663,7 @@ icpConnectionsOpen(void)
 {
     u_int16_t port;
 
-    struct in_addr addr;
+    struct IN_ADDR addr;
 
     struct sockaddr_in xaddr;
     int x;
@@ -729,7 +729,7 @@ icpConnectionsOpen(void)
         theOutIcpConnection = theInIcpConnection;
     }
 
-    memset(&theOutICPAddr, '\0', sizeof(struct in_addr));
+    memset(&theOutICPAddr, '\0', sizeof(struct IN_ADDR));
 
     len = sizeof(struct sockaddr_in);
     memset(&xaddr, '\0', len);
index 7ac28dd8bfe6186665ac322669292189325c8627..a53c84ccb6419981d78d7f954f9f497e4e8ff6bb 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ipcache.cc,v 1.250 2005/02/13 15:49:50 serassio Exp $
+ * $Id: ipcache.cc,v 1.251 2005/04/18 21:52:42 hno Exp $
  *
  * DEBUG: section 14    IP Cache
  * AUTHOR: Harvest Derived
@@ -333,7 +333,7 @@ ipcacheParse(ipcache_entry *i, const char *inbuf)
     if (ipcount > 0) {
         int j, k;
 
-        i->addrs.in_addrs = (struct in_addr *)xcalloc(ipcount, sizeof(struct in_addr));
+        i->addrs.in_addrs = (struct IN_ADDR *)xcalloc(ipcount, sizeof(struct IN_ADDR));
         i->addrs.bad_mask = (unsigned char *)xcalloc(ipcount, sizeof(unsigned char));
 
         for (j = 0, k = 0; k < ipcount; k++) {
@@ -416,7 +416,7 @@ ipcacheParse(ipcache_entry *i, rfc1035_rr * answers, int nr, const char *error_m
         return 0;
     }
 
-    i->addrs.in_addrs = (struct in_addr *)xcalloc(na, sizeof(struct in_addr));
+    i->addrs.in_addrs = (struct IN_ADDR *)xcalloc(na, sizeof(struct IN_ADDR));
     i->addrs.bad_mask = (unsigned char *)xcalloc(na, sizeof(unsigned char));
 
     for (j = 0, k = 0; k < nr; k++) {
@@ -571,7 +571,7 @@ ipcache_init(void)
 
     memset(&static_addrs, '\0', sizeof(ipcache_addrs));
 
-    static_addrs.in_addrs = (struct in_addr *)xcalloc(1, sizeof(struct in_addr));
+    static_addrs.in_addrs = (struct IN_ADDR *)xcalloc(1, sizeof(struct IN_ADDR));
     static_addrs.bad_mask = (unsigned char *)xcalloc(1, sizeof(unsigned char));
     ipcache_high = (long) (((float) Config.ipcache.size *
                             (float) Config.ipcache.high) / (float) 100);
@@ -718,7 +718,7 @@ ipcache_addrs *
 ipcacheCheckNumeric(const char *name)
 {
 
-    struct in_addr ip;
+    struct IN_ADDR ip;
     /* check if it's already a IP address in text form. */
 
     if (!safe_inet_addr(name, &ip))
@@ -804,7 +804,7 @@ ipcacheCycleAddr(const char *name, ipcache_addrs * ia)
  */
 void
 
-ipcacheMarkBadAddr(const char *name, struct in_addr addr)
+ipcacheMarkBadAddr(const char *name, struct IN_ADDR addr)
 {
     ipcache_entry *i;
     ipcache_addrs *ia;
@@ -837,7 +837,7 @@ ipcacheMarkBadAddr(const char *name, struct in_addr addr)
 
 void
 
-ipcacheMarkGoodAddr(const char *name, struct in_addr addr)
+ipcacheMarkGoodAddr(const char *name, struct IN_ADDR addr)
 {
     ipcache_entry *i;
     ipcache_addrs *ia;
@@ -906,7 +906,7 @@ ipcacheAddEntryFromHosts(const char *name, const char *ipaddr)
 {
     ipcache_entry *i;
 
-    struct in_addr ip;
+    struct IN_ADDR ip;
 
     if (!safe_inet_addr(ipaddr, &ip)) {
         if (strchr(ipaddr, ':') && strspn(ipaddr, "0123456789abcdefABCDEF:") == strlen(ipaddr)) {
@@ -936,7 +936,7 @@ ipcacheAddEntryFromHosts(const char *name, const char *ipaddr)
     i->addrs.cur = 0;
     i->addrs.badcount = 0;
 
-    i->addrs.in_addrs = (struct in_addr *)xcalloc(1, sizeof(struct in_addr));
+    i->addrs.in_addrs = (struct IN_ADDR *)xcalloc(1, sizeof(struct IN_ADDR));
     i->addrs.bad_mask = (unsigned char *)xcalloc(1, sizeof(unsigned char));
     i->addrs.in_addrs[0].s_addr = ip.s_addr;
     i->addrs.bad_mask[0] = FALSE;
index 56c303f63f0081086b2ec4af7cfe68d1d3e85764..0a27228f0600f2766bd1e3f006bc85a0178ac95d 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: main.cc,v 1.407 2005/04/06 18:44:25 serassio Exp $
+ * $Id: main.cc,v 1.408 2005/04/18 21:52:42 hno Exp $
  *
  * DEBUG: section 1     Startup and Main Loop
  * AUTHOR: Harvest Derived
@@ -931,15 +931,15 @@ main(int argc, char **argv)
     if (oldmask)
         umask(oldmask);
 
-    memset(&local_addr, '\0', sizeof(struct in_addr));
+    memset(&local_addr, '\0', sizeof(struct IN_ADDR));
 
     safe_inet_addr(localhost, &local_addr);
 
-    memset(&any_addr, '\0', sizeof(struct in_addr));
+    memset(&any_addr, '\0', sizeof(struct IN_ADDR));
 
     safe_inet_addr("0.0.0.0", &any_addr);
 
-    memset(&no_addr, '\0', sizeof(struct in_addr));
+    memset(&no_addr, '\0', sizeof(struct IN_ADDR));
 
     safe_inet_addr("255.255.255.255", &no_addr);
 
index b0283a3d001db4b78ba172c73d4ed4e201acab1a..9dbaad15aa7dc3e089e34c425773aea54493af9e 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: neighbors.cc,v 1.329 2005/03/10 20:22:46 serassio Exp $
+ * $Id: neighbors.cc,v 1.330 2005/04/18 21:52:42 hno Exp $
  *
  * DEBUG: section 15    Neighbor Routines
  * AUTHOR: Harvest Derived
@@ -96,7 +96,7 @@ whichPeer(const struct sockaddr_in * from)
     int j;
     u_short port = ntohs(from->sin_port);
 
-    struct in_addr ip = from->sin_addr;
+    struct IN_ADDR ip = from->sin_addr;
     peer *p = NULL;
     debug(15, 3) ("whichPeer: from %s port %d\n", inet_ntoa(ip), port);
 
index c916224d1dc24f3146542ef68435bceb75a4417f..cfebca674559a2e61435d8fd2bc7dd806a4c4bcd 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: net_db.cc,v 1.175 2005/01/05 21:59:34 serassio Exp $
+ * $Id: net_db.cc,v 1.176 2005/04/18 21:52:42 hno Exp $
  *
  * DEBUG: section 38    Network Measurement Database
  * AUTHOR: Duane Wessels
@@ -79,10 +79,10 @@ netdbExchangeState;
 static hash_table *addr_table = NULL;
 static hash_table *host_table = NULL;
 
-static struct in_addr networkFromInaddr(struct in_addr a);
+static struct IN_ADDR networkFromInaddr(struct IN_ADDR a);
 static void netdbRelease(netdbEntry * n);
 
-static void netdbHashInsert(netdbEntry * n, struct in_addr addr);
+static void netdbHashInsert(netdbEntry * n, struct IN_ADDR addr);
 static void netdbHashDelete(const char *key);
 static void netdbHostInsert(netdbEntry * n, const char *hostname);
 static void netdbHostDelete(const net_db_name * x);
@@ -108,7 +108,7 @@ static wordlist *peer_names = NULL;
 
 static void
 
-netdbHashInsert(netdbEntry * n, struct in_addr addr)
+netdbHashInsert(netdbEntry * n, struct IN_ADDR addr)
 {
     xstrncpy(n->network, inet_ntoa(networkFromInaddr(addr)), 16);
     n->hash.key = n->network;
@@ -245,7 +245,7 @@ netdbPurgeLRU(void)
 
 static netdbEntry *
 
-netdbLookupAddr(struct in_addr addr)
+netdbLookupAddr(struct IN_ADDR addr)
 {
     netdbEntry *n;
     char *key = inet_ntoa(networkFromInaddr(addr));
@@ -255,7 +255,7 @@ netdbLookupAddr(struct in_addr addr)
 
 static netdbEntry *
 
-netdbAdd(struct in_addr addr)
+netdbAdd(struct IN_ADDR addr)
 {
     netdbEntry *n;
 
@@ -275,7 +275,7 @@ static void
 netdbSendPing(const ipcache_addrs * ia, void *data)
 {
 
-    struct in_addr addr;
+    struct IN_ADDR addr;
     char *hostname = (char *)((generic_cbdata *) data)->data;
     netdbEntry *n;
     netdbEntry *na;
@@ -341,12 +341,12 @@ netdbSendPing(const ipcache_addrs * ia, void *data)
     xfree(hostname);
 }
 
-static struct in_addr
+static struct IN_ADDR
 
-            networkFromInaddr(struct in_addr a)
+            networkFromInaddr(struct IN_ADDR a)
 {
 
-    struct in_addr b;
+    struct IN_ADDR b;
     b.s_addr = ntohl(a.s_addr);
 #if USE_CLASSFUL
 
@@ -529,7 +529,7 @@ netdbReloadState(void)
     netdbEntry *n;
     netdbEntry N;
 
-    struct in_addr addr;
+    struct IN_ADDR addr;
     int count = 0;
 
     struct timeval start = current_time;
@@ -674,7 +674,7 @@ netdbExchangeHandleReply(void *data, StoreIOBuffer recievedData)
     int rec_sz = 0;
     off_t o;
 
-    struct in_addr addr;
+    struct IN_ADDR addr;
     double rtt;
     double hops;
     char *p;
@@ -974,7 +974,7 @@ netdbFreeMemory(void)
 
 int
 
-netdbHops(struct in_addr addr)
+netdbHops(struct IN_ADDR addr)
 {
 #if USE_ICMP
     netdbEntry *n = netdbLookupAddr(addr);
@@ -1143,7 +1143,7 @@ netdbUpdatePeer(HttpRequest * r, peer * e, int irtt, int ihops)
 
 void
 
-netdbExchangeUpdatePeer(struct in_addr addr, peer * e, double rtt, double hops)
+netdbExchangeUpdatePeer(struct IN_ADDR addr, peer * e, double rtt, double hops)
 {
 #if USE_ICMP
     netdbEntry *n;
@@ -1179,7 +1179,7 @@ netdbExchangeUpdatePeer(struct in_addr addr, peer * e, double rtt, double hops)
 
 void
 
-netdbDeleteAddrNetwork(struct in_addr addr)
+netdbDeleteAddrNetwork(struct IN_ADDR addr)
 {
 #if USE_ICMP
     netdbEntry *n = netdbLookupAddr(addr);
@@ -1206,7 +1206,7 @@ netdbBinaryExchange(StoreEntry * s)
     int rec_sz;
     char *buf;
 
-    struct in_addr addr;
+    struct IN_ADDR addr;
     storeBuffer(s);
     HttpVersion version(1, 0);
     httpReplySetHeaders(reply, version, HTTP_OK, "OK",
index efdb665e6e43d7be825f0f65d4d162e97ac6dea7..318094289015ae95b83564bd725cb5ba75ba4fee 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: pinger.cc,v 1.53 2004/04/03 14:38:36 hno Exp $
+ * $Id: pinger.cc,v 1.54 2005/04/18 21:52:42 hno Exp $
  *
  * DEBUG: section 42    ICMP Pinger program
  * AUTHOR: Duane Wessels
@@ -200,7 +200,7 @@ static const char *icmpPktStr[] =
 static int in_cksum(unsigned short *ptr, int size);
 static void pingerRecv(void);
 
-static void pingerLog(struct icmphdr *, struct in_addr, int, int);
+static void pingerLog(struct icmphdr *, struct IN_ADDR, int, int);
 static int ipHops(int ttl);
 static void pingerSendtoSquid(pingerReplyData * preply);
 static void pingerOpen(void);
@@ -324,7 +324,7 @@ pingerClose(void)
 
 static void
 
-pingerSendEcho(struct in_addr to, int opcode, char *payload, int len)
+pingerSendEcho(struct IN_ADDR to, int opcode, char *payload, int len)
 {
     LOCAL_ARRAY(char, pkt, MAX_PKT_SZ);
 
@@ -502,7 +502,7 @@ in_cksum(unsigned short *ptr, int size)
 
 static void
 
-pingerLog(struct icmphdr *icmp, struct in_addr addr, int rtt, int hops)
+pingerLog(struct icmphdr *icmp, struct IN_ADDR addr, int rtt, int hops)
 {
     debug(42, 2) ("pingerLog: %9d.%06d %-16s %d %-15.15s %dms %d hops\n",
                   (int) current_time.tv_sec,
index 6d8552834fc9f0404194505d29a8d86828119e96..8d54ca82c4499b7167a664d1026700926b9ee3be 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: protos.h,v 1.504 2005/04/06 18:44:25 serassio Exp $
+ * $Id: protos.h,v 1.505 2005/04/18 21:52:43 hno Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -96,13 +96,13 @@ SQUIDCEXTERN cbdata_type cbdataInternalAddType(cbdata_type type, const char *lab
 
 SQUIDCEXTERN void clientdbInit(void);
 
-SQUIDCEXTERN void clientdbUpdate(struct in_addr, log_type, protocol_t, size_t);
+SQUIDCEXTERN void clientdbUpdate(struct IN_ADDR, log_type, protocol_t, size_t);
 
-SQUIDCEXTERN int clientdbCutoffDenied(struct in_addr);
+SQUIDCEXTERN int clientdbCutoffDenied(struct IN_ADDR);
 SQUIDCEXTERN void clientdbDump(StoreEntry *);
 SQUIDCEXTERN void clientdbFreeMemory(void);
 
-SQUIDCEXTERN int clientdbEstablished(struct in_addr, int);
+SQUIDCEXTERN int clientdbEstablished(struct IN_ADDR, int);
 SQUIDCEXTERN void clientOpenListenSockets(void);
 SQUIDCEXTERN void clientHttpConnectionsClose(void);
 SQUIDCEXTERN void clientReadBody(HttpRequest * req, char *buf, size_t size, CBCB * callback, void *data);
@@ -130,9 +130,9 @@ SQUIDCEXTERN void commConnectStart(int fd, const char *, u_short, CNCB *, void *
 SQUIDCEXTERN int comm_connect_addr(int sock, const struct sockaddr_in *);
 SQUIDCEXTERN void comm_init(void);
 
-SQUIDCEXTERN int comm_open(int, int, struct in_addr, u_short port, int, const char *note);
+SQUIDCEXTERN int comm_open(int, int, struct IN_ADDR, u_short port, int, const char *note);
 
-SQUIDCEXTERN int comm_openex(int, int, struct in_addr, u_short, int, unsigned char TOS, const char *);
+SQUIDCEXTERN int comm_openex(int, int, struct IN_ADDR, u_short, int, unsigned char TOS, const char *);
 SQUIDCEXTERN u_short comm_local_port(int fd);
 
 SQUIDCEXTERN void commSetSelect(int, unsigned int, PF *, void *, time_t);
@@ -229,7 +229,7 @@ SQUIDCEXTERN void idnsInit(void);
 SQUIDCEXTERN void idnsShutdown(void);
 SQUIDCEXTERN void idnsALookup(const char *, IDNSCB *, void *);
 
-SQUIDCEXTERN void idnsPTRLookup(const struct in_addr, IDNSCB *, void *);
+SQUIDCEXTERN void idnsPTRLookup(const struct IN_ADDR, IDNSCB *, void *);
 
 extern void eventAdd(const char *name, EVH * func, void *arg, double when, int, bool cbdata=true);
 SQUIDCEXTERN void eventAddIsh(const char *name, EVH * func, void *arg, double delta_ish, int);
@@ -258,14 +258,14 @@ SQUIDCEXTERN void file_map_bit_reset(fileMap *, int);
 SQUIDCEXTERN void filemapFreeMemory(fileMap *);
 
 
-SQUIDCEXTERN void fqdncache_nbgethostbyaddr(struct in_addr, FQDNH *, void *);
+SQUIDCEXTERN void fqdncache_nbgethostbyaddr(struct IN_ADDR, FQDNH *, void *);
 
-SQUIDCEXTERN const char *fqdncache_gethostbyaddr(struct in_addr, int flags);
+SQUIDCEXTERN const char *fqdncache_gethostbyaddr(struct IN_ADDR, int flags);
 SQUIDCEXTERN void fqdncache_init(void);
 SQUIDCEXTERN void fqdnStats(StoreEntry *);
 SQUIDCEXTERN void fqdncacheReleaseInvalid(const char *);
 
-SQUIDCEXTERN const char *fqdnFromAddr(struct in_addr);
+SQUIDCEXTERN const char *fqdnFromAddr(struct IN_ADDR);
 SQUIDCEXTERN int fqdncacheQueueDrain(void);
 SQUIDCEXTERN void fqdncacheFreeMemory(void);
 SQUIDCEXTERN void fqdncache_restart(void);
@@ -438,9 +438,9 @@ SQUIDCEXTERN int httpMsgIsolateHeaders(const char **parse_start, const char **bl
 SQUIDCEXTERN void icmpOpen(void);
 SQUIDCEXTERN void icmpClose(void);
 
-SQUIDCEXTERN void icmpSourcePing(struct in_addr to, const icp_common_t *, const char *url);
+SQUIDCEXTERN void icmpSourcePing(struct IN_ADDR to, const icp_common_t *, const char *url);
 
-SQUIDCEXTERN void icmpDomainPing(struct in_addr to, const char *domain);
+SQUIDCEXTERN void icmpDomainPing(struct IN_ADDR to, const char *domain);
 
 #ifdef SQUID_SNMP
 SQUIDCEXTERN PF snmpHandleUdp;
@@ -450,11 +450,11 @@ SQUIDCEXTERN void snmpConnectionShutdown(void);
 SQUIDCEXTERN void snmpConnectionClose(void);
 SQUIDCEXTERN void snmpDebugOid(int lvl, oid * Name, snint Len);
 
-SQUIDCEXTERN void addr2oid(struct in_addr addr, oid * Dest);
+SQUIDCEXTERN void addr2oid(struct IN_ADDR addr, oid * Dest);
 
-SQUIDCEXTERN struct in_addr *oid2addr(oid * id);
+SQUIDCEXTERN struct IN_ADDR *oid2addr(oid * id);
 
-SQUIDCEXTERN struct in_addr *client_entry(struct in_addr *current);
+SQUIDCEXTERN struct IN_ADDR *client_entry(struct IN_ADDR *current);
 SQUIDCEXTERN variable_list *snmp_basicFn(variable_list *, snint *);
 SQUIDCEXTERN variable_list *snmp_confFn(variable_list *, snint *);
 SQUIDCEXTERN variable_list *snmp_sysFn(variable_list *, snint *);
@@ -490,9 +490,9 @@ SQUIDCEXTERN void ipcache_init(void);
 SQUIDCEXTERN void stat_ipcache_get(StoreEntry *);
 SQUIDCEXTERN void ipcacheCycleAddr(const char *name, ipcache_addrs *);
 
-SQUIDCEXTERN void ipcacheMarkBadAddr(const char *name, struct in_addr);
+SQUIDCEXTERN void ipcacheMarkBadAddr(const char *name, struct IN_ADDR);
 
-SQUIDCEXTERN void ipcacheMarkGoodAddr(const char *name, struct in_addr);
+SQUIDCEXTERN void ipcacheMarkGoodAddr(const char *name, struct IN_ADDR);
 SQUIDCEXTERN void ipcacheFreeMemory(void);
 SQUIDCEXTERN ipcache_addrs *ipcacheCheckNumeric(const char *name);
 SQUIDCEXTERN void ipcache_restart(void);
@@ -564,17 +564,17 @@ SQUIDCEXTERN void netdbHandlePingReply(const struct sockaddr_in *from, int hops,
 SQUIDCEXTERN void netdbPingSite(const char *hostname);
 SQUIDCEXTERN void netdbDump(StoreEntry *);
 
-SQUIDCEXTERN int netdbHops(struct in_addr);
+SQUIDCEXTERN int netdbHops(struct IN_ADDR);
 SQUIDCEXTERN void netdbFreeMemory(void);
 SQUIDCEXTERN int netdbHostHops(const char *host);
 SQUIDCEXTERN int netdbHostRtt(const char *host);
 SQUIDCEXTERN void netdbUpdatePeer(HttpRequest *, peer * e, int rtt, int hops);
 
-SQUIDCEXTERN void netdbDeleteAddrNetwork(struct in_addr addr);
+SQUIDCEXTERN void netdbDeleteAddrNetwork(struct IN_ADDR addr);
 SQUIDCEXTERN void netdbBinaryExchange(StoreEntry *);
 SQUIDCEXTERN EVH netdbExchangeStart;
 
-SQUIDCEXTERN void netdbExchangeUpdatePeer(struct in_addr, peer *, double, double);
+SQUIDCEXTERN void netdbExchangeUpdatePeer(struct IN_ADDR, peer *, double, double);
 SQUIDCEXTERN peer *netdbClosestParent(HttpRequest *);
 SQUIDCEXTERN void netdbHostData(const char *host, int *samp, int *rtt, int *hops);
 
@@ -605,7 +605,7 @@ SQUIDCEXTERN void fwdLogRotate(void);
 SQUIDCEXTERN void fwdStatus(FwdState *, http_status);
 #endif
 
-SQUIDCEXTERN struct in_addr getOutgoingAddr(HttpRequest * request);
+SQUIDCEXTERN struct IN_ADDR getOutgoingAddr(HttpRequest * request);
 unsigned long getOutgoingTOS(HttpRequest * request);
 
 SQUIDCEXTERN void urnStart(HttpRequest *, StoreEntry *);
@@ -794,7 +794,7 @@ SQUIDCEXTERN double dpercent(double, double);
 SQUIDCEXTERN void squid_signal(int sig, SIGHDLR *, int flags);
 SQUIDCEXTERN pid_t readPidFile(void);
 
-SQUIDCEXTERN struct in_addr inaddrFromHostent(const struct hostent *hp);
+SQUIDCEXTERN struct IN_ADDR inaddrFromHostent(const struct hostent *hp);
 SQUIDCEXTERN int intAverage(int, int, int, int);
 SQUIDCEXTERN double doubleAverage(double, double, int, int);
 SQUIDCEXTERN void debug_trap(const char *);
index b16e75bddfeaef67072f3fa90af34f2c8790e6ca..e5c431ab96ff9eb7690153003e12de4eac83d84a 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: redirect.cc,v 1.109 2004/12/20 16:30:36 robertc Exp $
+ * $Id: redirect.cc,v 1.110 2005/04/18 21:52:43 hno Exp $
  *
  * DEBUG: section 61    Redirector
  * AUTHOR: Duane Wessels
@@ -46,7 +46,7 @@ typedef struct
     void *data;
     char *orig_url;
 
-    struct in_addr client_addr;
+    struct IN_ADDR client_addr;
     const char *client_ident;
     const char *method_s;
     RH *handler;
index 16ba1e31fc89ffe0b7de77cf5c58117de4ee0cd6..96b66be7083b94b82ba4a3fa9cf1445a34c242e4 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: snmp_agent.cc,v 1.90 2005/01/03 16:08:26 robertc Exp $
+ * $Id: snmp_agent.cc,v 1.91 2005/04/18 21:52:43 hno Exp $
  *
  * DEBUG: section 49     SNMP Interface
  * AUTHOR: Kostas Anagnostakis
@@ -175,7 +175,7 @@ snmp_meshPtblFn(variable_list * Var, snint * ErrP)
 {
     variable_list *Answer = NULL;
 
-    struct in_addr *laddr;
+    struct IN_ADDR *laddr;
     char *cp = NULL;
     peer *p = NULL;
     int cnt = 0;
index b50f5d3a88c41f120cb7288f0c64333288a28d67..7944c9f6c018dd850c8f17984e5f9e5c6dc40b51 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: snmp_core.cc,v 1.65 2003/09/21 00:30:47 robertc Exp $
+ * $Id: snmp_core.cc,v 1.66 2005/04/18 21:52:43 hno Exp $
  *
  * DEBUG: section 49    SNMP support
  * AUTHOR: Glenn Chisholm
@@ -406,7 +406,7 @@ snmpConnectionOpen(void)
             theOutSnmpConnection = theInSnmpConnection;
         }
 
-        memset(&theOutSNMPAddr, '\0', sizeof(struct in_addr));
+        memset(&theOutSNMPAddr, '\0', sizeof(struct IN_ADDR));
 
         len = sizeof(struct sockaddr_in);
         memset(&xaddr, '\0', len);
@@ -854,7 +854,7 @@ peer_Inst(oid * name, snint * len, mib_tree_entry * current, oid_ParseFn ** Fn)
     u_char *cp = NULL;
     peer *peers = Config.peers;
 
-    struct in_addr *laddr = NULL;
+    struct IN_ADDR *laddr = NULL;
     char *host_addr = NULL, *current_addr = NULL, *last_addr = NULL;
 
     if (peers == NULL) {
@@ -919,7 +919,7 @@ client_Inst(oid * name, snint * len, mib_tree_entry * current, oid_ParseFn ** Fn
     oid *instance = NULL;
     u_char *cp = NULL;
 
-    struct in_addr *laddr = NULL;
+    struct IN_ADDR *laddr = NULL;
 
     if (*len <= current->len) {
         instance = (oid *)xmalloc(sizeof(name) * (*len + 4));
@@ -1142,7 +1142,7 @@ snmpSnmplibDebug(int lvl, char *buf)
 
 void
 
-addr2oid(struct in_addr addr, oid * Dest)
+addr2oid(struct IN_ADDR addr, oid * Dest)
 {
     u_char *cp;
     cp = (u_char *) & (addr.s_addr);
@@ -1152,12 +1152,12 @@ addr2oid(struct in_addr addr, oid * Dest)
     Dest[3] = *cp++;
 }
 
-struct in_addr
+struct IN_ADDR
             *
             oid2addr(oid * id)
 {
 
-    static struct in_addr laddr;
+    static struct IN_ADDR laddr;
     u_char *cp = (u_char *) & (laddr.s_addr);
     cp[0] = id[0];
     cp[1] = id[1];
index 86b21132e15aec9b83fdd0c30ff6b1f85098690e..be50d8cf242e8a88eeac8502f95aa003f34a3391 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: structs.h,v 1.515 2005/04/03 18:53:24 serassio Exp $
+ * $Id: structs.h,v 1.516 2005/04/18 21:52:43 hno Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -118,7 +118,7 @@ struct _acl_address
     acl_address *next;
     acl_list *aclList;
 
-    struct in_addr addr;
+    struct IN_ADDR addr;
 };
 
 struct _acl_tos
@@ -341,11 +341,11 @@ struct _SquidConfig
     struct
     {
 
-        struct in_addr router;
+        struct IN_ADDR router;
 
-        struct in_addr incoming;
+        struct IN_ADDR incoming;
 
-        struct in_addr outgoing;
+        struct IN_ADDR outgoing;
         int version;
     }
 
@@ -453,17 +453,17 @@ struct _SquidConfig
     struct
     {
 
-        struct in_addr udp_incoming;
+        struct IN_ADDR udp_incoming;
 
-        struct in_addr udp_outgoing;
+        struct IN_ADDR udp_outgoing;
 #if SQUID_SNMP
 
-        struct in_addr snmp_incoming;
+        struct IN_ADDR snmp_incoming;
 
-        struct in_addr snmp_outgoing;
+        struct IN_ADDR snmp_outgoing;
 #endif
 
-        struct in_addr client_netmask;
+        struct IN_ADDR client_netmask;
     }
 
     Addrs;
@@ -682,7 +682,7 @@ struct _SquidConfig
     struct
     {
 
-        struct in_addr addr;
+        struct IN_ADDR addr;
         int ttl;
         unsigned short port;
         char *encode_key;
@@ -984,7 +984,7 @@ unsigned int request_sent:
 struct _ipcache_addrs
 {
 
-    struct in_addr *in_addrs;
+    struct IN_ADDR *in_addrs;
     unsigned char *bad_mask;
     unsigned char count;
     unsigned char cur;
@@ -1272,7 +1272,7 @@ unsigned int counting:
 
     int tcp_up;                        /* 0 if a connect() fails */
 
-    struct in_addr addresses[10];
+    struct IN_ADDR addresses[10];
     int n_addresses;
     int rr_count;
     int rr_lastcount;
@@ -1352,7 +1352,7 @@ struct _netdbEntry
 struct _pingerEchoData
 {
 
-    struct in_addr to;
+    struct IN_ADDR to;
     unsigned char opcode;
     int psize;
     char payload[PINGER_PAYLOAD_SZ];
@@ -1361,7 +1361,7 @@ struct _pingerEchoData
 struct _pingerReplyData
 {
 
-    struct in_addr from;
+    struct IN_ADDR from;
     unsigned char opcode;
     int rtt;
     int hops;
@@ -1595,7 +1595,7 @@ struct _ErrorState
     char *dnsserver_msg;
     time_t ttl;
 
-    struct in_addr src_addr;
+    struct IN_ADDR src_addr;
     char *redirect_url;
     ERCB *callback;
     void *callback_data;
@@ -1841,7 +1841,7 @@ struct _ClientInfo
 {
     hash_link hash;            /* must be first */
 
-    struct in_addr addr;
+    struct IN_ADDR addr;
 
     struct
     {
index 3c550c3c4a7304986ab1262d2cb3c0c3d78fef6e..cbab3aabbc0a4f9ac86e7581c0d4cde5cf6bd6af 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: tools.cc,v 1.253 2005/03/18 15:47:42 hno Exp $
+ * $Id: tools.cc,v 1.254 2005/04/18 21:52:43 hno Exp $
  *
  * DEBUG: section 21    Misc Functions
  * AUTHOR: Harvest Derived
@@ -556,7 +556,7 @@ getMyHostname(void)
 
     const struct hostent *h = NULL;
 
-    struct in_addr sa;
+    struct IN_ADDR sa;
 
     if (Config.visibleHostname != NULL)
         return Config.visibleHostname;
@@ -929,12 +929,12 @@ squid_signal(int sig, SIGHDLR * func, int flags)
 #endif
 }
 
-struct in_addr
+struct IN_ADDR
 
             inaddrFromHostent(const struct hostent *hp)
 {
 
-    struct in_addr s;
+    struct IN_ADDR s;
     xmemcpy(&s.s_addr, hp->h_addr, sizeof(s.s_addr));
     return s;
 }
index 4bf564a81085c2adfe966921357d129bda8f8cce..1f69e6fa363a22c94fc90b69601c60d33170f4be 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: wccp.cc,v 1.38 2005/02/05 21:50:42 serassio Exp $
+ * $Id: wccp.cc,v 1.39 2005/04/18 21:52:43 hno Exp $
  *
  * DEBUG: section 80    WCCP Support
  * AUTHOR: Glenn Chisholm
@@ -61,7 +61,7 @@ struct wccp_here_i_am_t
 struct wccp_cache_entry_t
 {
 
-    struct in_addr ip_addr;
+    struct IN_ADDR ip_addr;
     int revision;
     char hash[WCCP_HASH_SIZE];
     int reserved;
@@ -96,7 +96,7 @@ static int last_id;
 static int last_assign_buckets_change;
 static unsigned int number_caches;
 
-static struct in_addr local_ip;
+static struct IN_ADDR local_ip;
 
 static PF wccpHandleUdp;
 static int wccpLowestIP(void);