发送 ICMPv6 回显请求
如何在 C# 中发送 ICMPv6 Echo 请求消息?此外,我需要指定使用 IPv6 的路径上的实际带宽、RTT、MTU(IPv6 数据包中没有 DF 标志)和数据包丢失。
How can I send an ICMPv6 Echo Request Message in C#? Further I'd need to appoint the actual bandwidth, RTT, MTU on path using IPv6 (There is no DF flag in IPv6 packet) and the Packet Loss.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否尝试过 System.Net.NetworkInformation.Ping 类? Send() 方法返回一个 PingReply 对象,其中包含状态和往返时间。不确定您是否可以从中提取其他信息(从来不需要)。
在幕后,Ping 使用 Windows IP 帮助程序功能 (http://msdn.microsoft.com/en-us/library/windows/desktop/aa366071%28v=VS.85%29.aspx),例如 Icmp6SendEcho2。通过直接使用这些函数,您可能能够获得比 Ping 包装器类公开的更多信息,例如:(
其中“replyBuffer”是 ICMPV6_ECHO_REPLY 结构 - http://msdn.microsoft.com/en-us/library/windows/desktop/bb485842%28v=VS.85%29.aspx)
不确定是否有办法获得MTU 或真正的总带宽,但希望这至少是一个开始!
Have you tried the System.Net.NetworkInformation.Ping class? The Send() method returns a PingReply object which contains status and round-trip time. Not sure if you can pull other information out of it (haven't ever needed to).
Under the hood, Ping uses Windows IP Helper Functions (http://msdn.microsoft.com/en-us/library/windows/desktop/aa366071%28v=VS.85%29.aspx) such as Icmp6SendEcho2. You might be able to get more information than the Ping wrapper class exposes by using those functions directly, e.g.:
(where 'replyBuffer' is an ICMPV6_ECHO_REPLY struct - http://msdn.microsoft.com/en-us/library/windows/desktop/bb485842%28v=VS.85%29.aspx)
Not sure if there's a way to get MTU or the true total bandwidth, but hopefully this is at least a start!