Module Name:    src
Committed By:   wiz
Date:           Thu Oct 31 00:30:14 UTC 2013

Modified Files:
        src/lib/libc/net: inet6_getscopeid.3

Log Message:
Try improving the description.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/lib/libc/net/inet6_getscopeid.3

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

Modified files:

Index: src/lib/libc/net/inet6_getscopeid.3
diff -u src/lib/libc/net/inet6_getscopeid.3:1.2 src/lib/libc/net/inet6_getscopeid.3:1.3
--- src/lib/libc/net/inet6_getscopeid.3:1.2	Sat Oct 19 23:34:48 2013
+++ src/lib/libc/net/inet6_getscopeid.3	Thu Oct 31 00:30:14 2013
@@ -1,6 +1,6 @@
-.\"	$NetBSD: inet6_getscopeid.3,v 1.2 2013/10/19 23:34:48 wiz Exp $
+.\"	$NetBSD: inet6_getscopeid.3,v 1.3 2013/10/31 00:30:14 wiz Exp $
 .\"-
-.\" Copyright (c) 2003 The NetBSD Foundation, Inc.
+.\" Copyright (c) 2013 The NetBSD Foundation, Inc.
 .\" All rights reserved.
 .\"
 .\" This code is derived from software contributed to The NetBSD Foundation
@@ -28,7 +28,7 @@
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
 .\"
-.Dd October 19, 2013
+.Dd October 31, 2013
 .Dt INET6_GETSCOPEID 3
 .Os
 .\"
@@ -48,6 +48,9 @@
 These functions implement a KAME-specific extension that encodes and
 decodes the scope id inside in the 3rd and 4th byte of the address,
 for link-local, site-local, and multicast-link-local addresses.
+The scope id helps deciding which interface is used for packets of
+that type.
+.Pp
 Typically those two bytes are
 .Dv 0
 for these kinds of addresses.
@@ -55,7 +58,11 @@ The scope id is stored in network byte o
 .Pp
 The
 .Fn inet6_getscopeid
-function retrieves the scope id from the 3rd and the 4th address bytes,
+function retrieves the scope id from the 3rd and the 4th address bytes
+(from the
+.Va sin6_addr
+member of
+.Fa sin6 ) ,
 and sets the
 .Ft sin6_scope_id
 from them.
@@ -65,19 +72,28 @@ The
 .Fn inet6putscopeid
 function stores the scope id found in
 .Ft sin6_scope_id
-into the 3rd and 4th byte of the address.
+into the 3rd and 4th byte of the address
+(into the
+.Va sin6_addr
+member of
+.Fa sin6 ) .
 It then clears the
-.Ft sin6_scope_id .
+.Va sin6_scope_id
+member of
+.Fa sin6 .
 .Pp
 The
 .Fa flags
 argument controls for which addresses this action is performed.
 It
 can be a combination of:
-.Bl -tag -width "INET6_IS_ADDR_MC_LINKLOCAL"
-.It Dv INET6_IS_ADDR_LINKLOCAL
-.It Dv INET6_IS_ADDR_MC_LINKLOCAL
-.It Dv INET6_IS_ADDR_SITELOCAL
+.Bl -bullet
+.It
+.Dv INET6_IS_ADDR_LINKLOCAL
+.It
+.Dv INET6_IS_ADDR_MC_LINKLOCAL
+.It
+.Dv INET6_IS_ADDR_SITELOCAL
 .El
 .Sh HISTORY
 These functions first appeared in

Reply via email to