libresolvconf
is a C library that parses resolv.conf
files and can load ENVIRONMENTAL variables into a predefined structure. It uses Ragel to build FSM that parse and validate the input, while striving for performance and reliability. It also comes with utility resolvconf-checker
, that check syntax of resolv.conf
file.
It supports multiple resolv.conf
file standards and is syntax compatible under Linux
and OpenBSD
. Tested platrofms are Ubuntu
and MacOS
.
Uses the CMake build system.
-
Before building, install the
cmake
, C compiler(gcc
,clang
, ...),libcriterion-dev
andragel
dependencies. -
Access the working directory and download the source code from the repository
cd <working directory>
git clone https://github.com/Payne-X6/libresolvconf.git
- Create a build directory
cd libresolvconf
mkdir build
- Build from source
cd build
cmake ..
make -j`nproc`
- Optionally, you can install the library
sudo make install