Skip to content

Commit

Permalink
Move global_structures.h back into nmap.h now that things are sorted …
Browse files Browse the repository at this point in the history
…out better
  • Loading branch information
bonsaiviking committed Jul 2, 2015
1 parent ea4096c commit 40dc3c5
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 176 deletions.
2 changes: 1 addition & 1 deletion Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ endif

export SRCS = charpool.cc FingerPrintResults.cc FPEngine.cc FPModel.cc idle_scan.cc MACLookup.cc main.cc nmap.cc nmap_dns.cc nmap_error.cc nmap_ftp.cc NmapOps.cc NmapOutputTable.cc nmap_tty.cc osscan2.cc osscan.cc output.cc payload.cc portlist.cc portreasons.cc protocols.cc scan_engine.cc scan_engine_connect.cc scan_engine_raw.cc service_scan.cc services.cc Target.cc TargetGroup.cc targets.cc tcpip.cc timing.cc traceroute.cc utils.cc xml.cc $(NSE_SRC)

export HDRS = charpool.h FingerPrintResults.h FPEngine.h global_structures.h idle_scan.h MACLookup.h nmap_amigaos.h nmap_dns.h nmap_error.h nmap.h nmap_ftp.h NmapOps.h NmapOutputTable.h nmap_tty.h nmap_winconfig.h osscan2.h osscan.h output.h payload.h portlist.h portreasons.h protocols.h scan_engine.h scan_engine_connect.h scan_engine_raw.h service_scan.h services.h TargetGroup.h Target.h targets.h tcpip.h timing.h traceroute.h utils.h xml.h $(NSE_HDRS)
export HDRS = charpool.h FingerPrintResults.h FPEngine.h idle_scan.h MACLookup.h nmap_amigaos.h nmap_dns.h nmap_error.h nmap.h nmap_ftp.h NmapOps.h NmapOutputTable.h nmap_tty.h nmap_winconfig.h osscan2.h osscan.h output.h payload.h portlist.h portreasons.h protocols.h scan_engine.h scan_engine_connect.h scan_engine_raw.h service_scan.h services.h TargetGroup.h Target.h targets.h tcpip.h timing.h traceroute.h utils.h xml.h $(NSE_HDRS)

OBJS = charpool.o FingerPrintResults.o FPEngine.o FPModel.o idle_scan.o MACLookup.o main.o nmap_dns.o nmap_error.o nmap.o nmap_ftp.o NmapOps.o NmapOutputTable.o nmap_tty.o osscan2.o osscan.o output.o payload.o portlist.o portreasons.o protocols.o scan_engine.o scan_engine_connect.o scan_engine_raw.o service_scan.o services.o TargetGroup.o Target.o targets.o tcpip.o timing.o traceroute.o utils.o xml.o $(NSE_OBJS)

Expand Down
2 changes: 1 addition & 1 deletion TargetGroup.cc
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
#include "TargetGroup.h"
#include "NmapOps.h"
#include "nmap_error.h"
#include "global_structures.h"
#include "nmap.h"
#include "libnetutil/netutil.h"

#include <sstream>
Expand Down
161 changes: 0 additions & 161 deletions global_structures.h

This file was deleted.

3 changes: 1 addition & 2 deletions mswin32/nmap.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@
<ClInclude Include="..\charpool.h" />
<ClInclude Include="..\FingerPrintResults.h" />
<ClInclude Include="..\FPEngine.h" />
<ClInclude Include="..\global_structures.h" />
<ClInclude Include="..\idle_scan.h" />
<ClInclude Include="..\MACLookup.h" />
<ClInclude Include="..\nmap.h" />
Expand Down Expand Up @@ -345,4 +344,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>
33 changes: 28 additions & 5 deletions nmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -327,13 +327,36 @@
# define recvfrom6_t int
#endif

/********************** LOCAL INCLUDES *****************************/

#include "global_structures.h"

/***********************STRUCTURES**********************************/

/* Moved to global_structures.h */
/* The various kinds of port/protocol scans we can have
* Each element is to point to an array of port/protocol numbers
*/
struct scan_lists {
/* The "synprobes" are also used when doing a connect() ping */
unsigned short *syn_ping_ports;
unsigned short *ack_ping_ports;
unsigned short *udp_ping_ports;
unsigned short *sctp_ping_ports;
unsigned short *proto_ping_ports;
int syn_ping_count;
int ack_ping_count;
int udp_ping_count;
int sctp_ping_count;
int proto_ping_count;
//the above fields are only used for host discovery
//the fields below are only used for port scanning
unsigned short *tcp_ports;
int tcp_count;
unsigned short *udp_ports;
int udp_count;
unsigned short *sctp_ports;
int sctp_count;
unsigned short *prots;
int prot_count;
};

typedef enum { STYPE_UNKNOWN, HOST_DISCOVERY, ACK_SCAN, SYN_SCAN, FIN_SCAN, XMAS_SCAN, UDP_SCAN, CONNECT_SCAN, NULL_SCAN, WINDOW_SCAN, SCTP_INIT_SCAN, SCTP_COOKIE_ECHO_SCAN, MAIMON_SCAN, IPPROT_SCAN, PING_SCAN, PING_SCAN_ARP, IDLE_SCAN, BOUNCE_SCAN, SERVICE_SCAN, OS_SCAN, SCRIPT_PRE_SCAN, SCRIPT_SCAN, SCRIPT_POST_SCAN, TRACEROUTE, PING_SCAN_ND }stype;

/***********************PROTOTYPES**********************************/

Expand Down
1 change: 0 additions & 1 deletion nse_main.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ extern "C" {
}

#include "nmap.h"
#include "global_structures.h"

class ScriptResult
{
Expand Down
5 changes: 0 additions & 5 deletions todo/dmiller.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,9 @@

* Make sure Ndiff, Zenmap are 2to3 compatible with python -3

* make build process detect Python major version (2 or 3). Breaks on Arch Linux,
which uses Python 3 by default.

* Script to check for updated versions of included libs. Have shell for libpcap,
but should convert to python.

* Get rid of global_structures.h (integrate into more-specific header files)

* NSE stuff
* broadcast-srvloc-info - test
* broadcast-rpcbind - write, test
Expand Down

0 comments on commit 40dc3c5

Please sign in to comment.