[EMAIL PROTECTED] wrote:
Hi,
On Fri, Apr 04, 2008 at 06:00:38PM +0200, Zheng Da wrote:
So could you give me some more advices to help me get into the project
faster? For example, which article or which part of code should I read
first?
I think studying the interaction between the TCP/IP stack (pfinet) and
the kernel eth0 device is the best starting point.
-antrik-
Hi,
In the network driver of gnumach, the packet filter mechanism is
provided to spread packets it receives to right servers.
In hurd, pfinet registers a filter when it open the ethernet device
(this ethernet device can be thought as a stub, right?), so it can
receive the packet it wants from the network. pfinet calls
device_write() to send the packet to the packet.
gnumach gets the packet from device_write(), and sends it to the
network, and, meanwhile, it sends one copy to the packet filter.
If we set the filter well, I believe the pfinet can get the copy. (But I
haven't gone through the code of the packet filter, so I'm not sure
about it)
If it works, does it mean pfinet servers have already been able to
communicate with each other?
If it doesn't work, I have another proposal:
We reimplement the functions in ethernet.c, which sends the packet to
other pfinets.
The problem is how pfinet knows which one it should send to.
One solution is that every pfinet sends its packets to one process which
decides the destination for every packet. In this case, the extra
process just works like a virtual network driver.
The benefit of the solution is that we can do many things in the extra
process to simulate the network.
But it might be not very efficient. Every packet needs to go to the user
space twice when it is delivered to the destination pfinet.
Zheng Da