关于“pacaket size limited during capture"的解释

前言:
在linux下用tcpdump抓取http数据包,之后用wireshark打开,发现数据包的内容是不全的,如图:
这时,想分析和获取http包中的内容是不可能是,在图中可以发现,wireshark给出了“ Packet size limited during cap ”的提示,和:“ HTTP truncated ”的提示。这是什么呢?

对于这个问题,一个“外国朋友的MAIL中”给了非常好的解答,MAIL部分原文如下:
Maynard, Chris wrote:
"Packet Size limited during capture" tells me that the packet was bigger than the snaplen set, so the packet was truncated when captured.  In Wireshark, the snaplen is set in the capture options dialog using the "Limit each packet to ___ bytes" option, and with dumpcap, tshark and tcpdump it is set via the "-s <snaplen>" option.  If not specified, tcpdump uses a default snaplen of 68 (or 96, depending on the platform).
非常感谢这位外国朋友在MAIL中的解释。
 
这个问题主要有两方面的原因:
1)在wireshark等包分析软件中,可以设置包的长度,如果不当可能回出现这个问题; wireshark的设置如下图(在[Capture]---[Options]下配置):
 
 
2)用Tcpdump进行抓包时,没有用-s参数指定抓取数据的长度,采用了默认长度为68或96字节;-s0则表示没有长度的限制。
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值