不使用system()命令就能在C中读取/写入路由表吗? [英] can I read/write the routing table in C without using system() command?

查看:67
本文介绍了不使用system()命令就能在C中读取/写入路由表吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有用C编写的代码。我想使用存储在路由表中的C代码信息。

I have code written in C. I want to get using C code information that is stored in routing table. Is it possible?

推荐答案

您可以打开netlink套接字并发送路由更新消息。有有关此操作的文章

You can open a netlink socket and send route update messages. There is an article about how to do this.

这篇关于不使用system()命令就能在C中读取/写入路由表吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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