IP主机主机名之间的tcpdump差异| IP和主机主机名

发布于 2025-02-12 11:51:08 字数 182 浏览 1 评论 0原文

tcpdump中,以下两个命令之间的区别是?我试图理解,但它们对我来说似乎几乎相同。

tcpdump ip host google.com

tcpdump ip and host google.com

In tcpdump, which is the difference between the following two commands? I tried to understand but they seems pretty much the same to me.

tcpdump ip host google.com

and

tcpdump ip and host google.com

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

弱骨蛰伏 2025-02-19 11:51:08

没有区别。如果比较包含-D选项生成的数据包匹配代码,则可以看到它们产生相同的结果:

tcpdump -d "ip host google.com"
(000) ldh      [12]
(001) jeq      #0x800           jt 2    jf 7
(002) ld       [26]
(003) jeq      #0x8efa41ae      jt 6    jf 4
(004) ld       [30]
(005) jeq      #0x8efa41ae      jt 6    jf 7
(006) ret      #262144
(007) ret      #0

tcpdump -d "ip and host google.com"
(000) ldh      [12]
(001) jeq      #0x800           jt 2    jf 7
(002) ld       [26]
(003) jeq      #0x8efa41ae      jt 6    jf 4
(004) ld       [30]
(005) jeq      #0x8efa41ae      jt 6    jf 7
(006) ret      #262144
(007) ret      #0

There is no difference. If you compare the packet-matching code, generated by including the -d option, then you can see that they produce identical results:

tcpdump -d "ip host google.com"
(000) ldh      [12]
(001) jeq      #0x800           jt 2    jf 7
(002) ld       [26]
(003) jeq      #0x8efa41ae      jt 6    jf 4
(004) ld       [30]
(005) jeq      #0x8efa41ae      jt 6    jf 7
(006) ret      #262144
(007) ret      #0

tcpdump -d "ip and host google.com"
(000) ldh      [12]
(001) jeq      #0x800           jt 2    jf 7
(002) ld       [26]
(003) jeq      #0x8efa41ae      jt 6    jf 4
(004) ld       [30]
(005) jeq      #0x8efa41ae      jt 6    jf 7
(006) ret      #262144
(007) ret      #0
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文