diff --git a/FPEngine.h b/FPEngine.h index 7b7200dd0..241fb3078 100644 --- a/FPEngine.h +++ b/FPEngine.h @@ -129,7 +129,6 @@ #include "nsock.h" #include -#include "osscan.h" #include "libnetutil/npacket.h" /* Mention some classes here so we don't have to place the declarations in @@ -140,6 +139,7 @@ class FPProbe; class Target; class FingerPrintResultsIPv6; +class FingerMatch; /****************************************************************************** * CONSTANT DEFINITIONS * diff --git a/FingerPrintResults.h b/FingerPrintResults.h index f8b0d2ff8..fc4d72dfc 100644 --- a/FingerPrintResults.h +++ b/FingerPrintResults.h @@ -129,6 +129,7 @@ class FingerPrintResults; #include "FPEngine.h" +#include "osscan.h" /* Maximum number of results allowed in one of these things ... */ #define MAX_FP_RESULTS 36 diff --git a/NmapOps.cc b/NmapOps.cc index b8943fc11..b6ff244e5 100644 --- a/NmapOps.cc +++ b/NmapOps.cc @@ -125,6 +125,7 @@ #include "nmap.h" #include "nbase.h" #include "NmapOps.h" +#include "osscan.h" #include "services.h" #include "nmap_error.h" #ifdef WIN32 diff --git a/NmapOps.h b/NmapOps.h index 405c31562..fb13f4d6a 100644 --- a/NmapOps.h +++ b/NmapOps.h @@ -126,10 +126,14 @@ #ifndef NMAP_OPS_H #define NMAP_OPS_H -#include "osscan.h" /* FingerPrintDB */ +#include "nmap.h" #include "output.h" #include #include +#include + +class FingerPrintDB; +class FingerMatch; class NmapOps { public: diff --git a/Target.h b/Target.h index 7035a5df6..97f042651 100644 --- a/Target.h +++ b/Target.h @@ -137,8 +137,8 @@ #include "portreasons.h" #include "portlist.h" -#include "tcpip.h" #include "scan_engine.h" +#include "osscan.h" #include "osscan2.h" class FingerPrintResults; diff --git a/nse_nsock.h b/nse_nsock.h index 614f71a1e..2c6fcf5bd 100644 --- a/nse_nsock.h +++ b/nse_nsock.h @@ -1,7 +1,9 @@ #ifndef NMAP_LUA_NSOCK_H #define NMAP_LUA_NSOCK_H -#include "nse_main.h" +extern "C" { + #include "lua.h" +} LUALIB_API int luaopen_nsock (lua_State *); diff --git a/nse_utility.h b/nse_utility.h index 0c125c5dc..affb3a056 100644 --- a/nse_utility.h +++ b/nse_utility.h @@ -1,7 +1,8 @@ #ifndef NMAP_NSE_UTILITY_H #define NMAP_NSE_UTILITY_H -#include "portlist.h" +class Port; +class Target; #if HAVE_STDINT_H #include diff --git a/osscan2.h b/osscan2.h index 2d6b1b8fb..2f7ecd441 100644 --- a/osscan2.h +++ b/osscan2.h @@ -133,8 +133,10 @@ #include #include #include "timing.h" -#include "osscan.h" #include "tcpip.h" +class FingerPrint; +class FingerTest; +class FingerPrintResultsIPv4; class Target; diff --git a/output.h b/output.h index 52b23bd70..114439c93 100644 --- a/output.h +++ b/output.h @@ -162,8 +162,12 @@ "think Solaris can support advanced localhost scans. You can probably "\ "use \"-Pn -sT localhost\" though.\n\n" -#include "portlist.h" +#include "nmap.h" +#ifndef NOLUA +#include "nse_main.h" +#endif #include +class PortList; #include #include diff --git a/targets.cc b/targets.cc index a2b3de65d..38c1f819f 100644 --- a/targets.cc +++ b/targets.cc @@ -340,6 +340,11 @@ static bool target_needs_new_hostgroup(const HostGroupState *hs, const Target *t return false; } +TargetGroup::~TargetGroup() { + if (this->netblock != NULL) + delete this->netblock; +} + /* Initializes (or reinitializes) the object with a new expression, such as 192.168.0.0/16 , 10.1.0-5.1-254 , or fe80::202:e3ff:fe14:1102 . Returns 0 for success */ diff --git a/targets.h b/targets.h index 864120e34..157fecbbf 100644 --- a/targets.h +++ b/targets.h @@ -126,8 +126,8 @@ #ifndef TARGETS_H #define TARGETS_H -#include "TargetGroup.h" - +#include +class NetBlock; class Target; class TargetGroup { @@ -138,10 +138,7 @@ public: this->netblock = NULL; } - ~TargetGroup() { - if (this->netblock != NULL) - delete this->netblock; - } + ~TargetGroup(); /* Initializes (or reinitializes) the object with a new expression, such as 192.168.0.0/16 , 10.1.0-5.1-254 , or