将Linux内核实现为路由器 [英] Implementing linux kernel as a router

查看:209
本文介绍了将Linux内核实现为路由器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Linux内核中实现路由算法.即当Linux主机配置为充当路由器时.是否可以像大多数内核服务一样在内核代码库中添加路由算法并进行注册?像创建我们自己的调度策略,注册USB设备等?

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

推荐答案

Linux内核中有一个特殊的子系统用于数据包处理和检查- netfilter . iptables例如基于netfilter.基本上,它为您提供了挂钩,您可以在其中绑定回调.我不知道实现新的路由算法就足够了,但是无论如何这都是一个很好的起点.

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.

这篇关于将Linux内核实现为路由器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