#include "nmap_error.h" #include "tcpip.h" #include #include #include #ifndef _RNDRANGE #define _RNDRANGE class rndRange{ public: rndRange() { } bool ip_is_reserved(struct in_addr &ip); rndRange(int maxHosts); ~rndRange(); void addRange(char **Options, const int &Pointer, const int &limit); void getRandHost(struct in_addr &ip); private: //the maximum number of hosts to scan unsigned int _mMaxHosts; //how many IP's are in this range unsigned int _mTotalRange; //where we store all the ip ranges unsigned int *_mRanges[2]; //how many ranges are there? unsigned int _mSzRanges; bool _mFullScan; //data for second mathod. struct _sHostsScanned { _sHostsScanned * next; unsigned int ip; }*_mHostsScanned[256]; }; #endif