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

2017-02-04 Thread #PATHANGI JANARDHANAN JATINSHRAVAN#
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:


160302002f012b030261616161616161616161616161616161616161616161616161616161616161610200050100


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:


\xffe9\xffe9


0CNCL-FYP03G\xff88\x\x\xfff\xff81\x\x\x\x\xffe8\xffbd|G\xff88\x\x)G\xff81\x\x\x\x



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@lists.xen.org
https://lists.xen.org/xen-devel


[Xen-devel] Reading network data going into a VM from netback.c

2017-01-16 Thread #PATHANGI JANARDHANAN JATINSHRAVAN#
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:


160302002f012b030261616161616161616161616161616161616161616161616161616161616161610200050100


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
___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


[Xen-devel] Reading network data going into a VM from netback.c

2017-01-16 Thread #PATHANGI JANARDHANAN JATINSHRAVAN#
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:


160302002f012b030261616161616161616161616161616161616161616161616161616161616161610200050100


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
___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


[Xen-devel] Reading network data going into a VM from netback.c

2017-01-16 Thread #PATHANGI JANARDHANAN JATINSHRAVAN#
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:


160302002f012b030261616161616161616161616161616161616161616161616161616161616161610200050100


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
___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


[Xen-devel] Modifying netback.c to produce logs

2016-10-18 Thread #PATHANGI JANARDHANAN JATINSHRAVAN#
Hi,

I've been playing around with the netback.c file in order to produce some log 
statements with dimes to better understand when each function in the file is 
called and I was having some trouble actually getting them to show up. I've 
written log statements in the following functions using the printk function at 
the beginning of each function below:

1.xenvif_rx_meta *get_next_rx_buffer()

2.void xenvif_rx_action()

3.int xenvif_tx_submit()

4.void xenvif_wait_for_rx_work()

5.int xenvif_kthread_guest_rx()

The I've not actually been able to see the log statements using dmesg at all. 
I've inserted the en_netback module in the kernel and checked that it is being 
used by the VM with the command lsmod | grep xen_netback.

I've booted up my virtual machine, and run a simple client server socket 
program in localhost within the VM and still not seen a single log message from 
the netback.c file being printed.

Can someone please advise me on where I can possibly insert log statements or 
how I can use the VM to invoke the netback.c functions?

Thanks,

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


[Xen-devel] Modifying netback.c to produce logs

2016-10-18 Thread #PATHANGI JANARDHANAN JATINSHRAVAN#
Hi,
I’ve been playing around with the netback.c file in order to produce some log 
statements with dimes to better understand when each function in the file is 
called and I was having some trouble actually getting them to show up. I’ve 
written log statements in the following functions using the printk function at 
the beginning of each function below:


1.xenvif_rx_meta *get_next_rx_buffer()

2.void xenvif_rx_action()

3.int xenvif_tx_submit()

4.void xenvif_wait_for_rx_work()

5.int xenvif_kthread_guest_rx()


The I’ve not actually been able to see the log statements using dmesg at all. 
I’ve inserted the en_netback module in the kernel and checked that it is being 
used by the VM with the command lsmod | grep xen_netback.


I’ve booted up my virtual machine, and run a simple client server socket 
program in localhost within the VM and still not seen a single log message from 
the netback.c file being printed.


Can someone please advise me on where I can possibly insert log statements or 
how I can use the VM to invoke the netback.c functions?


Thanks,

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


[Xen-devel] Network card in newly created VM

2016-10-04 Thread #PATHANGI JANARDHANAN JATINSHRAVAN#
Hi,
I had created a VM in my xen installation with the following command:


sudo xen-create-image --hostname=test --memory=512mb --vcpus=2 --lvm=vg0 --dhcp 
--pygrub —dist=wheezy


I have booted in to the VM with the following command: sudo xl create -c 
/etc/xen/test.cfg

Now when I run ifconfig in the VM, I just get nothing. No network at all.

How do I go about actually creating the VM’s network interfaces and connect it 
to the internet?

I have created a bridge for xen as can be seen from the command: sudo brctl 
show, which gives the following result:


bridge name bridge id STP enabled  interfaces

xenbr0 8000.c89cdced348b no eno1

vif2.0


I am assuming that vif2.0 refers to the VM, so how can I actually go about 
creating the network card?


I am trying to observe traffic to and from the VM from my host machine.


Thanks

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


[Xen-devel] Completing a modprobe on xen-netback.ko

2016-09-16 Thread #PATHANGI JANARDHANAN JATINSHRAVAN#
Hi,
 Sorry for the blank email previously.


 I am trying to modify netback.c in the Linux Kernel and Observe the 
changes. I've cloned the latest Linux Kernel with Git, checked out version 
4.7.0 and compiled it with the config options listed here: 
https://wiki.xenproject.org/wiki/Mainline_Linux_Kernel_Configs for dom0 
support. Then I installed the modules and the kernel and I had a file 
'xen-netback.ko' present in /lib/modules/4.7.0/kernel/drivers/net/xen-netback.

When I tried a modprobe on this file, I got an error "modprobe: ERROR: could 
not insert 'xen_netback': No such device."


I wanted to know how to resolve this error. Should I build Xen from the source 
code or is it enough to just install the xen-hypervisor via apt-get (Ubuntu)?


Thanks
Jatin
___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


[Xen-devel] Completing a modprobe on xen-netback.ko

2016-09-16 Thread #PATHANGI JANARDHANAN JATINSHRAVAN#
Hi,
___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel