From: Francis Dupont Date: Sun, 2 Aug 2020 14:24:54 +0000 (+0200) Subject: [#1329] Moved UML to ARM X-Git-Tag: Kea-1.8.0~129 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e49a6ac348fd043fdb6190f19f20aeaa287bf60a;p=thirdparty%2Fkea.git [#1329] Moved UML to ARM --- diff --git a/doc/devel/Makefile.am b/doc/devel/Makefile.am index 6562151616..9b740be71b 100644 --- a/doc/devel/Makefile.am +++ b/doc/devel/Makefile.am @@ -11,43 +11,6 @@ EXTRA_DIST += mainpage.dox EXTRA_DIST += terminology.dox EXTRA_DIST += unit-tests.dox -EXTRA_DIST += images/appendRequestedOptions.png -EXTRA_DIST += images/appendRequestedOptions.svg -EXTRA_DIST += images/appendRequestedOptions.uml -EXTRA_DIST += images/appendRequestedVendorOptions.png -EXTRA_DIST += images/appendRequestedVendorOptions.svg -EXTRA_DIST += images/appendRequestedVendorOptions.uml -EXTRA_DIST += images/assign-lease4.png -EXTRA_DIST += images/assign-lease4.svg -EXTRA_DIST += images/assign-lease4.uml -EXTRA_DIST += images/buildCfgOptionList.png -EXTRA_DIST += images/buildCfgOptionList.svg -EXTRA_DIST += images/buildCfgOptionList.uml -EXTRA_DIST += images/currentHost4.png -EXTRA_DIST += images/currentHost4.svg -EXTRA_DIST += images/currentHost4.uml -EXTRA_DIST += images/lease-states.png -EXTRA_DIST += images/lease-states.svg -EXTRA_DIST += images/lease-states.uml -EXTRA_DIST += images/main-loop.png -EXTRA_DIST += images/main-loop.svg -EXTRA_DIST += images/main-loop.uml -EXTRA_DIST += images/packet4.png -EXTRA_DIST += images/packet4.svg -EXTRA_DIST += images/packet4.uml -EXTRA_DIST += images/request4-lease.png -EXTRA_DIST += images/request4-lease.svg -EXTRA_DIST += images/request4-lease.uml -EXTRA_DIST += images/request4.png -EXTRA_DIST += images/request4.svg -EXTRA_DIST += images/request4.uml -EXTRA_DIST += images/requestLease4.png -EXTRA_DIST += images/requestLease4.svg -EXTRA_DIST += images/requestLease4.uml -EXTRA_DIST += images/select4.png -EXTRA_DIST += images/select4.svg -EXTRA_DIST += images/select4.uml - all: # do nothing, used only by developers manually devel: @@ -57,11 +20,3 @@ devel: clean-local: rm -rf html - -if HAVE_PLANTUML -.uml.png: - @PLANTUML@ $< - -.uml.svg: - @PLANTUML@ -svg $< -endif diff --git a/doc/devel/images/assign-lease4.png b/doc/devel/images/assign-lease4.png deleted file mode 100644 index c9f85fcb1a..0000000000 Binary files a/doc/devel/images/assign-lease4.png and /dev/null differ diff --git a/doc/devel/images/assign-lease4.svg b/doc/devel/images/assign-lease4.svg deleted file mode 100644 index da95e2fb74..0000000000 --- a/doc/devel/images/assign-lease4.svg +++ /dev/null @@ -1,111 +0,0 @@ -DHCPv4 Assign Lease (Kea 1.7.11)INIT-REBOOT stateLease allocatedGet existing lease by client idGet existing lease by hardware addressGet authoritativeupdate DDNSSend ACKCheck Subnetentry pointGet server idGet hintGet hardware address and client idProcess hostnameRequest leaseNo lease allocatedexit pointSend NAKexit pointNo responseexit pointno subnetuse requested address optionuse client addressno hintrequested address and no server idhas a client idno client idnot fountnot authoritative and no owned leaseowned lease with hint mismatchauthoritative and no owned leaseother caseslease allocatedno lease allocated \ No newline at end of file diff --git a/doc/sphinx/Makefile.am b/doc/sphinx/Makefile.am index 2ebe069e81..ed524b4404 100644 --- a/doc/sphinx/Makefile.am +++ b/doc/sphinx/Makefile.am @@ -21,6 +21,7 @@ EXTRA_DIST += static/static_sources.mk rst_arm_sources = rst_arm_sources += index.rst rst_arm_sources += manpages.rst +rst_arm_sources += umls.rst include arm/rst_arm_sources.mk EXTRA_DIST += arm/rst_arm_sources.mk @@ -90,6 +91,53 @@ $(srcdir)/arm/platforms.rst: rm -f $(srcdir)/arm/platforms.rst cp $(srcdir)/../../platforms.rst $(srcdir)/arm/platforms.rst +# UML files + +if HAVE_PLANTUML +.uml.png: + @PLANTUML@ $< + +.uml.svg: + @PLANTUML@ -svg $< +endif + +EXTRA_DIST += uml/appendRequestedOptions.png +EXTRA_DIST += uml/appendRequestedOptions.svg +EXTRA_DIST += uml/appendRequestedOptions.uml +EXTRA_DIST += uml/appendRequestedVendorOptions.png +EXTRA_DIST += uml/appendRequestedVendorOptions.svg +EXTRA_DIST += uml/appendRequestedVendorOptions.uml +EXTRA_DIST += uml/assign-lease4.png +EXTRA_DIST += uml/assign-lease4.svg +EXTRA_DIST += uml/assign-lease4.uml +EXTRA_DIST += uml/buildCfgOptionList.png +EXTRA_DIST += uml/buildCfgOptionList.svg +EXTRA_DIST += uml/buildCfgOptionList.uml +EXTRA_DIST += uml/currentHost4.png +EXTRA_DIST += uml/currentHost4.svg +EXTRA_DIST += uml/currentHost4.uml +EXTRA_DIST += uml/lease-states.png +EXTRA_DIST += uml/lease-states.svg +EXTRA_DIST += uml/lease-states.uml +EXTRA_DIST += uml/main-loop.png +EXTRA_DIST += uml/main-loop.svg +EXTRA_DIST += uml/main-loop.uml +EXTRA_DIST += uml/packet4.png +EXTRA_DIST += uml/packet4.svg +EXTRA_DIST += uml/packet4.uml +EXTRA_DIST += uml/request4-lease.png +EXTRA_DIST += uml/request4-lease.svg +EXTRA_DIST += uml/request4-lease.uml +EXTRA_DIST += uml/request4.png +EXTRA_DIST += uml/request4.svg +EXTRA_DIST += uml/request4.uml +EXTRA_DIST += uml/requestLease4.png +EXTRA_DIST += uml/requestLease4.svg +EXTRA_DIST += uml/requestLease4.uml +EXTRA_DIST += uml/select4.png +EXTRA_DIST += uml/select4.svg +EXTRA_DIST += uml/select4.uml + PDFLATEX_AND_OPTS=$(PDFLATEX) -interaction nonstopmode pdf: $(main_sources) api-files.txt mes-files.txt $(srcdir)/arm/platforms.rst diff --git a/doc/sphinx/index.rst b/doc/sphinx/index.rst index 79a6c97e56..8ea10dd255 100644 --- a/doc/sphinx/index.rst +++ b/doc/sphinx/index.rst @@ -50,7 +50,7 @@ Kea, can be found in ISC's `Knowledgebase DHCPv4 Assign Lease (Kea 1.7.11)INIT-REBOOT stateLease allocatedGet existing lease by client idGet existing lease by hardware addressGet authoritativeupdate DDNSSend ACKCheck Subnetentry pointGet server idGet hintGet hardware address and client idProcess hostnameRequest leaseNo lease allocatedexit pointSend NAKexit pointNo responseexit pointno subnetuse requested address optionuse client addressno hintrequested address and no server idhas a client idno client idfoundnot foundnot authoritative and no owned leaseowned lease with hint mismatchauthoritative and no owned leaseother caseslease allocatedno lease allocated \ No newline at end of file diff --git a/doc/devel/images/assign-lease4.uml b/doc/sphinx/uml/assign-lease4.uml similarity index 95% rename from doc/devel/images/assign-lease4.uml rename to doc/sphinx/uml/assign-lease4.uml index 8382d97a99..5b29b77f0d 100644 --- a/doc/devel/images/assign-lease4.uml +++ b/doc/sphinx/uml/assign-lease4.uml @@ -47,7 +47,8 @@ ident --> init_reboot : requested address and no server id ident ---> hostname init_reboot --> by_client_id : has a client id init_reboot --> by_hw_addr : no client id -by_client_id --> by_hw_addr : not fount +by_client_id ---> authoritative : found +by_client_id --> by_hw_addr : not found by_hw_addr --> authoritative authoritative ---> no_response : not authoritative and no owned lease authoritative --> nak : owned lease with hint mismatch diff --git a/doc/devel/images/buildCfgOptionList.png b/doc/sphinx/uml/buildCfgOptionList.png similarity index 100% rename from doc/devel/images/buildCfgOptionList.png rename to doc/sphinx/uml/buildCfgOptionList.png diff --git a/doc/devel/images/buildCfgOptionList.svg b/doc/sphinx/uml/buildCfgOptionList.svg similarity index 100% rename from doc/devel/images/buildCfgOptionList.svg rename to doc/sphinx/uml/buildCfgOptionList.svg diff --git a/doc/devel/images/buildCfgOptionList.uml b/doc/sphinx/uml/buildCfgOptionList.uml similarity index 100% rename from doc/devel/images/buildCfgOptionList.uml rename to doc/sphinx/uml/buildCfgOptionList.uml diff --git a/doc/devel/images/currentHost4.png b/doc/sphinx/uml/currentHost4.png similarity index 100% rename from doc/devel/images/currentHost4.png rename to doc/sphinx/uml/currentHost4.png diff --git a/doc/devel/images/currentHost4.svg b/doc/sphinx/uml/currentHost4.svg similarity index 100% rename from doc/devel/images/currentHost4.svg rename to doc/sphinx/uml/currentHost4.svg diff --git a/doc/devel/images/currentHost4.uml b/doc/sphinx/uml/currentHost4.uml similarity index 100% rename from doc/devel/images/currentHost4.uml rename to doc/sphinx/uml/currentHost4.uml diff --git a/doc/devel/images/lease-states.png b/doc/sphinx/uml/lease-states.png similarity index 100% rename from doc/devel/images/lease-states.png rename to doc/sphinx/uml/lease-states.png diff --git a/doc/devel/images/lease-states.svg b/doc/sphinx/uml/lease-states.svg similarity index 100% rename from doc/devel/images/lease-states.svg rename to doc/sphinx/uml/lease-states.svg diff --git a/doc/devel/images/lease-states.uml b/doc/sphinx/uml/lease-states.uml similarity index 100% rename from doc/devel/images/lease-states.uml rename to doc/sphinx/uml/lease-states.uml diff --git a/doc/devel/images/main-loop.png b/doc/sphinx/uml/main-loop.png similarity index 100% rename from doc/devel/images/main-loop.png rename to doc/sphinx/uml/main-loop.png diff --git a/doc/devel/images/main-loop.svg b/doc/sphinx/uml/main-loop.svg similarity index 100% rename from doc/devel/images/main-loop.svg rename to doc/sphinx/uml/main-loop.svg diff --git a/doc/devel/images/main-loop.uml b/doc/sphinx/uml/main-loop.uml similarity index 100% rename from doc/devel/images/main-loop.uml rename to doc/sphinx/uml/main-loop.uml diff --git a/doc/devel/images/packet4.png b/doc/sphinx/uml/packet4.png similarity index 100% rename from doc/devel/images/packet4.png rename to doc/sphinx/uml/packet4.png diff --git a/doc/devel/images/packet4.svg b/doc/sphinx/uml/packet4.svg similarity index 100% rename from doc/devel/images/packet4.svg rename to doc/sphinx/uml/packet4.svg diff --git a/doc/devel/images/packet4.uml b/doc/sphinx/uml/packet4.uml similarity index 100% rename from doc/devel/images/packet4.uml rename to doc/sphinx/uml/packet4.uml diff --git a/doc/devel/images/request4-lease.png b/doc/sphinx/uml/request4-lease.png similarity index 100% rename from doc/devel/images/request4-lease.png rename to doc/sphinx/uml/request4-lease.png diff --git a/doc/devel/images/request4-lease.svg b/doc/sphinx/uml/request4-lease.svg similarity index 100% rename from doc/devel/images/request4-lease.svg rename to doc/sphinx/uml/request4-lease.svg diff --git a/doc/devel/images/request4-lease.uml b/doc/sphinx/uml/request4-lease.uml similarity index 100% rename from doc/devel/images/request4-lease.uml rename to doc/sphinx/uml/request4-lease.uml diff --git a/doc/devel/images/request4.png b/doc/sphinx/uml/request4.png similarity index 100% rename from doc/devel/images/request4.png rename to doc/sphinx/uml/request4.png diff --git a/doc/devel/images/request4.svg b/doc/sphinx/uml/request4.svg similarity index 100% rename from doc/devel/images/request4.svg rename to doc/sphinx/uml/request4.svg diff --git a/doc/devel/images/request4.uml b/doc/sphinx/uml/request4.uml similarity index 100% rename from doc/devel/images/request4.uml rename to doc/sphinx/uml/request4.uml diff --git a/doc/devel/images/requestLease4.png b/doc/sphinx/uml/requestLease4.png similarity index 100% rename from doc/devel/images/requestLease4.png rename to doc/sphinx/uml/requestLease4.png diff --git a/doc/devel/images/requestLease4.svg b/doc/sphinx/uml/requestLease4.svg similarity index 100% rename from doc/devel/images/requestLease4.svg rename to doc/sphinx/uml/requestLease4.svg diff --git a/doc/devel/images/requestLease4.uml b/doc/sphinx/uml/requestLease4.uml similarity index 100% rename from doc/devel/images/requestLease4.uml rename to doc/sphinx/uml/requestLease4.uml diff --git a/doc/devel/images/select4.png b/doc/sphinx/uml/select4.png similarity index 100% rename from doc/devel/images/select4.png rename to doc/sphinx/uml/select4.png diff --git a/doc/devel/images/select4.svg b/doc/sphinx/uml/select4.svg similarity index 100% rename from doc/devel/images/select4.svg rename to doc/sphinx/uml/select4.svg diff --git a/doc/devel/images/select4.uml b/doc/sphinx/uml/select4.uml similarity index 100% rename from doc/devel/images/select4.uml rename to doc/sphinx/uml/select4.uml diff --git a/doc/sphinx/umls.rst b/doc/sphinx/umls.rst new file mode 100644 index 0000000000..af1c6787dd --- /dev/null +++ b/doc/sphinx/umls.rst @@ -0,0 +1,109 @@ +.. + Copyright (C) 2020 Internet Systems Consortium, Inc. ("ISC") + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + + See the COPYRIGHT file distributed with this work for additional + information regarding copyright ownership. + +.. _umls: + +UML files +========= + +These UML files describe the DHCPv4 server implementation. They are +provided in UML (source), PNG and SVG formats. + +The main loop is common to DHCPv4 and DHPCv6 servers. + +.. figure:: uml/main-loop.* + + DHCP server main loop + +Next is the DHCPv4 packet processing. + +.. figure:: uml/packet4.* + + DHCPv4 packet processing + +With more details for DHCPREQUEST processing. + +.. figure:: uml/request4.* + + DHCPREQUEST processing + +Packet processing begins by the subnet selection i.e. the localization +of the sender of the query. Note that when the selected subnet is a +member of a shared network in fact the whole shared network was selected. + +.. figure:: uml/select4.* + + DHCPv4 subnet selection + +After the subnet selection and before the lease allocation the DHCPv4 +server handles specific case as the INIT-REBOOT client state. + +.. note:: + + The "Request lease" box will be expanded below as lease allocation. + +.. figure:: uml/assign-lease4.* + + DHCPv4 Assign Lease + +The allocation of a lease (or not) to an incoming request is very complex +so is given too as an algorithm summary. + +.. figure:: uml/request4-lease.* + + Allocate a lease for DHCPREQUEST + +.. figure:: uml/requestLease4.* + + requestLease4 algorithm + +The different lease states including the free one where no lease object exists. + +.. note:: + + In statistics declined addresses are counted with the assigned addresses + so the :math:`assigned + free = total` equation stands. + +.. figure:: uml/lease-states.* + + lease states + +The allocation engine maintains a notion of current subnet and host +reservation. + +.. note:: + + Beware that to find a free lease the allocation engine starts from + the *preferred* subnet i.e. the last used one so the current subnet + can depend on the history, not only from the incoming query... + +.. figure:: uml/currentHost4.* + + currentHost + +Before sending a response options are added: + - evaluate required client classes + - build the configured option list + - append requested options + - append requested vendor options + - append basic options + +.. figure:: uml/buildCfgOptionList.* + + buildCfgOptionList (build configured option list) algorithm + +.. figure:: uml/appendRequestedOptions.* + + appendRequestedOptions (append requested options) algorithm + +.. figure:: uml/appendRequestedVendorOptions.* + + appendRequestedVendorOptions (append vendor requested options) algorithm +