Andy-Python-Programmer / aero

Aero is a new modern, experimental, UNIX-like operating system following the monolithic kernel design. Supporting modern PC features such as long mode, 5-level paging, and SMP (multicore), to name a few.
https://aero.andypy.dev
GNU General Public License v3.0
1.16k stars 48 forks source link

Routing Sockets #95

Open Andy-Python-Programmer opened 1 year ago

Andy-Python-Programmer commented 1 year ago

Routing sockets are used for the kernel's routing tables to be read and altered (BSD). On the other hand, Netlink is a socket family used for inter-process communication (IPC) between both the kernel and userspace processes, and between different userspace processes. They also provide the functionality to alter the kernel's routing tables; initially designed to be a successor to the ioctl approach.

TL;DR: Routing sockets are specifically made for altering routing tables where as Netlink sockets serves different purposes.

Unresolved Questions

Which one of the API's would be better to implement? Could we improve the existing approach, if so, how?

Sources

alimkoca commented 1 year ago

Netlink sockets would be better to implement, I think it serves more functionality to us. But developer team can modify the features of netlink to provide proper implementation for Aero.

cleanbaja commented 1 year ago

+1 for netlink sockets too partly because I'm not familiar with how BSD routing works (I am only aware about netlink), and because netlink sockets serve extra functionality besides. Besides, FreeBSD seems to support them to, which further highlights their functionality