Chinaunix首页 | 论坛 | 博客
  • 博客访问: 524824
  • 博文数量: 51
  • 博客积分: 345
  • 博客等级: 民兵
  • 技术积分: 534
  • 用 户 组: 普通用户
  • 注册时间: 2011-03-21 12:02
个人简介

文章分类

全部博文(51)

文章存档

2023年(2)

2022年(1)

2021年(7)

2020年(10)

2019年(2)

2016年(20)

2015年(5)

2014年(1)

2011年(3)

我的朋友

分类: LINUX

2020-12-16 10:47:32

下面是snort3的一个抽象的框架图, 要介绍的DAQ是sniffer部分;


默认的daq是pcap,当然还有其它的实现方式;为了兼容各种sniffer,提供统一的接口,就有了libdaq这个库:
通过阅读代码,抽象出来一个软件框架图:

另类API:一类是供其上的binary使用,不需要关心使用哪一类sniffer,二是中间件API,每类plugin都需要实现其中重要的函数;
当前已经实现的模块包括:
./modules/
├── afpacket
├── bpf
├── divert
├── dump
├── fst
├── netmap
├── nfq
├── pcap
└── trace

有个大致的总结:
?Pcap: default DAQ
?AFPACKET: similar to the memory mapped pcap DAQ but no external library is required
?NFQ: built on top of the Linux netfilter packet filtering framework; the module operates on packets queued by the kernel packet filter for userspace consumption via the NFQUEUE mechanism, usually controlled by iptables rules. 
?Dump: A wrapper DAQ module that presents the configuration stack as inline-interface- and injection-capable.
?Netmap: built on top of the netmap project; The netmap project is a framework for very high speed packet I/O.
?FST: The Flow State Table (FST) DAQ module is a wrapper module that mimics operating on top of a flow-tracking dataplane.


阅读(3290) | 评论(0) | 转发(0) |
0

上一篇:snort3 for arm64

下一篇:perf probe实例

给主人留下些什么吧!~~