#ifndef MAIN_H_
#define MAIN_H_
#endif /*MAIN_H_*/
#define COPYRIGHT "Copyrights: Chebotarev Roman (2008)."
#define VERSION "0.9.2 (15.10.2008)"
#define ICMP_DLL_2K "icmp.dll"
#define ICMP_DLL_XP "Iphlpapi.dll"
#define MAX_THREADS_COUNT MAXIMUM_WAIT_OBJECTS /* MAXIMUM_WAIT_OBJECTS == 64 (winbase.h) */
#define INET_ADDR_LEN 16
#define DEF_PACKET_COUNT 2
#define DEF_PACKET_SIZE 32
#define DEF_SUBNET_MASK_LEN 24
#define DEF_WAIT_TIME 1000
#define HOSTNAME_LEN 1024
extern HINSTANCE icmpdll;
typedef DWORD(CALLBACK* IcmpSendEcho)(HANDLE, IPAddr, LPVOID, WORD,
PIP_OPTION_INFORMATION, LPVOID, DWORD, DWORD);
typedef HANDLE (CALLBACK* IcmpCreateFile)(void);
typedef BOOL (* IcmpCloseHandle)(HANDLE IcmpHandle);
extern IcmpSendEcho icmp_echo;
extern IcmpCreateFile icmp_create_file;
extern IcmpCloseHandle icmp_close_file;
extern CRITICAL_SECTION host_incr;
extern uint32_t hosts_count;
extern uint8_t flood_mode;
extern uint32_t total_sended;
extern uint32_t unfinished_echoes_count;
extern uint32_t start_scan_time;
extern uint32_t end_scan_time;
typedef struct config
{
uint32_t netmask_len;
uint32_t packets_count;
uint32_t wait_time;
uint32_t packet_size;
uint8_t no_rev_resolve;
uint8_t flood;
uint8_t *subnet_ptr;
}CONFIG;
typedef struct echo_params
{
struct config * config_params;
uint32_t dst_ip;
uint8_t release_mem_after_use;
uint32_t * hosts_count;
CRITICAL_SECTION * host_incr;
}ECHO_PARAMS;