hi everyone,
I want to have networking facility in my OS. So what am I supposed to do for that ? Would it be enough to write a device driver for the NIC ? If so will the NIC allow me to directly transfer bytes through it(lets say I want to implement UDP).
And the idea of sockets is pretty vague to me ? What exactly is a Socket(Where is it implemented - probably in memory !). In that case what exactly is the structure of that Socket. And please illuminate on ports and port addressing...
If possible please give me link information.
Thanking in advace
modshah
Networking Information ?
RE:Networking Information ?
A socket represents a two way communication link between two computers. Most people are talking about TCP/IP when they are talking about sockets. All TCP/IP connections are two way. Sockets themsevles are just something that the OS handles in memory to keep track of who it has a network connection to.
What you have to do is two things:
1)Implement a network driver with a standard interface.
(it could even be a loopback driver for use with the next part..)
2)Implement a TCP/IP network stack. Basically a part of your OS that is callable by what ever syscall interface your OS uses and can be asked to make connections/close connections/send data. (follows the TCP/IP RFC)
You may want to look for:
RFC 793 - TRANSMISSION CONTROL PROTOCOL
RFC 1180 - A TCP/IP Tutorial
RFC 1323 - TCP Extensions for High Performance
RFC 1337 - TIME-WAIT Assassination Hazards in TCP
RFC 1379 - Extending TCP for Transactions
RFC 1693 - An Extension to TCP - Partial Order Service
RFC 2001 - TCP Slow Start, Congestion Avoidance, Fast Retransmit, and Fast Recovery Algorithms
RFC 2018 - TCP Selective Acknowledgment Options
RFC 2140 - TCP Control Block Interdependence
RFC 2398 - Some Testing Tools for TCP Implementors
RFC 2414 - Increasing TCP's Initial Window
RFC 2415 - Simulation Studies of Increased Initial TCP Window Size
RFC 2416 - When TCP Starts Up With Four Packets Into Only Three Buffers
RFC 2525 - Known TCP Implementation Problems
What you have to do is two things:
1)Implement a network driver with a standard interface.
(it could even be a loopback driver for use with the next part..)
2)Implement a TCP/IP network stack. Basically a part of your OS that is callable by what ever syscall interface your OS uses and can be asked to make connections/close connections/send data. (follows the TCP/IP RFC)
You may want to look for:
RFC 793 - TRANSMISSION CONTROL PROTOCOL
RFC 1180 - A TCP/IP Tutorial
RFC 1323 - TCP Extensions for High Performance
RFC 1337 - TIME-WAIT Assassination Hazards in TCP
RFC 1379 - Extending TCP for Transactions
RFC 1693 - An Extension to TCP - Partial Order Service
RFC 2001 - TCP Slow Start, Congestion Avoidance, Fast Retransmit, and Fast Recovery Algorithms
RFC 2018 - TCP Selective Acknowledgment Options
RFC 2140 - TCP Control Block Interdependence
RFC 2398 - Some Testing Tools for TCP Implementors
RFC 2414 - Increasing TCP's Initial Window
RFC 2415 - Simulation Studies of Increased Initial TCP Window Size
RFC 2416 - When TCP Starts Up With Four Packets Into Only Three Buffers
RFC 2525 - Known TCP Implementation Problems
RE:Networking Information ?
hi,
Thanks for all the information. But I don't understand what is a "loopback driver".
Does "standard interface" mean implementing abstract methods like "open","read","write" etc and then adapt it for particular NIC cards ?
Chase thanks again for so many RFC links.
Thanks
modshah
Thanks for all the information. But I don't understand what is a "loopback driver".
Does "standard interface" mean implementing abstract methods like "open","read","write" etc and then adapt it for particular NIC cards ?
Chase thanks again for so many RFC links.
Thanks
modshah
RE:Networking Information ?
A loopback driver is the term most people give to the virtual network card that all modern operating systems have. On your computer you should be able to ping 127.0.0.1 because when you try to connect to 127.0.0.1 you are making a network connection back to your own computer.
And you have the idea correct for the standard interface part. All your nic drivers should have the same set of hooks or methods so that the TCP/IP software you write is not tied to any one single nic.
-Chase
And you have the idea correct for the standard interface part. All your nic drivers should have the same set of hooks or methods so that the TCP/IP software you write is not tied to any one single nic.
-Chase