ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: Re: [Wireshark-dev] How to get Destination IP in plugin

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Thu, 3 Jan 2008 17:45:04 -0800

On Jan 3, 2008, at 3:05 PM, Diaconou, Alex wrote:

The data field of the pinfo->src address structure ( (pinfo- >src).data )
contains gibberish - no IP address.  What could be the cause of this?

What are the bytes pointed to by the pointer in that data field? It should point to 4 bytes of IPv4 address if "type" is AT_IPv4, or 16 bytes of IPv6 address if "type" is AT_IPv6.