#ifndef _ICMPAPI_H
#define _ICMPAPI_H

#if __POCC__ >= 500
#pragma once
#endif

/* Windows ICMP Echo Request API definitions */

#if defined(WIN32_DEFAULT_LIBS)
#pragma comment(lib, "iphlpapi.lib")
#endif

#ifdef __cplusplus
extern "C" {
#endif

HANDLE WINAPI IcmpCreateFile(void);
HANDLE WINAPI Icmp6CreateFile(void);
BOOL WINAPI IcmpCloseHandle(HANDLE);
DWORD WINAPI IcmpSendEcho(HANDLE,IPAddr,LPVOID,WORD,PIP_OPTION_INFORMATION,LPVOID,DWORD,DWORD);
#ifdef PIO_APC_ROUTINE_DEFINED
DWORD WINAPI IcmpSendEcho2(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,IPAddr,LPVOID,WORD,PIP_OPTION_INFORMATION,LPVOID,DWORD,DWORD);
DWORD WINAPI Icmp6SendEcho2(HANDLE,HANDLE,PIO_APC_ROUTINE,PVOID,struct sockaddr_in6*,struct sockaddr_in6*,LPVOID,WORD,PIP_OPTION_INFORMATION,LPVOID,DWORD,DWORD);
#else
DWORD WINAPI IcmpSendEcho2(HANDLE,HANDLE,FARPROC,PVOID,IPAddr,LPVOID,WORD,PIP_OPTION_INFORMATION,LPVOID,DWORD,DWORD);
DWORD WINAPI Icmp6SendEcho2(HANDLE,HANDLE,FARPROC,PVOID,struct sockaddr_in6*,struct sockaddr_in6*,LPVOID,WORD,PIP_OPTION_INFORMATION,LPVOID,DWORD,DWORD);
#endif /* PIO_APC_ROUTINE_DEFINED */
DWORD IcmpParseReplies(LPVOID,DWORD);
DWORD Icmp6ParseReplies(LPVOID,DWORD);

#ifdef __cplusplus
}
#endif

#endif /* _ICMPAPI_H */
