aboutsummaryrefslogtreecommitdiff
path: root/src/include/ndpi_api.h
Commit message (Collapse)AuthorAge
* fuzz: some improvements and add two new fuzzers (#1881)Ivan Nardi2023-02-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove `FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION` define from `fuzz/Makefile.am`; it is already included by the main configure script (when fuzzing). Add a knob to force disabling of AESNI optimizations: this way we can fuzz also no-aesni crypto code. Move CRC32 algorithm into the library. Add some fake traces to extend fuzzing coverage. Note that these traces are hand-made (via scapy/curl) and must not be used as "proof" that the dissectors are really able to identify this kind of traffic. Some small updates to some dissectors: CSGO: remove a wrong rule (never triggered, BTW). Any UDP packet starting with "VS01" will be classified as STEAM (see steam.c around line 111). Googling it, it seems right so. XBOX: XBOX only analyses UDP flows while HTTP only TCP ones; therefore that condition is false. RTP, STUN: removed useless "break"s Zattoo: `flow->zattoo_stage` is never set to any values greater or equal to 5, so these checks are never true. PPStream: `flow->l4.udp.ppstream_stage` is never read. Delete it. TeamSpeak: we check for `flow->packet_counter == 3` just above, so the following check `flow->packet_counter >= 3` is always false.
* fuzz: add a new fuzzer to test serialization/deserialization code (#1876)Ivan Nardi2023-01-27
| | | | | | | | | | Autodetecting the needed buffer size is quite complex (especially with float/double values) so it is mandatory to properly check for `ndpi_snprintf` truncation. These issues have been undetected so far probably because the default buffer is big enough for all common cases. Add an example of usage of `ndpi_deserialize_clone_all()` (taken from `ntopng`)
* LRU caches: add a generic (optional and configurable) expiration logic (#1855)Ivan Nardi2023-01-18
| | | Two caches already implemented a similar mechanism: make it generic.
* Add some fuzzers to test algorithms and data structures (#1852)Ivan Nardi2023-01-17
| | | Fix some issues found with these new fuzzers
* fuzz: add fuzzer testing nDPI (initial) configurations (#1830)Ivan Nardi2022-12-23
| | | | | | | | | | | | | | | | | The goal of this fuzzer is to test init and deinit of the library, with different configurations. In details: * random memory allocation failures, even during init phase * random `ndpi_init_prefs` parameter of `ndpi_init_detection_module()` * random LRU caches sizes * random bitmask of enabled protocols * random parameters of `ndpi_set_detection_preferences()` * random initialization of opportunistic TLS * random load/don't load of configuration files This new fuzzer is a C++ file, because it uses `FuzzedDataProvider` class (see https://github.com/google/fuzzing/blob/master/docs/split-inputs.md). Note that the (existing) fuzzers need to be linked with C++ compiler anyway, so this new fuzzer doesn't add any new requirements.
* Add protocol disabling feature (#1808)Ivan Nardi2022-12-18
| | | | | | | | | | | | | | | | | | | | | | The application may enable only some protocols. Disabling a protocol means: *) don't register/use the protocol dissector code (if any) *) disable classification by-port for such a protocol *) disable string matchings for domains/certificates involving this protocol *) disable subprotocol registration (if any) This feature can be tested with `ndpiReader -B list_of_protocols_to_disable`. Custom protocols are always enabled. Technically speaking, this commit doesn't introduce any API/ABI incompatibility. However, calling `ndpi_set_protocol_detection_bitmask2()` is now mandatory, just after having called `ndpi_init_detection_module()`. Most of the diffs (and all the diffs in `/src/lib/protocols/`) are due to the removing of some function parameters. Fix the low level macro `NDPI_LOG`. This issue hasn't been detected sooner simply because almost all the code uses only the helpers `NDPI_LOG_*`
* Improve export/print of L4 protocol information (#1799)Ivan Nardi2022-11-13
| | | Close #1797
* Sizes of LRU caches are now configurableNardi Ivan2022-09-23
| | | | | | | | 0 as size value disable the cache. The diffs in unit tests are due to the fact that some lookups are performed before the first insert: before this change these lookups weren't counted because the cache was not yet initialized, now they are.
* Moved `NDPI_API_VERSION` to `src/include/ndpi_define.h.in` where it belongs.Toni Uhlig2022-09-21
| | | | | | | That way, we can make `src/include/ndpi_api.h` independent of autoconf. MSBuild will like that. Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
* File nor necessary and generated by configureLuca Deri2020-11-12
|
* Cosmetic changesLuca Deri2020-11-03
|
* :bulb: Add mongodb protocol dissector (#1048)Leonn2020-11-03
|
* Updated APILuca Deri2020-05-06
|
* Reworked protocol handling chnging it is u_int16_tLuca Deri2020-05-06
|
* :bulb: implement websocket protocol dissectorLeonn Paiva2020-04-26
|
* NDPI_API_VERSION is now computed automaticallyLuca Deri2020-03-25
|
* Win fixesLuca Deri2020-03-12
|
* Fix docstrings.Zied Aouini2020-02-21
|
* Add ndpi_flow_tcp_struct and ndpi_flow_udp_struct api calls.Zied Aouini2020-02-21
|
* Add ndpi_serialize_string_raw to add raw json valuesAlfredo Cardigliano2020-02-14
|
* Added ndpi_is_protocol_detected() API callLuca Deri2020-02-13
|
* Implement ndpi_flowv6_flow_hash ndpi_flowv4_flow_hash. Add ndpi_base64_encode.Alfredo Cardigliano2020-01-24
|
* Merge branch 'dev' of https://github.com/ntop/nDPI into devLuca Deri2020-01-05
|\
| * Reworked TLS dissectionLuca2020-01-01
| |
* | Updated (C)Luca Deri2020-01-05
|/
* Expose API to calculate the MD5 hashemanuele-f2019-11-20
|
* Rounding up serializer buffer to be divisible by 4 (required by zmq encryption)Alfredo Cardigliano2019-11-19
|
* New ndpi_serialize_string_boolean/ndpi_serialize_uint32_booleanAlfredo Cardigliano2019-11-13
|
* Added ndpi_load_ipv4_ptree() API callLuca Deri2019-11-11
|
* Added ndpi_init_detection_module() API preferencesLuca Deri2019-11-10
|
* Added ndpi_finalize_initalization() initialization functionLuca2019-11-07
|
* Merge branch 'dev' of https://github.com/ntop/nDPI into devLuca2019-11-05
|\
| * Implemented SQL Injection and XSS attack detectionLuca Deri2019-11-01
| |
* | Added tunnelling decapsulationLuca2019-11-05
|/
* Major cleanupLuca Deri2019-10-24
| | | | Removed ndpi_pref_http_dont_dissect_response and ndpi_pref_dns_dont_dissect_response as the ndpi_extra_dissection_possible() call will now handle everything
* Reworked email metaata extractionLuca Deri2019-10-21
|
* Added POP3 metadata extractionLuca Deri2019-10-20
|
* Fix memory leak in ndpiReader.Ravi Kerur2019-10-19
| | | | | | Changes in library for strict function prototype. Signed-off-by: Ravi Kerur <ravi.kerur@viasat.com>
* Updated ndpi_flow2jsonLuca Deri2019-10-16
|
* Merge branch 'dev' of https://github.com/ntop/nDPI into devLuca Deri2019-10-15
|\
| * Implement nDPI patricia tree APIemanuele-f2019-10-15
| |
* | Initial implementation of ndpi_flow2json APi callLuca Deri2019-10-15
|/
* Modified API signatures forLuca Deri2019-10-09
| | | | | - ndpi_ssl_version2str() - ndpi_detection_giveup()
* New API functions: ndpi_load_categories_file and ndpi_load_categoryemanuele-f2019-10-08
|
* Merge branch 'dev' of https://github.com/ntop/nDPI into devLuca Deri2019-10-08
|\
| * ndpi_load_hostname_category now performs strdup on the name argumentemanuele-f2019-10-08
| | | | | | | | This simplifies the API as an application is not required to keep references to the strings to free
* | Added ndpi_get_l4_proto_name() and ndpi_get_l4_proto_info() API calls to ↵Luca Deri2019-10-08
|/ | | | print L4 protocol
* Fix out of bounds read in ndpi_match_custom_categoryemanuele-f2019-10-04
|
* Reworked categories handlingLuca Deri2019-09-29
| | | | | Removed GenericProtocol and replaced with categories Removed ndpi_pref_enable_category_substring_match option: substring matching is now default
* Added ndpi_extra_dissection_possible() API callLuca Deri2019-09-26
|