what would cause ICMPsendEcho to fail when ping.exe succeeds

前端 未结 3 1379
走了就别回头了
走了就别回头了 2021-02-15 15:35

I have an interesting situation on my hands, and I\'m not quite sure how to go about troubleshooting it. I did a few searches for something similar to my situation, but nothing

相关标签:
3条回答
  • 2021-02-15 16:14

    The answer might be in the size of the ping you send (there seems to be an undocumented minimum size of 20 bytes for the payload). See this post for more info: http://groups.google.com/group/microsoft.public.win32.programmer.networks/browse_thread/thread/2b28b994a8067713?pli=1

    0 讨论(0)
  • 2021-02-15 16:30

    Have you checked the user permissions? Ping.exe does not require administrator rights, but the raw ICMP commands in Windows need administrator privileges.

    See this example: http://www.delphi-central.com/tutorials/icmp-ping.aspx

    Please note, however, that for Windows NT and Windows 2000 implementations, Raw Sockets are subject to security checks and are accessible only to members of the administrator's group.


    Another possible reason could be a firewall which blocks ICMP packets.

    0 讨论(0)
  • 2021-02-15 16:31

    We had the same error with a client. The solution was to implement IcmpSendEcho2 as a plan B when IcmpSendEcho fails. It worked!

    0 讨论(0)
提交回复
热议问题