Files
Obsidian/rbnet.ko 模块.md
2025-08-23 15:15:57 +08:00

43 lines
946 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

1.安装模块(不再需要加参数)
``` bash
insmod rbnet.ko
```
2.配置需要处理的接口与类型可动态配置enable后任可修改。实时生效不需要rmmod
``` bash
echo lo > /proc/rbnet/ifaces_in
```
输入方向需要去帧头的接口列表多个使用逗号隔开无0xeb90则不做处理
``` bash
echo lo > /proc/rbnet/ifaces_out
```
输出方向需要加帧头的接口列表,多个使用逗号隔开
``` bash
echo 0x17 > /proc/rbnet/dtype_out
```
输出方向帧头中的类型字段,多个使用逗号隔开
3.使能功能
``` bash
echo 1 > /proc/rbnet/enabled
```
``` bash
echo 0 > /proc/rbnet/enabled
```
4.可开启调试信息查看包处理过程
``` bash
echo 1 > /proc/rbnet/hexdump_enable
```
``` bash
dmesg
```
``` bash
insmod rbnet.ko
echo eth0 > /proc/rbnet/ifaces_in
echo eth0 > /proc/rbnet/ifaces_out
echo 0x17 > /proc/rbnet/dtype_out
echo 1 > /proc/rbnet/enabled
```