Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet6 PR/52472: Edgar Fuss: Document handling of scop...
details: https://anonhg.NetBSD.org/src/rev/be8e9968b751
branches: trunk
changeset: 355676:be8e9968b751
user: christos <christos%NetBSD.org@localhost>
date: Wed Aug 09 17:20:44 2017 +0000
description:
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
diffstat:
sys/netinet6/scope6_var.h | 59 +++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 59 insertions(+), 0 deletions(-)
diffs (69 lines):
diff -r 384028f0c416 -r be8e9968b751 sys/netinet6/scope6_var.h
--- a/sys/netinet6/scope6_var.h Wed Aug 09 16:44:39 2017 +0000
+++ b/sys/netinet6/scope6_var.h Wed Aug 09 17:20:44 2017 +0000
@@ -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.
Home |
Main Index |
Thread Index |
Old Index