Wireshark-dev: Re: [Wireshark-dev] I want to print the string tvb->real_data on the ubuntu term
From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Mon, 25 Oct 2010 15:39:36 -0700
On Oct 24, 2010, at 2:25 AM, 刘昆 wrote:

> tvb->real_data is a pointer.And I guess the contents of this pointer 
> should be the  payload of the packet just as
> 
> "const guint8 *) 0x8b53042 "GET http://www.baidu.com/ HTTP/1.1\r\nHost: 
> www.baidu.com\r\nUser-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; 
> rv:1.9.2.11) Gecko/20101013 Linux Mint/9 (Isadora) 
> Firefox/3.6.11\r\nAccept: text/html,applic"...

Yes, but there's no guarantee that the payload of the packet is printable text.

*Even if the packet is an HTTP request or response*, there's no guarantee of that, as an HTTP GET response might contain raw binary data (consider what happens if you fetch an image).