On Dec 6, 2010, at 6:39 PM, 刘昆 wrote:

> Thank you. Now I have noticed "data" is a pointer
> 
> I add "printf("%s\n",(pinfo->src).data)"

For almost all address types, including IPv4 and IPv6 addresses, the data field 
does *NOT* point to a text string.  Wireshark deals with binary packet data; it 
does not turn everything into nice easy-to-print strings.  If you want to get 
the string corresponding to the address, use Wireshark's ip_to_str() routine.
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <[email protected]>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:[email protected]?subject=unsubscribe

Reply via email to