diff options
author | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2000-02-05 18:17:57 +0000 |
---|---|---|
committer | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2000-02-05 18:17:57 +0000 |
commit | f0c4bfe6054c7326d8746f80720e06380d98778c (patch) | |
tree | 591fcd106fbe649cff60e169a8d0340101c68494 | |
parent | 03bf76c8260bfe8792568e4c88145ce8f587272d (diff) |
show scopeid on "Trying foo...".
-rw-r--r-- | usr.bin/telnet/commands.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.bin/telnet/commands.c b/usr.bin/telnet/commands.c index 8d8804a23ae..578c300a3ed 100644 --- a/usr.bin/telnet/commands.c +++ b/usr.bin/telnet/commands.c @@ -1,4 +1,4 @@ -/* $OpenBSD: commands.c,v 1.26 2000/01/29 16:07:08 itojun Exp $ */ +/* $OpenBSD: commands.c,v 1.27 2000/02/05 18:17:56 itojun Exp $ */ /* $NetBSD: commands.c,v 1.14 1996/03/24 22:03:48 jtk Exp $ */ /* @@ -2388,9 +2388,14 @@ tn(argc, argv) for (res = res0; res; res = res->ai_next) { if (1 /* retry */) { char hbuf[MAXHOSTNAMELEN]; +#ifdef NI_WITHSCOPEID + const int niflags = NI_NUMERICHOST | NI_WITHSCOPEID; +#else + const int niflags = NI_NUMERICHOST; +#endif getnameinfo(res->ai_addr, res->ai_addrlen, hbuf, sizeof(hbuf), - NULL, 0, NI_NUMERICHOST); + NULL, 0, niflags); printf("Trying %s...\r\n", hbuf); } net = socket(res->ai_family, res->ai_socktype, res->ai_protocol); |