]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Merged from trunk
authorAmos Jeffries <squid3@treenet.co.nz>
Fri, 10 Oct 2008 11:24:16 +0000 (00:24 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Fri, 10 Oct 2008 11:24:16 +0000 (00:24 +1300)
18 files changed:
1  2 
configure.in
src/Debug.h
src/Makefile.am
src/debug.cc
src/globals.h
src/icmp/Icmp.cc
src/icmp/Icmp.h
src/icmp/Icmp4.cc
src/icmp/Icmp4.h
src/icmp/Icmp6.cc
src/icmp/IcmpConfig.h
src/icmp/IcmpPinger.cc
src/icmp/IcmpSquid.cc
src/icmp/net_db.cc
src/icmp/pinger.cc
src/icmp/testIcmp.cc
src/icmp/testIcmp.h
src/structs.h

diff --cc configure.in
Simple merge
diff --cc src/Debug.h
Simple merge
diff --cc src/Makefile.am
index 2472d4581ec1e8c84180c45aa6632eb8d1930a0a,1b20279161dd178cc0a6ebc3df0e1136cd2c1f29..015839a02477cd544a67913a8536634f54818cdb
@@@ -2095,9 -2151,27 +2092,8 @@@ tests_testHttpRequest_LDADD = 
  tests_testHttpRequest_LDFLAGS = $(LIBADD_DL)
  tests_testHttpRequest_DEPENDENCIES =  $(top_builddir)/lib/libmiscutil.a \
        @REPL_OBJS@ \
-       @SQUID_CPPUNIT_LA@ \
-       ${ADAPTATION_LIBS}
+       @SQUID_CPPUNIT_LA@
  
 -## Tests of the ICMP base module.
 -# Its used by pinger so SHOULD NOT require more dependancies! :-(
 -tests_testICMP_SOURCES=\
 -      ICMP.h \
 -      icmp.cc \
 -      tests/testICMP.h \
 -      tests/testICMP.cc \
 -      tests/testMain.cc \
 -      SquidTime.h \
 -      time.cc \
 -      $(TESTSOURCES)
 -tests_testICMP_LDFLAGS = $(LIBADD_DL)
 -tests_testICMP_LDADD=\
 -      @SQUID_CPPUNIT_LIBS@ \
 -      @SQUID_CPPUNIT_LA@ \
 -      -L../lib -lmiscutil
 -tests_testICMP_DEPENDENCIES= @SQUID_CPPUNIT_LA@ \
 -      $(top_builddir)/lib/libmiscutil.a
 -
  # TODO:mime.cc drags in HttpReply.cc
  # delay pools need client_side_request.cc
  # store_key_md5 wants the method.
diff --cc src/debug.cc
Simple merge
diff --cc src/globals.h
Simple merge
index 029bff812d79ed158394c62f00ae1eab50ad1bec,8d6d30a7c5612d2d321fb11c1b9bfa0f11f4ed44..38c0c0419446090e6b1306f4622f10e7c61e3286
@@@ -45,10 -45,10 +45,10 @@@ Icmp::Icmp(
  }
  
  void
 -ICMP::Close()
 +Icmp::Close()
  {
  #if USE_ICMP
-     if(icmp_sock > 0)
+     if (icmp_sock > 0)
          close(icmp_sock);
      icmp_sock = -1;
      icmp_ident = 0;
diff --cc src/icmp/Icmp.h
Simple merge
index f9f2ecc108d9caa9aa4aac424c6e2aeda8da999a,67b789476de9205fdb87f0062ba59c7ad6e093ed..04e1cf41862e5bb3ba921a69c26b1f2301adfe51
  #if USE_ICMP
  
  #include "SquidTime.h"
 -#include "ICMPv4.h"
 -#include "ICMPPinger.h"
 +#include "Icmp4.h"
 +#include "IcmpPinger.h"
  #include "Debug.h"
  
- const char *icmpPktStr[] =
-     {
-         "Echo Reply",
-         "ICMP 1",
-         "ICMP 2",
-         "Destination Unreachable",
-         "Source Quench",
-         "Redirect",
-         "ICMP 6",
-         "ICMP 7",
-         "Echo",
-         "ICMP 9",
-         "ICMP 10",
-         "Time Exceeded",
-         "Parameter Problem",
-         "Timestamp",
-         "Timestamp Reply",
-         "Info Request",
-         "Info Reply",
-         "Out of Range Type"
-     };
+ const char *icmpPktStr[] = {
+     "Echo Reply",
+     "ICMP 1",
+     "ICMP 2",
+     "Destination Unreachable",
+     "Source Quench",
+     "Redirect",
+     "ICMP 6",
+     "ICMP 7",
+     "Echo",
+     "ICMP 9",
+     "ICMP 10",
+     "Time Exceeded",
+     "Parameter Problem",
+     "Timestamp",
+     "Timestamp Reply",
+     "Info Request",
+     "Info Reply",
+     "Out of Range Type"
+ };
  
 -ICMPv4::ICMPv4() : ICMP()
 +Icmp4::Icmp4() : Icmp()
- {;
+ {
+     ;
  }
  
 -ICMPv4::~ICMPv4()
 +Icmp4::~Icmp4()
  {
      Close();
  }
Simple merge
index 190d97cd26d7d068adbcf979628cb083447cf878,f05ff7a2dfc805eb85e28b94522dde4c3656e172..430d699f378693254236df3799fb432c8c27b3b5
  #include <netinet/ip6.h>
  #endif
  
 -// ICMPv6 OP-Codes
 +// Icmp6 OP-Codes
  // see http://www.iana.org/assignments/icmpv6-parameters
  // NP: LowPktStr is for codes 0-127
- static const char *icmp6LowPktStr[] =
-     {
-         "ICMP 0",                     // 0
-         "Destination Unreachable",    // 1 - RFC2463
-         "Packet Too Big",             // 2 - RFC2463
-         "Time Exceeded",              // 3 - RFC2463
-         "Parameter Problem",          // 4 - RFC2463
-         "ICMP 5",                     // 5
-         "ICMP 6",                     // 6
-         "ICMP 7",                     // 7
-         "ICMP 8",                     // 8
-         "ICMP 9",                     // 9
-         "ICMP 10"                     // 10
-     };
+ static const char *icmp6LowPktStr[] = {
+     "ICMP 0",                 // 0
+     "Destination Unreachable",        // 1 - RFC2463
+     "Packet Too Big",                 // 2 - RFC2463
+     "Time Exceeded",          // 3 - RFC2463
+     "Parameter Problem",              // 4 - RFC2463
+     "ICMP 5",                 // 5
+     "ICMP 6",                 // 6
+     "ICMP 7",                 // 7
+     "ICMP 8",                 // 8
+     "ICMP 9",                 // 9
+     "ICMP 10"                 // 10
+ };
  
  // NP: HighPktStr is for codes 128-255
- static const char *icmp6HighPktStr[] =
-     {
-         "Echo Request",                                       // 128 - RFC2463
-         "Echo Reply",                                 // 129 - RFC2463
-         "Multicast Listener Query",                   // 130 - RFC2710
-         "Multicast Listener Report",                  // 131 - RFC2710
-         "Multicast Listener Done",                    // 132 - RFC2710
-         "Router Solicitation",                                // 133 - RFC4861
-         "Router Advertisement",                               // 134 - RFC4861
-         "Neighbor Solicitation",                      // 135 - RFC4861
-         "Neighbor Advertisement",                     // 136 - RFC4861
-         "Redirect Message",                           // 137 - RFC4861
-         "Router Renumbering",                         // 138 - Crawford
-         "ICMP Node Information Query",                        // 139 - RFC4620
-         "ICMP Node Information Response",             // 140 - RFC4620
-         "Inverse Neighbor Discovery Solicitation",    // 141 - RFC3122
-         "Inverse Neighbor Discovery Advertisement",   // 142 - RFC3122
-         "Version 2 Multicast Listener Report",                // 143 - RFC3810       
-         "Home Agent Address Discovery Request",               // 144 - RFC3775
-         "Home Agent Address Discovery Reply",         // 145 - RFC3775
-         "Mobile Prefix Solicitation",                 // 146 - RFC3775
-         "Mobile Prefix Advertisement",                        // 147 - RFC3775
-         "Certification Path Solicitation",            // 148 - RFC3971
-         "Certification Path Advertisement",           // 149 - RFC3971
-         "ICMP Experimental (150)",                    // 150 - RFC4065
-         "Multicast Router Advertisement",             // 151 - RFC4286
-         "Multicast Router Solicitation",              // 152 - RFC4286
-         "Multicast Router Termination",                       // 153 - [RFC4286]
-         "ICMP 154",
-         "ICMP 155",
-         "ICMP 156",
-         "ICMP 157",
-         "ICMP 158",
-         "ICMP 159",
-         "ICMP 160"
-     };
+ static const char *icmp6HighPktStr[] = {
+     "Echo Request",                                   // 128 - RFC2463
+     "Echo Reply",                                     // 129 - RFC2463
+     "Multicast Listener Query",                       // 130 - RFC2710
+     "Multicast Listener Report",                      // 131 - RFC2710
+     "Multicast Listener Done",                        // 132 - RFC2710
+     "Router Solicitation",                            // 133 - RFC4861
+     "Router Advertisement",                           // 134 - RFC4861
+     "Neighbor Solicitation",                  // 135 - RFC4861
+     "Neighbor Advertisement",                 // 136 - RFC4861
+     "Redirect Message",                               // 137 - RFC4861
+     "Router Renumbering",                             // 138 - Crawford
+     "ICMP Node Information Query",                    // 139 - RFC4620
+     "ICMP Node Information Response",         // 140 - RFC4620
+     "Inverse Neighbor Discovery Solicitation",        // 141 - RFC3122
+     "Inverse Neighbor Discovery Advertisement",       // 142 - RFC3122
+     "Version 2 Multicast Listener Report",            // 143 - RFC3810
+     "Home Agent Address Discovery Request",           // 144 - RFC3775
+     "Home Agent Address Discovery Reply",             // 145 - RFC3775
+     "Mobile Prefix Solicitation",                     // 146 - RFC3775
+     "Mobile Prefix Advertisement",                    // 147 - RFC3775
+     "Certification Path Solicitation",                // 148 - RFC3971
+     "Certification Path Advertisement",               // 149 - RFC3971
+     "ICMP Experimental (150)",                        // 150 - RFC4065
+     "Multicast Router Advertisement",         // 151 - RFC4286
+     "Multicast Router Solicitation",          // 152 - RFC4286
+     "Multicast Router Termination",                   // 153 - [RFC4286]
+     "ICMP 154",
+     "ICMP 155",
+     "ICMP 156",
+     "ICMP 157",
+     "ICMP 158",
+     "ICMP 159",
+     "ICMP 160"
+ };
  
 -ICMPv6::ICMPv6() : ICMP()
 +Icmp6::Icmp6() : Icmp()
  {
      ; // nothing new.
  }
@@@ -189,17 -186,17 +186,17 @@@ Icmp6::SendEcho(IPAddress &to, int opco
  
      assert(icmp6_pktsize <= MAX_PKT6_SZ);
  
 -    debugs(42, 5, HERE << "Send ICMPv6 packet to " << to << ".");
 +    debugs(42, 5, HERE << "Send Icmp6 packet to " << to << ".");
  
      x = sendto(icmp_sock,
-            (const void *) pkt,
-            icmp6_pktsize,
-            0,
-            S->ai_addr,
-            S->ai_addrlen);
-     if(x < 0) {
-         debugs(42, 1, HERE << "Error sending to Icmp6 packet to " << to << ". ERR: " << xstrerror());
+                (const void *) pkt,
+                icmp6_pktsize,
+                0,
+                S->ai_addr,
+                S->ai_addrlen);
+     if (x < 0) {
+         debugs(42, 1, HERE << "Error sending to ICMPv6 packet to " << to << ". ERR: " << xstrerror());
      }
      debugs(42,9, HERE << "x=" << x);
  
index 1504b14134cc468260d5e1b37fe0192725bff081,a1a1b3b9b0bc4a2fa90b4c3fc559417915effbf6..e06f0e5e21cd48fce9821e5d4ffaddf3df2dff2d
   * This structure is included as a child field of the global Config
   * such that if ICMP is built it can be accessed as Config.pinger.*
   */
- class IcmpConfig {
 -class ICMPConfig
++class IcmpConfig
+ {
  
  public:
  
      /** \todo These methods should really be defined in an ICMPConfig.cc file
       * alongside any custom parsing routines needed for this component.
       * First though, the whole global Config dependancy tree needs fixing */
 -    ICMPConfig() : program(NULL), enable(0) {};
 -    ~ICMPConfig() { if (program) delete program; program = NULL; };
 +    IcmpConfig() : program(NULL), enable(0) {};
-     ~IcmpConfig() { if(program) delete program; program = NULL; };
++    ~IcmpConfig() { if (program) delete program; program = NULL; };
  
- /* variables */
    /* variables */
  
      /** pinger helper application path */
      char *program;
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc src/structs.h
Simple merge