From 0ff1d601dfadfd19e286c021fd1288e8b8b4b7c2 Mon Sep 17 00:00:00 2001 From: sje Date: Tue, 31 Jul 2007 05:07:21 +0000 Subject: use yapp api for popup classes use fontservice for fame background colour add beta changelog url link to svn log use IPHLPAPI.dll if available, and use only one icmp file handle git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@316 4f64403b-2f21-0410-a795-97e2b3489a10 --- ping/icmp.h | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'ping/icmp.h') diff --git a/ping/icmp.h b/ping/icmp.h index 902942e..95efc28 100644 --- a/ping/icmp.h +++ b/ping/icmp.h @@ -4,9 +4,11 @@ #define _ICMP_H //#include +#include +#include // Structures required to use functions in ICMP.DLL - +/* typedef struct { unsigned char Ttl; // Time To Live unsigned char Tos; // Type Of Service @@ -26,16 +28,16 @@ typedef struct { unsigned char ReplyData[8]; } IP_ECHO_REPLY, * PIP_ECHO_REPLY; - +*/ typedef HANDLE (WINAPI* pfnHV)(VOID); typedef BOOL (WINAPI* pfnBH)(HANDLE); -typedef DWORD (WINAPI* pfnDHDPWPipPDD)(HANDLE, DWORD, LPVOID, WORD, PIP_OPTION_INFORMATION, LPVOID, DWORD, DWORD); // evil, no? +typedef DWORD (WINAPI* pfnDHDPWPipPDD)(HANDLE, HANDLE, FARPROC, PVOID, IPAddr, LPVOID, WORD, PIP_OPTION_INFORMATION, LPVOID, DWORD, DWORD); class ICMP { protected: pfnHV pIcmpCreateFile; pfnBH pIcmpCloseHandle; - pfnDHDPWPipPDD pIcmpSendEcho; + pfnDHDPWPipPDD pIcmpSendEcho2; HMODULE hDLL; @@ -46,13 +48,16 @@ protected: // protected constructor - singleton class ICMP(); - static ICMP instance; + static ICMP *instance; + + char *buff; public: ~ICMP(); - static ICMP *get_instance() {return &instance;} + static ICMP *get_instance(); + static void cleanup(); - bool ping(char *host, IP_ECHO_REPLY &reply); + bool ping(char *host, ICMP_ECHO_REPLY &reply); void set_timeout(unsigned int t) { timeout = t; -- cgit v1.2.3