]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#899] added more documentation
authorRazvan Becheriu <razvan@isc.org>
Mon, 15 Feb 2021 14:14:25 +0000 (16:14 +0200)
committerRazvan Becheriu <razvan@isc.org>
Thu, 18 Feb 2021 17:23:57 +0000 (19:23 +0200)
ChangeLog
doc/sphinx/arm/hooks-run-script.rst
doc/sphinx/arm/hooks.rst
src/hooks/dhcp/run_script/run_script.dox

index 9879c32c42340df2210ce1e73de502c355ff6d13..19a86b7c6193bf9f08ae161f9dca07ef7720a610 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,7 @@
 1865.  [func]          razvan
        Implemented the Run Script hooks library which can be used to
        run external scripts for specific packet processing hook points.
-       There are several exported environemnt variables available for
+       There are several exported environment variables available for
        the script. Currently the implementation is nonblocking and
        Kea will not wait for the script to finish execution before
        continuing to the next step. For this reason, the next step
index ae7a87b4f618f4902335640dc0f94674c5af14dd..fb9bf1f969129ff7d9821e6a32507d238476ef6e 100644 (file)
@@ -3,7 +3,8 @@
 Run Script Support
 ==================
 
-This hooks library adds support for calling an external script with vendor information extensions
+This hooks library adds support for calling an external script for specific
+packet processing hook points.
 
 The library is available since Kea 1.9.5 and can be loaded in a
 similar way as other hook libraries by the ``kea-dhcp4`` and
index 8ec4f42e48c8a356bf8e9f577d68f2b8ca6ac17e..7fb843531568ffd5ca9de494d0c722038e82c268 100644 (file)
@@ -461,6 +461,11 @@ loaded by the correct process per the table below.
    |                 | 1.7.8, DHCPv6 |                                                            |
    |                 | since 1.7.9)  |                                                            |
    +-----------------+---------------+------------------------------------------------------------+
+   | Run Script      | Kea sources   |The Run Script hooks library adds support to run external   |
+   |                 | (since 1.9.5) |scripts for specific packet processing hook points. There   |
+   |                 |               |are several exported environment variables available for    |
+   |                 |               |the script.                                                 |
+   +-----------------+---------------+------------------------------------------------------------+
 
 ISC hopes to see more hooks libraries become available as time
 progresses, developed both internally and externally. Since this list
index d2e714bcf9f8e0765074ff730057cea7312e2bfd..bb29170c3964017cfd9b6de989fa5917c3b125e9 100644 (file)
@@ -24,15 +24,16 @@ Developer's Guide</a> and in particular its section about hooks.
 libdhcp_run_script is a hooks library which allows an external script to
 be run on specific hook points.
 
-## Configuring the DHCPv4 Module
+## Configuring the DHCPv4 and DHCPv6 Modules
 
 It must be configured as a hook library for the desired DHCP server
 modules. Note that the Run Script library is installed alongside the
 Kea libraries in "<install-dir>/lib" where <install-dir> is determined
 by the --prefix option of the configure script.  It defaults to
-"/usr/local". Assuming the default value then, configuring kea-dhcp4
-to load the Run Script library could be done with the following Kea4
-configuration:
+"/usr/local".
+
+Configuring kea-dhcp4 to load the Run Script library could be done with
+the following Kea4 configuration:
 
 @code
 "Dhcp4": {
@@ -48,6 +49,23 @@ configuration:
 }
 @endcode
 
+Configuring kea-dhcp6 to load the Run Script library could be done with
+the following Kea6 configuration:
+
+@code
+"Dhcp6": {
+    "hook_libraries": [
+        {   "library": "/usr/local/lib/libdhcp_run_script.so",
+            "parameters": {
+                "name": "/path_to/script_name.sh",
+                "sync": false
+            }
+        },
+        ...
+    ]
+}
+@endcode
+
 The parameters contain the 'name' which indicates the path and name of the
 external script to be called on each hookpoint, and also the 'sync' option
 to be able to wait synchronously for the script to finish execution.