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:
@@ -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 *
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
2
Target.h
2
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;
|
||||
|
||||
|
||||
@@ -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 *);
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
|
||||
6
output.h
6
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 <nsock.h>
|
||||
class PortList;
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <string>
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user