]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
make ICMP optional
authorwessels <>
Tue, 17 Sep 1996 03:50:23 +0000 (03:50 +0000)
committerwessels <>
Tue, 17 Sep 1996 03:50:23 +0000 (03:50 +0000)
src/Makefile.in
src/icmp.cc
src/main.cc
src/neighbors.cc

index 821d5570c968649527407a7d8d5ba1de4d4c6ade..b4d217b79b802313f2054d4af1a390dc23ae8bd6 100644 (file)
@@ -1,7 +1,7 @@
 #
 #  Makefile for the Squid Object Cache server
 #
-#  $Id: Makefile.in,v 1.39 1996/09/16 21:11:02 wessels Exp $
+#  $Id: Makefile.in,v 1.40 1996/09/16 21:50:23 wessels Exp $
 #
 #  Uncomment and customize the following to suit your needs:
 #
@@ -10,7 +10,8 @@ AIO_OPT               = # -DUSE_ASYNC_IO=1
 AIO_LIBS       = # @AIO_LIBS@
 AUTH_OPT       = # -DUSE_PROXY_AUTH=1
 LOG_HDRS_OPT   = # -DLOG_FULL_HEADERS=1
-DEFINES                = $(HOST_OPT) $(AIO_OPT) $(AUTH_OPT) $(LOG_HDRS_OPT)
+ICMP_OPT       = # -DUSE_ICMP=1
+DEFINES                = $(HOST_OPT) $(AIO_OPT) $(AUTH_OPT) $(LOG_HDRS_OPT) $(ICMP_OPT)
 
 prefix         = @prefix@
 exec_prefix    = @exec_prefix@
index 6ffdbb615196addfe2491d3db88c5935ad5cfd3f..331e321f257013be839929131d56f2832661b8f1 100644 (file)
@@ -1,4 +1,36 @@
 
+/*
+ * $Id: icmp.cc,v 1.4 1996/09/16 21:50:24 wessels Exp $
+ *
+ * DEBUG: section 37    ICMP Routines
+ * AUTHOR: Duane Wessels
+ *
+ * SQUID Internet Object Cache  http://www.nlanr.net/Squid/
+ * --------------------------------------------------------
+ *
+ *  Squid is the result of efforts by numerous individuals from the
+ *  Internet community.  Development is led by Duane Wessels of the
+ *  National Laboratory for Applied Network Research and funded by
+ *  the National Science Foundation.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *  
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *  
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *  
+ */
+
+#if USE_ICMP
+
 #include "squid.h"
 
 #include <netinet/in_systm.h>
@@ -395,3 +427,5 @@ icmpHandleSourcePing(struct sockaddr_in *from, char *buf)
        NULL,
        0);
 }
+
+#endif /* USE_ICMP */
index 3d07349891b033ec83ba4b1bf291bef139494a1b..ef81e9d4d5a53e2ec498792b3d8b77c962a547a8 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: main.cc,v 1.77 1996/09/16 21:20:48 wessels Exp $
+ * $Id: main.cc,v 1.78 1996/09/16 21:50:25 wessels Exp $
  *
  * DEBUG: section 1     Startup and Main Loop
  * AUTHOR: Harvest Derived
@@ -379,7 +379,9 @@ serverConnectionsOpen()
            }
        }
     }
+#if USE_ICMP
     icmpOpen();
+#endif
 }
 
 void
@@ -415,7 +417,9 @@ serverConnectionsClose()
                0);
        theInIcpConnection = -1;
     }
+#if USE_ICMP
     icmpClose();
+#endif
 }
 
 static void
index b87476316936aa1382d360a39b313732132f9abe..71b108a67c43f062febf4a20a192c894d4b3fda3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: neighbors.cc,v 1.53 1996/09/16 21:11:12 wessels Exp $
+ * $Id: neighbors.cc,v 1.54 1996/09/16 21:50:26 wessels Exp $
  *
  * DEBUG: section 15    Neighbor Routines
  * AUTHOR: Harvest Derived
@@ -507,9 +507,11 @@ neighborsUdpPing(protodispatch_data * proto)
            debug(15, 6, "neighborsUdpPing: Source Ping: to %s for '%s'\n",
                host, url);
            echo_hdr.reqnum = reqnum;
+#if USE_ICMP
            if (icmp_sock != -1) {
                icmpSourcePing(inaddrFromHostent(hep), &echo_hdr, url);
            } else {
+#endif
                to_addr.sin_family = AF_INET;
                to_addr.sin_addr = inaddrFromHostent(hep);
                to_addr.sin_port = htons(echo_port);
@@ -521,7 +523,9 @@ neighborsUdpPing(protodispatch_data * proto)
                    ICP_OP_SECHO,
                    LOG_TAG_NONE,
                    PROTO_NONE);
+#if USE_ICMP
            }
+#endif
        } else {
            debug(15, 6, "neighborsUdpPing: Source Ping: unknown host: %s\n",
                host);