Page 1 of 2

progamming the network

Posted: Thu Mar 04, 2010 1:40 am
by shindow
hi,everyone.I see the articals on the wiki about the network,i think it is so complicated.
My question is that:
1. there are many net cards .enable it ,should I test what kind of my card is first?
2.i was using bochs,should i make any changes to the bochsrc file to enable it(like the mouse,it should set when you want to use it)
3.should anyone give some more detail information about the network about the OS.I totally think it is hard any any part of others in the os.

Thank you in advance.
shindow

Re: progamming the network

Posted: Thu Mar 04, 2010 2:54 am
by thepowersgang
Networking is a very advanced and complicated topic (I've been working on my OS for about five years, and I've only just started on networking).

First step would be to write a driver for a network card (I recommend the Ne2000 because bochs has support for those)
Next, read the wikipedia articles on the link-layer protocols and the RFCs for ARP and IP.
Then, you should be able to get started. But, beware, it will take some time before you can actually see the results, but keep at it and you should succeed.

(Also, I suggest you brush up on your english skills. If your reading is anything like your writing, you will find it very difficult to understand the RFCs)

Re: progamming the network

Posted: Thu Mar 04, 2010 3:05 am
by pcmattman
1. there are many net cards .enable it ,should I test what kind of my card is first?
I suggest the NE2K. An ne2k driver is extremely easy to write, and Bochs and QEMU both support ISA and PCI versions of the card.
2.i was using bochs,should i make any changes to the bochsrc file to enable it(like the mouse,it should set when you want to use it)
Look at the manual for bochsrc and find "ne2k". That'll outline what you need to change to enable the card.
3.should anyone give some more detail information about the network about the OS.I totally think it is hard any any part of others in the os.
You should look at creating a "network stack". The concept is widely documented, and if you feel like purchasing books, you can find a total goldmine of information with respect to networking.
Next, read the wikipedia articles on the link-layer protocols and the RFCs for ARP and IP.
Perhaps reading up on Ethernet first might be a good idea - need to frame ARP and IP, after all.

Re: progamming the network

Posted: Thu Mar 04, 2010 4:10 am
by fronty
If you don't have basic understanding of different protocols, you may want to skim through W. Richard Stevens's TCP/IP Illustrated, Volume 1 if you find it in library. It (read: my edition) covers IP, ARP, RARP, ICMP, routing, UDP, TCP and bunch of application layer protocols like FTP and NFS.

Re: progamming the network

Posted: Thu Mar 04, 2010 4:51 am
by osdnlo
At the packet level, you could also use Ethereal and study the packets. It provides an excellent break down of each packet and you can even filter out the ones you want from the ones you don't care about. Most of all, it is free.

Re: progamming the network

Posted: Thu Mar 04, 2010 5:33 am
by shindow
thank you all
thepowersgang wrote:First step would be to write a driver for a network card
Maybe such kind articals is so less on the wiki,i am hardly find one.
thepowersgang wrote: (Also, I suggest you brush up on your english skills. If your reading is anything like your writing, you will find it very difficult to understand the RFCs)
sorry,i am not the native speaking english,english is my second language,and i don't use it in the daily life.
pcmattman wrote:You should look at creating a "network stack". The concept is widely documented, and if you feel like purchasing books, you can find a total goldmine of information with respect to networking.
Should you give some links for this

Re: progamming the network

Posted: Thu Mar 04, 2010 5:41 am
by osdnlo
There comes a point in every hobby OS developers life where s/he finds s/he's self very much alone. And, this is one of those times for you. Try google, and google code for guides/references. And, don't worry about your English, it's good enough. Good luck with your driver.

Re: progamming the network

Posted: Thu Mar 04, 2010 7:01 am
by shindow
okay,and this term i will study the computer network,and i needn't write it immdeliately,i'll do it step by step.

Re: progamming the network

Posted: Thu Mar 04, 2010 11:54 am
by Selenic
New versions of Bochs (at least) have a *very* useful tool for testing networking: if you set the network type to 'vnet', it creates a virtual network which consists of the VM and a server which does DHCP, TFTP (which saves and loads files to a directory on your disk) and answers pings. Beyond that, you'd want to create a 'real' server (whether on real hardware or in another VM) which serves everything; a Linux distro would be good for this, as you can (for no cost) install server daemons for HTTP, FTP, IRC, rsync, NFS, etc. and even programs for network stress-testing.

Re: progamming the network

Posted: Thu Mar 04, 2010 12:40 pm
by Merdini
shindow wrote:
thepowersgang wrote: (Also, I suggest you brush up on your english skills. If your reading is anything like your writing, you will find it very difficult to understand the RFCs)
sorry,i am not the native speaking english,english is my second language,and i don't use it in the daily life.
He meant that it'll be much harder to understand the tutorials or any information about the RFCs if you don't understand english as well as you should.
English is my third language (Kurdish being the first and Swedish second) and I understand it very well, even though there are some word I don't understand, I'll just look them up in a dictionary. So english being your second language are no excuse. Try working on it and it'll be so much easier for you! Good luck.

Re: progamming the network

Posted: Thu Mar 04, 2010 11:08 pm
by smeezekitty
Networking has to be one of the hardest because there is so many card types (hundreds?).
Even linux has poor support for networking.
-off-topic-
osdnlo wrote:There comes a point in every hobby OS developers life where s/he finds s/he's self very much alone. And, this is one of those times for you. Try google, and google code for guides/references. And, don't worry about your English, it's good enough. Good luck with your driver.
Really, how many women develop OS'es?

Re: progamming the network

Posted: Fri Mar 05, 2010 12:37 am
by pcmattman
Even linux has poor support for networking.
Uh, what? Citation needed ;)
smeezekitty wrote:
osdnlo wrote:There comes a point in every hobby OS developers life where s/he finds s/he's self very much alone. And, this is one of those times for you. Try google, and google code for guides/references. And, don't worry about your English, it's good enough. Good luck with your driver.
Really, how many women develop OS'es?
That attitude is exactly why hardly any do.

Re: progamming the network

Posted: Fri Mar 05, 2010 12:57 am
by osdnlo
smeezekitty wrote:Really, how many women develop OS'es?
About the same number of men; very few. :)

Re: progamming the network

Posted: Fri Mar 05, 2010 4:41 am
by shindow
It is not interest to discuss whether men or women develop os,it is just a hobby,like basketball.

I am new to the network,and today i found a book named Computer Networking first-step by Wendell Odom in the libary.It is a good book for newer.Recommend for the birds like me.

Re: progamming the network

Posted: Fri Mar 05, 2010 4:45 am
by osdnlo
Really, what kind of bird are you? :)