如何使用c#获取从源到目标的文件传输路由模式 [英] how to get route pattern of file transfer from source to destination using c#

查看:103
本文介绍了如何使用c#获取从源到目标的文件传输路由模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用c#

将文件从一个源传输到另一个目的地时获取路由模式图请逐步告诉我:



示例:

我想从ip地址192.168.1.4(源)发送文件到72.68.1.6(目的地)可能有很多路由通过它可以发送数据我希望看到路由



输出:

i想用图表形式的这条路线(网络图交通流量)



一条路线

192.168.1.4(来源)-2.2.2.0 / 24-172.21.20.3-172.21.20.0 / 24-172.20.12.1-72.20.12.3-72.68.1.6(desti)



另一条路线

192.168.1.4(来源)-2.2.2.0 / 24-172.21.20.3-173.1.6.1-173.1.4.2 -72.20.12.3-72.68.1.6(desti)

how to get route pattern diagram during file transferring from one source to another destination using c#
Pls tell me step by step:

Example:
I want to send a file from ip address 192.168.1.4(source) to 72.68.1.6(destination) there may be many routes through which data can sent i want to see the routes

Output:
i want this routes in Diagram form(network diagram traffic flow)

one route
192.168.1.4(source)-2.2.2.0/24-172.21.20.3-172.21.20.0/24-172.20.12.1-72.20.12.3-72.68.1.6(desti)

another route
192.168.1.4(source)-2.2.2.0/24-172.21.20.3-173.1.6.1-173.1.4.2-72.20.12.3-72.68.1.6(desti)

推荐答案

您的信息非常有限,但您可以在这里找到tracert的C#实现:使用ping-tracert [ ^ ]。您可以使用结果创建图表。
Your information is very limited, but you can find a C# implementation of tracert here: ICMP the ping-tracert[^]. You can use the results to create a diagram.


这样做有点问题。您可以尝试在代码中使用ICMP TRACERT实现来查找路由。这样做的问题是,某些路由器根本不会转发ICMP数据包,或者会因为某些愚蠢的原因而从正在通过FTP发送的正常流量中重新路由它们。



是的,我已经看到它发生在两个不同的ISP上。



此外,一些ISP和内容托管服务提供商可以将FTP流量放在与其他网络流量不同的路由上,这是罕见的。



在任何情况下,你无法知道流量是否真的发生在TRACERT实施所说的路线上。你也可能遇到FTP失败的问题,但是TRACERT说一切都很好,或者你可以找到相反的方法(这有点多见!)



基本上,如果您遇到FTP传输问题,则无法通过代码对其进行任何操作。关于你可以做的最好的事情是猜测问题所在。它通常完全不在用户做任何事情的可能性之外,所以我会说这个功能毫无意义。
There is a bit of a problem with doing this. You can attempt to find the route using a ICMP TRACERT implementation in your code. The problem with this is that some routers will either not forward ICMP packets at all or will reroute them from the normal traffic you're sending over FTP for some stupid reason.

Yes, I have seen it happen with two different ISPs.

Also, some ISP's and content hosting providers can put FTP traffic on separate routes from other web traffic, though this is rare.

In any case, you have no way of knowing if the traffic is actually going on the route that you're TRACERT implementation says it's on. You may also run into the problems where FTP fails, but TRACERT says everything is fine, or you may find the other way around (this is a bit more common!)

Basically, if you have a problem with the FTP transfer, you have no way of doing anything about it from your code. About the best you can do is guess at where the problem may be. It's usually going to be completely outside of the possibility of the user doing anything about it anyway so I'd say this "feature" is pretty pointless.


这篇关于如何使用c#获取从源到目标的文件传输路由模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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