summaryrefslogtreecommitdiffstats
path: root/doc/examples/kea4/hooks.json
blob: 3acc4d9ec593e2a46509112f0059528f0c1e7794 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# This is an example configuration file for the DHCPv4 server in Kea
# illustrating the configuration of hooks libraries.  It uses a basic scenario
# of one IPv4 subnet configured with the default values for all parameters.

{"Dhcp4":

{
# Kea is told to listen on the ethX interface only.
  "interfaces-config": {
    "interfaces": [ "ethX" ]
  },

# Set up the storage for leases.
  "lease-database": {
    "type": "memfile"
  },

# Define a single subnet.
  "subnet4": [
    {
      "pools": [ { "pool": "192.0.2.1 - 19.2.0.2.200" } ],
      "subnet": "192.0.2.0/24",
      "interface": "ethX"
    }
  ],

# Set up the hooks libraries.  For this example, we assume that two libraries
# are loaded, called "security" and "charging".  Note that order is important:
# "security" is specified first so if both libraries supply a hook function
# for a given hook, the function in "security" will be called before that in
# "charging".

  "hooks-libraries": [
     {
        "library": "/opt/lib/security.so"
     },
     {
        "library": "/opt/lib/charging.so"
     }
  ]
}

}