OpenVZ Forum


Home » Mailing lists » Users » How do I know which IP packet is for which container in kernel space
How do I know which IP packet is for which container in kernel space [message #42366] Wed, 06 April 2011 14:55 Go to next message
niu xinli is currently offline  niu xinli
Messages: 1
Registered: April 2011
Junior Member
Hi,
I need to build a virtual network to test our program. We used Xen before
migrating them to openvz. There are some patches I should make to the
kernel.
In net/ipv4/ip_output.c, before the packet is sent out, we need to do some
operations on the packet. The problem is , I don't know the packet belongs
to which openvz node. It would be easy to distinguish them in user space but
we need to know them in kernel space.
Is there some data structure in kernel space containing this kind of
information. Please give me some suggestions! Thanks a lot!
Re: How do I know which IP packet is for which container in kernel space [message #42367 is a reply to message #42366] Wed, 06 April 2011 15:14 Go to previous message
Kirill Korotaev is currently offline  Kirill Korotaev
Messages: 137
Registered: January 2006
Senior Member
Check venet_xmit() and veth_xmit().
These functions are called on boundaries host/VE and have context for skb in hands.


On Apr 6, 2011, at 18:55 , niu xinli wrote:

> Hi,
> I need to build a virtual network to test our program. We used Xen before migrating them to openvz. There are some patches I should make to the kernel.
> In net/ipv4/ip_output.c, before the packet is sent out, we need to do some operations on the packet. The problem is , I don't know the packet belongs to which openvz node. It would be easy to distinguish them in user space but we need to know them in kernel space.
> Is there some data structure in kernel space containing this kind of information. Please give me some suggestions! Thanks a lot!
> <ATT00001..c>
Previous Topic: Xen hypervisor vs OpenVZ
Next Topic: &quot;reboot&quot; inside a container stops the container
Goto Forum:
  


Current Time: Sun Oct 06 08:22:13 GMT 2024

Total time taken to generate the page: 0.04132 seconds