mikaku / Fiwix

A UNIX-like kernel for the i386 architecture
https://www.fiwix.org
Other
407 stars 32 forks source link

About potential networking support #36

Open mamccollum opened 1 year ago

mamccollum commented 1 year ago

Hi there -- before I start this issue/suggestion, I would like to say that yes, I understand that networking is not implemented at this point in time.

Now with that out of the way; I would like to put in a potential "suggestion" of sorts for if/when networking becomes a feature or planned feature.

I have used networking before using SLIP (Serial Line IP) and I believe that before trying to implement any kind of NIC, I believe it would be helpful to try and do loopback first, SLIP, and then try to do an ethernet-based NIC later. My reasoning is that any two computers with a serial port can do SLIP, so it's hardware-agnostic.

I also know that you can do SLIP with QEMU (albeit, it's a bit of a cruddy way that I know of).

The QEMU way I know of doing would be specifying -serial pty as a qemu-system-i386 argument and then installing net-tools, and using sudo slattach /dev/pts/<whatever QEMU is using>.

I hope I'm not creating clutter. Just wanted to point out an idea for if/when TCP/IP becomes a feature.

mikaku commented 1 year ago

Now with that out of the way; I would like to put in a potential "suggestion" of sorts for if/when networking becomes a feature or planned feature.

Yes, networking support is a planned feature.

When? well definitely not during the 1.4 version. From now to the end of the year I'll continue giving some assistance to the boostrapping community to integrate the Fiwix kernel into the bootstrapping process, with the help of @rick-masters.

Moreover, networking is something big and needs specific NIC drivers to work, so there will be necessary certain amount of extra code, that's the reason why I planned to focus on it during the 1.5 version (next year). Unfortunately I'm not an expert in low level networking, so I don't know how much it will take to accomplish. Nevertheless, I thought to start with something simpler like AF_UNIX sockets, and progress from that on.

I have used networking before using SLIP (Serial Line IP) and I believe that before trying to implement any kind of NIC, I believe it would be helpful to try and do loopback first, SLIP, and then try to do an ethernet-based NIC later. My reasoning is that any two computers with a serial port can do SLIP, so it's hardware-agnostic.

This is a nice idea to make the first step into networking.

I remember to be using PPP to connect to Internet in the 90s, and I know that SLIP was also a feature in Linux but I've never used it. In any case, I'm not sure if the current serial driver has the minimum functionality to hold SLIP.

Please, fell free to investigate more on this, doing some tests with a simple SLIP implementation just to know if the current serial driver is enough or it lacks of essential features to deploy SLIP on it.