Implementing linux kernel as a router

五迷三道 提交于 2019-12-13 06:25:19

问题


I'm trying to implement a routing algorithm in Linux kernel. i.e. When the Linux host is configured to act as a router. Is it possible to add a routing algorithm to the kernel code base and register it as it is done with most of the kernel services? Like creating our own scheduling policy, registering a usb device etc.?

Thanks in Advance, Binoy


回答1:


There is a special subsystem in linux kernel for packet processing and inspection - netfilter. iptables, for example, is based on netfilter. It basically gives you hooks, to which you can bind your callbacks. I don't know will it be enough to implement new routing algorithm, but anyway it's a good starting point.



来源:https://stackoverflow.com/questions/21449283/implementing-linux-kernel-as-a-router

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!