문제

I need to capture packets which are coming from interface (say eth0) and need to print those packet details (same as wireshark) through C language. Packet can be any general packet. is there any way to achieve this ?? (I don't want to use any application like wireshark for this purpose)

OS:Centos

도움이 되었습니까?

해결책

Try having a look at libpcap. http://www.tcpdump.org/ I believe it will do what you want.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top