From 4faf19f738387ebcea89daf6d07cea3118df5c0f Mon Sep 17 00:00:00 2001 From: luis Date: Mon, 25 Jul 2011 18:30:05 +0000 Subject: [PATCH] Move constant definitions to the osscan2 header file --- osscan2.cc | 20 -------------------- osscan2.h | 30 +++++++++++++++++++++++++++++- 2 files changed, 29 insertions(+), 21 deletions(-) diff --git a/osscan2.cc b/osscan2.cc index fb790af82..9ce5eae19 100644 --- a/osscan2.cc +++ b/osscan2.cc @@ -100,26 +100,6 @@ #include #include -#define NUM_FPTESTS 13 -/* The number of tries we normally do. This may be increased if - the target looks like a good candidate for fingerprint submission, or fewer - if the user gave the --max-os-tries option */ -#define STANDARD_OS2_TRIES 2 - -// The minimum (and target) amount of time to wait between probes -// sent to a single host, in milliseconds. -#define OS_PROBE_DELAY 25 - -// The target amount of time to wait between sequencing probes sent to -// a single host, in milliseconds. The ideal is 500ms because of the -// common 2Hz timestamp frequencies. Less than 500ms and we might not -// see any change in the TS counter (and it gets less accurate even if -// we do). More than 500MS and we risk having two changes (and it -// gets less accurate even if we have just one). So we delay 100MS -// between probes, leaving 500MS between 1st and 6th. - -#define OS_SEQ_PROBE_DELAY 100 - using namespace std; extern NmapOps o; diff --git a/osscan2.h b/osscan2.h index 11efb6721..1c09b6814 100644 --- a/osscan2.h +++ b/osscan2.h @@ -101,8 +101,36 @@ class Target; -/********************** PROTOTYPES ***********************************/ +/****************************************************************************** + * CONSTANT DEFINITIONS * + ******************************************************************************/ + +#define NUM_FPTESTS 13 + +/* The number of tries we normally do. This may be increased if + the target looks like a good candidate for fingerprint submission, or fewer + if the user gave the --max-os-tries option */ +#define STANDARD_OS2_TRIES 2 + +// The minimum (and target) amount of time to wait between probes +// sent to a single host, in milliseconds. +#define OS_PROBE_DELAY 25 + +// The target amount of time to wait between sequencing probes sent to +// a single host, in milliseconds. The ideal is 500ms because of the +// common 2Hz timestamp frequencies. Less than 500ms and we might not +// see any change in the TS counter (and it gets less accurate even if +// we do). More than 500MS and we risk having two changes (and it +// gets less accurate even if we have just one). So we delay 100MS +// between probes, leaving 500MS between 1st and 6th. +#define OS_SEQ_PROBE_DELAY 100 + + + +/****************************************************************************** + * FUNCTION PROTOTYPES * + ******************************************************************************/ /* This is the primary OS detection function. If many Targets are passed in (the threshold is based on timing level), they are