-
大小: 813KB文件类型: .gz金币: 1下载: 0 次发布日期: 2021-05-29
- 语言: 其他
- 标签: libpcap-1.9. linux
资源简介
linux下libpcap-1.9.0的源码。可以在Linux下编译。参考Readme文件。
代码片段和文件信息
/*
* Copyright (c) 1992 1993 1994 1995 1996
* 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: (1) source code distributions
* retain the above copyright notice and this paragraph in its entirety (2)
* distributions including binary code include the above copyright notice and
* this paragraph in its entirety in the documentation or other materials
* provided with the distribution and (3) all advertising materials mentioning
* features or use of this software display the following acknowledgement:
* ‘‘This product includes software developed by the University of California
* Lawrence Berkeley Laboratory and its contributors.‘‘ 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 ‘‘AS IS‘‘ AND WITHOUT ANY EXPRESS OR IMPLIED
* WARRANTIES INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
#ifdef HAVE_CONFIG_H
#include
#endif
#include
#include
#include “optimize.h“
void
bpf_dump(const struct bpf_program *p int option)
{
const struct bpf_insn *insn;
int i;
int n = p->bf_len;
insn = p->bf_insns;
if (option > 2) {
printf(“%d\n“ n);
for (i = 0; i < n; ++insn ++i) {
printf(“%u %u %u %u\n“ insn->code
insn->jt insn->jf insn->k);
}
return ;
}
if (option > 1) {
for (i = 0; i < n; ++insn ++i)
printf(“{ 0x%x %d %d 0x%08x }\n“
insn->code insn->jt insn->jf insn->k);
return;
}
for (i = 0; i < n; ++insn ++i) {
#ifdef BDEBUG
if (i < NBIDS && bids[i] > 0)
printf(“[%02d]“ bids[i] - 1);
else
printf(“ -- “);
#endif
puts(bpf_image(insn i));
}
}
- 上一篇:鸡尾酒会问题测试音频
- 下一篇:发送字符到指定的IP和端口
相关资源
- uboot到linux logo显示不间断 补丁
- UNIX/LINUX编程实践教程的源码
- Linux任务管理器
- linux应用层的华容道游戏源代码
- ubuntu9.10 可加载内核模块和字符设备驱
- MP3文件ID3v2ID3v2APEv2标签读取
- 操作系统实验——虚存管理实验
- linux下的发包工具sendip
- 尚观培训linux许巍关于c 的笔记和讲义
- 尚观培训linux董亮老师关于数据结构的
- linux 线程池源码 c 版
- linux C 电梯程序练习
- linux下用多进程同步方法解决生产者
- Linux 操作系统实验(全)
- Linux From Scratch 中文手册
- linux 网络实验 ftp程序
- Linux命令大全离线版&在线版
- 操作系统共享内存实验
- dos 下运行Linux 命令--gnu_utils
- linux 0.12内核源代码
- linux简易shell C实现
- linux实验报告及心得体会
- 基于GTK的Linux环境下的简易任务管理器
- linux扫雷游戏代码
- CAN Linux驱动代码
- Linux系统教材
- intel 82579LM 网卡驱动Linux系统版 v1.9.
- SA1110处理器掌上电脑液晶显示器设计
- 基于Linux的串口服务器设计
- Windows下访问LINUX的利器-SSH
评论
共有 条评论