NIC driver skeleton for study. (GXemul/PSIM)
Ian Caddy
ianc at goanna.iinet.net.au
Fri Jan 20 01:14:48 UTC 2006
Hi Karel,
When we originally did our NIC driver, we referenced the RTEMS Network
Supplement written by Eric Norum, which was quite informative. It
references the network driver in the Gen68360 BSP
(c/src/lib/libbsp/m68k/Gen68360/network/network.c) which is based on the
Motorola 68360 processor with onboard MAC.
There are other drivers around, but that one is fairly straight forward.
There are PC type ones in c/src/libchip/network such as cs8900.c which
look fairly straight forward as well.
Basically the stack will create the full ethernet frame before it drops
down to the driver level which is only for sending and receiving frames.
The thing to watch out for is that they are not necessarily contained
in one buffer, it will probably be a linked list of buffers containing
all the data required.
I hope this helps.
regards,
Ian Caddy
Karel Gardas wrote:
>
> Hello,
>
> I'm thinking about writting as simple as possible NIC driver for RTEMS
> for simple emulated NIC. Something for ether-like device from GXemul:
> http://gavare.se/gxemul/gxemul-stable/doc/experiments.html#expdevices --
> scroll down and look for `ether'.
>
> The NIC will be connected to TUN/TAP device, hence I need to get proper
> Ethernet's frames somewhere. Does TCPIP stack produce them
> automatically? If so, then such work should be relatively easy, but I'd
> like to study some as simple as possible NIC driver to get an idea what
> to do and where to start.
>
> Thanks!
> Karel
> --
> Karel Gardas kgardas at objectsecurity.com
> ObjectSecurity Ltd. http://www.objectsecurity.com
>
--
Ian Caddy
Goanna Technologies Pty Ltd
+61 8 9221 1860
More information about the users
mailing list