home *** CD-ROM | disk | FTP | other *** search
/ Team Palmtops 7 / Palmtops_numero07.iso / WinCE / SDKWindowsCE / AutoPC / apcsdk10.exe / data1.cab / Emulation_Include_Files / icmpapi.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-05-13  |  3.2 KB  |  144 lines

  1. /*++
  2.  
  3. Copyright (c) 1991-1998  Microsoft Corporation
  4.  
  5. Module Name:
  6.  
  7.     icmpapi.h
  8.  
  9. Abstract:
  10.  
  11.     Declarations for the Win32 ICMP Echo request API.
  12.  
  13. --*/
  14.  
  15. #ifndef _ICMP_INCLUDED_
  16. #define _ICMP_INCLUDED_
  17.  
  18.  
  19. //
  20. // Exported Routines.
  21. //
  22.  
  23. //++
  24. //
  25. // Routine Name:
  26. //
  27. //     IcmpCreateFile
  28. //
  29. // Routine Description:
  30. //
  31. //     Opens a handle on which ICMP Echo Requests can be issued.
  32. //
  33. // Arguments:
  34. //
  35. //     None.
  36. //
  37. // Return Value:
  38. //
  39. //     An open file handle or INVALID_HANDLE_VALUE. Extended error information
  40. //     is available by calling GetLastError().
  41. //
  42. //--
  43.  
  44. HANDLE
  45. WINAPI
  46. IcmpCreateFile(
  47.     VOID
  48.     );
  49.  
  50.  
  51. //++
  52. //
  53. // Routine Name:
  54. //
  55. //     IcmpCloseHandle
  56. //
  57. // Routine Description:
  58. //
  59. //     Closes a handle opened by ICMPOpenFile.
  60. //
  61. // Arguments:
  62. //
  63. //     IcmpHandle  - The handle to close.
  64. //
  65. // Return Value:
  66. //
  67. //     TRUE if the handle was closed successfully, otherwise FALSE. Extended
  68. //     error information is available by calling GetLastError().
  69. //
  70. //--
  71.  
  72. BOOL
  73. WINAPI
  74. IcmpCloseHandle(
  75.     HANDLE  IcmpHandle
  76.     );
  77.  
  78.  
  79.  
  80. //++
  81. //
  82. // Routine Name:
  83. //
  84. //     IcmpSendEcho
  85. //
  86. // Routine Description:
  87. //
  88. //     Sends an ICMP Echo request and returns any replies. The
  89. //     call returns when the timeout has expired or the reply buffer
  90. //     is filled.
  91. //
  92. // Arguments:
  93. //
  94. //     IcmpHandle           - An open handle returned by ICMPCreateFile.
  95. //
  96. //     DestinationAddress   - The destination of the echo request.
  97. //
  98. //     RequestData          - A buffer containing the data to send in the
  99. //                            request.
  100. //
  101. //     RequestSize          - The number of bytes in the request data buffer.
  102. //
  103. //     RequestOptions       - Pointer to the IP header options for the request.
  104. //                            May be NULL.
  105. //
  106. //     ReplyBuffer          - A buffer to hold any replies to the request.
  107. //                            On return, the buffer will contain an array of
  108. //                            ICMP_ECHO_REPLY structures followed by the
  109. //                            options and data for the replies. The buffer
  110. //                            should be large enough to hold at least one
  111. //                            ICMP_ECHO_REPLY structure plus
  112. //                            MAX(RequestSize, 8) bytes of data since an ICMP
  113. //                            error message contains 8 bytes of data.
  114. //
  115. //     ReplySize            - The size in bytes of the reply buffer.
  116. //
  117. //     Timeout              - The time in milliseconds to wait for replies.
  118. //
  119. // Return Value:
  120. //
  121. //     Returns the number of ICMP_ECHO_REPLY structures stored in ReplyBuffer.
  122. //     The status of each reply is contained in the structure. If the return
  123. //     value is zero, extended error information is available via
  124. //     GetLastError().
  125. //
  126. //--
  127.  
  128. DWORD
  129. WINAPI
  130. IcmpSendEcho(
  131.     HANDLE                   IcmpHandle,
  132.     IPAddr                   DestinationAddress,
  133.     LPVOID                   RequestData,
  134.     WORD                     RequestSize,
  135.     PIP_OPTION_INFORMATION   RequestOptions,
  136.     LPVOID                   ReplyBuffer,
  137.     DWORD                    ReplySize,
  138.     DWORD                    Timeout
  139.     );
  140.  
  141.  
  142. #endif // _ICMP_INCLUDED_
  143.  
  144.