Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
dhtnet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
dhtnet
Commits
43448f66
Commit
43448f66
authored
7 months ago
by
Amna Snene
Browse files
Options
Downloads
Patches
Plain Diff
doc/mappings: add a description of the mapping state machine
Change-Id: I65f7c277e32b71e45f4eaf08be4df4146d823348
parent
a15c688e
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/upnp/mapping.h
+21
-0
21 additions, 0 deletions
include/upnp/mapping.h
with
21 additions
and
0 deletions
include/upnp/mapping.h
+
21
−
0
View file @
43448f66
...
...
@@ -31,6 +31,27 @@ namespace upnp {
using
sys_clock
=
std
::
chrono
::
system_clock
;
enum
class
PortType
{
TCP
,
UDP
};
/**
* State Machine:
*
* - PENDING: Initial state when a mapping is requested by the client.
* - IN_PROGRESS: Intermediate state while the mapping is being requested from an IGD.
* - OPEN: State when the mapping is successfully established.
* - FAILED: State when the mapping fails or is invalidated.
*
* State Transitions:
*
* - PENDING -> IN_PROGRESS: When the mapping request is sent to the IGD.
* - PENDING -> FAILED: When there is no valid IGD and it's not during the IGD discovery phase.
* - IN_PROGRESS -> OPEN: When the mapping is successfully established.
* - IN_PROGRESS -> FAILED: When the mapping fails.
* - OPEN -> FAILED: When the IGD becomes invalid or the mapping is removed.
* - FAILED -> PENDING: When auto-update is enabled and there is no valid IGD.
* - FAILED -> unregistered: When auto-update is disabled.
*
* If auto-update is enabled but there is a valid IGD, the mapping will be unregistered and a new mapping of the same type will be requested.
*/
enum
class
MappingState
{
PENDING
,
IN_PROGRESS
,
FAILED
,
OPEN
};
enum
class
NatProtocolType
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment