summaryrefslogtreecommitdiffstats
path: root/doc/sphinx/uml/main-loop.svg
diff options
context:
space:
mode:
Diffstat (limited to 'doc/sphinx/uml/main-loop.svg')
-rw-r--r--doc/sphinx/uml/main-loop.svg99
1 files changed, 99 insertions, 0 deletions
diff --git a/doc/sphinx/uml/main-loop.svg b/doc/sphinx/uml/main-loop.svg
new file mode 100644
index 0000000..9ad33e1
--- /dev/null
+++ b/doc/sphinx/uml/main-loop.svg
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="974px" preserveAspectRatio="none" style="width:674px;height:974px;" version="1.1" viewBox="0 0 674 974" width="674px" zoomAndPan="magnify"><defs><filter height="300%" id="f1hatkcuz2d0l4" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><text fill="#000000" font-family="sans-serif" font-size="18" lengthAdjust="spacingAndGlyphs" textLength="300" x="178" y="17.4023">DHCP server main loop (Kea 1.8.0)</text><!--MD5=[f7a7ee0c51b4e04c55c1f405505b5a33]
+cluster Main Loop--><rect fill="#FFFFFF" filter="url(#f1hatkcuz2d0l4)" height="911.86" style="stroke: #000000; stroke-width: 1.5;" width="650" x="7" y="28.1992"/><text fill="#000000" font-family="sans-serif" font-size="14" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="75" x="294.5" y="43.7344">Main Loop</text><!--MD5=[5612987a0f9796801dd6d08eccf6974b]
+cluster run_one--><rect fill="#FFFFFF" filter="url(#f1hatkcuz2d0l4)" height="467.86" style="stroke: #000000; stroke-width: 1.5;" width="572" x="49" y="170.1992"/><text fill="#000000" font-family="sans-serif" font-size="14" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="79" x="295.5" y="185.7344">Event Loop</text><!--MD5=[983d0794f401e349a629364dfc448d7d]
+entity run--><rect fill="#FEFECE" filter="url(#f1hatkcuz2d0l4)" height="36.4883" style="stroke: #A80036; stroke-width: 1.5;" width="149" x="145.5" y="63.1992"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="129" x="155.5" y="86.7344">Wait for next event</text><!--MD5=[463fa6ce3d00da797e8ff80a4d9c8378]
+entity shutdown--><rect fill="#FEFECE" filter="url(#f1hatkcuz2d0l4)" height="36.4883" style="stroke: #A80036; stroke-width: 1.5;" width="135" x="28.5" y="888.0592"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="115" x="38.5" y="911.5944">Check Shutdown</text><!--MD5=[f73c77a11c1a01c10ee045ae76f5a064]
+entity timeout--><rect fill="#FEFECE" filter="url(#f1hatkcuz2d0l4)" height="36.4883" style="stroke: #A80036; stroke-width: 1.5;" width="77" x="306.5" y="578.0592"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="57" x="316.5" y="601.5944">Timeout</text><!--MD5=[53133b9ef51e4e7f3d2c6bacee8894bf]
+entity signal--><rect fill="#FEFECE" filter="url(#f1hatkcuz2d0l4)" height="36.4883" style="stroke: #A80036; stroke-width: 1.5;" width="62" x="311" y="277.0592"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="42" x="321" y="300.5944">Signal</text><!--MD5=[7492a645d94b1ba942c71cddc305dc30]
+entity handleSignal--><rect fill="#FEFECE" filter="url(#f1hatkcuz2d0l4)" height="36.4883" style="stroke: #A80036; stroke-width: 1.5;" width="114" x="97" y="277.0592"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="94" x="107" y="300.5944">Handle Signal</text><!--MD5=[82e30069e7a5a9e7454e349f4f7c28bc]
+entity external_socket--><rect fill="#FEFECE" filter="url(#f1hatkcuz2d0l4)" height="36.4883" style="stroke: #A80036; stroke-width: 1.5;" width="126" x="97" y="378.0592"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="106" x="107" y="401.5944">External Socket</text><!--MD5=[ba069a43eac8d7db5b41bef0d2c2bb79]
+entity handleExternalSocket--><rect fill="#FEFECE" filter="url(#f1hatkcuz2d0l4)" height="36.4883" style="stroke: #A80036; stroke-width: 1.5;" width="178" x="395" y="378.0592"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="158" x="405" y="401.5944">Handle External Socket</text><!--MD5=[a096c1983bcf686c95ea726f28f7a0ed]
+entity query--><rect fill="#FEFECE" filter="url(#f1hatkcuz2d0l4)" height="36.4883" style="stroke: #A80036; stroke-width: 1.5;" width="103" x="371.5" y="479.0592"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="83" x="381.5" y="502.5944">DHCP Query</text><!--MD5=[15a052d0312126cb226db0f9a615136d]
+entity processQuery--><rect fill="#FEFECE" filter="url(#f1hatkcuz2d0l4)" height="36.4883" style="stroke: #A80036; stroke-width: 1.5;" width="117" x="97.5" y="479.0592"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="97" x="107.5" y="502.5944">Process Query</text><!--MD5=[3ec86a5ecee919912764a4f49fada726]
+entity poll--><rect fill="#FEFECE" filter="url(#f1hatkcuz2d0l4)" height="36.4883" style="stroke: #A80036; stroke-width: 1.5;" width="94" x="60" y="711.0592"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="74" x="70" y="734.5944">I/O Service</text><!--MD5=[55a3d76f9f066a914db2e6a0219879c4]
+entity ready--><rect fill="#FEFECE" filter="url(#f1hatkcuz2d0l4)" height="36.4883" style="stroke: #A80036; stroke-width: 1.5;" width="173" x="275.5" y="711.0592"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="153" x="285.5" y="734.5944">Execute ready handler</text><!--MD5=[5e1c1922f34751d45a9d92a38b9ac144]
+link run to run_one--><path d="M265,99.3792 C265,114.9742 265,138.0042 265,157.8405 C265,160.32 265,162.7496 265,165.1086 C265,166.2881 265,167.4499 265,168.5915 C265,168.8768 265,169.161 265,169.4438 C265,169.5852 265,169.7263 265,169.867 " fill="none" id="run-&gt;run_one" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#A80036" points="265,169.867,269,160.867,265,164.867,261,160.867,265,169.867" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="90" x="236" y="142.7676">get next event</text><!--MD5=[0596cb5bc7e39429b5a70ee803d7702a]
+link run_one to signal--><path d="M265,198.1292 C265,205.6592 265,286.0592 265,286.0592 C265,286.0592 305.68,286.0592 305.68,286.0592 " fill="none" id="run_one-&gt;signal" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#A80036" points="310.68,286.0592,301.68,282.0592,305.68,286.0592,301.68,290.0592,310.68,286.0592" style="stroke: #A80036; stroke-width: 1.0;"/><!--MD5=[71bca8b2b5579f3e01e5a5e6d05e252f]
+link signal to handleSignal--><path d="M310.96,295.0592 C310.96,295.0592 216.31,295.0592 216.31,295.0592 " fill="none" id="signal-&gt;handleSignal" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#A80036" points="211.31,295.0592,220.31,299.0592,216.31,295.0592,220.31,291.0592,211.31,295.0592" style="stroke: #A80036; stroke-width: 1.0;"/><!--MD5=[59b958d73309821d887c593216a24bf9]
+link handleSignal to poll--><path d="M96.78,295.0592 C86.25,295.0592 78.5,295.0592 78.5,295.0592 C78.5,295.0592 78.5,705.9592 78.5,705.9592 " fill="none" id="handleSignal-&gt;poll" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#A80036" points="78.5,710.9592,82.5,701.9592,78.5,705.9592,74.5,701.9592,78.5,710.9592" style="stroke: #A80036; stroke-width: 1.0;"/><!--MD5=[85a6501bbdb71fe843a154c65df0b326]
+link signal to external_socket--><path d="M310.78,304.0592 C273.76,304.0592 217,304.0592 217,304.0592 C217,304.0592 217,372.8792 217,372.8792 " fill="none" id="signal-&gt;external_socket" style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 7.0,7.0;"/><polygon fill="#A80036" points="217,377.8792,221,368.8792,217,372.8792,213,368.8792,217,377.8792" style="stroke: #A80036; stroke-width: 1.0;"/><!--MD5=[3cd4ee53a51a0c2827ab7b17e0cc3c3c]
+link external_socket to handleExternalSocket--><path d="M223.24,390.0592 C223.24,390.0592 389.87,390.0592 389.87,390.0592 " fill="none" id="external_socket-&gt;handleExternalSocket" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#A80036" points="394.87,390.0592,385.87,386.0592,389.87,390.0592,385.87,394.0592,394.87,390.0592" style="stroke: #A80036; stroke-width: 1.0;"/><!--MD5=[9e360989e7d922bcf27daccb5299f564]
+link handleExternalSocket to poll--><path d="M394.76,402.0592 C335.73,402.0592 269.17,402.0592 269.17,402.0592 C269.17,402.0592 269.17,723.0592 269.17,723.0592 C269.17,723.0592 159.34,723.0592 159.34,723.0592 " fill="none" id="handleExternalSocket-&gt;poll" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#A80036" points="154.34,723.0592,163.34,727.0592,159.34,723.0592,163.34,719.0592,154.34,723.0592" style="stroke: #A80036; stroke-width: 1.0;"/><!--MD5=[281658fee0b0d1e8e512917c18413af8]
+link external_socket to query--><path d="M218.75,414.3792 C218.75,441.9792 218.75,491.0592 218.75,491.0592 C218.75,491.0592 366.46,491.0592 366.46,491.0592 " fill="none" id="external_socket-&gt;query" style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 7.0,7.0;"/><polygon fill="#A80036" points="371.46,491.0592,362.46,487.0592,366.46,491.0592,362.46,495.0592,371.46,491.0592" style="stroke: #A80036; stroke-width: 1.0;"/><!--MD5=[0da47bb881eae3b3085d664f44c330f1]
+link query to processQuery--><path d="M371.2,503.0592 C371.2,503.0592 219.62,503.0592 219.62,503.0592 " fill="none" id="query-&gt;processQuery" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#A80036" points="214.62,503.0592,223.62,507.0592,219.62,503.0592,223.62,499.0592,214.62,503.0592" style="stroke: #A80036; stroke-width: 1.0;"/><!--MD5=[5ae6948e7f9ea24c9961deb19f615012]
+link processQuery to poll--><path d="M116.33,515.2592 C116.33,515.2592 116.33,705.9392 116.33,705.9392 " fill="none" id="processQuery-&gt;poll" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#A80036" points="116.33,710.9392,120.33,701.9392,116.33,705.9392,112.33,701.9392,116.33,710.9392" style="stroke: #A80036; stroke-width: 1.0;"/><!--MD5=[351006a45bcbe20db47f41960f495fbd]
+link query to timeout--><path d="M377.5,515.2192 C377.5,515.2192 377.5,573.0192 377.5,573.0192 " fill="none" id="query-&gt;timeout" style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 7.0,7.0;"/><polygon fill="#A80036" points="377.5,578.0192,381.5,569.0192,377.5,573.0192,373.5,569.0192,377.5,578.0192" style="stroke: #A80036; stroke-width: 1.0;"/><!--MD5=[8da1f0cfac91639d3cdbe4344b95ba5e]
+link timeout to poll--><path d="M306.02,596.0592 C245.34,596.0592 135.17,596.0592 135.17,596.0592 C135.17,596.0592 135.17,705.8492 135.17,705.8492 " fill="none" id="timeout-&gt;poll" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#A80036" points="135.17,710.8492,139.17,701.8492,135.17,705.8492,131.17,701.8492,135.17,710.8492" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="100" x="277" y="675.6276">timeout expired</text><!--MD5=[7fc4943622e5fd2b8bdecbc7965863a3]
+link poll to ready--><path d="M154.07,735.0592 C154.07,735.0592 270.48,735.0592 270.48,735.0592 " fill="none" id="poll-&gt;ready" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#A80036" points="275.48,735.0592,266.48,731.0592,270.48,735.0592,266.48,739.0592,275.48,735.0592" style="stroke: #A80036; stroke-width: 1.0;"/><!--MD5=[82806226eee1d65d24007de8ef94d3ba]
+link poll to shutdown--><path d="M107,747.3392 C107,747.3392 107,882.8792 107,882.8792 " fill="none" id="poll-&gt;shutdown" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#A80036" points="107,887.8792,111,878.8792,107,882.8792,103,878.8792,107,887.8792" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="105" x="102" y="823.6276">no ready handler</text><!--MD5=[9e95aa1826d8662af772234e20e4c11a]
+link ready to ready--><path d="M285,711.0292 C285,691.4792 285,663.0592 285,663.0592 C285,663.0592 272.33,663.0592 272.33,663.0592 C272.33,663.0592 272.33,818.0592 272.33,818.0592 C272.33,818.0592 362,818.0592 362,818.0592 C362,818.0592 362,752.0692 362,752.0692 " fill="none" id="ready-&gt;ready" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#A80036" points="362,747.0692,358,756.0692,362,752.0692,366,756.0692,362,747.0692" style="stroke: #A80036; stroke-width: 1.0;"/><!--MD5=[e3e9af49381d3719c9282a3c352c133e]
+reverse link run to shutdown--><path d="M243.5,104.5792 C243.5,104.5792 243.5,906.0592 243.5,906.0592 C243.5,906.0592 202.48,906.0592 163.71,906.0592 " fill="none" id="run&lt;-shutdown" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#A80036" points="243.5,99.5792,239.5,108.5792,243.5,104.5792,247.5,108.5792,243.5,99.5792" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#888888" font-family="sans-serif" font-size="10" lengthAdjust="spacingAndGlyphs" textLength="139" x="258.5" y="960.7272">dashed arrow means priority</text><!--MD5=[8fa551d0c9d64d50247cb50d8338b7c4]
+@startuml
+
+title DHCP server main loop (Kea 1.8.0)
+
+skinparam linetype ortho
+
+rectangle "Main Loop" {
+ agent "Wait for next event" as run
+
+ rectangle "Event Loop" as run_one {
+ together {
+ agent "Signal" as signal
+
+ agent "Handle Signal" as handleSignal
+ }
+
+ together {
+ agent "External Socket" as external_socket
+
+ agent "Handle External Socket" as handleExternalSocket
+ }
+
+ together {
+ agent "DHCP Query" as query
+
+ agent "Process Query" as processQuery
+ }
+
+ agent "Timeout" as timeout
+ }
+
+ together {
+ agent "I/O Service" as poll
+
+ agent "Execute ready handler" as ready
+ }
+
+ agent "Check Shutdown" as shutdown
+}
+
+run - -> run_one : get next event
+run_one - -> signal
+signal -right-> handleSignal : got signal
+handleSignal - -> poll
+signal -[dashed]-> external_socket
+external_socket -right-> handleExternalSocket : external socket ready
+handleExternalSocket - -> poll
+external_socket -[dashed]-> query
+query -right-> processQuery : DHCP socket ready
+processQuery - -> poll
+query -[dashed]-> timeout
+timeout - -> poll : timeout expired
+poll -> ready : handler ready
+poll - - -> shutdown : no ready handler
+ready -> ready : execute ready handler
+shutdown -u-> run
+
+footer dashed arrow means priority
+
+@enduml
+
+PlantUML version 1.2020.15(Sun Jun 28 13:39:45 CEST 2020)
+(GPL source distribution)
+Java Runtime: OpenJDK Runtime Environment
+JVM: OpenJDK 64-Bit Server VM
+Default Encoding: UTF-8
+Language: en
+Country: US
+--></g></svg> \ No newline at end of file