diff options
author | shin <shin@FreeBSD.org> | 2000-02-28 18:38:19 +0000 |
---|---|---|
committer | shin <shin@FreeBSD.org> | 2000-02-28 18:38:19 +0000 |
commit | ce0f910200f5c366a4d1c7d0a4975c21d2bdaa38 (patch) | |
tree | 730a70f9faab7a548f25d320a91d1953acd12d68 /sbin | |
parent | 0f87228bd084f0a4c8e3890e4a50c5811119d056 (diff) | |
download | FreeBSD-src-ce0f910200f5c366a4d1c7d0a4975c21d2bdaa38.zip FreeBSD-src-ce0f910200f5c366a4d1c7d0a4975c21d2bdaa38.tar.gz |
Print scope id for scoped addrs.
Approved by: jkh
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/ifconfig/ifconfig.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c index aa22007..70437b8 100644 --- a/sbin/ifconfig/ifconfig.c +++ b/sbin/ifconfig/ifconfig.c @@ -977,6 +977,7 @@ in6_status(s, info) struct in6_addrlifetime lifetime; time_t t = time(NULL); int error; + u_int32_t scopeid; memset(&null_sin, 0, sizeof(null_sin)); @@ -1013,6 +1014,7 @@ in6_status(s, info) if (sin->sin6_scope_id == 0) sin->sin6_scope_id = ntohs(index); } + scopeid = sin->sin6_scope_id; error = getnameinfo((struct sockaddr *)sin, sin->sin6_len, addr_buf, sizeof(addr_buf), NULL, 0, @@ -1071,6 +1073,8 @@ in6_status(s, info) if (flags6 & IN6_IFF_DEPRECATED) printf("deprecated "); + if (scopeid) + printf(" scopeid 0x%x", scopeid); if (ip6lifetime && (lifetime.ia6t_preferred || lifetime.ia6t_expire)) { printf("pltime "); |