This project is a Trie-based IP address management system implemented in C. It provides an efficient way to store and manage IP addresses and their associated subnet masks.
- Add IP Address: The
addfunction allows you to add an IP address and its associated subnet mask to the data structure. - Delete IP Address: The
delfunction allows you to remove an IP address and its associated subnet mask from data structure. - Check IP Address: The
checkfunction checks if an IP address is present in the data structure and returns its associated subnet mask. - Test Suite: The project includes a comprehensive test suite written with the Unity test framework. The tests cover all major functionalities of the data structure.
To get started with this project, clone the repository and build the project using your preferred C compiler.
git clone https://github.com/jlatusek/ip-trie
cd ip-trie
cmake \
-Bbuild \
-DCMAKE_BUILD_TYPE=Release \
-G Ninja
cmake --build buildThe tests for this project are written using the Unity test framework. To run the tests, compile the project and in build directory run:
cd build
ctestTo generate a coverage report, you can run the following commands:
cmake --build build --target coverageTo run the cppcheck static analysis tool, you can run the following commands:
cmake --build build --target cppcheckResult report will be saved in build/cppcheck/index.html.
This project is licensed under the MIT License.