Renamed IcmpChecksumCalculator to IcmpChecksum
authorGuilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
Thu, 18 Aug 2011 02:21:57 +0000 (23:21 -0300)
committerGuilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
Thu, 18 Aug 2011 02:23:26 +0000 (23:23 -0300)
src/icmp/icmpchecksum.h [moved from src/icmp/icmpchecksumcalculator.h with 72% similarity]
src/icmp/icmppinger.cpp

similarity index 72%
rename from src/icmp/icmpchecksumcalculator.h
rename to src/icmp/icmpchecksum.h
index d173619..a14ebf1 100644 (file)
@@ -4,16 +4,16 @@
 // Distributed under the Boost Software License, Version 1.0.
 //    (See accompanying file LICENSE_1_0.txt or copy at
 //          http://www.boost.org/LICENSE_1_0.txt)
-#ifndef ICMPCHECKSUMCALCULATOR_H
-#define ICMPCHECKSUMCALCULATOR_H
+#ifndef ICMP_CHECKSUM_H
+#define ICMP_CHECKSUM_H
 
 #include "host/checksum.hpp"
 #include "icmp/icmpdata.h"
 
 //-----------------------------------------------------------------------------
-// IcmpChecksumCalculator
+// IcmpChecksum
 //-----------------------------------------------------------------------------
 
-typedef Checksum<IcmpData::const_iterator> IcmpChecksumCalculator;
+typedef Checksum<IcmpData::const_iterator> IcmpChecksum;
 
-#endif /* ICMPCHECKSUMCALCULATOR_H */
+#endif // ICMP_CHECKSUM_H
index 9297601..ac33b70 100644 (file)
@@ -21,7 +21,7 @@
 
 #include <logfunc.hpp>
 
-#include "icmp/icmpchecksumcalculator.h"
+#include "icmp/icmpchecksum.h"
 #include "icmp/icmpdata.h"
 #include "icmp/icmpheader.h"
 #include "icmp/icmppacket.h"
@@ -132,7 +132,7 @@ IcmpPacket IcmpPinger::create_echo_request(
 
     IcmpType type = IcmpType_EchoRequest;
     uint8_t code = 0;
-    IcmpChecksumCalculator calculator( icmp_data.begin(), icmp_data.end() );
+    IcmpChecksum calculator( icmp_data.begin(), icmp_data.end() );
     uint16_t checksum = calculator.compute(
             type, code, Identifier, sequence_number
     );