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.0 KiB

  1. /*****************************************************************************
  2. *
  3. * $Workfile: PingICMP.h $
  4. *
  5. * Copyright (C) 1997 Hewlett-Packard Company.
  6. * Copyright (C) 1997 Microsoft Corporation.
  7. * All rights reserved.
  8. *
  9. * 11311 Chinden Blvd.
  10. * Boise, Idaho 83714
  11. *
  12. *****************************************************************************
  13. *
  14. * $Log: /StdTcpMon/Common/PingICMP.h $
  15. *
  16. * 2 7/14/97 2:35p Binnur
  17. * copyright statement
  18. *
  19. * 1 7/02/97 2:25p Binnur
  20. * Initial File
  21. *
  22. *****************************************************************************/
  23. #ifndef INC_PINGICMP_H
  24. #define INC_PINGICMP_H
  25. class CMemoryDebug;
  26. class CPingICMP
  27. #if defined _DEBUG || defined DEBUG
  28. : public CMemoryDebug
  29. #endif
  30. {
  31. public:
  32. CPingICMP( const char *pHost );
  33. ~CPingICMP();
  34. BOOL Ping();
  35. private:
  36. HANDLE hIcmp;
  37. int m_iLastError; // Last error from Winsock call
  38. char m_szHost[MAX_NETWORKNAME_LEN];
  39. BOOL Open();
  40. BOOL Close();
  41. IPAddr ResolveAddress();
  42. };
  43. #endif // INC_PINGICMP_H