读取下载的数据包头 [英] Reading A Downloaded Packet Header

查看:80
本文介绍了读取下载的数据包头的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在不将包另存为文件之前读取它的报头,而无需
使用数据包嗅探器?我正在尝试详细"查找数据包的旅程,但是我所能找到的只是关于此主题的一般性说明.我想读取数据包的标题,以便可以获取正在下载的IP地址和文件类型.一定有一点需要这样做,而不是使用数据包嗅探器在套接字级别或更高级别进行此操作.
我在哪里可以访问此信息以读取和删除/或终止数据包/下载?
谢谢
DS

Is it possible to read the header of a packet before it is saved as a file, without
using a packet sniffer? I''m trying to find "in detail" the journey of a packet, but all I can find is general statements about this subject. I want to read the header of a packet so that I can grab the IP address and file type that is downloading. There has to be a point to do this further up the stack rather than at the socket level or higher using a packet sniffer.
Where else can I access this info to read and delete/or terminate the packet/download?
Thanks
DS

推荐答案

如果您的应用程序正在保存这样的内容,答案当然是. br/> 另一方面,如果另一个应用程序超出了您的控制范围来保存数据包,那么您将无法执行此操作,除非您精确地嗅探该数据包或以某种方式控制了另一个应用程序.
If your application is saving such a content, the answer is, of course yes.
On the other hand, if another application, out of your control, is saving the packet, then you cannot do that, unless you precisely sniff the packet or take somehow control of the other application.


如果您没有使用数据包嗅探器,并且数据包未保存到文件中,那么您将如何看到"报头?
If you are not using a packet sniffer and the packet is not saved to a file then how would you ''see'' the header?


这种逻辑是否合理:如果有的话要保存为文件,这意味着它已经与文件应该存在于同一台机器上,所以答案是是"?

坏问题,这就是为什么我的答案可能不是很有用的原因.我不在乎,因为这不是我的错. :-)
您至少可以解释一下您尝试创建哪种网络代码……

—SA
Isn''t this logical: if something is to be saved as a file, it means it already exists on the same machine as the file is supposed to be, so the answer is "yes"?

Bad Question, that''s why my Answer maybe is not very useful. I don''t care because this is not my fault. :-)
You could have at least explained what kind of networking code are your trying to create…

—SA


这篇关于读取下载的数据包头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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