You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I am trying to capture tcp traffic (similar to what tcpdump captures). From the tcp packet I am trying to get the source and destination port and source and destination IP addresses.
Here is how I am getting the tcpPacket
But I can't see any method to obtain source and destination IPs. I tried looking into the tcp headers. I also tried looking into the payload like this.
tcpPacket.getPayload().get(IpV4Packet.class)
But this just provide null as payload is of type UnknownPacket.
Is there any way to get the IP information for TCP traffic?
The text was updated successfully, but these errors were encountered:
Hi,
I am trying to capture tcp traffic (similar to what tcpdump captures). From the tcp packet I am trying to get the source and destination port and source and destination IP addresses.
Here is how I am getting the tcpPacket
TcpPacket tcpPacket = pcapHandle.getNextPacketEx().get(TcpPacket.class);
But I can't see any method to obtain source and destination IPs. I tried looking into the tcp headers. I also tried looking into the payload like this.
tcpPacket.getPayload().get(IpV4Packet.class)
But this just provide null as payload is of type UnknownPacket.
Is there any way to get the IP information for TCP traffic?
The text was updated successfully, but these errors were encountered: