From 697a22fd63a4b534ae6658452535fbb9c805898b Mon Sep 17 00:00:00 2001 From: dmiller Date: Mon, 30 Dec 2019 04:48:50 +0000 Subject: [PATCH] Move some flag defines from services.h to scan_lists.h where they make more sense. --- idle_scan.cc | 1 - protocols.cc | 1 - scan_lists.h | 8 ++++++++ services.h | 8 -------- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/idle_scan.cc b/idle_scan.cc index 86dbcf9e3..1a01ee036 100644 --- a/idle_scan.cc +++ b/idle_scan.cc @@ -166,7 +166,6 @@ #include "nmap.h" #include "scan_lists.h" #include "NmapOps.h" -#include "services.h" #include "Target.h" #include "nmap_error.h" #include "output.h" diff --git a/protocols.cc b/protocols.cc index 0af214c22..e940a033b 100644 --- a/protocols.cc +++ b/protocols.cc @@ -132,7 +132,6 @@ #include "protocols.h" #include "NmapOps.h" -#include "services.h" #include "charpool.h" #include "nmap_error.h" #include "utils.h" diff --git a/scan_lists.h b/scan_lists.h index 0605833c0..194c146a4 100644 --- a/scan_lists.h +++ b/scan_lists.h @@ -129,6 +129,14 @@ #ifndef SCAN_LISTS_H #define SCAN_LISTS_H +/* just flags to indicate whether a particular port number should get tcp + * scanned, udp scanned, or both + */ +#define SCAN_TCP_PORT (1 << 0) +#define SCAN_UDP_PORT (1 << 1) +#define SCAN_SCTP_PORT (1 << 2) +#define SCAN_PROTOCOLS (1 << 3) + /* The various kinds of port/protocol scans we can have * Each element is to point to an array of port/protocol numbers */ diff --git a/services.h b/services.h index 7c1fac5e3..79dd99913 100644 --- a/services.h +++ b/services.h @@ -142,14 +142,6 @@ #define SERVICE_TABLE_SIZE 1024 -/* just flags to indicate whether a particular port number should get tcp - * scanned, udp scanned, or both - */ -#define SCAN_TCP_PORT (1 << 0) -#define SCAN_UDP_PORT (1 << 1) -#define SCAN_SCTP_PORT (1 << 2) -#define SCAN_PROTOCOLS (1 << 3) - int addportsfromservmask(char *mask, u8 *porttbl, int range_type); struct servent *nmap_getservbyport(int port, const char *proto); void gettoppts(double level, char *portlist, struct scan_lists * ports, char *exclude_list = NULL);