aero icon indicating copy to clipboard operation
aero copied to clipboard

Routing Sockets

Open Andy-Python-Programmer opened this issue 1 year ago • 2 comments

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

  • Netlink: https://man7.org/linux/man-pages/man7/rtnetlink.7.html
  • Routing Sockets (BSD): https://man.freebsd.org/cgi/man.cgi?query=route&sektion=4&manpath=netbsd

Andy-Python-Programmer avatar Mar 04 '23 03:03 Andy-Python-Programmer

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.

alimkoca avatar Mar 04 '23 22:03 alimkoca

+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

cleanbaja avatar Mar 05 '23 02:03 cleanbaja