|
From: Tim R. <ti...@ga...> - 2002-08-16 14:50:38
|
On Fri, 16 Aug 2002 12:47:44 +0530
"prakash saivasan" <hel...@ho...> wrote:
| Have you checked in the code to the CVS ? I am not able to find any code
| related to networking !!!
No, I haven't checked the networking code into the CVS yet, because I
try not to check code into CVS until I'm satisfied it's working properly
(or, at least not fundamentally broken). I'll hack at the network code a
bit longer, then I'll commit it. I think in the long term we need a
proper protocol stack -- at the moment all the networking code is a
loose connection of functions in the RTL8139 driver binary.
Some initial thoughts on the network stack:
Make it analogous to the file system model. We have file system drivers
layered on top of storage device drivers, with one FSD per volume
(storage device). FSDs are separate from the hardware driver and
communicate between the VFS and the hardware with standard interfaces.
Now imagine networking: replace 'file system driver' with 'protocol
drivers' and 'storage device' with 'network device'. There could be
several network devices (e.g. Ethernet card and PPP connection), and
several protocols (e.g. TCP/IP and NetBIOS). Each network device can
have several protocols bound to it, and not necessarily the full set
(e.g. you might use NetBIOS on your LAN to talk to a Windows 95 machine,
but only TCP/IP on the Internet connection). So the same pieces of
protocol code need to talk to a set of network devices.
/-- Protocol --\
User mode --+--- Protocol ---+-+-- Device
\-- Protocol --/ \- Device
Network device drivers can be simple pieces of code, which are
responsible for sending and receiving packets over their physical link.
Protocols might maintain two sets of data: global and per-device. Taking
the example of TCP/IP, global data can be IP address routing tables,
whereas per-device data can be the IP address assigned to each card.
| I have more dbts comming my way will send a seperate detailed mail
| regarding the same
Sure, keep 'em coming! :)
--
Tim Robinson <tim...@ic...>
|