I want to add internet support to my OS
But i have no clue of what so ever about where to start . I googled but no luck. any pointing to right direction would be great.
[edit]NIC driver
- packet50071
- Member
- Posts: 43
- Joined: Sat Dec 22, 2007 2:27 pm
- Location: canada
[edit]NIC driver
Last edited by packet50071 on Sun May 11, 2008 9:54 am, edited 1 time in total.
Technology is here to make things easier not harder.
have you written a NIC driver? if not, that would deffinately be the first place to start as writing a TCP/IP stack doesn't provide much functionality without a network card.
but, assuming you have. You need to create structures of the various protocols (TCP/IP, ARP, RARP, ICMP, IGMP, etc...) and then parse the structure after the packet has been copied onto the appropriate structure.
If you have some decent assembly knowledge, I believe Dex just relased his TCP/IP stack which you could look at to get you more familiar with the stack. Also, if you google for TCP/IP Stacks I'm sure you will find pre-built structures with explanations to guide you along.
but, assuming you have. You need to create structures of the various protocols (TCP/IP, ARP, RARP, ICMP, IGMP, etc...) and then parse the structure after the packet has been copied onto the appropriate structure.
If you have some decent assembly knowledge, I believe Dex just relased his TCP/IP stack which you could look at to get you more familiar with the stack. Also, if you google for TCP/IP Stacks I'm sure you will find pre-built structures with explanations to guide you along.
Website: https://joscor.com
- packet50071
- Member
- Posts: 43
- Joined: Sat Dec 22, 2007 2:27 pm
- Location: canada
- packet50071
- Member
- Posts: 43
- Joined: Sat Dec 22, 2007 2:27 pm
- Location: canada
Yes, you need to write a driver for your card, Some times you can not find a data sheet.packet50071 wrote:I have this VIA Rhine II fast ehternet adapter
I thought there are some standard basic features that are common in all cards. Am i wrong ?
So you look for Linux or BSD drivers eg:
http://www.gelato.unsw.edu.au/lxr/sourc ... ia-rhine.c
In it you will find "References"
This leads to
http://people.freebsd.org/~wpaul/VIA/VT86C100A03.pdf
and
http://people.freebsd.org/~wpaul/VIA/VT6102_021.PDF
Thats how you get info for your driver.
There are "standards" but unfortunately finding a card that actually obeys the standards is hit or miss. Ne2K is one type of standard.packet50071 wrote: I thought there are some standard basic features that are common in all cards. Am i wrong ?
Website: https://joscor.com