我需要什么包安装使用路由套接字? [英] What package do i need to install for using routing sockets?

查看:136
本文介绍了我需要什么包安装使用路由套接字?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图由理查德·史蒂文斯的Unix网络编程给予code。但我不能够得到code编译。

i am trying code given in Unix Network Programming by Richard Stevens. but i am not able to get the code to compile.

下面是源$ C ​​$ C。
<一href=\"http://www.cs.cmu.edu/afs/cs.cmu.edu/academic/class/15213-f00/unpv12e/libroute/\">http://www.cs.cmu.edu/afs/cs.cmu.edu/academic/class/15213-f00/unpv12e/libroute/

here is the source code. http://www.cs.cmu.edu/afs/cs.cmu.edu/academic/class/15213-f00/unpv12e/libroute/

我没有头文件网/ if_dl.h和网/ route.h头文件中不包括常量和结构的code使用。

i don't have the header file net/if_dl.h and the net/route.h header file does not include the constants and structures that the code uses.

推荐答案

这是一个特定的BSD API和Linux不支持它。该
等效的功能(未源兼容)由提供
网络连接套接字的家庭。 人7 netlink的应该让你开始,但
你可能会需要做一些移植工作。

That is a BSD-specific API, and linux doesn't support it. The equivalent functionality (not source-compatible) is provided by the netlink socket family. "man 7 netlink" should get you started, but you're likely going to need to do some porting work.

这篇关于我需要什么包安装使用路由套接字?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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