+ dhcp custom options

Squashed commit of the following:

commit 140ac16568383cab2270e5d5ba895959902dd943
Merge: d5ed73b5 cb6ca3b0
Author: Simon Zolin <s.zolin@adguard.com>
Date:   Tue Aug 25 13:46:34 2020 +0300

    Merge remote-tracking branch 'origin/master' into 1585-dhcp-options

commit d5ed73b5e4f068b823fe97ab1161753670d10387
Author: Simon Zolin <s.zolin@adguard.com>
Date:   Fri Aug 21 18:16:41 2020 +0300

    minor

commit f5208a0b050c2dd462b32edee0379758cc6e5003
Author: Simon Zolin <s.zolin@adguard.com>
Date:   Mon Jun 1 14:09:39 2020 +0300

    + dhcpv4 custom options
This commit is contained in:
Simon Zolin
2020-08-25 14:07:11 +03:00
parent cb6ca3b0c4
commit 9c999f98fb
6 changed files with 130 additions and 10 deletions

View File

@@ -25,12 +25,13 @@ Contents:
* API: Find clients by IP
* DHCP server
* DHCP server in DNS
* "Show DHCP interfaces" command
* "Show DHCP status" command
* "Check DHCP" command
* "Enable DHCP" command
* DHCP Custom Options
* API: Show DHCP interfaces
* API: Show DHCP status
* API: Check DHCP
* API: Enable DHCP
* Static IP check/set
* Add a static lease
* API: Add a static lease
* API: Reset DHCP configuration
* DNS general settings
* API: Get DNS general settings
@@ -429,7 +430,20 @@ DHCP leases are used in several ways by DNS module.
> PTR 100.1.168.192.in-addr.arpa. = bills-notebook.
### "Show DHCP interfaces" command
### DHCP Custom Options
Option with arbitrary hexadecimal data:
DEC_CODE hex HEX_DATA
where DEC_CODE is a decimal DHCPv4 option code in range [1..255]
Option with IP data (only 1 IP is supported):
DEC_CODE ip IP_ADDR
### API: Show DHCP interfaces
Request:
@@ -452,7 +466,7 @@ Response:
}
### "Show DHCP status" command
### API: Show DHCP status
Request:
@@ -487,7 +501,7 @@ Response:
}
### "Check DHCP" command
### API: Check DHCP
Request:
@@ -535,7 +549,7 @@ If `static_ip.static` is:
In order to use DHCP server a static IP address must be set. We failed to determine if this network interface is configured using static IP address. Please set a static IP address manually.
### "Enable DHCP" command
### API: Enable DHCP
Request:
@@ -662,7 +676,7 @@ or:
systemctl restart system-networkd
### Add a static lease
### API: Add a static lease
Request: