From 1a6f56e0e6ee44d3718f7116383cb83d6b4993ed Mon Sep 17 00:00:00 2001 From: Guilherme Maciel Ferreira Date: Wed, 17 Aug 2011 23:21:57 -0300 Subject: [PATCH] Renamed IcmpChecksumCalculator to IcmpChecksum --- src/icmp/icmpchecksum.h | 19 +++++++++++++++++++ src/icmp/icmpchecksumcalculator.h | 19 ------------------- src/icmp/icmppinger.cpp | 4 ++-- 3 files changed, 21 insertions(+), 21 deletions(-) create mode 100644 src/icmp/icmpchecksum.h delete mode 100644 src/icmp/icmpchecksumcalculator.h diff --git a/src/icmp/icmpchecksum.h b/src/icmp/icmpchecksum.h new file mode 100644 index 0000000..a14ebf1 --- /dev/null +++ b/src/icmp/icmpchecksum.h @@ -0,0 +1,19 @@ +// Copyright (c) 2003-2010 Christopher M. Kohlhoff +// Modifications (c) 2011 by Guilherme Maciel Ferreira / Intra2net AG +// +// 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 ICMP_CHECKSUM_H +#define ICMP_CHECKSUM_H + +#include "host/checksum.hpp" +#include "icmp/icmpdata.h" + +//----------------------------------------------------------------------------- +// IcmpChecksum +//----------------------------------------------------------------------------- + +typedef Checksum IcmpChecksum; + +#endif // ICMP_CHECKSUM_H diff --git a/src/icmp/icmpchecksumcalculator.h b/src/icmp/icmpchecksumcalculator.h deleted file mode 100644 index d173619..0000000 --- a/src/icmp/icmpchecksumcalculator.h +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2003-2010 Christopher M. Kohlhoff -// Modifications (c) 2011 by Guilherme Maciel Ferreira / Intra2net AG -// -// 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 - -#include "host/checksum.hpp" -#include "icmp/icmpdata.h" - -//----------------------------------------------------------------------------- -// IcmpChecksumCalculator -//----------------------------------------------------------------------------- - -typedef Checksum IcmpChecksumCalculator; - -#endif /* ICMPCHECKSUMCALCULATOR_H */ diff --git a/src/icmp/icmppinger.cpp b/src/icmp/icmppinger.cpp index 9297601..ac33b70 100644 --- a/src/icmp/icmppinger.cpp +++ b/src/icmp/icmppinger.cpp @@ -21,7 +21,7 @@ #include -#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 ); -- 1.7.1