Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.9 KiB

  1. #ifndef __TCP_h__
  2. #define __TCP_h__
  3. /**************************************************************************
  4. File: icw.h
  5. Description:
  6. **************************************************************************/
  7. // === Structures Required by the ICMP.DLL ====================================
  8. typedef struct {
  9. unsigned char Ttl; // Time To Live
  10. unsigned char Tos; // Type Of Service
  11. unsigned char Flags; // IP header flags
  12. unsigned char OptionsSize; // Size in bytes of options data
  13. unsigned char *OptionsData; // Pointer to options data
  14. } IP_OPTION_INFORMATION, * PIP_OPTION_INFORMATION;
  15. typedef struct {
  16. DWORD Address; // Replying address
  17. unsigned long Status; // Reply status
  18. unsigned long RoundTripTime; // RTT in milliseconds
  19. unsigned short DataSize; // Echo data size
  20. unsigned short Reserved; // Reserved for system use
  21. void *Data; // Pointer to the echo data
  22. IP_OPTION_INFORMATION Options; // Reply options
  23. } IP_ECHO_REPLY, * PIP_ECHO_REPLY;
  24. typedef HANDLE (WINAPI *ICMPCREATEFILE)(VOID);
  25. typedef BOOL (WINAPI *ICMPCLOSEHANDLE)(HANDLE);
  26. typedef DWORD (WINAPI *ICMPSENDECHO )(
  27. HANDLE, DWORD, LPVOID, WORD,
  28. PIP_OPTION_INFORMATION, LPVOID,
  29. DWORD, DWORD
  30. );
  31. #ifdef __cplusplus
  32. extern "C"
  33. {
  34. #endif
  35. DWORD PingHost();
  36. BOOL Ping(LPSTR szIPAddress);
  37. BOOL CheckHostName(LPSTR szIISServer);
  38. #ifdef __cplusplus
  39. }
  40. #endif
  41. #endif // __TCP_H__