Module Name:    src
Committed By:   christos
Date:           Wed Aug  9 17:20:44 UTC 2017

Modified Files:
        src/sys/netinet6: scope6_var.h

Log Message:
PR/52472: Edgar Fuss: Document handling of scoped IPv6 addresses by embedding
ASCII art from:
        IPv6 Core Protocols Implementation
        By Qing Li, Tatuya Jinmei, Keiichi Shima
        Page 56, Figure 2.12


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/netinet6/scope6_var.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/netinet6/scope6_var.h
diff -u src/sys/netinet6/scope6_var.h:1.3 src/sys/netinet6/scope6_var.h:1.4
--- src/sys/netinet6/scope6_var.h:1.3	Tue Dec  9 20:10:37 2014
+++ src/sys/netinet6/scope6_var.h	Wed Aug  9 13:20:44 2017
@@ -34,6 +34,65 @@
 #define _NETINET6_SCOPE6_VAR_H_
 
 #ifdef _KERNEL
+
+/*
+ * IPv6 Core Protocols Implementation
+ * By Qing Li, Tatuya Jinmei, Keiichi Shima
+ *
+ * Some information from Chapter 2.9 (Handling Scope Zones) Figure 2.12, p.56
+ *
+ * User Space
+ *
+ *             Normal App         Statistics/Mgmt App        Routing App
+ *          /---------------\    /-------------------\   /------------------\
+ *          | sin6_scope_id |    |   embedded form   |   |  embedded form   |
+ *          |      only     |    | (+ sin6_scope_id) |   | or sin6_scope_id |
+ *          \---------------/    \-------------------/   \------------------/
+ *                  ^                      ^                ^          |
+ *                  |                      |                |          |
+ *            no conversion              parse            parse      embed
+ *                  |                   embedded        embbeded      ID
+ *                  |                      ID              ID    (if necessary)
+ *                  |                      |                |          |
+ *                  v                      |                |          v
+ *          /---------------\    /-------------------\   /------------------\
+ * ------   |    AF_INET6   |    |        kvm        |   |     Routing      |
+ * Kernel   |     socket    |    |     interface     |   |     socket       |
+ *          \---------------/    \-------------------/   \------------------/
+ *             ^       |                  ^                        ^
+ *             |       |                  |                        |
+ *           clear   embed           no conversion                 |
+ *          embedded  ID                  |                   no conversion
+ *            ID       |  ----------------------------------       |
+ *             |       V  |                                |       v
+ *          /---------------\                            /--------------------\
+ *          |               |---- clear sin_scope_id --->| embedded form only |
+ *          |               |<---  set sin_scope_id  ----|                    |
+ *          |               |                            \--------------------/
+ *          | embedded form |                                      ^
+ *          |       +       |                                      |
+ *          | sin_scope_id  |                                no conversion
+ *          |               |                                      |
+ *          |               |                                      V
+ *          |               |                            /--------------------\
+ *          |               |---- clear sin_scope_id --->| embedded form only |
+ *          |               |<---  set sin_scope_id  ----|                    |
+ *          \---------------/                            \--------------------/
+ * --------   ^           |
+ * Physical   |         clear 
+ * Network  embed ID,  embedded
+ *           set         ID
+ *        sin_scope_id    |
+ *            |           v
+ *          /---------------\
+ *          | 128-bit IPv6  |
+ *          | address       |
+ *          | (ID not       |
+ *          |  included)    |
+ *          \---------------/
+ */
+
+
 struct scope6_id {
 	/*
 	 * 16 is correspondent to 4bit multicast scope field.

Reply via email to