Skip to content

Embed Python in the Kea DHCP server. This adds support for kea 2.X and some additional functions.

License

Notifications You must be signed in to change notification settings

phicus/kea-python

 
 

Repository files navigation

Kea Python

Develop Kea hooks in Python.

This project integrates a Python3 interpreter into Kea, offering a lightweight interface to a selection of Kea classes. This enables the development of hooks in Python. The Python module 'kea' is designed to mirror the API of the Kea classes as closely as possible, ensuring a familiar experience for users.

Installation

Clone the kea-python project, compile it, and install it:

$ git clone https://github.com/phicus/kea-python.git
$ cd kea-python
$ autoreconf --install --force
$ make
$ sudo make install

Loading the kea-python hook

To load this hook into kea you will need a hook-libraries section in kea config that looks something like the following:

        "hooks-libraries": [{
            "library": "/usr/lib/kea/hooks/libdhcp_python.so",
            "parameters": {
                "libpython": "libpython3.8.so",
                "module": "/usr/local/lib/kea/keahook.py"
            }
        }],

Acknowledgements

This project has benefited from the development, contributions and resources provided by the following:

About

Embed Python in the Kea DHCP server. This adds support for kea 2.X and some additional functions.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 73.3%
  • Python 22.9%
  • M4 1.5%
  • Makefile 1.4%
  • Other 0.9%