---------------------
PatchSet 4240 
Date: 2002/06/14 07:09:47
Author: visolve
Branch: visolve_wccpv2-s2_5
Tag: (none) 
Log:
visolve_wccpv2 for squid-2.5

Members: 
	acconfig.h:1.13.2.2->1.13.2.2.4.1 
	configure.in:1.42.2.14->1.42.2.14.2.1 
	src/Makefile.am:1.13.2.3->1.13.2.3.4.1 
	src/cf.data.pre:1.49.2.10->1.49.2.10.4.1 
	src/cf_gen_defines:1.5->1.5.26.1 
	src/main.c:1.28.6.2->1.28.6.2.2.1 
	src/protos.h:1.41.6.5->1.41.6.5.4.1 
	src/structs.h:1.48.2.3->1.48.2.3.4.1 

Index: squid/acconfig.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/Attic/acconfig.h,v
retrieving revision 1.13.2.2
retrieving revision 1.13.2.2.4.1
diff -u -r1.13.2.2 -r1.13.2.2.4.1
--- squid/acconfig.h	13 Apr 2002 23:11:22 -0000	1.13.2.2
+++ squid/acconfig.h	14 Jun 2002 07:09:47 -0000	1.13.2.2.4.1
@@ -23,7 +23,7 @@
 #ifndef __CONFIGURE_H__
 #define __CONFIGURE_H__
 @TOP@
