Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

what is the easiest way to support network in hobby os?

123 views
Skip to first unread message

Peter Cheung

unread,
Sep 13, 2012, 8:45:27 AM9/13/12
to
Hi all, what is the easiest way to support network in hobby os?
thanks
from Peter (cmk...@hotmail.com)

dos...@googlemail.com

unread,
Sep 13, 2012, 12:50:57 PM9/13/12
to
I guess you should try to find some driver code included in some other OS and use that until you found time to write your own.

It would help all OS developers if there would be a standardized driver interface and one could just take drivers from a common pool of these drivers. These could e.g. be collected from abandoned OS projects.

These drivers could be made available in e.g. a Mercurial server and if someone works on a driver he can load the code changes to this server.

Georg

James Harris

unread,
Sep 13, 2012, 2:57:21 PM9/13/12
to
On Sep 13, 1:45 pm, Peter Cheung <mcheun...@gmail.com> wrote:

> Hi all, what is the easiest way to support network in hobby os?

Hi Peter. Do you want to support some specific network cards? If so,
which ones? Or are you asking about supporting the range of network
interface cards out there? I guess you could even be asking about a
driver framework to support network interfaces. Care to explain what
you mean?

James

van...@vsta.org

unread,
Sep 13, 2012, 6:03:04 PM9/13/12
to
Peter Cheung <mche...@gmail.com> wrote:
> Hi all, what is the easiest way to support network in hobby os?

Easiest? Bring up on an emulated old ISA machine with a 3c509 LAN card.
Then bring up KA9Q networking stack. The 3c509 card has a very simple
programming register set, and it's at a fixed IRQ and port range, so you
don't have to hassle with PCI bus stuff. It has its own on-card network
buffers which you pull from (programmed I/O) so you also don't have to
get your DMA working to receive and send packets.

For actual networking, KA9Q is a very nicely written TCP/UDP/IP/ARP package
which is probably the easiest IP stack to port. Another small one I've used
is "uip".

--
Andy Valencia
Home page: http://www.vsta.org/andy/
To contact me: http://www.vsta.org/contact/andy.html

van...@vsta.org

unread,
Sep 13, 2012, 7:59:21 PM9/13/12
to
van...@vsta.org wrote:
> Easiest? Bring up on an emulated old ISA machine with a 3c509 LAN card.

FWIW, looks like the NE2000 was just as simple. Go with whichever
is available, I guess.

Peter Cheung

unread,
Sep 14, 2012, 12:11:07 AM9/14/12
to
James Harris於 2012年9月14日星期五UTC+8上午2時57分21秒寫道:
At the moment, support one network card is ok. What is the most easiest network card then? thanks

Peter Cheung

unread,
Sep 14, 2012, 12:11:49 AM9/14/12
to
(未知)於 2012年9月14日星期五UTC+8上午6時03分05秒寫道:
Thank you so much James :-)

James Harris

unread,
Sep 14, 2012, 4:34:29 AM9/14/12
to
On Sep 14, 5:11 am, Peter Cheung <mcheun...@gmail.com> wrote:

...

> At the moment, support one network card is ok. What is the most easiest network card then? thanks

That's much easier than supporting any network card since I don't
believe there is any common interface. (There are layers like NDIS but
nothing simple and universal.) I see you already have some suggestions
over which specific card or cards to use so I won't repeat that. There
is some helpful documentation on writing drivers for some of them at

http://wiki.osdev.org
http://wiki.osdev.org/Category:Network_devices

Bochs apparently supports some of those such as an NE2000.

James

Some of them are

Peter Cheung

unread,
Sep 15, 2012, 12:51:19 AM9/15/12
to
th

James Harris於 2012年9月14日星期五UTC+8下午4時34分29秒寫道:
thanks again

cool_kau

unread,
Sep 15, 2012, 9:50:25 AM9/15/12
to
Once you have your network card driver ready, you could use lwip TCP/IP stack. Its simple enough integrate into your OS. Its reliable and it works.

http://savannah.nongnu.org/projects/lwip/

Kaustubh

Peter Cheung

unread,
Sep 18, 2012, 12:27:08 AM9/18/12
to
lwip save me
0 new messages