[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] Reading network data from netback.c


  • To: "xen-devel@xxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxx>
  • From: #PATHANGI JANARDHANAN JATINSHRAVAN# <JATINSHR001@xxxxxxxxxxxx>
  • Date: Sat, 4 Feb 2017 08:42:33 +0000
  • Accept-language: en-US
  • Delivery-date: Sat, 04 Feb 2017 08:43:01 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>
  • Spamdiagnosticmetadata: NSPM
  • Spamdiagnosticoutput: 1:99
  • Thread-index: AQHSfsKgiqsWpzNagku/k2Jg06f8Zg==
  • Thread-topic: Reading network data from netback.c

Hi all, 
Recently, I’ve been trying to modify netback.c to print network data that is going into the VM. For example, I’m doing an SSL handshake with the VM as the server, and I send the following hexadecimal string from the client to the VM:

160302002f0100002b03026161616161616161616161616161616161616161616161616161616161616161000002000501000000


Now,  to read this ingoing data to the VM from netback.c, I’ve been trying to get the sk_buff from the function xenvif_rx_action() and extract the TCP header from it using the tcp_hdr(skb) function. 


I then try to get the data from the TCP header using the line: (unsigned char *)((unsigned char *)tcph + (tcph->doff * 4))


But I am not able to parse the hexadecimal string as shown above. Printing the userdata portion of the sk_buff, I notice that I get things like the below:


\xffffffe9\xffffffe9


0CNCL-FYP03G\xffffff88\xffffffff\xffffffff\xfff\xffffff81\xffffffff\xffffffff\xffffffff\xffffffff\xffffffe8\xffffffbd|G\xffffff88\xffffffff\xffffffff)G\xffffff81\xffffffff\xffffffff\xffffffff\xffffffff 



The above data was truncated to 104 bytes.


Can anyone point me in the right direction regarding this and how to read the above data?


Thanks

Jatin

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.