-/* $Id: acconfig.h,v 1.13.2.2 2002/04/13 23:11:22 squidadm Exp $ */
+/* $Id: acconfig.h,v 1.13.2.2.4.1 2002/06/14 07:09:47 visolve Exp $ */
 
 /*
  * configure command line used to configure Squid
@@ -112,11 +112,16 @@
 #undef SQUID_SNMP
 
 /*
- * Define to enable WCCP
+ * Define to enable WCCP V1
  */
 #define USE_WCCP 1
 
 /*
+ * Define to enable WCCP V2
+ */
+#undef USE_WCCPv2
+
+/*
  * Squid frequently calls gettimeofday() for accurate timestamping.
  * If you are concerned that gettimeofday() is called too often, and
  * could be causing performance degradation, then you can define
Index: squid/configure.in
===================================================================
RCS file: /cvsroot/squid-sf//squid/configure.in,v
retrieving revision 1.42.2.14
retrieving revision 1.42.2.14.2.1
diff -u -r1.42.2.14 -r1.42.2.14.2.1
--- squid/configure.in	20 May 2002 01:05:14 -0000	1.42.2.14
+++ squid/configure.in	14 Jun 2002 07:09:47 -0000	1.42.2.14.2.1
@@ -3,7 +3,7 @@
 dnl
 dnl  Duane Wessels, wessels@nlanr.net, February 1996 (autoconf v2.9)
 dnl
-dnl  $Id: configure.in,v 1.42.2.14 2002/05/20 01:05:14 squidadm Exp $
+dnl  $Id: configure.in,v 1.42.2.14.2.1 2002/06/14 07:09:47 visolve Exp $
 dnl
 dnl
 dnl
@@ -11,7 +11,7 @@
 AC_CONFIG_AUX_DIR(cfgaux)
 AM_INIT_AUTOMAKE(squid, 2.5.PRE7-CVS)
 AM_CONFIG_HEADER(include/autoconf.h)
-AC_REVISION($Revision: 1.42.2.14 $)dnl
+AC_REVISION($Revision: 1.42.2.14.2.1 $)dnl
 AC_PREFIX_DEFAULT(/usr/local/squid)
 AM_MAINTAINER_MODE
 
@@ -471,15 +471,27 @@
 ])
 
 AC_ARG_ENABLE(wccp,  
-[  --disable-wccp          Disable Web Cache Coordination Protocol],
+[  --disable-wccp          Disable Web Cache Coordination V1 Protocol],
 [ if test "$enableval" = "no" ; then
-    echo "Web Cache Coordination Protocol disabled"
+    echo "Web Cache Coordination V1 Protocol disabled"
     AC_DEFINE(USE_WCCP, 0)
   else
     AC_DEFINE(USE_WCCP, 1)
   fi
 ])      
 
+AM_CONDITIONAL(USE_WCCPv2, false)
+AC_ARG_ENABLE(wccpv2,
+[  --enable-wccpv2          Enable Web Cache Coordination V2 Protocol],
+[ if test "$enableval" = "yes" ; then
+    echo "Web Cache Coordination V2 Protocol enabled"
+    AC_DEFINE(USE_WCCPv2, 1)
+    AM_CONDITIONAL(USE_WCCPv2, true)
+  fi
+])
+ 
+
+
 AC_ARG_ENABLE(kill-parent-hack,
 [  --enable-kill-parent-hack
                           Kill parent on shutdown],
Index: squid/src/Makefile.am
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/Makefile.am,v
retrieving revision 1.13.2.3
retrieving revision 1.13.2.3.4.1
diff -u -r1.13.2.3 -r1.13.2.3.4.1
--- squid/src/Makefile.am	14 Apr 2002 23:08:55 -0000	1.13.2.3
+++ squid/src/Makefile.am	14 Jun 2002 07:09:47 -0000	1.13.2.3.4.1
@@ -26,6 +26,12 @@
 DELAY_POOL_SOURCE = 
 endif
 
+if USE_WCCPv2
+WCCPv2_SOURCE = wccpv2.c
+else
+WCCPv2_SOURCE = 
+endif
+
 if ENABLE_HTCP
 HTCPSOURCE = htcp.c
 endif
@@ -97,6 +103,7 @@
 	unlinkd.c \
 	ssl_support.c \
 	ssl_support.h \
+	wccpv2.c \
 	win32.c
 
 squid_SOURCES = \
@@ -196,6 +203,7 @@
 	useragent.c \
 	wais.c \
 	wccp.c \
+	$(WCCPv2_SOURCE) \
 	whois.c \
 	$(WIN32SOURCE)
 
Index: squid/src/cf.data.pre
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/cf.data.pre,v
retrieving revision 1.49.2.10
retrieving revision 1.49.2.10.4.1
diff -u -r1.49.2.10 -r1.49.2.10.4.1
--- squid/src/cf.data.pre	21 Apr 2002 21:30:12 -0000	1.49.2.10
+++ squid/src/cf.data.pre	14 Jun 2002 07:09:47 -0000	1.49.2.10.4.1
@@ -1,6 +1,6 @@
 
 #
-# $Id: cf.data.pre,v 1.49.2.10 2002/04/21 21:30:12 squidadm Exp $
+# $Id: cf.data.pre,v 1.49.2.10.4.1 2002/06/14 07:09:47 visolve Exp $
 #
 #
 # SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -3115,6 +3115,12 @@
 LOC: Config.Wccp.router
 DEFAULT: 0.0.0.0
 IFDEF: USE_WCCP
+DOC_NONE
+NAME: wccp2_router
+TYPE: address
+LOC: Config.Wccp2.router
+DEFAULT: 0.0.0.0
+IFDEF: USE_WCCPv2
 DOC_START
 	Use this option to define your WCCP ``home'' router for
 	Squid.   Setting the 'wccp_router' to 0.0.0.0 (the default)
@@ -3126,6 +3132,12 @@
 LOC: Config.Wccp.version
 DEFAULT: 4
 IFDEF: USE_WCCP
+DOC_NONE
+NAME: wccp2_version
+TYPE: int
+LOC: Config.Wccp2.version
+DEFAULT: 4
+IFDEF: USE_WCCPv2
 DOC_START
 	According to some users, Cisco IOS 11.2 only supports WCCP
 	version 3.  If you're using that version of IOS, change
@@ -3143,6 +3155,18 @@
 LOC: Config.Wccp.outgoing
 DEFAULT: 255.255.255.255
 IFDEF: USE_WCCP
+DOC_NONE
+NAME: wccp2_incoming_address
+TYPE: address
+LOC: Config.Wccp2.incoming
+DEFAULT: 0.0.0.0
+IFDEF: USE_WCCPv2
+DOC_NONE
+NAME: wccp2_outgoing_address
+TYPE: address
+LOC: Config.Wccp2.outgoing
+DEFAULT: 255.255.255.255
+IFDEF: USE_WCCPv2
 DOC_START
         wccp_incoming_address   Use this option if you require WCCP
 				messages to be received on only one
Index: squid/src/cf_gen_defines
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/cf_gen_defines,v
retrieving revision 1.5
retrieving revision 1.5.26.1
diff -u -r1.5 -r1.5.26.1
--- squid/src/cf_gen_defines	3 Dec 2001 08:03:21 -0000	1.5
+++ squid/src/cf_gen_defines	14 Jun 2002 07:09:47 -0000	1.5.26.1
@@ -18,6 +18,7 @@
 	define["USE_UNLINKD"]="--enable-unlinkd"
 	define["USE_USERAGENT_LOG"]="--enable-useragent-log"
 	define["USE_WCCP"]="--enable-wccp"
+	define["USE_WCCPv2"]="--enable-wccpv2"
 }
 /^IFDEF:/ {
 	if (define[$2] != "")
Index: squid/src/main.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/main.c,v
retrieving revision 1.28.6.2
retrieving revision 1.28.6.2.2.1
diff -u -r1.28.6.2 -r1.28.6.2.2.1
--- squid/src/main.c	23 May 2002 14:10:19 -0000	1.28.6.2
+++ squid/src/main.c	14 Jun 2002 07:09:47 -0000	1.28.6.2.2.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: main.c,v 1.28.6.2 2002/05/23 14:10:19 squidadm Exp $
+ * $Id: main.c,v 1.28.6.2.2.1 2002/06/14 07:09:47 visolve Exp $
  *
  * DEBUG: section 1     Startup and Main Loop
  * AUTHOR: Harvest Derived
@@ -292,6 +292,9 @@
 #if USE_WCCP
     wccpConnectionOpen();
 #endif
+#if USE_WCCPv2
+    wccp2ConnectionOpen();
+#endif
     clientdbInit();
     icmpOpen();
     netdbInit();
@@ -318,6 +321,9 @@
 #if USE_WCCP
     wccpConnectionShutdown();
 #endif
+#if USE_WCCPv2
+    wccp2ConnectionShutdown();
+#endif
     asnFreeMemory();
 }
 
@@ -338,6 +344,9 @@
 #if USE_WCCP
     wccpConnectionClose();
 #endif
+#if USE_WCCPv2
+    wccp2ConnectionClose();
+#endif
 #if USE_DNSSERVERS
     dnsShutdown();
 #else
@@ -366,6 +375,9 @@
 #if USE_WCCP
     wccpInit();
 #endif
+#if USE_WCCPv2
+    wccp2Init();
+#endif
     serverConnectionsOpen();
     if (theOutIcpConnection >= 0) {
 	if (!Config2.Accel.on || Config.onoff.accel_with_proxy)
@@ -526,6 +538,9 @@
 #if USE_WCCP
     wccpInit();
 #endif
+#if USE_WCCPv2
+    wccp2Init();
+#endif
     serverConnectionsOpen();
     if (theOutIcpConnection >= 0) {
 	if (!Config2.Accel.on || Config.onoff.accel_with_proxy)
@@ -950,6 +965,9 @@
 #if USE_WCCP
     wccpConnectionClose();
 #endif
+#if USE_WCCPv2
+    wccp2ConnectionClose();
+#endif
     releaseServerSockets();
     commCloseAllSockets();
     authenticateShutdown();
Index: squid/src/protos.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/protos.h,v
retrieving revision 1.41.6.5
retrieving revision 1.41.6.5.4.1
diff -u -r1.41.6.5 -r1.41.6.5.4.1
--- squid/src/protos.h	21 Apr 2002 21:30:12 -0000	1.41.6.5
+++ squid/src/protos.h	14 Jun 2002 07:09:47 -0000	1.41.6.5.4.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: protos.h,v 1.41.6.5 2002/04/21 21:30:12 squidadm Exp $
+ * $Id: protos.h,v 1.41.6.5.4.1 2002/06/14 07:09:47 visolve Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -570,6 +570,13 @@
 extern void wccpConnectionClose(void);
 #endif /* USE_WCCP */
 
