Search code examples
javapcapjpcap

given a pcap file, how to find if a src ip address is local or remote using jpcap


Given a pcap file, how can I find out which src ip addresses are local and which are remote using jpcap? Can any one guide me?


Solution

  • You can't.

    There's nothing intrinsic in a pcap entry to tell you whether the packet was inbound or outbound.

    You'll need a configuration file to tell you which IPs are considered "local".