C# 中的 TraceRoute 和 Ping [英] TraceRoute and Ping in C#

查看:44
本文介绍了C# 中的 TraceRoute 和 Ping的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人手边有 C# 代码来对目标计算机执行 ping 和跟踪路由?我正在寻找一个纯代码解决方案,而不是我现在正在做的,它调用 ping.exe 和 tracert.exe 程序并解析输出.我想要更强大的东西.

Does anyone have C# code handy for doing a ping and traceroute to a target computer? I am looking for a pure code solution, not what I'm doing now, which is invoking the ping.exe and tracert.exe program and parsing the output. I would like something more robust.

推荐答案

尽管基类库包括 Ping,BCL 不包含任何跟踪功能.

Although the Base Class Library includes Ping, the BCL does not include any tracert functionality.

然而,快速搜索发现有两个开源尝试,第一个在 C# 中,第二个在 C++ 中:

However, a quick search reveals two open-source attempts, the first in C# the second in C++:

这篇关于C# 中的 TraceRoute 和 Ping的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