Browse Source

README: document IPv6 variables

Baptiste Jonglez 7 years ago
parent
commit
d858b846be
1 changed files with 117 additions and 5 deletions
  1. 117 5
      README.md

+ 117 - 5
README.md

@@ -121,9 +121,9 @@ is to continously display the content of this file:
 
 ## DHCPv4 variables
 
-Here are all possible variables, with their type, description and
-reference of the possible values.  Booleans are simply expressed with `0`
-and `1`.
+Here are all possible variables for DHCPv4, with their type, description
+and reference of the possible values.  Booleans are simply expressed with
+`0` and `1`.
 
 | Variable name          | Type     | Description                                                 | Reference                                                                                                                                                       |
 |------------------------|----------|-------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|
@@ -135,8 +135,8 @@ and `1`.
 | `QUERY4_HWADDR_SOURCE` | `int`    | Currently always set to `0`                                 | [dhcp/hwaddr.h](https://jenkins.isc.org/job/Kea_doc/doxygen/d2/db9/structisc_1_1dhcp_1_1HWAddr.html)                                                            |
 | `RESPONSE4_TYPE`       | `string` | Type of DHCP message                                        | [dhcp/dhcp4.h](https://jenkins.isc.org/job/Kea_doc/doxygen/d5/d8c/namespaceisc_1_1dhcp.html#aa5bfdcc4861aa3dab5328dba89362016)                                  |
 | `RESPONSE4_INTERFACE`  | `string` | Interface on which response is being sent                   |                                                                                                                                                                 |
-| `SUBNET4_PREFIX`       | `IPv4`   | Address of the IP prefix (without prefix length)            |                                                                                                                                                                 |
-| `SUBNET4_PREFIXLEN`    | `int`    | Prefix length (`0` to `32`)                                 |                                                                                                                                                                 |
+| `SUBNET4_PREFIX`       | `IPv4`   | IP prefix of the subnet (without prefix length)             |                                                                                                                                                                 |
+| `SUBNET4_PREFIXLEN`    | `int`    | Prefix length of the subnet (`0` to `32`)                   |                                                                                                                                                                 |
 | `SUBNET4`              | `string` | `SUBNET4_PREFIX`/`SUBNET4_PREFIXLEN`                        |                                                                                                                                                                 |
 | `LEASE4_ADDRESS`       | `IPv4`   | IPv4 address leased to client                               |                                                                                                                                                                 |
 | `REMOVE_LEASE`         | `bool`   | Whether the lease should be removed from the lease database | [DHCPv4 hook API](https://jenkins.isc.org/job/Kea_doc/doxygen/de/df3/dhcpv4Hooks.html#dhcpv4HooksLease4Expire)                                                  |
@@ -236,6 +236,118 @@ script.
 - `LEASE4_ADDRESS`
 
 
+## DHCPv6 variables
+
+Here are all possible variables for DHCPv6, with their type, description
+and reference of the possible values.  Booleans are simply expressed with
+`0` and `1`.
+
+| Variable name                  | Type     | Description                                                 | Reference                                                                                                      |
+|--------------------------------|----------|-------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------- |
+| `QUERY6_TYPE`                  | `string` | Type of DHCPv6 message                                      | [dhcp/dhcp6.h](https://jenkins.isc.org/job/Kea_doc/doxygen/db/d87/dhcp6_8h_source.html)                        |
+| `QUERY6_INTERFACE`             | `string` | Interface on which query was received                       |                                                                                                                |
+| `QUERY6_DUID`                  | `string` | TODO                                                        |                                                                                                                |
+| `QUERY6_HWADDR`                | `string` | TODO                                                        |                                                                                                                |
+| `RESPONSE6_TYPE`               | `string` | Type of DHCPv6 message                                      | [dhcp/dhcp6.h](https://jenkins.isc.org/job/Kea_doc/doxygen/db/d87/dhcp6_8h_source.html)                        |
+| `RESPONSE6_INTERFACE`          | `string` | Interface on which response is being sent                   |                                                                                                                |
+| `RESPONSE6_ADDRESS`            | `string` | TODO                                                        |                                                                                                                |
+| `RESPONSE6_PREFERRED_LIFETIME` | `int`    | TODO                                                        |                                                                                                                |
+| `RESPONSE6_VALID_LIFETIME`     | `int`    | TODO                                                        |                                                                                                                |
+| `SUBNET6_PREFIX`               | `IPv6`   | IP prefix of the subnet (without prefix length)             |                                                                                                                |
+| `SUBNET6_PREFIXLEN`            | `int`    | Prefix length of the subnet (`0` to `128`)                  |                                                                                                                |
+| `SUBNET6`                      | `string` | `SUBNET6_PREFIX`/`SUBNET6_PREFIXLEN`                        |                                                                                                                |
+| `LEASE6_ADDRESS`               | `IPv6`   | IPv6 address leased to client                               |                                                                                                                |
+| `REMOVE_LEASE`                 | `bool`   | Whether the lease should be removed from the lease database | [DHCPv6 hook API](https://jenkins.isc.org/job/Kea_doc/doxygen/d1/d02/dhcpv6Hooks.html#dhcpv6HooksLease6Expire) |
+| `FAKE_ALLOCATION`              | `bool`   | Whether the query is a SOLICIT or a REQUEST                 | [DHCPv6 hook API](https://jenkins.isc.org/job/Kea_doc/doxygen/d1/d02/dhcpv6Hooks.html#dhcpv6HooksLease6Select) |
+
+## DHCPv6 hook points
+
+For each Kea hook point, here are all variables usable in the external
+script.
+
+### [`pkt6_receive`](https://jenkins.isc.org/job/Kea_doc/doxygen/d1/d02/dhcpv6Hooks.html#dhcpv6HooksPkt6Receive)
+
+- `QUERY6_TYPE`
+- `QUERY6_INTERFACE`
+- `QUERY6_DUID`
+- `QUERY6_HWADDR`
+
+### [`pkt6_send`](https://jenkins.isc.org/job/Kea_doc/doxygen/d1/d02/dhcpv6Hooks.html#dhcpv6HooksPkt6Send)
+
+- `QUERY6_TYPE`
+- `QUERY6_INTERFACE`
+- `QUERY6_DUID`
+- `QUERY6_HWADDR`
+- `RESPONSE6_TYPE`
+- `RESPONSE6_INTERFACE`
+- `RESPONSE6_ADDRESS`
+- `RESPONSE6_PREFERRED_LIFETIME`
+- `RESPONSE6_VALID_LIFETIME`
+
+### [`subnet6_select`](https://jenkins.isc.org/job/Kea_doc/doxygen/d1/d02/dhcpv6Hooks.html#dhcpv6HooksSubnet6Select)
+
+- `QUERY6_TYPE`
+- `QUERY6_INTERFACE`
+- `QUERY6_DUID`
+- `QUERY6_HWADDR`
+- `SUBNET6_PREFIX`
+- `SUBNET6_PREFIXLEN`
+- `SUBNET6`
+
+### [`lease6_select`](https://jenkins.isc.org/job/Kea_doc/doxygen/d1/d02/dhcpv6Hooks.html#dhcpv6HooksLease6Select)
+
+- `QUERY6_TYPE`
+- `QUERY6_INTERFACE`
+- `QUERY6_DUID`
+- `QUERY6_HWADDR`
+- `SUBNET6_PREFIX`
+- `SUBNET6_PREFIXLEN`
+- `SUBNET6`
+- `FAKE_ALLOCATION`
+- `LEASE6_ADDRESS`
+
+### [`lease6_renew`](https://jenkins.isc.org/job/Kea_doc/doxygen/d1/d02/dhcpv6Hooks.html#dhcpv6HooksLease6Renew)
+
+- `QUERY6_TYPE`
+- `QUERY6_INTERFACE`
+- `QUERY6_DUID`
+- `QUERY6_HWADDR`
+- `LEASE6_ADDRESS`
+
+### [`lease6_rebind`](https://jenkins.isc.org/job/Kea_doc/doxygen/d1/d02/dhcpv6Hooks.html#dhcpv6HooksLease6Rebind)
+
+- `QUERY6_TYPE`
+- `QUERY6_INTERFACE`
+- `QUERY6_DUID`
+- `QUERY6_HWADDR`
+- `LEASE6_ADDRESS`
+
+### [`lease6_decline`](https://jenkins.isc.org/job/Kea_doc/doxygen/d1/d02/dhcpv6Hooks.html#dhcpv6HooksLease6Decline)
+
+- `QUERY6_TYPE`
+- `QUERY6_INTERFACE`
+- `QUERY6_DUID`
+- `QUERY6_HWADDR`
+- `LEASE6_ADDRESS`
+
+### [`lease6_release`](https://jenkins.isc.org/job/Kea_doc/doxygen/d1/d02/dhcpv6Hooks.html#dhcpv6HooksLease6Release)
+
+- `QUERY6_TYPE`
+- `QUERY6_INTERFACE`
+- `QUERY6_DUID`
+- `QUERY6_HWADDR`
+- `LEASE6_ADDRESS`
+
+### [`lease6_expire`](https://jenkins.isc.org/job/Kea_doc/doxygen/d1/d02/dhcpv6Hooks.html#dhcpv6HooksLease6Expire)
+
+- `LEASE6_ADDRESS`
+- `REMOVE_LEASE`
+
+### [`lease6_recover`](https://jenkins.isc.org/job/Kea_doc/doxygen/d1/d02/dhcpv6Hooks.html#dhcpv6HooksLease6Recover)
+
+- `LEASE6_ADDRESS`
+
+
 # TODO
 
 - handle DHCPv6 hook points better