在安装unpv13e的时候遇到问题

问题

$ cd ../libroute/
$ make
gcc -I../lib -g -O2 -D_REENTRANT -Wall   -c -o get_rtaddrs.o get_rtaddrs.c
In file included from get_rtaddrs.c:1:0:
unproute.h:3:45: 致命错误:net/if_dl.h:没有那个文件或目录#include <net/if_dl.h>  /* sockaddr_sdl{} */^
编译中断。
make: *** [get_rtaddrs.o] 错误 1
$

出错位置

Execute the following from the src/ directory:./configure    # try to figure out all implementation differencescd lib         # build the basic library that all programs needmake           # use "gmake" everywhere on BSD/OS systemscd ../libfree  # continue building the basic librarymakecd ../libroute # only if your system supports 4.4BSD style routing socketsmake           # only if your system supports 4.4BSD style routing socketscd ../libxti   # only if your system supports XTImake           # only if your system supports XTIcd ../intro    # build and test a basic client programmake daytimetcpcli./daytimetcpcli 127.0.0.1

if_dl.h源代码

/*
* Copyright (c) 1990, 1993
* The Regents of the University of California.  All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
*    notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
*    notice, this list of conditions and the following disclaimer in the
*    documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
*    must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
*    may be used to endorse or promote products derived from this software
*    without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)if_dl.h 8.1 (Berkeley) 6/10/93
* $FreeBSD: src/sys/net/if_dl.h,v 1.10 2000/03/01 02:46:25 archie Exp $
*/#ifndef _NET_IF_DL_H_
#define _NET_IF_DL_H_/*
* A Link-Level Sockaddr may specify the interface in one of two
* ways: either by means of a system-provided index number (computed
* anew and possibly differently on every reboot), or by a human-readable
* string such as "il0" (for managerial convenience).
*
* Census taking actions, such as something akin to SIOCGCONF would return
* both the index and the human name.
*
* High volume transactions (such as giving a link-level ``from'' address
* in a recvfrom or recvmsg call) may be likely only to provide the indexed
* form, (which requires fewer copy operations and less space).
*
* The form and interpretation  of the link-level address is purely a matter
* of convention between the device driver and its consumers; however, it is
* expected that all drivers for an interface of a given if_type will agree.
*//*
* Structure of a Link-Level sockaddr:
*/
struct sockaddr_dl {
u_char sdl_len; /* Total length of sockaddr */
u_char sdl_family; /* AF_LINK */
u_short sdl_index; /* if != 0, system given index for interface */
u_char sdl_type; /* interface type */
u_char sdl_nlen; /* interface name length, no trailing 0 reqd. */
u_char sdl_alen; /* link level address length */
u_char sdl_slen; /* link layer selector length */
char sdl_data[12]; /* minimum work area, can be larger;
   contains both if name and ll address */
u_short sdl_rcf; /* source routing control */
u_short sdl_route[16]; /* source routing information */
};#define LLADDR(s) ((caddr_t)((s)->sdl_data + (s)->sdl_nlen))#ifndef _KERNEL#include <sys/cdefs.h>__BEGIN_DECLS
void link_addr __P((const char *, struct sockaddr_dl *));
char *link_ntoa __P((const struct sockaddr_dl *));
__END_DECLS#endif /* !_KERNEL */#endif

  • 源代码网址:http://www.codeforge.com/read/116933/if_dl.h__html