+#if USE_WCCPv2
+extern void wccp2Init(void);
+extern void wccp2ConnectionOpen(void);
+extern void wccp2ConnectionShutdown(void);
+extern void wccp2ConnectionClose(void);
+#endif /* USE_WCCPv2 */
+
 extern void icpHandleIcpV3(int, struct sockaddr_in, char *, int);
 extern int icpCheckUdpHit(StoreEntry *, request_t * request);
 extern void icpConnectionsOpen(void);
Index: squid/src/structs.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/structs.h,v
retrieving revision 1.48.2.3
retrieving revision 1.48.2.3.4.1
diff -u -r1.48.2.3 -r1.48.2.3.4.1
--- squid/src/structs.h	30 Apr 2002 06:21:12 -0000	1.48.2.3
+++ squid/src/structs.h	14 Jun 2002 07:09:49 -0000	1.48.2.3.4.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: structs.h,v 1.48.2.3 2002/04/30 06:21:12 squidadm Exp $
+ * $Id: structs.h,v 1.48.2.3.4.1 2002/06/14 07:09:49 visolve Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -444,6 +444,14 @@
 	int version;
     } Wccp;
 #endif
+#if USE_WCCPv2
+    struct {
+        struct in_addr router;
+        struct in_addr incoming;
+        struct in_addr outgoing;
+        int version;
+    } Wccp2;
+#endif
     char *as_whois_server;
     struct {
 	char *log;
