vinix
vinix copied to clipboard
How to start network implementation
Hello everyone! So, I just would like to ask some questions on the topic.
- Are there any ideas on how to start implementing networking features?
- What should be implemented first?
- What should the basic implementation consist of?
- What existing software might be used as a reference for the implementation?
- Any other considerations?
I appreciate any feedback provided, I would be glad to read your ideas.
Are you talking about writing an ethernet driver to add networking to vinix?
If so, you should try to find a "least common denominator" chipset... likely something from Intel, which a lot of other chips support as well. Most emulators (QEMU, etc.) also support the basic Intel chips.
Once you've decided on which chipset to write the driver for, a simple Google search will likely lead you to more documentation, sample drivers, etc. than you really want to try to figure out. :-)
Last, you'll need to decide if you're doing a kernel driver, or a user space driver. Some differences in architecture, so they are different sets of code.
Hi @Paul-Stern
So, generally speaking, here goes:
- There are of course ideas on how to do things, but it would be better to have the person implementing certain things to ultimately make certain design decisions. And of course familiarity with the rest of the Vinix codebase is somewhat required.
- I don't think there needs to be a set order in terms of implementing things.
- I guess a basic implementation would consist of some NIC driver to send and receive raw packets (e1000e is a very common one, and the one that I recommend you implement), ARP address resolution and caching of resolved addresses, IPv4, routing tables and routing sockets, and TCP and UDP sockets.
- Other OS kernel code can help, sure.
- Not that I can come up with right now.
Good luck!
Thank you for your valuable answers. One more thing that came to me. What are some basic testing scenarios both for the networking stack as a whole and its individual parts? I guess curl might be used for some of them. What about ip programme (used as ip route, ip address, etc.)? Might it be useful for testing too if it was possible to run in vinix? As usual, any feedback is welcome.