c - 使用路由套接字需要安装什么包?

标签 c linux networking routing

我正在尝试 Richard Stevens 在 Unix Network Programming 中给出的代码。但我无法编译代码。

这是源代码。 http://www.cs.cmu.edu/afs/cs.cmu.edu/academic/class/15213-f00/unpv12e/libroute/

我没有头文件 net/if_dl.h 并且 net/route.h 头文件不包含代码使用的常量和结构。

最佳答案

请注意,您不需要在该文件夹中创建“libroute”

查看文档:

cd ../libroute # only if your system supports 4.4BSD style routing sockets
make           # only if your system supports 4.4BSD style routing sockets

cd ../libxti   # only if your system supports XTI
make           # only if your system supports XTI

Linux 不是BSD 风格的路由,直接去../intro 构建例子吧~!

关于c - 使用路由套接字需要安装什么包?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1520649/

相关文章:

mysql - bash脚本中的特殊字符

Linux 线程性能在 GDB 下非常快,但在其他情况下非常慢

linux - node -v 没有 ./就不能工作

java - 收到 Netty 消息,写入对象不起作用

ruby-on-rails - 在没有 Lighttpd/Apache 的情况下服务 Web 应用程序

c - 我的浮点代码或 gcc 中有错误吗?

c++ - C 和 C++ 标准库是用什么语言编写的?他们的源代码在哪里?

C 在多线程程序中在哪里定义互斥体?

c - 如何从 sockaddr_in/sockaddr_in6 结构创建 sockaddr

c - 调用函数有哪些不同的方法?