mirror of
https://github.com/vel21ripn/nDPI.git
synced 2026-05-05 02:16:47 +00:00
New API for library configuration
This is the first step into providing (more) configuration options in nDPI. The idea is to have a simple way to configure (most of) nDPI: only one function (`ndpi_set_config()`) to set any configuration parameters (in the present or on in the future) and we try to keep this function prototype as agnostic as possible. You can configure the library: * via API, using `ndpi_set_config()` * via a configuration file, in a text format This way, anytime we need to add a new configuration parameter: * we don't need to add two public functions (a getter and a setter) * we don't break API/ABI compatibility of the library; even changing the parameter type (from integer to a list of integer, for example) doesn't break the compatibility. The complete list of configuration options is provided in `doc/configuration_parameters.md`. As a first example, two configuration knobs are provided: * the ability to enable/disable the extraction of the sha1 fingerprint of the TLS certificates. * the upper limit on the number of packets per flow that will be subject to inspection
This commit is contained in:
parent
ca7df1db82
commit
d72a760ac3
52 changed files with 740 additions and 77 deletions
10
example/config.txt
Normal file
10
example/config.txt
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
#Format: <proto, param, value>
|
||||
#proto might be empty
|
||||
#Basic example of how to set nDPI configuration parameters via file
|
||||
#We set only some default values
|
||||
#See doc/configuration_parameters.md for a complete list and description of all the accepted knobs
|
||||
|
||||
packets_limit_per_flow,32
|
||||
tls,metadata.sha1_fingerprint.enable,1
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue