2 * Copyright (c) 1988, 1989, 1990, 1991, 1993, 1994
3 * The Regents of the University of California. All rights reserved.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that: (1) source code distributions
7 * retain the above copyright notice and this paragraph in its entirety, (2)
8 * distributions including binary code include the above copyright notice and
9 * this paragraph in its entirety in the documentation or other materials
10 * provided with the distribution, and (3) all advertising materials mentioning
11 * features or use of this software display the following acknowledgement:
12 * ``This product includes software developed by the University of California,
13 * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
14 * the University nor the names of its contributors may be used to endorse
15 * or promote products derived from this software without specific prior
17 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
18 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
19 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
23 static const char rcsid
[] =
24 "@(#) $Header: /tcpdump/master/tcpdump/print-icmp6.c,v 1.35 2000-10-07 05:58:06 itojun Exp $";
35 #include <sys/param.h>
37 #include <sys/types.h>
38 #include <sys/socket.h>
41 #include <netinet/in.h>
43 #include <arpa/inet.h>
50 #include "interface.h"
51 #include "addrtoname.h"
56 void icmp6_opt_print(const u_char
*, int);
57 void mld6_print(const u_char
*);
58 static struct udphdr
*get_upperlayer(u_char
*, int *);
59 static void dnsname_print(const u_char
*, const u_char
*);
60 void icmp6_nodeinfo_print(int, const u_char
*, const u_char
*);
63 #define abs(a) ((0 < (a)) ? (a) : -(a))
67 icmp6_print(register const u_char
*bp
, register const u_char
*bp2
)
69 const struct icmp6_hdr
*dp
;
70 register const struct ip6_hdr
*ip
;
71 register const char *str
;
72 register const struct ip6_hdr
*oip
;
73 register const struct udphdr
*ouh
;
75 register const u_char
*ep
;
80 #define TCHECK(var) if ((u_char *)&(var) > ep - sizeof(var)) goto trunc
83 dp
= (struct icmp6_hdr
*)bp
;
84 ip
= (struct ip6_hdr
*)bp2
;
85 oip
= (struct ip6_hdr
*)(dp
+ 1);
87 /* 'ep' points to the end of available data. */
90 icmp6len
= (ntohs(ip
->ip6_plen
) + sizeof(struct ip6_hdr
) -
92 else /* XXX: jumbo payload case... */
93 icmp6len
= snapend
- bp
;
96 (void)printf("%s > %s: ",
97 ip6addr_string(&ip
->ip6_src
),
98 ip6addr_string(&ip
->ip6_dst
));
101 TCHECK(dp
->icmp6_code
);
102 switch (dp
->icmp6_type
) {
103 case ICMP6_DST_UNREACH
:
104 TCHECK(oip
->ip6_dst
);
105 switch (dp
->icmp6_code
) {
106 case ICMP6_DST_UNREACH_NOROUTE
:
107 printf("icmp6: %s unreachable route",
108 ip6addr_string(&oip
->ip6_dst
));
110 case ICMP6_DST_UNREACH_ADMIN
:
111 printf("icmp6: %s unreachable prohibited",
112 ip6addr_string(&oip
->ip6_dst
));
114 #ifdef ICMP6_DST_UNREACH_BEYONDSCOPE
115 case ICMP6_DST_UNREACH_BEYONDSCOPE
:
117 case ICMP6_DST_UNREACH_NOTNEIGHBOR
:
119 printf("icmp6: %s beyond scope of source address %s",
120 ip6addr_string(&oip
->ip6_dst
),
121 ip6addr_string(&oip
->ip6_src
));
123 case ICMP6_DST_UNREACH_ADDR
:
124 printf("icmp6: %s unreachable address",
125 ip6addr_string(&oip
->ip6_dst
));
127 case ICMP6_DST_UNREACH_NOPORT
:
128 if ((ouh
= get_upperlayer((u_char
*)oip
, &prot
))
132 dport
= ntohs(ouh
->uh_dport
);
135 printf("icmp6: %s tcp port %s unreachable",
136 ip6addr_string(&oip
->ip6_dst
),
137 tcpport_string(dport
));
140 printf("icmp6: %s udp port %s unreachable",
141 ip6addr_string(&oip
->ip6_dst
),
142 udpport_string(dport
));
145 printf("icmp6: %s protocol %d port %d unreachable",
146 ip6addr_string(&oip
->ip6_dst
),
147 oip
->ip6_nxt
, dport
);
152 printf("icmp6: %s unreachable code-#%d",
153 ip6addr_string(&oip
->ip6_dst
),
158 case ICMP6_PACKET_TOO_BIG
:
159 TCHECK(dp
->icmp6_mtu
);
160 printf("icmp6: too big %u\n", (u_int32_t
)ntohl(dp
->icmp6_mtu
));
162 case ICMP6_TIME_EXCEEDED
:
163 TCHECK(oip
->ip6_dst
);
164 switch (dp
->icmp6_code
) {
165 case ICMP6_TIME_EXCEED_TRANSIT
:
166 printf("icmp6: time exceeded in-transit for %s",
167 ip6addr_string(&oip
->ip6_dst
));
169 case ICMP6_TIME_EXCEED_REASSEMBLY
:
170 printf("icmp6: ip6 reassembly time exceeded");
173 printf("icmp6: time exceeded code-#%d",
178 case ICMP6_PARAM_PROB
:
179 TCHECK(oip
->ip6_dst
);
180 switch (dp
->icmp6_code
) {
181 case ICMP6_PARAMPROB_HEADER
:
182 printf("icmp6: parameter problem errorneous - octet %u\n",
183 (u_int32_t
)ntohl(dp
->icmp6_pptr
));
185 case ICMP6_PARAMPROB_NEXTHEADER
:
186 printf("icmp6: parameter problem next header - octet %u\n",
187 (u_int32_t
)ntohl(dp
->icmp6_pptr
));
189 case ICMP6_PARAMPROB_OPTION
:
190 printf("icmp6: parameter problem option - octet %u\n",
191 (u_int32_t
)ntohl(dp
->icmp6_pptr
));
194 printf("icmp6: parameter problem code-#%d",
199 case ICMP6_ECHO_REQUEST
:
200 printf("icmp6: echo request");
202 case ICMP6_ECHO_REPLY
:
203 printf("icmp6: echo reply");
205 case ICMP6_MEMBERSHIP_QUERY
:
206 printf("icmp6: multicast listener query ");
207 mld6_print((const u_char
*)dp
);
209 case ICMP6_MEMBERSHIP_REPORT
:
210 printf("icmp6: multicast listener report ");
211 mld6_print((const u_char
*)dp
);
213 case ICMP6_MEMBERSHIP_REDUCTION
:
214 printf("icmp6: multicast listener done ");
215 mld6_print((const u_char
*)dp
);
217 case ND_ROUTER_SOLICIT
:
218 printf("icmp6: router solicitation ");
221 icmp6_opt_print((const u_char
*)dp
+ RTSOLLEN
,
222 icmp6len
- RTSOLLEN
);
225 case ND_ROUTER_ADVERT
:
226 printf("icmp6: router advertisement");
228 struct nd_router_advert
*p
;
230 p
= (struct nd_router_advert
*)dp
;
231 TCHECK(p
->nd_ra_retransmit
);
232 printf("(chlim=%d, ", (int)p
->nd_ra_curhoplimit
);
233 if (p
->nd_ra_flags_reserved
& ND_RA_FLAG_MANAGED
)
235 if (p
->nd_ra_flags_reserved
& ND_RA_FLAG_OTHER
)
237 #ifndef ND_RA_FLAG_HA
238 #define ND_RA_FLAG_HA 0x20
240 if (p
->nd_ra_flags_reserved
& ND_RA_FLAG_HA
)
242 if (p
->nd_ra_flags_reserved
!= 0)
244 printf("router_ltime=%d, ", ntohs(p
->nd_ra_router_lifetime
));
245 printf("reachable_time=%u, ",
246 (u_int32_t
)ntohl(p
->nd_ra_reachable
));
247 printf("retrans_time=%u)",
248 (u_int32_t
)ntohl(p
->nd_ra_retransmit
));
250 icmp6_opt_print((const u_char
*)dp
+ RTADVLEN
,
251 icmp6len
- RTADVLEN
);
254 case ND_NEIGHBOR_SOLICIT
:
256 struct nd_neighbor_solicit
*p
;
257 p
= (struct nd_neighbor_solicit
*)dp
;
258 TCHECK(p
->nd_ns_target
);
259 printf("icmp6: neighbor sol: who has %s",
260 ip6addr_string(&p
->nd_ns_target
));
263 icmp6_opt_print((const u_char
*)dp
+ NDSOLLEN
,
264 icmp6len
- NDSOLLEN
);
268 case ND_NEIGHBOR_ADVERT
:
270 struct nd_neighbor_advert
*p
;
272 p
= (struct nd_neighbor_advert
*)dp
;
273 TCHECK(p
->nd_na_target
);
274 printf("icmp6: neighbor adv: tgt is %s",
275 ip6addr_string(&p
->nd_na_target
));
277 #define ND_NA_FLAG_ALL \
278 (ND_NA_FLAG_ROUTER|ND_NA_FLAG_SOLICITED|ND_NA_FLAG_OVERRIDE)
279 /* we don't need ntohl() here. see advanced-api-04. */
280 if (p
->nd_na_flags_reserved
& ND_NA_FLAG_ALL
) {
281 #undef ND_NA_FLAG_ALL
284 flags
= p
->nd_na_flags_reserved
;
286 if (flags
& ND_NA_FLAG_ROUTER
)
288 if (flags
& ND_NA_FLAG_SOLICITED
)
290 if (flags
& ND_NA_FLAG_OVERRIDE
)
295 icmp6_opt_print((const u_char
*)dp
+ NDADVLEN
,
296 icmp6len
- NDADVLEN
);
302 #define RDR(i) ((struct nd_redirect *)(i))
303 TCHECK(RDR(dp
)->nd_rd_dst
);
304 printf("icmp6: redirect %s",
305 getname6((const u_char
*)&RDR(dp
)->nd_rd_dst
));
307 getname6((const u_char
*)&RDR(dp
)->nd_rd_target
));
308 #define REDIRECTLEN 40
310 icmp6_opt_print((const u_char
*)dp
+ REDIRECTLEN
,
311 icmp6len
- REDIRECTLEN
);
316 #ifndef ICMP6_ROUTER_RENUMBERING
317 #define ICMP6_ROUTER_RENUMBERING 138 /* router renumbering */
319 case ICMP6_ROUTER_RENUMBERING
:
320 switch (dp
->icmp6_code
) {
321 #ifndef ICMP6_ROUTER_RENUMBERING_COMMAND
322 #define ICMP6_ROUTER_RENUMBERING_COMMAND 0 /* rr command */
324 case ICMP6_ROUTER_RENUMBERING_COMMAND
:
325 printf("icmp6: router renum command");
327 #ifndef ICMP6_ROUTER_RENUMBERING_RESULT
328 #define ICMP6_ROUTER_RENUMBERING_RESULT 1 /* rr result */
330 case ICMP6_ROUTER_RENUMBERING_RESULT
:
331 printf("icmp6: router renum result");
334 printf("icmp6: router renum code-#%d", dp
->icmp6_code
);
339 icmp6_nodeinfo_print(icmp6len
, bp
, ep
);
342 icmp6_nodeinfo_print(icmp6len
, bp
, ep
);
345 printf("icmp6: type-#%d", dp
->icmp6_type
);
350 fputs("[|icmp6]", stdout
);
356 static struct udphdr
*
357 get_upperlayer(register u_char
*bp
, int *prot
)
359 register const u_char
*ep
;
360 struct ip6_hdr
*ip6
= (struct ip6_hdr
*)bp
;
363 struct ip6_frag
*fragh
;
367 /* 'ep' points to the end of available data. */
370 if (TTEST(ip6
->ip6_nxt
) == 0)
374 hlen
= sizeof(struct ip6_hdr
);
376 while (bp
< snapend
) {
382 uh
= (struct udphdr
*)bp
;
383 if (TTEST(uh
->uh_dport
)) {
391 case IPPROTO_HOPOPTS
:
392 case IPPROTO_DSTOPTS
:
393 case IPPROTO_ROUTING
:
394 hbh
= (struct ip6_hbh
*)bp
;
395 if (TTEST(hbh
->ip6h_len
) == 0)
398 hlen
= (hbh
->ip6h_len
+ 1) << 3;
401 case IPPROTO_FRAGMENT
: /* this should be odd, but try anyway */
402 fragh
= (struct ip6_frag
*)bp
;
403 if (TTEST(fragh
->ip6f_offlg
) == 0)
405 /* fragments with non-zero offset are meaningless */
406 if ((fragh
->ip6f_offlg
& IP6F_OFF_MASK
) != 0)
408 nh
= fragh
->ip6f_nxt
;
409 hlen
= sizeof(struct ip6_frag
);
413 ah
= (struct ah
*)bp
;
414 if (TTEST(ah
->ah_len
) == 0)
417 hlen
= (ah
->ah_len
+ 2) << 2;
420 default: /* unknown or undecodable header */
421 *prot
= nh
; /* meaningless, but set here anyway */
426 return(NULL
); /* should be notreached, though */
430 icmp6_opt_print(register const u_char
*bp
, int resid
)
432 register const struct nd_opt_hdr
*op
;
433 register const struct nd_opt_hdr
*opl
; /* why there's no struct? */
434 register const struct nd_opt_prefix_info
*opp
;
435 register const struct icmp6_opts_redirect
*opr
;
436 register const struct nd_opt_mtu
*opm
;
437 register const u_char
*ep
;
440 register const struct ip6_hdr
*ip
;
441 register const char *str
;
442 register const struct ip6_hdr
*oip
;
443 register const struct udphdr
*ouh
;
444 register int hlen
, dport
;
448 #define ECHECK(var) if ((u_char *)&(var) > ep - sizeof(var)) return
450 op
= (struct nd_opt_hdr
*)bp
;
452 ip
= (struct ip6_hdr
*)bp2
;
453 oip
= &dp
->icmp6_ip6
;
456 /* 'ep' points to the end of available data. */
459 ECHECK(op
->nd_opt_len
);
462 switch (op
->nd_opt_type
) {
463 case ND_OPT_SOURCE_LINKADDR
:
464 opl
= (struct nd_opt_hdr
*)op
;
466 if ((u_char
*)opl
+ (opl
->nd_opt_len
<< 3) > ep
)
469 TCHECK((u_char
*)opl
+ (opl
->nd_opt_len
<< 3) - 1);
471 printf("(src lladdr: %s", /*)*/
472 etheraddr_string((u_char
*)(opl
+ 1)));
473 if (opl
->nd_opt_len
!= 1)
477 icmp6_opt_print((const u_char
*)op
+ (op
->nd_opt_len
<< 3),
478 resid
- (op
->nd_opt_len
<< 3));
480 case ND_OPT_TARGET_LINKADDR
:
481 opl
= (struct nd_opt_hdr
*)op
;
483 if ((u_char
*)opl
+ (opl
->nd_opt_len
<< 3) > ep
)
486 TCHECK((u_char
*)opl
+ (opl
->nd_opt_len
<< 3) - 1);
488 printf("(tgt lladdr: %s", /*)*/
489 etheraddr_string((u_char
*)(opl
+ 1)));
490 if (opl
->nd_opt_len
!= 1)
494 icmp6_opt_print((const u_char
*)op
+ (op
->nd_opt_len
<< 3),
495 resid
- (op
->nd_opt_len
<< 3));
497 case ND_OPT_PREFIX_INFORMATION
:
498 opp
= (struct nd_opt_prefix_info
*)op
;
499 TCHECK(opp
->nd_opt_pi_prefix
);
500 printf("(prefix info: "); /*)*/
501 if (opp
->nd_opt_pi_flags_reserved
& ND_OPT_PI_FLAG_ONLINK
)
503 if (opp
->nd_opt_pi_flags_reserved
& ND_OPT_PI_FLAG_AUTO
)
505 if (opp
->nd_opt_pi_flags_reserved
)
507 printf("valid_ltime=");
508 if ((u_int32_t
)ntohl(opp
->nd_opt_pi_valid_time
) == ~0U)
511 printf("%u", (u_int32_t
)ntohl(opp
->nd_opt_pi_valid_time
));
514 printf("preffered_ltime=");
515 if ((u_int32_t
)ntohl(opp
->nd_opt_pi_preferred_time
) == ~0U)
518 printf("%u", (u_int32_t
)ntohl(opp
->nd_opt_pi_preferred_time
));
521 printf("prefix=%s/%d", ip6addr_string(&opp
->nd_opt_pi_prefix
),
522 opp
->nd_opt_pi_prefix_len
);
523 if (opp
->nd_opt_pi_len
!= 4)
527 icmp6_opt_print((const u_char
*)op
+ (op
->nd_opt_len
<< 3),
528 resid
- (op
->nd_opt_len
<< 3));
530 case ND_OPT_REDIRECTED_HEADER
:
531 opr
= (struct icmp6_opts_redirect
*)op
;
532 printf("(redirect)");
534 icmp6_opt_print((const u_char
*)op
+ (op
->nd_opt_len
<< 3),
535 resid
- (op
->nd_opt_len
<< 3));
538 opm
= (struct nd_opt_mtu
*)op
;
539 TCHECK(opm
->nd_opt_mtu_mtu
);
540 printf("(mtu: "); /*)*/
541 printf("mtu=%u", (u_int32_t
)ntohl(opm
->nd_opt_mtu_mtu
));
542 if (opm
->nd_opt_mtu_len
!= 1)
545 icmp6_opt_print((const u_char
*)op
+ (op
->nd_opt_len
<< 3),
546 resid
- (op
->nd_opt_len
<< 3));
549 opts_len
= op
->nd_opt_len
;
550 printf("(unknwon opt_type=%d, opt_len=%d)",
551 op
->nd_opt_type
, opts_len
);
553 opts_len
= 1; /* XXX */
554 icmp6_opt_print((const u_char
*)op
+ (opts_len
<< 3),
555 resid
- (opts_len
<< 3));
560 fputs("[ndp opt]", stdout
);
566 mld6_print(register const u_char
*bp
)
568 register struct mld6_hdr
*mp
= (struct mld6_hdr
*)bp
;
569 register const u_char
*ep
;
571 /* 'ep' points to the end of available data. */
574 if ((u_char
*)mp
+ sizeof(*mp
) > ep
)
577 printf("max resp delay: %d ", ntohs(mp
->mld6_maxdelay
));
578 printf("addr: %s", ip6addr_string(&mp
->mld6_addr
));
582 dnsname_print(const u_char
*cp
, const u_char
*ep
)
586 /* DNS name decoding - no decompression */
595 while (i
-- && cp
< ep
) {
599 if (cp
+ 1 < ep
&& *cp
)
605 } else if (cp
+ 1 == ep
&& *cp
== '\0') {
618 icmp6_nodeinfo_print(int icmp6len
, const u_char
*bp
, const u_char
*ep
)
620 struct icmp6_nodeinfo
*ni6
;
621 struct icmp6_hdr
*dp
;
626 dp
= (struct icmp6_hdr
*)bp
;
627 ni6
= (struct icmp6_nodeinfo
*)bp
;
630 switch (ni6
->ni_type
) {
632 if (siz
== sizeof(*dp
) + 4) {
633 /* KAME who-are-you */
634 printf("icmp6: who-are-you request");
637 printf("icmp6: node information query");
639 TCHECK2(*dp
, sizeof(*ni6
));
640 ni6
= (struct icmp6_nodeinfo
*)dp
;
642 switch (ntohs(ni6
->ni_qtype
)) {
646 case NI_QTYPE_SUPTYPES
:
647 printf("supported qtypes");
648 i
= ntohs(ni6
->ni_flags
);
650 printf(" [%s]", (i
& 0x01) ? "C" : "");
656 case NI_QTYPE_NODEADDR
:
657 printf("node addresses");
661 /* NI_NODEADDR_FLAG_TRUNCATE undefined for query */
662 printf(" [%s%s%s%s%s%s]",
663 (i
& NI_NODEADDR_FLAG_ANYCAST
) ? "a" : "",
664 (i
& NI_NODEADDR_FLAG_GLOBAL
) ? "G" : "",
665 (i
& NI_NODEADDR_FLAG_SITELOCAL
) ? "S" : "",
666 (i
& NI_NODEADDR_FLAG_LINKLOCAL
) ? "L" : "",
667 (i
& NI_NODEADDR_FLAG_COMPAT
) ? "C" : "",
668 (i
& NI_NODEADDR_FLAG_ALL
) ? "A" : "");
675 if (ni6
->ni_qtype
== NI_QTYPE_NOOP
||
676 ni6
->ni_qtype
== NI_QTYPE_SUPTYPES
) {
677 if (siz
!= sizeof(*ni6
))
679 printf(", invalid len");
686 /* XXX backward compat, icmp-name-lookup-03 */
687 if (siz
== sizeof(*ni6
)) {
688 printf(", 03 draft");
694 switch (ni6
->ni_code
) {
695 case ICMP6_NI_SUBJ_IPV6
:
697 sizeof(*ni6
) + sizeof(struct in6_addr
)))
699 if (siz
!= sizeof(*ni6
) + sizeof(struct in6_addr
)) {
701 printf(", invalid subject len");
704 printf(", subject=%s",
705 getname6((const u_char
*)(ni6
+ 1)));
707 case ICMP6_NI_SUBJ_FQDN
:
708 printf(", subject=DNS name");
709 cp
= (const u_char
*)(ni6
+ 1);
710 if (cp
[0] == ep
- cp
- 1) {
711 /* icmp-name-lookup-03, pascal string */
713 printf(", 03 draft");
722 dnsname_print(cp
, ep
);
724 case ICMP6_NI_SUBJ_IPV4
:
725 if (!TTEST2(*dp
, sizeof(*ni6
) + sizeof(struct in_addr
)))
727 if (siz
!= sizeof(*ni6
) + sizeof(struct in_addr
)) {
729 printf(", invalid subject len");
732 printf(", subject=%s",
733 getname((const u_char
*)(ni6
+ 1)));
736 printf(", unknown subject");
745 if (icmp6len
> siz
) {
746 printf("[|icmp6: node information reply]");
752 ni6
= (struct icmp6_nodeinfo
*)dp
;
753 printf("icmp6: node information reply");
755 switch (ni6
->ni_code
) {
756 case ICMP6_NI_SUCCESS
:
762 case ICMP6_NI_REFUSED
:
765 if (siz
!= sizeof(*ni6
))
767 printf(", invalid length");
769 case ICMP6_NI_UNKNOWN
:
772 if (siz
!= sizeof(*ni6
))
774 printf(", invalid length");
778 if (ni6
->ni_code
!= ICMP6_NI_SUCCESS
) {
784 switch (ntohs(ni6
->ni_qtype
)) {
789 if (siz
!= sizeof(*ni6
))
791 printf(", invalid length");
793 case NI_QTYPE_SUPTYPES
:
796 printf("supported qtypes");
797 i
= ntohs(ni6
->ni_flags
);
799 printf(" [%s]", (i
& 0x01) ? "C" : "");
805 cp
= (const u_char
*)(ni6
+ 1) + 4;
806 if (cp
[0] == ep
- cp
- 1) {
807 /* icmp-name-lookup-03, pascal string */
809 printf(", 03 draft");
818 dnsname_print(cp
, ep
);
819 if ((ntohs(ni6
->ni_flags
) & 0x01) != 0)
820 printf(" [TTL=%u]", *(u_int32_t
*)(ni6
+ 1));
822 case NI_QTYPE_NODEADDR
:
825 printf("node addresses");
828 if (i
+ sizeof(struct in6_addr
) + sizeof(int32_t) > siz
)
830 printf(" %s", getname6(bp
+ i
));
831 i
+= sizeof(struct in6_addr
);
832 printf("(%d)", ntohl(*(int32_t *)(bp
+ i
)));
833 i
+= sizeof(int32_t);
838 printf(" [%s%s%s%s%s%s%s]",
839 (i
& NI_NODEADDR_FLAG_ANYCAST
) ? "a" : "",
840 (i
& NI_NODEADDR_FLAG_GLOBAL
) ? "G" : "",
841 (i
& NI_NODEADDR_FLAG_SITELOCAL
) ? "S" : "",
842 (i
& NI_NODEADDR_FLAG_LINKLOCAL
) ? "L" : "",
843 (i
& NI_NODEADDR_FLAG_COMPAT
) ? "C" : "",
844 (i
& NI_NODEADDR_FLAG_ALL
) ? "A" : "",
845 (i
& NI_NODEADDR_FLAG_TRUNCATE
) ? "T" : "");
861 fputs("[|icmp6]", stdout
);