diff options
| author | itojun <> | 2000-02-16 12:53:35 +0000 | 
|---|---|---|
| committer | itojun <> | 2000-02-16 12:53:35 +0000 | 
| commit | 670f8b86a21e9943f06a44a02534f71133a96788 (patch) | |
| tree | 88bc459b8feda3db774db6985954d5b8a8b2532b /src/lib/libc/net/getnameinfo.c | |
| parent | 0b25150d45a4edb0baa51ce4216185a4309beac0 (diff) | |
| download | openbsd-670f8b86a21e9943f06a44a02534f71133a96788.tar.gz openbsd-670f8b86a21e9943f06a44a02534f71133a96788.tar.bz2 openbsd-670f8b86a21e9943f06a44a02534f71133a96788.zip | |
add more comments from recent kame.
prepare to swap extended scoped address notation.  fe80::1%de0 is the
most promised candidate, but since it is still very draft, i'm not sure
when to switch - if you have any idea please let me know.  in other words,
do i allowed to change it every week? :-P  (NOTE it is only for "extended"
scoped address notation, which is not for daily use)
Diffstat (limited to 'src/lib/libc/net/getnameinfo.c')
| -rw-r--r-- | src/lib/libc/net/getnameinfo.c | 15 | 
1 files changed, 14 insertions, 1 deletions
| diff --git a/src/lib/libc/net/getnameinfo.c b/src/lib/libc/net/getnameinfo.c index e203cd5d16..808182c6e6 100644 --- a/src/lib/libc/net/getnameinfo.c +++ b/src/lib/libc/net/getnameinfo.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: getnameinfo.c,v 1.8 2000/02/09 12:22:09 itojun Exp $ */ | 1 | /* $OpenBSD: getnameinfo.c,v 1.9 2000/02/16 12:53:35 itojun Exp $ */ | 
| 2 | 2 | ||
| 3 | /* | 3 | /* | 
| 4 | * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. | 4 | * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. | 
| @@ -235,6 +235,10 @@ getnameinfo(sa, salen, host, hostlen, serv, servlen, flags) | |||
| 235 | if (scopelen + 1 + numaddrlen + 1 > hostlen) | 235 | if (scopelen + 1 + numaddrlen + 1 > hostlen) | 
| 236 | return ENI_MEMORY; | 236 | return ENI_MEMORY; | 
| 237 | 237 | ||
| 238 | #if 1 | ||
| 239 | /* | ||
| 240 | * construct <scopeid><delim><numeric-addr> | ||
| 241 | */ | ||
| 238 | /* | 242 | /* | 
| 239 | * Shift the host string to allocate | 243 | * Shift the host string to allocate | 
| 240 | * space for the scope ID part. | 244 | * space for the scope ID part. | 
| @@ -245,6 +249,15 @@ getnameinfo(sa, salen, host, hostlen, serv, servlen, flags) | |||
| 245 | memcpy(host, scopebuf, scopelen); | 249 | memcpy(host, scopebuf, scopelen); | 
| 246 | host[scopelen] = SCOPE_DELIMITER; | 250 | host[scopelen] = SCOPE_DELIMITER; | 
| 247 | host[scopelen + 1 + numaddrlen] = '\0'; | 251 | host[scopelen + 1 + numaddrlen] = '\0'; | 
| 252 | #else | ||
| 253 | /* | ||
| 254 | * construct <numeric-addr><delim><scopeid> | ||
| 255 | */ | ||
| 256 | memcpy(host + numaddrlen + 1, scopebuf, | ||
| 257 | scopelen); | ||
| 258 | host[numaddrlen] = SCOPE_DELIMITER; | ||
| 259 | host[numaddrlen + 1 + scopelen] = '\0'; | ||
| 260 | #endif | ||
| 248 | } | 261 | } | 
| 249 | } | 262 | } | 
| 250 | #endif /* INET6 */ | 263 | #endif /* INET6 */ | 
