1 # Hyperscan plugin for VPP {#hyperscan_plugin_doc}
5 Hyperscan is a high-performance multiple regex matching library.
6 Please refer to below for details:
7 http://intel.github.io/hyperscan/dev-reference/
9 This plugin provides Hyperscan support on VPP, so can implement DPI/IPS/IDS etc.
11 ## Hyperscan Installation on Ubuntu
12 1).Install binary prerequisites
13 apt-get install cmake ragel
14 apt-get install libboost-dev
15 apt-get install python-dev libbz2-dev
17 2).Download Hyperscan sources
18 wget https://github.com/intel/hyperscan/archive/v4.7.0.tar.gz
21 3).Download boost headers
22 wget https://dl.bintray.com/boostorg/release/1.67.0/source/boost_1_67_0.tar.gz
23 tar -xf boost_1_67_0.tar.gz
24 cp -r boost_1_67_0/boost hyperscan-4.7.0/include
26 4).Build and install Hyperscan shared library.
27 Just follow the instruction from here. Compilation can take a long time.
31 cmake -DBUILD_SHARED_LIBS=true ..
38 ### Configure ip_hyperscan_bypass
40 The hyperscan plugin need to redirct packets to hyperscan-scan graph node:
42 hs set interface ip4 hyperscan-bypass <interface> [del]
44 interface: the interface that you want to enable hyperscan.
47 ### Configure and compile Hyperscan
49 The hyperscan plugin need to configure regular matching patterns
50 and compile them into database.
52 hs compile mode [block|stream] flags [imsHV8W\r] \
56 HS_MODE_BLOCK or HS_MODE_STREAM or HS_MODE_VECTORED must be supplied.
57 flags: Flags which modify the behaviour of the expression.
58 Multiple flags may be used by ORing them together.
59 patterns: The NULL-terminated expression to parse