UNIX网络编程:unpv13e编译错误:net/if_dl.h:没有那个文件或目录相关推荐

  1. UNIX网络编程—SCTP编译运行错误及解决

    UNIX网络编程-SCTP编译运行错误及解决 环境 ubuntu 14.04 64bits unpv13e 问题1 'redefinition of 'struct in_pktinfo' 解决办法1 ...

  2. unix网络编程源代码编译

    最近开始研究unix网络编程,正所谓"学习网络编程的最好方法就是下载这些程序,对其进行修改和改进.只有这样才能深入理解与有关概念和方法". 1.首先下载源代码,不多说了: 2.照着 ...

  3. 《UNIX网络编程卷1》第一例及问题

    <UNIX网络编程卷1>一上来就给了一个例子,新手不容易看懂,估计作者也没有打算让人看懂,作了详尽的解释.新手都想运行这个程序,我也是. 首先,给的程序都是在unix下运行的.这里有全书代 ...

  4. 《Unix网络编程卷1-套接字联网API》第一个例子编译 不通过问题解决

    <Unix网络编程卷1-套接字联网API>是本好书. 但是第一个例子不是很好编译. 需要如下步骤: 本人机器CentOS 5.4 1.下载源码 unpv13e解压到任意目录 然后按其rea ...

  5. 《Unix网络编程(第3版)》代码编译的一些问题

    现在学习<UNIX网络编程(第3版)>一书,书中源代码有一些默认情况下编译不能通过,要经过一些修改都行.这编文档将记录下我遇到的不能正常编译的程序的修改步骤. 28章:traceroute ...

  6. UNIX网络编程之旅-配置unp.h头文件环境

    最近在学习Unix网络编程(UNP),书中steven在处理网络编程时只用了一个#include "unp.h"  相当有个性并且也很便捷 于是我把第三版的源代码编译实现了这个过程 ...

  7. Unix——《Unix网络编程》配置unp.h头文件

    <Unix网络编程 卷1>unp.h 头文件及其编译问题 本书源码下载地址 http://www.unpbook.com 解压tar -zxvf unpv13e.tar.gz 其实各个编译 ...

  8. 《UNIX网络编程》第一步:编写自己的daytime客户端,并从daytime服务器获取时间

    编写自己的daytime客户端,并从daytime服务器获取时间 @Author:CSU张扬 @Email:csuzhangyang@gmail.com or csuzhangyang@qq.com ...

  9. 【UNIX网络编程第三版】阅读笔记(一):代码环境搭建

    粗略的阅读过<TCP/IP详解>和<计算机网络(第五版)>后,开始啃这本<UNIX网络编程卷一:套接字联网API>,目前linux下的编程不算太了解,在阅读的过程中 ...

  10. 16.unix网络编程一卷 unp.h

    unix网络编程 --ubuntu下建立编译环境 1.安装编译器,安装build-essential sudo apt-get install build-essential 2.下载本书的头文件 下 ...

最新文章

  1. 软件构建发布自动化[摘抄]
  2. 穿越传统藩篱,当统计学闯入人工智能“后花园”
  3. 【Linux】FrameBuffer操作入门
  4. c#学习路线应该靠谱
  5. 如何做好工程监理控制工作?
  6. C++——析构函数为什么要为虚函数
  7. 记前端知识--数组元素的相关操作
  8. C++ STL标准模板库
  9. Vim插件合集 (打造你的专属炫酷IDE)
  10. excel如何去重统计户数_excel表格单一数据统计-Excel如何去重,然后统计数据?...
  11. 有什么合适个体商户及小微企业的入门级进销存管理软件?
  12. 山东大学软件学院项目实训-创新实训-山大软院网络攻防靶场实验平台(七)-SQL注入字符型
  13. Vue:首屏加载页实现
  14. AI+智能服务机器人应用基础【实践报告】
  15. 学习C++的参考书目
  16. Memcached集群配置
  17. 什么?你还没女伴?教你如何借助Python俘获女孩子芳心
  18. 计算机考试五大软件,计算机软件水平考试应避免的五大失误
  19. 开博尔智能android播放器C3,开博尔C3四核最新固件Android4.4_KIUI7.0_v1.0.4
  20. python 摄氏度与华氏度的转换

热门文章

  1. Java并发编程-线程的状态
  2. 程序设计与算法----动态规划之最长公共子序列
  3. 推荐系统和搜索引擎的关系
  4. bash log传到日志服务器
  5. python中property干什么用的?
  6. 资源--toast的五种使用方式
  7. Oracle常用存储过程写法
  8. Javascript综合应用小案例
  9. 案例:演示exception对象的使用
  10. 计算机与工程建设项目结合,计算机科学与技术在工程建设项目管理中应用.doc...