

Then the picture changes and you need to reassess the situation. If you have confirmed you are tracing with the right interface and you have correctly typed your display filter, and you /still/ not seeing any packets, then the only thing to conclude is that those packets were never sent or received on your network interface. Then you should /only/ see packets with a source or destination port 8080. Once the trace has started, then you should be able to use type your filter (the /display/ filter) into the filter toolbar in the Wireshark interface. Then select that interface and click the Start button. To do this quickly and simply, I would click Capture > Interfaces and confirm which interface is receiving packets. tcp port 8080 is /capture/ filter, but tcp.port = 8080 is /display/ filter.įirst thing I would confirm is that I am using the right interface. In that case you can use libpcap Java wrappers to do the job (jpcap or pcap4j). If I understand the question thought, you need to filter packets before forwarding them (ie forward only HTTP content). However, if you only want to capture packets then the correct filter on the ports should do the job.

You have to decide whether to use a /capture/ filter or a /display/ filter - the syntax is different between those two filter types. 1 I don't think WireShark can do forwarding.
