Closed sandeepbs39 closed 9 years ago
I'm not sure what you're asking.
Capture and decode all outgoing TCP data packets destined for port 80 on the interface for 192.168.0.10: but i want to capture and decode all TCP packets from Port 80 to the interface 192.168.0.10
You can use this pcap filter: tcp src port 80 dst host 192.168.0.10
I came up with that filter by reading this: http://www.tcpdump.org/manpages/pcap-filter.7.html
You can make sure you have the correct device opened by using the findDevice()
helper and passing in the IP address of the interface. Otherwise you can use deviceList()
to return a list of available devices, and pass the name
you want to open()
. Be aware you may need elevated privileges for this to work.
Additionally, you may need the correct filter string as @crawfordcomeaux alluded to.
In that example program is working for interface to port 80 but i want snif the packets from port to interface is it possible?