xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* Reading network data going into a VM from netback.c
@ 2017-01-16 13:46 #PATHANGI JANARDHANAN JATINSHRAVAN#
  0 siblings, 0 replies; 5+ messages in thread
From: #PATHANGI JANARDHANAN JATINSHRAVAN# @ 2017-01-16 13:46 UTC (permalink / raw)
  To: xen-devel@lists.xen.org


[-- Attachment #1.1: Type: text/plain, Size: 848 bytes --]

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.


Can anyone point me in the right direction regarding this?


Thanks

Jatin

[-- Attachment #1.2: Type: text/html, Size: 3511 bytes --]

[-- Attachment #2: Type: text/plain, Size: 127 bytes --]

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Reading network data going into a VM from netback.c
@ 2017-01-17  2:24 #PATHANGI JANARDHANAN JATINSHRAVAN#
  0 siblings, 0 replies; 5+ messages in thread
From: #PATHANGI JANARDHANAN JATINSHRAVAN# @ 2017-01-17  2:24 UTC (permalink / raw)
  To: xen-devel@lists.xen.org


[-- Attachment #1.1: Type: text/plain, Size: 848 bytes --]

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.


Can anyone point me in the right direction regarding this?


Thanks

Jatin

[-- Attachment #1.2: Type: text/html, Size: 3241 bytes --]

[-- Attachment #2: Type: text/plain, Size: 127 bytes --]

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Reading network data going into a VM from netback.c
@ 2017-01-17  3:55 Pathangi
  0 siblings, 0 replies; 5+ messages in thread
From: Pathangi @ 2017-01-17  3:55 UTC (permalink / raw)
  To: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 863 bytes --]

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. 



Can anyone point me in the right direction regarding this?



Thanks

Jatin



[-- Attachment #1.2: Type: text/html, Size: 3109 bytes --]

[-- Attachment #2: Type: text/plain, Size: 127 bytes --]

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Reading network data going into a VM from netback.c
@ 2017-01-17  6:02 #PATHANGI JANARDHANAN JATINSHRAVAN#
  2017-01-17 23:30 ` Dario Faggioli
  0 siblings, 1 reply; 5+ messages in thread
From: #PATHANGI JANARDHANAN JATINSHRAVAN# @ 2017-01-17  6:02 UTC (permalink / raw)
  To: xen-devel@lists.xen.org


[-- Attachment #1.1: Type: text/plain, Size: 848 bytes --]

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.


Can anyone point me in the right direction regarding this?


Thanks

Jatin

[-- Attachment #1.2: Type: text/html, Size: 3241 bytes --]

[-- Attachment #2: Type: text/plain, Size: 127 bytes --]

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Reading network data going into a VM from netback.c
  2017-01-17  6:02 Reading network data going into a VM from netback.c #PATHANGI JANARDHANAN JATINSHRAVAN#
@ 2017-01-17 23:30 ` Dario Faggioli
  0 siblings, 0 replies; 5+ messages in thread
From: Dario Faggioli @ 2017-01-17 23:30 UTC (permalink / raw)
  To: #PATHANGI JANARDHANAN JATINSHRAVAN#, xen-devel@lists.xen.org


[-- Attachment #1.1: Type: text/plain, Size: 783 bytes --]

On Tue, 2017-01-17 at 06:02 +0000, #PATHANGI JANARDHANAN JATINSHRAVAN#
wrote:
> But I am not able to parse the hexadecimal string as shown above. 
> 
> Can anyone point me in the right direction regarding this?
> 
I'm afraid I can't.

At the same time, I'm quite sure that by sending the same exact HTML
email 3 times, within a couple of hours, you're makes it very unlikely
that you'd receive any useful help.

Perhaps (re)read
https://wiki.xenproject.org/wiki/Asking_Developer_Questions

Regards,
Dario
-- 
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 127 bytes --]

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-01-17 23:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-17  6:02 Reading network data going into a VM from netback.c #PATHANGI JANARDHANAN JATINSHRAVAN#
2017-01-17 23:30 ` Dario Faggioli
  -- strict thread matches above, loose matches on Subject: below --
2017-01-17  3:55 Pathangi
2017-01-17  2:24 #PATHANGI JANARDHANAN JATINSHRAVAN#
2017-01-16 13:46 #PATHANGI JANARDHANAN JATINSHRAVAN#

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).