Skip to content

Conversation

@IvanNardi
Copy link
Collaborator

This commit significantly improves the documentation quality in ndpi_api.h, the main public API header file for nDPI.

Changes include:

  1. Fixed 11 typos:

    • "fucntion" → "function"
    • "ckeck" → "check"
    • "guesses" → "guessed"
    • "searhing" → "searching"
    • "@paw" → "@Par" (incorrect Doxygen tag)
    • "addeed" → "added"
    • "readeable" → "readable" (function name)
    • "creaign" → "creating"
    • "lenght" → "length" (3 occurrences)
    • "hosti tself" → "host itself"
  2. Added comprehensive documentation for memory management functions:

    • ndpi_malloc(), ndpi_calloc(), ndpi_realloc()
    • ndpi_strdup(), ndpi_strndup()
    • ndpi_free()
    • ndpi_flow_malloc(), ndpi_flow_free()
    • ndpi_get_tot_allocated_memory()

    These critical functions were previously undocumented, which could
    confuse users about custom allocator support and memory tracking.

  3. Documented high-priority utility functions:

    • ndpi_match_string_value() - automaton string matching
    • ndpi_strip_leading_trailing_spaces() - string trimming
    • ndpi_handle_risk_exceptions() - risk exception handling
    • set_ndpi_malloc(), set_ndpi_free() - custom allocator setup
    • set_ndpi_flow_malloc(), set_ndpi_flow_free() - flow allocator setup
    • set_ndpi_debug_function() - custom debug logging
  4. Added detailed documentation for Community ID hash functions:

    • ndpi_flowv4_flow_hash() - IPv4 flow hashing
    • ndpi_flowv6_flow_hash() - IPv6 flow hashing
    • Added reference to Community ID specification
    • Clarified parameter byte ordering and buffer requirements

All documentation follows Doxygen format with @param and @return tags. Build and tests verified: all tests pass (3/3).

Stats: +173 lines of documentation, -19 lines (typo fixes)

🤖 Generated with Claude Code

IvanNardi and others added 2 commits October 10, 2025 17:57
This commit significantly improves the documentation quality in ndpi_api.h,
the main public API header file for nDPI.

Changes include:

1. Fixed 11 typos:
   - "fucntion" → "function"
   - "ckeck" → "check"
   - "guesses" → "guessed"
   - "searhing" → "searching"
   - "@paw" → "@Par" (incorrect Doxygen tag)
   - "addeed" → "added"
   - "readeable" → "readable" (function name)
   - "creaign" → "creating"
   - "lenght" → "length" (3 occurrences)
   - "hosti tself" → "host itself"

2. Added comprehensive documentation for memory management functions:
   - ndpi_malloc(), ndpi_calloc(), ndpi_realloc()
   - ndpi_strdup(), ndpi_strndup()
   - ndpi_free()
   - ndpi_flow_malloc(), ndpi_flow_free()
   - ndpi_get_tot_allocated_memory()

   These critical functions were previously undocumented, which could
   confuse users about custom allocator support and memory tracking.

3. Documented high-priority utility functions:
   - ndpi_match_string_value() - automaton string matching
   - ndpi_strip_leading_trailing_spaces() - string trimming
   - ndpi_handle_risk_exceptions() - risk exception handling
   - set_ndpi_malloc(), set_ndpi_free() - custom allocator setup
   - set_ndpi_flow_malloc(), set_ndpi_flow_free() - flow allocator setup
   - set_ndpi_debug_function() - custom debug logging

4. Added detailed documentation for Community ID hash functions:
   - ndpi_flowv4_flow_hash() - IPv4 flow hashing
   - ndpi_flowv6_flow_hash() - IPv6 flow hashing
   - Added reference to Community ID specification
   - Clarified parameter byte ordering and buffer requirements

All documentation follows Doxygen format with @param and @return tags.
Build and tests verified: all tests pass (3/3).

Stats: +173 lines of documentation, -19 lines (typo fixes)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@sonarqubecloud
Copy link

@IvanNardi IvanNardi merged commit 523fe3e into dev Oct 14, 2025
34 checks passed
@IvanNardi IvanNardi deleted the doc/improve-api-header-documentation branch October 14, 2025 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants