Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/net Try improving the description.
details: https://anonhg.NetBSD.org/src/rev/7555a587a000
branches: trunk
changeset: 791013:7555a587a000
user: wiz <wiz%NetBSD.org@localhost>
date: Thu Oct 31 00:30:14 2013 +0000
description:
Try improving the description.
diffstat:
lib/libc/net/inet6_getscopeid.3 | 36 ++++++++++++++++++++++++++----------
1 files changed, 26 insertions(+), 10 deletions(-)
diffs (79 lines):
diff -r ef52f40d912f -r 7555a587a000 lib/libc/net/inet6_getscopeid.3
--- a/lib/libc/net/inet6_getscopeid.3 Wed Oct 30 23:32:30 2013 +0000
+++ b/lib/libc/net/inet6_getscopeid.3 Thu Oct 31 00:30:14 2013 +0000
@@ -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 @@
.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 @@
.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
Home |
Main Index |
Thread Index |
Old Index