head 1.5; access; symbols netbsd-10-0-RELEASE:1.5 netbsd-10-0-RC6:1.5 netbsd-10-0-RC5:1.5 netbsd-10-0-RC4:1.5 netbsd-10-0-RC3:1.5 netbsd-10-0-RC2:1.5 thorpej-ifq:1.5.0.24 thorpej-ifq-base:1.5 thorpej-altq-separation:1.5.0.22 thorpej-altq-separation-base:1.5 netbsd-10-0-RC1:1.5 netbsd-10:1.5.0.20 netbsd-10-base:1.5 bouyer-sunxi-drm:1.5.0.18 bouyer-sunxi-drm-base:1.5 netbsd-9-3-RELEASE:1.4 thorpej-i2c-spi-conf2:1.5.0.16 thorpej-i2c-spi-conf2-base:1.5 thorpej-futex2:1.5.0.14 thorpej-futex2-base:1.5 thorpej-cfargs2:1.5.0.12 thorpej-cfargs2-base:1.5 cjep_sun2x-base1:1.5 cjep_sun2x:1.5.0.10 cjep_sun2x-base:1.5 cjep_staticlib_x-base1:1.5 netbsd-9-2-RELEASE:1.4 cjep_staticlib_x:1.5.0.8 cjep_staticlib_x-base:1.5 thorpej-i2c-spi-conf:1.5.0.6 thorpej-i2c-spi-conf-base:1.5 thorpej-cfargs:1.5.0.4 thorpej-cfargs-base:1.5 thorpej-futex:1.5.0.2 thorpej-futex-base:1.5 netbsd-9-1-RELEASE:1.4 bouyer-xenpvh-base2:1.4 phil-wifi-20200421:1.4 bouyer-xenpvh-base1:1.4 phil-wifi-20200411:1.4 bouyer-xenpvh:1.4.0.14 bouyer-xenpvh-base:1.4 is-mlppp:1.4.0.12 is-mlppp-base:1.4 phil-wifi-20200406:1.4 netbsd-8-2-RELEASE:1.3 ad-namecache-base3:1.4 netbsd-9-0-RELEASE:1.4 netbsd-9-0-RC2:1.4 ad-namecache-base2:1.4 ad-namecache-base1:1.4 ad-namecache:1.4.0.10 ad-namecache-base:1.4 netbsd-9-0-RC1:1.4 phil-wifi-20191119:1.4 netbsd-9:1.4.0.8 netbsd-9-base:1.4 phil-wifi-20190609:1.4 netbsd-8-1-RELEASE:1.3 netbsd-8-1-RC1:1.3 isaki-audio2:1.4.0.6 isaki-audio2-base:1.4 pgoyette-compat-merge-20190127:1.4 pgoyette-compat-20190127:1.4 pgoyette-compat-20190118:1.4 pgoyette-compat-1226:1.4 pgoyette-compat-1126:1.4 pgoyette-compat-1020:1.4 pgoyette-compat-0930:1.4 pgoyette-compat-0906:1.4 netbsd-7-2-RELEASE:1.2 pgoyette-compat-0728:1.4 netbsd-8-0-RELEASE:1.3 phil-wifi:1.4.0.4 phil-wifi-base:1.4 pgoyette-compat-0625:1.4 netbsd-8-0-RC2:1.3 pgoyette-compat-0521:1.4 pgoyette-compat-0502:1.4 pgoyette-compat-0422:1.4 netbsd-8-0-RC1:1.3 pgoyette-compat-0415:1.4 pgoyette-compat-0407:1.4 pgoyette-compat-0330:1.4 pgoyette-compat-0322:1.4 pgoyette-compat-0315:1.4 netbsd-7-1-2-RELEASE:1.2 pgoyette-compat:1.4.0.2 pgoyette-compat-base:1.4 netbsd-7-1-1-RELEASE:1.2 tls-maxphys-base-20171202:1.4 matt-nb8-mediatek:1.3.0.14 matt-nb8-mediatek-base:1.3 nick-nhusb-base-20170825:1.4 perseant-stdc-iso10646:1.3.0.12 perseant-stdc-iso10646-base:1.3 netbsd-8:1.3.0.10 netbsd-8-base:1.3 prg-localcount2-base3:1.3 prg-localcount2-base2:1.3 prg-localcount2-base1:1.3 prg-localcount2:1.3.0.8 prg-localcount2-base:1.3 pgoyette-localcount-20170426:1.3 bouyer-socketcan-base1:1.3 jdolecek-ncq:1.3.0.6 jdolecek-ncq-base:1.3 pgoyette-localcount-20170320:1.3 netbsd-7-1:1.2.0.90 netbsd-7-1-RELEASE:1.2 netbsd-7-1-RC2:1.2 nick-nhusb-base-20170204:1.3 netbsd-7-nhusb-base-20170116:1.2 bouyer-socketcan:1.3.0.4 bouyer-socketcan-base:1.3 pgoyette-localcount-20170107:1.3 netbsd-7-1-RC1:1.2 nick-nhusb-base-20161204:1.3 pgoyette-localcount-20161104:1.3 netbsd-7-0-2-RELEASE:1.2 nick-nhusb-base-20161004:1.3 localcount-20160914:1.3 netbsd-7-nhusb:1.2.0.88 netbsd-7-nhusb-base:1.2 pgoyette-localcount-20160806:1.3 pgoyette-localcount-20160726:1.3 pgoyette-localcount:1.3.0.2 pgoyette-localcount-base:1.3 nick-nhusb-base-20160907:1.3 nick-nhusb-base-20160529:1.3 netbsd-7-0-1-RELEASE:1.2 nick-nhusb-base-20160422:1.3 nick-nhusb-base-20160319:1.3 nick-nhusb-base-20151226:1.3 netbsd-7-0:1.2.0.86 netbsd-7-0-RELEASE:1.2 nick-nhusb-base-20150921:1.3 netbsd-7-0-RC3:1.2 netbsd-7-0-RC2:1.2 netbsd-7-0-RC1:1.2 nick-nhusb-base-20150606:1.3 nick-nhusb-base-20150406:1.3 nick-nhusb:1.2.0.84 nick-nhusb-base:1.2 netbsd-5-2-3-RELEASE:1.2 netbsd-5-1-5-RELEASE:1.2 netbsd-6-0-6-RELEASE:1.2 netbsd-6-1-5-RELEASE:1.2 netbsd-7:1.2.0.82 netbsd-7-base:1.2 yamt-pagecache-base9:1.2 yamt-pagecache-tag8:1.2 netbsd-6-1-4-RELEASE:1.2 netbsd-6-0-5-RELEASE:1.2 tls-earlyentropy:1.2.0.80 tls-earlyentropy-base:1.2 riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.2 riastradh-drm2-base3:1.2 netbsd-6-1-3-RELEASE:1.2 netbsd-6-0-4-RELEASE:1.2 netbsd-5-2-2-RELEASE:1.2 netbsd-5-1-4-RELEASE:1.2 netbsd-6-1-2-RELEASE:1.2 netbsd-6-0-3-RELEASE:1.2 netbsd-5-2-1-RELEASE:1.2 netbsd-5-1-3-RELEASE:1.2 rmind-smpnet-nbase:1.2 netbsd-6-1-1-RELEASE:1.2 riastradh-drm2-base2:1.2 riastradh-drm2-base1:1.2 riastradh-drm2:1.2.0.78 riastradh-drm2-base:1.2 rmind-smpnet:1.2.0.70 rmind-smpnet-base:1.2 netbsd-6-1:1.2.0.76 netbsd-6-0-2-RELEASE:1.2 netbsd-6-1-RELEASE:1.2 khorben-n900:1.2.0.74 netbsd-6-1-RC4:1.2 netbsd-6-1-RC3:1.2 agc-symver:1.2.0.72 agc-symver-base:1.2 netbsd-6-1-RC2:1.2 netbsd-6-1-RC1:1.2 yamt-pagecache-base8:1.2 netbsd-5-2:1.2.0.68 netbsd-6-0-1-RELEASE:1.2 yamt-pagecache-base7:1.2 netbsd-5-2-RELEASE:1.2 netbsd-5-2-RC1:1.2 matt-nb6-plus-nbase:1.2 yamt-pagecache-base6:1.2 netbsd-6-0:1.2.0.66 netbsd-6-0-RELEASE:1.2 netbsd-6-0-RC2:1.2 tls-maxphys:1.2.0.64 tls-maxphys-base:1.2 matt-nb6-plus:1.2.0.62 matt-nb6-plus-base:1.2 netbsd-6-0-RC1:1.2 jmcneill-usbmp-base10:1.2 yamt-pagecache-base5:1.2 jmcneill-usbmp-base9:1.2 yamt-pagecache-base4:1.2 jmcneill-usbmp-base8:1.2 jmcneill-usbmp-base7:1.2 jmcneill-usbmp-base6:1.2 jmcneill-usbmp-base5:1.2 jmcneill-usbmp-base4:1.2 jmcneill-usbmp-base3:1.2 jmcneill-usbmp-pre-base2:1.2 jmcneill-usbmp-base2:1.2 netbsd-6:1.2.0.60 netbsd-6-base:1.2 netbsd-5-1-2-RELEASE:1.2 netbsd-5-1-1-RELEASE:1.2 jmcneill-usbmp:1.2.0.58 jmcneill-usbmp-base:1.2 jmcneill-audiomp3:1.2.0.56 jmcneill-audiomp3-base:1.2 yamt-pagecache-base3:1.2 yamt-pagecache-base2:1.2 yamt-pagecache:1.2.0.54 yamt-pagecache-base:1.2 rmind-uvmplock-nbase:1.2 cherry-xenmp:1.2.0.52 cherry-xenmp-base:1.2 bouyer-quota2-nbase:1.2 bouyer-quota2:1.2.0.50 bouyer-quota2-base:1.2 jruoho-x86intr:1.2.0.48 jruoho-x86intr-base:1.2 matt-mips64-premerge-20101231:1.2 matt-nb5-mips64-premerge-20101231:1.2 matt-nb5-pq3:1.2.0.46 matt-nb5-pq3-base:1.2 netbsd-5-1:1.2.0.44 netbsd-5-1-RELEASE:1.2 uebayasi-xip-base4:1.2 uebayasi-xip-base3:1.2 yamt-nfs-mp-base11:1.2 netbsd-5-1-RC4:1.2 matt-nb5-mips64-k15:1.2 uebayasi-xip-base2:1.2 yamt-nfs-mp-base10:1.2 netbsd-5-1-RC3:1.2 netbsd-5-1-RC2:1.2 uebayasi-xip-base1:1.2 netbsd-5-1-RC1:1.2 rmind-uvmplock:1.2.0.42 rmind-uvmplock-base:1.2 yamt-nfs-mp-base9:1.2 uebayasi-xip:1.2.0.40 uebayasi-xip-base:1.2 netbsd-5-0-2-RELEASE:1.2 matt-nb5-mips64-premerge-20091211:1.2 matt-premerge-20091211:1.2 yamt-nfs-mp-base8:1.2 matt-nb5-mips64-u2-k2-k4-k7-k8-k9:1.2 matt-nb4-mips64-k7-u2a-k9b:1.2 matt-nb5-mips64-u1-k1-k5:1.2 yamt-nfs-mp-base7:1.2 matt-nb5-mips64:1.2.0.38 netbsd-5-0-1-RELEASE:1.2 jymxensuspend-base:1.2 yamt-nfs-mp-base6:1.2 yamt-nfs-mp-base5:1.2 yamt-nfs-mp-base4:1.2 jym-xensuspend-nbase:1.2 yamt-nfs-mp-base3:1.2 nick-hppapmap-base4:1.2 nick-hppapmap-base3:1.2 netbsd-5-0:1.2.0.36 netbsd-5-0-RELEASE:1.2 netbsd-5-0-RC4:1.2 netbsd-5-0-RC3:1.2 nick-hppapmap-base2:1.2 netbsd-5-0-RC2:1.2 jym-xensuspend:1.2.0.34 jym-xensuspend-base:1.2 netbsd-5-0-RC1:1.2 haad-dm-base2:1.2 haad-nbase2:1.2 ad-audiomp2:1.2.0.32 ad-audiomp2-base:1.2 netbsd-5:1.2.0.30 netbsd-5-base:1.2 nick-hppapmap:1.2.0.28 nick-hppapmap-base:1.2 matt-mips64-base2:1.2 matt-mips64:1.1.0.58 haad-dm-base1:1.2 wrstuden-revivesa-base-4:1.2 netbsd-4-0-1-RELEASE:1.1 wrstuden-revivesa-base-3:1.2 wrstuden-revivesa-base-2:1.2 wrstuden-fixsa-newbase:1.1 nick-csl-alignment-base5:1.1 haad-dm:1.2.0.26 haad-dm-base:1.2 wrstuden-revivesa-base-1:1.2 simonb-wapbl-nbase:1.2 yamt-pf42-base4:1.2 simonb-wapbl:1.2.0.24 simonb-wapbl-base:1.2 yamt-pf42-base3:1.2 hpcarm-cleanup-nbase:1.2 yamt-pf42-baseX:1.2 yamt-pf42-base2:1.2 yamt-nfs-mp-base2:1.2 wrstuden-revivesa:1.2.0.22 wrstuden-revivesa-base:1.2 yamt-nfs-mp:1.2.0.20 yamt-nfs-mp-base:1.2 yamt-pf42:1.2.0.18 yamt-pf42-base:1.2 ad-socklock-base1:1.2 yamt-lazymbuf-base15:1.2 yamt-lazymbuf-base14:1.2 keiichi-mipv6-nbase:1.2 mjf-devfs2:1.2.0.16 mjf-devfs2-base:1.2 nick-net80211-sync:1.2.0.14 nick-net80211-sync-base:1.2 keiichi-mipv6:1.2.0.12 keiichi-mipv6-base:1.2 bouyer-xeni386-merge1:1.2 matt-armv6-prevmlocking:1.1.48.1 wrstuden-fixsa-base-1:1.1 vmlocking2-base3:1.2 netbsd-4-0:1.1.0.56 netbsd-4-0-RELEASE:1.1 bouyer-xeni386-nbase:1.2 yamt-kmem-base3:1.2 cube-autoconf:1.2.0.10 cube-autoconf-base:1.2 yamt-kmem-base2:1.2 bouyer-xeni386:1.2.0.8 bouyer-xeni386-base:1.2 yamt-kmem:1.2.0.6 yamt-kmem-base:1.2 vmlocking2-base2:1.2 reinoud-bufcleanup-nbase:1.2 vmlocking2:1.2.0.4 vmlocking2-base1:1.2 netbsd-4-0-RC5:1.1 matt-nb4-arm:1.1.0.54 matt-nb4-arm-base:1.1 matt-armv6-nbase:1.2 jmcneill-base:1.2 netbsd-4-0-RC4:1.1 mjf-devfs:1.2.0.2 mjf-devfs-base:1.2 bouyer-xenamd64-base2:1.2 vmlocking-nbase:1.2 yamt-x86pmap-base4:1.1 bouyer-xenamd64:1.1.0.52 bouyer-xenamd64-base:1.2 netbsd-4-0-RC3:1.1 yamt-x86pmap-base3:1.1 yamt-x86pmap-base2:1.1 netbsd-4-0-RC2:1.1 yamt-x86pmap:1.1.0.50 yamt-x86pmap-base:1.1 netbsd-4-0-RC1:1.1 matt-armv6:1.1.0.48 matt-armv6-base:1.2 matt-mips64-base:1.1 jmcneill-pm:1.1.0.46 jmcneill-pm-base:1.2 hpcarm-cleanup:1.1.0.44 hpcarm-cleanup-base:1.2 nick-csl-alignment:1.1.0.42 nick-csl-alignment-base:1.1 yamt-idlelwp-base8:1.1 wrstuden-fixsa:1.1.0.40 wrstuden-fixsa-base:1.1 thorpej-atomic:1.1.0.38 thorpej-atomic-base:1.1 reinoud-bufcleanup:1.1.0.36 reinoud-bufcleanup-base:1.2 mjf-ufs-trans:1.1.0.34 mjf-ufs-trans-base:1.1 vmlocking:1.1.0.32 vmlocking-base:1.1 ad-audiomp:1.1.0.30 ad-audiomp-base:1.1 yamt-idlelwp:1.1.0.28 post-newlock2-merge:1.1 newlock2-nbase:1.1 yamt-splraiseipl-base5:1.1 yamt-splraiseipl-base4:1.1 yamt-splraiseipl-base3:1.1 abandoned-netbsd-4-base:1.1 abandoned-netbsd-4:1.1.0.20 yamt-splraiseipl-base2:1.1 yamt-splraiseipl:1.1.0.24 yamt-splraiseipl-base:1.1 yamt-pdpolicy-base9:1.1 newlock2:1.1.0.22 newlock2-base:1.1 yamt-pdpolicy-base8:1.1 yamt-pdpolicy-base7:1.1 netbsd-4:1.1.0.26 netbsd-4-base:1.1 yamt-pdpolicy-base6:1.1 yamt-lazymbuf:1.1.0.18 chap-midi-nbase:1.1 gdamore-uart:1.1.0.16 gdamore-uart-base:1.1 simonb-timcounters-final:1.1 yamt-pdpolicy-base5:1.1 chap-midi:1.1.0.14 chap-midi-base:1.1 yamt-pdpolicy-base4:1.1 yamt-pdpolicy-base3:1.1 peter-altq-base:1.1 peter-altq:1.1.0.12 yamt-pdpolicy-base2:1.1 elad-kernelauth-base:1.1 elad-kernelauth:1.1.0.10 yamt-pdpolicy:1.1.0.8 yamt-pdpolicy-base:1.1 yamt-uio_vmspace-base5:1.1 simonb-timecounters:1.1.0.6 simonb-timecounters-base:1.1 yamt-uio_vmspace:1.1.0.4 rpaulo-netinet-merge-pcb:1.1.0.2 rpaulo-netinet-merge-pcb-base:1.1; locks; strict; comment @ * @; 1.5 date 2020.06.16.17.12.18; author maxv; state Exp; branches; next 1.4; commitid Iwhm7uXiJOpYktcC; 1.4 date 2017.08.09.17.20.44; author christos; state Exp; branches; next 1.3; commitid ixpMy9bAxsz2Sy2A; 1.3 date 2014.12.10.01.10.37; author christos; state Exp; branches; next 1.2; commitid 9sb7Mx4CaeKGMq1y; 1.2 date 2007.10.24.06.37.22; author dyoung; state Exp; branches 1.2.64.1 1.2.84.1; next 1.1; 1.1 date 2006.01.21.00.15.37; author rpaulo; state Exp; branches 1.1.4.1 1.1.18.1 1.1.46.1 1.1.48.1 1.1.52.1; next ; 1.2.64.1 date 2017.12.03.11.39.05; author jdolecek; state Exp; branches; next ; commitid XcIYRZTAh1LmerhA; 1.2.84.1 date 2015.04.06.15.18.23; author skrll; state Exp; branches; next 1.2.84.2; commitid pz01Zhy7RP6iGxgy; 1.2.84.2 date 2017.08.28.17.53.13; author skrll; state Exp; branches; next ; commitid UQQpnjvcNkUZn05A; 1.1.4.1 date 2006.01.21.00.15.37; author yamt; state dead; branches; next 1.1.4.2; 1.1.4.2 date 2006.02.01.14.52.42; author yamt; state Exp; branches; next ; 1.1.18.1 date 2006.01.21.00.15.37; author yamt; state dead; branches; next 1.1.18.2; 1.1.18.2 date 2006.06.21.15.11.09; author yamt; state Exp; branches; next 1.1.18.3; 1.1.18.3 date 2007.10.27.11.36.14; author yamt; state Exp; branches; next ; 1.1.46.1 date 2007.10.26.15.49.10; author joerg; state Exp; branches; next ; 1.1.48.1 date 2007.11.06.23.34.11; author matt; state Exp; branches; next ; 1.1.52.1 date 2007.11.13.16.03.02; author bouyer; state Exp; branches; next ; desc @@ 1.5 log @remove unused @ text @/* $FreeBSD: src/sys/netinet6/scope6_var.h,v 1.4 2005/01/07 02:30:35 imp Exp $ */ /* $KAME: scope6_var.h,v 1.4 2000/05/18 15:03:27 jinmei Exp $ */ /*- * Copyright (C) 2000 WIDE Project. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the project nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _NETINET6_SCOPE6_VAR_H_ #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. * i.e. from interface-local to global with some * reserved/unassigned types. */ uint32_t s6id_list[16]; }; void scope6_init(void); struct scope6_id *scope6_ifattach(struct ifnet *); void scope6_ifdetach(struct scope6_id *); uint32_t scope6_in6_addrscope(struct in6_addr *); uint32_t scope6_addr2default(const struct in6_addr *); int sa6_embedscope(struct sockaddr_in6 *, int); int sa6_recoverscope(struct sockaddr_in6 *); int in6_setzoneid(struct in6_addr *, uint32_t); int in6_setscope(struct in6_addr *, const struct ifnet *, u_int32_t *); int in6_clearscope(struct in6_addr *); const char *in6_getscopename(const struct in6_addr *); #endif /* _KERNEL */ #endif /* _NETINET6_SCOPE6_VAR_H_ */ @ 1.4 log @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 @ text @a107 4 int scope6_set(struct ifnet *, const struct scope6_id *); int scope6_get(const struct ifnet *, struct scope6_id *); void scope6_setdefault(struct ifnet *); int scope6_get_default(struct scope6_id *); @ 1.3 log @printable version of the scope. remove stray breaks. @ text @d37 59 @ 1.2 log @Replace rote sockaddr_in6 initializations (memset(), set sa6_family, sa6_len, and sa6_add) with sockaddr_in6_init() calls. De-__P(). Constify. KNF. Shorten a staircase. Change bcmp() to memcmp(). Extract subroutine in6_setzoneid() from in6_setscope(), for re-use soon. @ text @d60 1 @ 1.2.64.1 log @update from HEAD @ text @a36 59 /* * 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) | * \---------------/ */ a59 1 const char *in6_getscopename(const struct in6_addr *); @ 1.2.84.1 log @Sync with HEAD @ text @a59 1 const char *in6_getscopename(const struct in6_addr *); @ 1.2.84.2 log @Sync with HEAD @ text @a36 59 /* * 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) | * \---------------/ */ @ 1.1 log @Better support of IPv6 scoped addresses. - most of the kernel code will not care about the actual encoding of scope zone IDs and won't touch "s6_addr16[1]" directly. - similarly, most of the kernel code will not care about link-local scoped addresses as a special case. - scope boundary check will be stricter. For example, the current *BSD code allows a packet with src=::1 and dst=(some global IPv6 address) to be sent outside of the node, if the application do: s = socket(AF_INET6); bind(s, "::1"); sendto(s, some_global_IPv6_addr); This is clearly wrong, since ::1 is only meaningful within a single node, but the current implementation of the *BSD kernel cannot reject this attempt. - and, while there, don't try to remove the ff02::/32 interface route entry in in6_ifdetach() as it's already gone. This also includes some level of support for the standard source address selection algorithm defined in RFC3484, which will be completed on in the future. From the KAME project via JINMEI Tatuya. Approved by core@@. @ text @d49 2 a50 2 int scope6_set(struct ifnet *, struct scope6_id *); int scope6_get(struct ifnet *, struct scope6_id *); d54 1 a54 1 uint32_t scope6_addr2default(struct in6_addr *); d57 2 a58 1 int in6_setscope(struct in6_addr *, struct ifnet *, u_int32_t *); @ 1.1.4.1 log @file scope6_var.h was added on branch yamt-uio_vmspace on 2006-02-01 14:52:42 +0000 @ text @d1 61 @ 1.1.4.2 log @sync with head. @ text @a0 61 /* $FreeBSD: src/sys/netinet6/scope6_var.h,v 1.4 2005/01/07 02:30:35 imp Exp $ */ /* $KAME: scope6_var.h,v 1.4 2000/05/18 15:03:27 jinmei Exp $ */ /*- * Copyright (C) 2000 WIDE Project. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the project nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _NETINET6_SCOPE6_VAR_H_ #define _NETINET6_SCOPE6_VAR_H_ #ifdef _KERNEL struct scope6_id { /* * 16 is correspondent to 4bit multicast scope field. * i.e. from interface-local to global with some * reserved/unassigned types. */ uint32_t s6id_list[16]; }; void scope6_init(void); struct scope6_id *scope6_ifattach(struct ifnet *); void scope6_ifdetach(struct scope6_id *); int scope6_set(struct ifnet *, struct scope6_id *); int scope6_get(struct ifnet *, struct scope6_id *); void scope6_setdefault(struct ifnet *); int scope6_get_default(struct scope6_id *); uint32_t scope6_in6_addrscope(struct in6_addr *); uint32_t scope6_addr2default(struct in6_addr *); int sa6_embedscope(struct sockaddr_in6 *, int); int sa6_recoverscope(struct sockaddr_in6 *); int in6_setscope(struct in6_addr *, struct ifnet *, u_int32_t *); int in6_clearscope(struct in6_addr *); #endif /* _KERNEL */ #endif /* _NETINET6_SCOPE6_VAR_H_ */ @ 1.1.18.1 log @file scope6_var.h was added on branch yamt-lazymbuf on 2006-06-21 15:11:09 +0000 @ text @d1 61 @ 1.1.18.2 log @sync with head. @ text @a0 61 /* $FreeBSD: src/sys/netinet6/scope6_var.h,v 1.4 2005/01/07 02:30:35 imp Exp $ */ /* $KAME: scope6_var.h,v 1.4 2000/05/18 15:03:27 jinmei Exp $ */ /*- * Copyright (C) 2000 WIDE Project. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the project nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _NETINET6_SCOPE6_VAR_H_ #define _NETINET6_SCOPE6_VAR_H_ #ifdef _KERNEL struct scope6_id { /* * 16 is correspondent to 4bit multicast scope field. * i.e. from interface-local to global with some * reserved/unassigned types. */ uint32_t s6id_list[16]; }; void scope6_init(void); struct scope6_id *scope6_ifattach(struct ifnet *); void scope6_ifdetach(struct scope6_id *); int scope6_set(struct ifnet *, struct scope6_id *); int scope6_get(struct ifnet *, struct scope6_id *); void scope6_setdefault(struct ifnet *); int scope6_get_default(struct scope6_id *); uint32_t scope6_in6_addrscope(struct in6_addr *); uint32_t scope6_addr2default(struct in6_addr *); int sa6_embedscope(struct sockaddr_in6 *, int); int sa6_recoverscope(struct sockaddr_in6 *); int in6_setscope(struct in6_addr *, struct ifnet *, u_int32_t *); int in6_clearscope(struct in6_addr *); #endif /* _KERNEL */ #endif /* _NETINET6_SCOPE6_VAR_H_ */ @ 1.1.18.3 log @sync with head. @ text @d49 2 a50 2 int scope6_set(struct ifnet *, const struct scope6_id *); int scope6_get(const struct ifnet *, struct scope6_id *); d54 1 a54 1 uint32_t scope6_addr2default(const struct in6_addr *); d57 1 a57 2 int in6_setzoneid(struct in6_addr *, uint32_t); int in6_setscope(struct in6_addr *, const struct ifnet *, u_int32_t *); @ 1.1.52.1 log @Sync with HEAD @ text @d49 2 a50 2 int scope6_set(struct ifnet *, const struct scope6_id *); int scope6_get(const struct ifnet *, struct scope6_id *); d54 1 a54 1 uint32_t scope6_addr2default(const struct in6_addr *); d57 1 a57 2 int in6_setzoneid(struct in6_addr *, uint32_t); int in6_setscope(struct in6_addr *, const struct ifnet *, u_int32_t *); @ 1.1.48.1 log @sync with HEAD @ text @d49 2 a50 2 int scope6_set(struct ifnet *, const struct scope6_id *); int scope6_get(const struct ifnet *, struct scope6_id *); d54 1 a54 1 uint32_t scope6_addr2default(const struct in6_addr *); d57 1 a57 2 int in6_setzoneid(struct in6_addr *, uint32_t); int in6_setscope(struct in6_addr *, const struct ifnet *, u_int32_t *); @ 1.1.46.1 log @Sync with HEAD. Follow the merge of pmap.c on i386 and amd64 and move pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup code to restore CR4 before jumping back into kernel space as the large page option might cover that. @ text @d49 2 a50 2 int scope6_set(struct ifnet *, const struct scope6_id *); int scope6_get(const struct ifnet *, struct scope6_id *); d54 1 a54 1 uint32_t scope6_addr2default(const struct in6_addr *); d57 1 a57 2 int in6_setzoneid(struct in6_addr *, uint32_t); int in6_setscope(struct in6_addr *, const struct ifnet *, u_int32_t *); @