summaryrefslogtreecommitdiffstats
path: root/doc/sphinx/uml/packet4.uml
blob: 15263c79a30c52bd93220e100ce664db67dc1e1c (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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
@startuml

title DHCPv4 packet processing (Kea 1.8.0)

agent "Receive query" as receivePacket
note left : input

agent "Service Enabled" as isServiceEnabled

agent "Callout buffer4_receive" as buffer4_receive
note right : hook

agent "Unpack query" as unpack

agent "Classify query" as classify

agent "Callout pkt4_receive" as pkt4_receive
note right : hook

agent "Check DROP class" as drop_class

agent "Avoid same client race in multi-threaded mode" as same_client
note right : postpone processing or drop

rectangle "Process Query on its Message Type" as process {
 agent "Process Discover" as processDiscover
 agent "Process Request" as processRequest
 agent "Process Release" as processRelease
 agent "Process Decline" as processDecline
 agent "Process Inform" as processInform
}

agent "Callout leases4_committed" as leases4_committed
note right : hook

agent "Park" as park

agent "Callout pkt4_send" as pkt4_send

agent "Send response" as send

agent "Pack response" as pack

agent "Callout buffer4_send" as buffer4_send

agent "Send response" as send
note left : output

agent "Drop packet" as drop
note left : error

receivePacket --> isServiceEnabled
isServiceEnabled --> buffer4_receive : service is enabled
isServiceEnabled ----> drop : service is disabled
buffer4_receive --> unpack : CONTINUE
buffer4_receive --> classify : SKIP
buffer4_receive ----> drop : DROP
unpack --> classify
unpack ---> drop : on error
classify --> pkt4_receive
pkt4_receive --> drop_class : CONTINUE
pkt4_receive ---> drop : DROP
drop_class --> same_client
drop_class ---> drop : query in DROP class
same_client ---> process
same_client ---> drop : queries from the same client possible race
process ---> drop : unknown message type
processDiscover --> leases4_committed
processDiscover ---> drop : on error
processRequest --> leases4_committed
processRequest ---> drop : on error
processRelease --> leases4_committed
processRelease ---> drop : on error
processDecline --> leases4_committed
processDecline ---> drop : on error
processInform --> leases4_committed
processInform ---> drop : on error
leases4_committed --> pkt4_send : CONTINUE
leases4_committed ---> drop : DROP
leases4_committed --> park : PARK
park -[dashed]-> pkt4_send : unpark
pkt4_send --> pack : CONTINUE
pkt4_send --> buffer4_send : SKIP
pkt4_send ---> drop : DROP
pack --> buffer4_send
buffer4_send --> send : CONTINUE
buffer4_send ---> drop : DROP
send -[hidden]-> drop

footer dashed arrow means asynchronous processing

@enduml