1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

Reduce more inclusions of .h files by forward-declaring classes

This commit is contained in:
dmiller
2015-07-02 04:14:51 +00:00
parent 40dc3c5830
commit ffad433b43
11 changed files with 30 additions and 13 deletions

View File

@@ -129,7 +129,6 @@
#include "nsock.h"
#include <vector>
#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 *

View File

@@ -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

View File

@@ -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

View File

@@ -126,10 +126,14 @@
#ifndef NMAP_OPS_H
#define NMAP_OPS_H
#include "osscan.h" /* FingerPrintDB */
#include "nmap.h"
#include "output.h"
#include <nsock.h>
#include <string>
#include <map>
class FingerPrintDB;
class FingerMatch;
class NmapOps {
public:

View File

@@ -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;

View File

@@ -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 *);

View File

@@ -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 <stdint.h>

View File

@@ -133,8 +133,10 @@
#include <vector>
#include <list>
#include "timing.h"
#include "osscan.h"
#include "tcpip.h"
class FingerPrint;
class FingerTest;
class FingerPrintResultsIPv4;
class Target;

View File

@@ -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 <nsock.h>
class PortList;
#include <stdarg.h>
#include <string>

View File

@@ -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 */

View File

@@ -126,8 +126,8 @@
#ifndef TARGETS_H
#define TARGETS_H
#include "TargetGroup.h"
#include <list>
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