[hyperscan][pkg-config] hyperscan 从0到1路线图

接续前文,继续深入理解:

概述:

1.  自动机理论,是hyperscan的理论基础。

https://zh.wikipedia.org/wiki/%E8%87%AA%E5%8B%95%E6%A9%9F%E7%90%86%E8%AB%96

2.  主要工作流程,分编译期和运行期。

3。与传统正则匹配引擎不同,Hyperscan支持多规则的同步匹配。在用户为每条规则指定独有的编号后,Hypercan可以将所有规则编译成一个数据库并在匹配过程中输出所有当前匹配到的规则信息。

4.  No memory allocations occur at runtime with the exception of two fixed-size allocations, these structures can be pre-allocated if required for performance reasons.

编译:

http://intel.github.io/hyperscan/dev-reference/compilation.html#compilation

摘要:

  1. 三个编译函数

hs_compile()
hs_compile_multi()
hs_compile_ext_multi()

  2. 编译时需要决定三种应用模式:

    streaming /  block /  vectored

    有参数mode决定:

 One of HS_MODE_STREAM or HS_MODE_BLOCK or HS_MODE_VECTORED must be supplied, to select between the generation of a streaming, block or vectored database.

运行:

http://intel.github.io/hyperscan/dev-reference/runtime.html

摘要:

  1. 回调函数可以通过返回一个非0值来终止尚没有完成的scaning

The match callback function has the capability to halt scanning by returning a non-zero value.

  2.  Hyperscan provides three different scanning modes

    Streaming Mode

    Block Mode

    Vectored Mode

  3.  内存预分配

API:

http://intel.github.io/hyperscan/dev-reference/api_files.html

摘要:

  block模式下的常用函数:

hs_compile_multi()
hs_compile_ext_multi()
int(* match_event_handler)()
hs_scan()
hs_alloc_scratch()
hs_free_scratch()

[hyperscan] hyperscan 1到1.5 --!!的更多相关文章

  1. [hyperscan][pkg-config] hyperscan 从0到1路线图

    经过一系列的研究学习,知识储备之后,终于,可以开始研究hyperscan了. [knowledge][模式匹配] 字符匹配/模式匹配 正则表达式 自动机 [knowledge][perl][pcre] ...

  2. 如何在windows下成功的编译和安装python组件hyperscan

    摘要:hyperscan 是英特尔推出的一款高性能正则表达式引擎,一次接口调用可以实现多条规则与多个对象之间的匹配,可以支持多种匹配模式,块模式和流模式,它是以PCRE为原型开发,并以BSD许可证开源 ...

  3. hyperscan在低版本系统应用问题

    编译环境:centos6.3 32位/64位 由于hyperscan使用许多C++11特性,在低版本系统gcc版本不能编译.后来发现在runtime时也就是hs_scan时只需要依赖libhs_run ...

  4. hyperscan简单学习(2)

    对hyperscan官方的前两个example进行编译和运行. 支持单个和多个正则编译.并行匹配规则,性能高. 对块模式和流模式使用: 示例pcapscan: http://www.cnblogs.c ...

  5. 一种hyperscan API使用(1)

    hyperscan: 编译和安装:http://www.cnblogs.com/zzqcn/p/4900643.html 简单介绍:http://www.cnblogs.com/zzqcn/p/489 ...

  6. Hyperscan与Snort的集成方案

    概况 Hyperscan作为一款高性能的正则表达式匹配库,非常适用于部署在诸如DPI/IPS/IDS/NGFW等网络解决方案中.Snort (https://www.snort.org) 是目前应用最 ...

  7. 【hyperscan】示例解读 pcapscan

    示例位置: <hyperscan source>/examples/pcapscan.cc参考:http://01org.github.io/hyperscan/dev-reference ...

  8. 【hyperscan】示例解读 simplegrep

    示例位置: <hyperscan source>/examples/simplegrep.c参考:http://01org.github.io/hyperscan/dev-referenc ...

  9. 【hyperscan】编译hyperscan 4.0.0

    ref: http://01org.github.io/hyperscan/dev-reference/getting_started.html 1. 硬件需求 intel x86处理器 64-bit ...

随机推荐

  1. 【Big Data - Hadoop - MapReduce】通过腾讯shuffle部署对shuffle过程进行详解

    摘要: 通过腾讯shuffle部署对shuffle过程进行详解 摘要:腾讯分布式数据仓库基于开源软件Hadoop和Hive进行构建,TDW计算引擎包括两部分:MapReduce和Spark,两者内部都 ...

  2. Approx Analytic Arealight

    试着实现的基于分析方法的近似面积光源.

  3. idea debug info can be unavailable. Please close other application using ADB: Monitor, DDMS, Eclipse

    开发android debug时 报错 解决方法 Kill adb  关闭  设备监视器

  4. [转] BootStrap table增加一列显示序号

    原文地址:https://blog.csdn.net/aboboo5200/article/details/78839208 最近由于项目需要,使用BootStrap table做数据展示,其中要在第 ...

  5. GitStack 第三方开源服务器端

      GitStack 开源集成Git的界面服务器端 官网URL:http://gitstack.com     详情 请看<分布式版本控制系统Git--使用GitStack+TortoiseGi ...

  6. MySQL 查询in操作,查询结果按in集合顺序显示

    MySQL 查询in操作,查询结果按in集合顺序显示   select * from test where id in(3,1,5) order by find_in_set(id,'3,1,5'); ...

  7. 二叉树转换成森林&amp;森林变成二叉树

    一,树转换成二叉树 1,将全部兄弟结点连起来; 2,保留第一个兄弟结点与父节点的连接,断开其它兄弟结点与父节点的连接,然后以根节点为轴依照顺时针方向旋转45度 watermark/2/text/aHR ...

  8. 前端开发神级IDE-sublime text

    汉化并自动带常用插件的版本下载地址:http://www.cr173.com/soft/55484.html 1.修改auto_complete快捷键:首选项>设置-默认>ctrl+f搜索 ...

  9. Window应急响应(四):挖矿病毒

    0x00 前言 ​ 随着虚拟货币的疯狂炒作,挖矿病毒已经成为不法分子利用最为频繁的攻击方式之一.病毒传播者可以利用个人电脑或服务器进行挖矿,具体现象为电脑CPU占用率高,C盘可使用空间骤降,电脑温度升 ...

  10. 【代码审计】大米CMS_V5.5.3 代码执行漏洞分析

      0x00 环境准备 大米CMS官网:http://www.damicms.com 网站源码版本:大米CMS_V5.5.3试用版(更新时间:2017-04-15) 程序源码下载:http://www ...