开发者

tcpdump: localhost to localhost [closed]

开发者 https://www.devze.com 2023-01-04 18:57 出处:网络
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.

Closed 7 years ago.

开发者_如何转开发 Improve this question

I write a program that send TCP packets from localhost to localhost. And I want to use tcpdump to capture the packets. But nothing is captured. My command in Ubuntu:

sudo tcpdump

What argument shall I add? Thanks!


sudo tcpdump -i lo

Notes

  • If you get tcpdump: lo: No such device exists, get the name by coping it from the output of
sudo tcpdump -D

For example, if the output is as below you need lo0 (which is reusult 9. here:

1.en0 [Up, Running]
2.p2p0 [Up, Running]
3.awdl0 [Up, Running]
4.llw0 [Up, Running]
5.utun0 [Up, Running]
6.utun1 [Up, Running]
7.utun2 [Up, Running]
8.utun3 [Up, Running]
9.lo0 [Up, Running, Loopback]
0

精彩评论

暂无评论...
验证码 换一张
取 消