从netfilter的NF_IP_PRE_ROUTING抓包 和 用libpcap抓包有什么区别?
2016-06-07 02:15
465 查看
从netfilter上抓的包好象只能是进入本机或广播包,不能抓混杂模式下的不进入本机的数据。
不知道从netfilter上能不能监听网卡上的数据,就像原始套接字一样混杂模式下监听网络数据。
终于在ip_input.c中找到了
/* When the interface is in promisc. mode, drop all the crap
* that it receives, do not try to analyse it.
*/
if (skb->pkt_type == PACKET_OTHERHOST)
goto drop;
混杂模式收到的数据进不了netfilter, 看来只有重新编译内核了
不知道从netfilter上能不能监听网卡上的数据,就像原始套接字一样混杂模式下监听网络数据。
终于在ip_input.c中找到了
/* When the interface is in promisc. mode, drop all the crap
* that it receives, do not try to analyse it.
*/
if (skb->pkt_type == PACKET_OTHERHOST)
goto drop;
混杂模式收到的数据进不了netfilter, 看来只有重新编译内核了
相关文章推荐
- Screeps ———— A MMO Strategy Sandbox Game for Programmers
- Unix式图形化操作系统开发笔记0:前言
- c# list 委托排序
- java如何计算程序运行时间
- 2016 计蒜之道 初赛 第二场(待补)
- Handler机制
- 比目鱼
- 常见的排序算法
- linux 分卷解压
- Get started
- http://yusi123.com/
- 浅谈我对DDD领域驱动设计的理解
- 从0开始玩安全——Linux基础(1)
- 一点感悟
- Helixoft VSdocman 是一个集成于Visual Studio并提供了命令行版本的帮助文档编译工具
- C语言标准
- 一种好的持久层开发方法——建立BaseDao和BaseDaoImpl
- Leetcode Maximum Subarray
- Xcode中的pch文件
- 地沟油在围观玻尿酸