mirror of
https://github.com/nmap/nmap.git
synced 2025-12-07 05:01: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 "nsock.h"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include "osscan.h"
|
|
||||||
#include "libnetutil/npacket.h"
|
#include "libnetutil/npacket.h"
|
||||||
|
|
||||||
/* Mention some classes here so we don't have to place the declarations in
|
/* Mention some classes here so we don't have to place the declarations in
|
||||||
@@ -140,6 +139,7 @@ class FPProbe;
|
|||||||
|
|
||||||
class Target;
|
class Target;
|
||||||
class FingerPrintResultsIPv6;
|
class FingerPrintResultsIPv6;
|
||||||
|
class FingerMatch;
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* CONSTANT DEFINITIONS *
|
* CONSTANT DEFINITIONS *
|
||||||
|
|||||||
@@ -129,6 +129,7 @@
|
|||||||
class FingerPrintResults;
|
class FingerPrintResults;
|
||||||
|
|
||||||
#include "FPEngine.h"
|
#include "FPEngine.h"
|
||||||
|
#include "osscan.h"
|
||||||
|
|
||||||
/* Maximum number of results allowed in one of these things ... */
|
/* Maximum number of results allowed in one of these things ... */
|
||||||
#define MAX_FP_RESULTS 36
|
#define MAX_FP_RESULTS 36
|
||||||
|
|||||||
@@ -125,6 +125,7 @@
|
|||||||
#include "nmap.h"
|
#include "nmap.h"
|
||||||
#include "nbase.h"
|
#include "nbase.h"
|
||||||
#include "NmapOps.h"
|
#include "NmapOps.h"
|
||||||
|
#include "osscan.h"
|
||||||
#include "services.h"
|
#include "services.h"
|
||||||
#include "nmap_error.h"
|
#include "nmap_error.h"
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
|||||||
@@ -126,10 +126,14 @@
|
|||||||
#ifndef NMAP_OPS_H
|
#ifndef NMAP_OPS_H
|
||||||
#define NMAP_OPS_H
|
#define NMAP_OPS_H
|
||||||
|
|
||||||
#include "osscan.h" /* FingerPrintDB */
|
#include "nmap.h"
|
||||||
#include "output.h"
|
#include "output.h"
|
||||||
#include <nsock.h>
|
#include <nsock.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <map>
|
||||||
|
|
||||||
|
class FingerPrintDB;
|
||||||
|
class FingerMatch;
|
||||||
|
|
||||||
class NmapOps {
|
class NmapOps {
|
||||||
public:
|
public:
|
||||||
|
|||||||
2
Target.h
2
Target.h
@@ -137,8 +137,8 @@
|
|||||||
|
|
||||||
#include "portreasons.h"
|
#include "portreasons.h"
|
||||||
#include "portlist.h"
|
#include "portlist.h"
|
||||||
#include "tcpip.h"
|
|
||||||
#include "scan_engine.h"
|
#include "scan_engine.h"
|
||||||
|
#include "osscan.h"
|
||||||
#include "osscan2.h"
|
#include "osscan2.h"
|
||||||
class FingerPrintResults;
|
class FingerPrintResults;
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
#ifndef NMAP_LUA_NSOCK_H
|
#ifndef NMAP_LUA_NSOCK_H
|
||||||
#define 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 *);
|
LUALIB_API int luaopen_nsock (lua_State *);
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
#ifndef NMAP_NSE_UTILITY_H
|
#ifndef NMAP_NSE_UTILITY_H
|
||||||
#define NMAP_NSE_UTILITY_H
|
#define NMAP_NSE_UTILITY_H
|
||||||
|
|
||||||
#include "portlist.h"
|
class Port;
|
||||||
|
class Target;
|
||||||
|
|
||||||
#if HAVE_STDINT_H
|
#if HAVE_STDINT_H
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|||||||
@@ -133,8 +133,10 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#include <list>
|
#include <list>
|
||||||
#include "timing.h"
|
#include "timing.h"
|
||||||
#include "osscan.h"
|
|
||||||
#include "tcpip.h"
|
#include "tcpip.h"
|
||||||
|
class FingerPrint;
|
||||||
|
class FingerTest;
|
||||||
|
class FingerPrintResultsIPv4;
|
||||||
class Target;
|
class Target;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
6
output.h
6
output.h
@@ -162,8 +162,12 @@
|
|||||||
"think Solaris can support advanced localhost scans. You can probably "\
|
"think Solaris can support advanced localhost scans. You can probably "\
|
||||||
"use \"-Pn -sT localhost\" though.\n\n"
|
"use \"-Pn -sT localhost\" though.\n\n"
|
||||||
|
|
||||||
#include "portlist.h"
|
#include "nmap.h"
|
||||||
|
#ifndef NOLUA
|
||||||
|
#include "nse_main.h"
|
||||||
|
#endif
|
||||||
#include <nsock.h>
|
#include <nsock.h>
|
||||||
|
class PortList;
|
||||||
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|||||||
@@ -340,6 +340,11 @@ static bool target_needs_new_hostgroup(const HostGroupState *hs, const Target *t
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TargetGroup::~TargetGroup() {
|
||||||
|
if (this->netblock != NULL)
|
||||||
|
delete this->netblock;
|
||||||
|
}
|
||||||
|
|
||||||
/* Initializes (or reinitializes) the object with a new expression, such
|
/* 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 .
|
as 192.168.0.0/16 , 10.1.0-5.1-254 , or fe80::202:e3ff:fe14:1102 .
|
||||||
Returns 0 for success */
|
Returns 0 for success */
|
||||||
|
|||||||
@@ -126,8 +126,8 @@
|
|||||||
#ifndef TARGETS_H
|
#ifndef TARGETS_H
|
||||||
#define TARGETS_H
|
#define TARGETS_H
|
||||||
|
|
||||||
#include "TargetGroup.h"
|
#include <list>
|
||||||
|
class NetBlock;
|
||||||
class Target;
|
class Target;
|
||||||
|
|
||||||
class TargetGroup {
|
class TargetGroup {
|
||||||
@@ -138,10 +138,7 @@ public:
|
|||||||
this->netblock = NULL;
|
this->netblock = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
~TargetGroup() {
|
~TargetGroup();
|
||||||
if (this->netblock != NULL)
|
|
||||||
delete this->netblock;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Initializes (or reinitializes) the object with a new expression,
|
/* Initializes (or reinitializes) the object with a new expression,
|
||||||
such as 192.168.0.0/16 , 10.1.0-5.1-254 , or
|
such as 192.168.0.0/16 , 10.1.0-5.1-254 , or
|
||||||
|
|||||||
Reference in New Issue
Block a user