Skip to content

Commit

Permalink
Remove unused includes
Browse files Browse the repository at this point in the history
  • Loading branch information
seladb committed Oct 4, 2024
1 parent 44972d0 commit b06d3af
Show file tree
Hide file tree
Showing 57 changed files with 8 additions and 96 deletions.
3 changes: 1 addition & 2 deletions Common++/src/GeneralUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
#include "Logger.h"
#include <sstream>
#include <iomanip>
#include <string.h>
#include <stdlib.h>
#include <cstring>

namespace pcpp
{
Expand Down
3 changes: 0 additions & 3 deletions Common++/src/IpAddress.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
#define LOG_MODULE CommonLogModuleIpUtils

#include <algorithm>
#include <cmath>
#include <errno.h>
#include <sstream>
#include <stdexcept>
#include <stdint.h>
#include <bitset>
#include "Logger.h"
#include "IpUtils.h"
Expand Down
3 changes: 1 addition & 2 deletions Common++/src/IpUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

#include "IpUtils.h"
#include "Logger.h"
#include <string.h>
#include <stdio.h>
#include <cstring>
#include <stdexcept>
#ifndef NS_INADDRSZ
# define NS_INADDRSZ 4
Expand Down
2 changes: 0 additions & 2 deletions Common++/src/MacAddress.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#include <stdio.h>

#include "MacAddress.h"

namespace pcpp
Expand Down
4 changes: 1 addition & 3 deletions Common++/src/SystemUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
#include <array>
#include <iostream>
#include <mutex>
#include <signal.h>
#include <stdio.h>
#include <string.h>
#include <csignal>
#include <sys/stat.h>
#if defined(__APPLE__)
# include <mach/clock.h>
Expand Down
1 change: 0 additions & 1 deletion Common++/src/TablePrinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#include <iomanip>
#include <sstream>
#include <iostream>
#include <iterator>
#include <numeric>
#include <utility>
#include "TablePrinter.h"
Expand Down
1 change: 0 additions & 1 deletion Packet++/src/ArpLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

#include "ArpLayer.h"
#include "EthLayer.h"
#include <string.h>
#include "EndianPortable.h"

namespace pcpp
Expand Down
2 changes: 0 additions & 2 deletions Packet++/src/Asn1Codec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@
#include "Asn1Codec.h"
#include "GeneralUtils.h"
#include "EndianPortable.h"
#include "GeneralUtils.h"
#include <unordered_map>
#include <numeric>
#include <algorithm>
#include <iostream>
#include <sstream>
#include <cstring>
#include <cmath>
#include <limits>

Expand Down
1 change: 0 additions & 1 deletion Packet++/src/BgpLayer.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#define LOG_MODULE PacketLogModuleBgpLayer

#include <string.h>
#include "Logger.h"
#include "BgpLayer.h"
#include "EndianPortable.h"
Expand Down
4 changes: 0 additions & 4 deletions Packet++/src/CotpLayer.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
#include "../header/CotpLayer.h"
#include "EndianPortable.h"
#include "S7CommLayer.h"
#include <PayloadLayer.h>
#include <cstring>
#include <iostream>
#include <sstream>

namespace pcpp
{
Expand Down
4 changes: 0 additions & 4 deletions Packet++/src/DnsLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@

#include "DnsLayer.h"
#include "Logger.h"
#include "IpAddress.h"
#include <sstream>
#include <string.h>
#include <iomanip>
#include <stdlib.h>
#include "EndianPortable.h"

namespace pcpp
Expand Down
1 change: 0 additions & 1 deletion Packet++/src/DnsResource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#include "DnsResource.h"
#include "Logger.h"
#include <sstream>
#include <string.h>
#include "EndianPortable.h"

namespace pcpp
Expand Down
1 change: 0 additions & 1 deletion Packet++/src/DnsResourceData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include "GeneralUtils.h"
#include <sstream>
#include <utility>
#include <string.h>
#include "EndianPortable.h"

namespace pcpp
Expand Down
1 change: 0 additions & 1 deletion Packet++/src/EthLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include "MplsLayer.h"
#include "WakeOnLanLayer.h"
#include "EndianPortable.h"
#include <string.h>

namespace pcpp
{
Expand Down
4 changes: 1 addition & 3 deletions Packet++/src/HttpLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@
#include "Logger.h"
#include "GeneralUtils.h"
#include "HttpLayer.h"
#include <string.h>
#include <cstring>
#include <algorithm>
#include <stdlib.h>
#include <exception>
#include <utility>
#include <unordered_map>

namespace pcpp
Expand Down
1 change: 0 additions & 1 deletion Packet++/src/IPReassembly.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include "IPv6Layer.h"
#include "PacketUtils.h"
#include "Logger.h"
#include <string.h>
#include "EndianPortable.h"

namespace pcpp
Expand Down
1 change: 0 additions & 1 deletion Packet++/src/IPv4Layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include "IPSecLayer.h"
#include "VrrpLayer.h"
#include "PacketUtils.h"
#include <string.h>
#include <sstream>
#include "Logger.h"
#include "EndianPortable.h"
Expand Down
4 changes: 0 additions & 4 deletions Packet++/src/IPv6Extensions.cpp
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
#define LOG_MODULE PacketLogModuleIPv6ExtensionLayer

#include <sstream>
#include "EndianPortable.h"
#include "Logger.h"
#include "IPv6Extensions.h"
#include "IPv6Layer.h"
#include "IPv4Layer.h"
#include "PayloadLayer.h"
#include "UdpLayer.h"
#include "TcpLayer.h"
#include "GreLayer.h"

namespace pcpp
{
Expand Down
1 change: 0 additions & 1 deletion Packet++/src/IPv6Layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include "IcmpV6Layer.h"
#include "VrrpLayer.h"
#include "Packet.h"
#include <string.h>
#include "EndianPortable.h"

namespace pcpp
Expand Down
1 change: 0 additions & 1 deletion Packet++/src/IcmpLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include "PacketUtils.h"
#include "Logger.h"
#include <sstream>
#include <string.h>
#include "EndianPortable.h"

namespace pcpp
Expand Down
1 change: 0 additions & 1 deletion Packet++/src/IcmpV6Layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include "NdpLayer.h"
#include "PacketUtils.h"
#include "PayloadLayer.h"
#include <memory>
#include <sstream>

// IcmpV6Layer
Expand Down
1 change: 0 additions & 1 deletion Packet++/src/IgmpLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#include "IgmpLayer.h"
#include "PacketUtils.h"
#include "Logger.h"
#include <string.h>
#include "EndianPortable.h"

namespace pcpp
Expand Down
1 change: 0 additions & 1 deletion Packet++/src/LLCLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#include "LLCLayer.h"
#include "PayloadLayer.h"
#include "StpLayer.h"
#include <iostream>

namespace pcpp
{
Expand Down
1 change: 0 additions & 1 deletion Packet++/src/Layer.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#define LOG_MODULE PacketLogModuleLayer

#include "Layer.h"
#include <string.h>
#include "Logger.h"
#include "Packet.h"

Expand Down
1 change: 0 additions & 1 deletion Packet++/src/MplsLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include "IPv6Layer.h"
#include "PayloadLayer.h"
#include "Logger.h"
#include <string.h>
#include <sstream>
#include "EndianPortable.h"

Expand Down
2 changes: 0 additions & 2 deletions Packet++/src/NflogLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
#include "GeneralUtils.h"
#include "EndianPortable.h"

#include <string.h>

namespace pcpp
{
/** IPv4 protocol */
Expand Down
4 changes: 1 addition & 3 deletions Packet++/src/NtpLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
#include "NtpLayer.h"
#include "SystemUtils.h"
#include "GeneralUtils.h"

#include <math.h>
#include <stdlib.h>
#include <cmath>

/// 2^16 as a double
#define NTP_FRIC 65536.
Expand Down
1 change: 0 additions & 1 deletion Packet++/src/NullLoopbackLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#include "IPv4Layer.h"
#include "IPv6Layer.h"
#include "PayloadLayer.h"
#include <string.h>

namespace pcpp
{
Expand Down
3 changes: 0 additions & 3 deletions Packet++/src/Packet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
#include "PayloadLayer.h"
#include "PacketTrailerLayer.h"
#include "Logger.h"
#include "EndianPortable.h"
#include <string.h>
#include <numeric>
#include <typeinfo>
#include <sstream>
#ifdef _MSC_VER
# include <time.h>
Expand Down
1 change: 0 additions & 1 deletion Packet++/src/PacketTrailerLayer.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include "PacketTrailerLayer.h"
#include "GeneralUtils.h"
#include <string.h>
#include <sstream>

namespace pcpp
Expand Down
1 change: 0 additions & 1 deletion Packet++/src/PayloadLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

#include "PayloadLayer.h"
#include "GeneralUtils.h"
#include <string.h>
#include <sstream>

namespace pcpp
Expand Down
2 changes: 0 additions & 2 deletions Packet++/src/RadiusLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
#include "RadiusLayer.h"
#include "Logger.h"
#include "GeneralUtils.h"

#include <string.h>
#include <sstream>
#include "EndianPortable.h"

Expand Down
1 change: 0 additions & 1 deletion Packet++/src/RawPacket.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#define LOG_MODULE PacketLogModuleRawPacket

#include "RawPacket.h"
#include <string.h>
#include "Logger.h"
#include "TimespecTimeval.h"

Expand Down
3 changes: 0 additions & 3 deletions Packet++/src/S7CommLayer.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
#include "EndianPortable.h"

#include "S7CommLayer.h"
#include "TcpLayer.h"
#include <iostream>

#include <cstring>
#include <sstream>

namespace pcpp
Expand Down
1 change: 0 additions & 1 deletion Packet++/src/SSHLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include "GeneralUtils.h"
#include "Logger.h"
#include "EndianPortable.h"
#include <string.h>

namespace pcpp
{
Expand Down
1 change: 0 additions & 1 deletion Packet++/src/SSLHandshake.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

#include "EndianPortable.h"
#include "md5.h"
#include <string.h>
#include <sstream>
#include <unordered_map>
#include <set>
Expand Down
1 change: 0 additions & 1 deletion Packet++/src/SSLLayer.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#define LOG_MODULE PacketLogModuleSSLLayer

#include "Logger.h"
#include "SSLLayer.h"
#include "EndianPortable.h"
#include <sstream>
Expand Down
2 changes: 0 additions & 2 deletions Packet++/src/SdpLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

#include "SdpLayer.h"
#include "Logger.h"
#include <stdlib.h>
#include <string>
#include <sstream>

namespace pcpp
Expand Down
4 changes: 1 addition & 3 deletions Packet++/src/SingleCommandTextProtocol.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#include "SingleCommandTextProtocol.h"
#include "Logger.h"

#include <string.h>
#include <cstring>
#include <algorithm>
#include <vector>

Expand Down
2 changes: 0 additions & 2 deletions Packet++/src/SipLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
#include "PayloadLayer.h"
#include "Logger.h"
#include "GeneralUtils.h"
#include <string.h>
#include <algorithm>
#include <stdlib.h>
#include <exception>
#include <utility>
#include <unordered_map>
Expand Down
1 change: 0 additions & 1 deletion Packet++/src/Sll2Layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include "VlanLayer.h"
#include "PPPoELayer.h"
#include "MplsLayer.h"
#include <string.h>
#include "EndianPortable.h"

namespace pcpp
Expand Down
1 change: 0 additions & 1 deletion Packet++/src/SllLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include "VlanLayer.h"
#include "PPPoELayer.h"
#include "MplsLayer.h"
#include <string.h>
#include "EndianPortable.h"

namespace pcpp
Expand Down
1 change: 0 additions & 1 deletion Packet++/src/SomeIpLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include "EndianPortable.h"
#include <algorithm>
#include <sstream>
#include <string.h>

namespace pcpp
{
Expand Down
1 change: 0 additions & 1 deletion Packet++/src/SomeIpSdLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#include "SomeIpSdLayer.h"
#include "EndianPortable.h"
#include <algorithm>
#include <cstring>
#include <sstream>
#include <stdexcept>

Expand Down
Loading

0 comments on commit b06d3af

Please sign in to comment.