]> The Tcpdump Group git mirrors - tcpdump/blob - print-ospf6.c
Add an "ip.h" header, to declare the IP stuff needed by dissectors, and
[tcpdump] / print-ospf6.c
1 /*
2 * Copyright (c) 1992, 1993, 1994, 1995, 1996, 1997
3 * The Regents of the University of California. All rights reserved.
4 *
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
16 * written permission.
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.
20 *
21 * OSPF support contributed by Jeffrey Honig (jch@mitchell.cit.cornell.edu)
22 */
23
24 #ifndef lint
25 static const char rcsid[] =
26 "@(#) $Header: /tcpdump/master/tcpdump/print-ospf6.c,v 1.5 2000-09-23 08:54:36 guy Exp $ (LBL)";
27 #endif
28
29 #ifdef HAVE_CONFIG_H
30 #include "config.h"
31 #endif
32
33 #include <sys/param.h>
34 #include <sys/time.h>
35 #include <sys/socket.h>
36
37 #include <netinet/in.h>
38 #include <netinet/in_systm.h>
39
40 #include <ctype.h>
41 #include <stdio.h>
42 #include <string.h>
43
44 #include "interface.h"
45 #include "addrtoname.h"
46
47 #include "ospf6.h"
48
49 struct bits {
50 u_int32_t bit;
51 const char *str;
52 };
53
54 static const struct bits ospf6_option_bits[] = {
55 { OSPF6_OPTION_V6, "V6" },
56 { OSPF6_OPTION_E, "E" },
57 { OSPF6_OPTION_MC, "MC" },
58 { OSPF6_OPTION_N, "N" },
59 { OSPF6_OPTION_R, "R" },
60 { OSPF6_OPTION_DC, "DC" },
61 { 0, NULL }
62 };
63
64 static const struct bits ospf6_rla_flag_bits[] = {
65 { RLA_FLAG_B, "B" },
66 { RLA_FLAG_E, "E" },
67 { RLA_FLAG_V, "V" },
68 { RLA_FLAG_W, "W" },
69 { 0, NULL }
70 };
71
72 static const struct bits ospf6_asla_flag_bits[] = {
73 { ASLA_FLAG_EXTERNAL, "E" },
74 { ASLA_FLAG_FWDADDR, "F" },
75 { ASLA_FLAG_ROUTETAG, "T" },
76 { 0, NULL }
77 };
78
79 static struct tok type2str[] = {
80 { OSPF_TYPE_UMD, "umd" },
81 { OSPF_TYPE_HELLO, "hello" },
82 { OSPF_TYPE_DB, "dd" },
83 { OSPF_TYPE_LSR, "ls_req" },
84 { OSPF_TYPE_LSU, "ls_upd" },
85 { OSPF_TYPE_LSA, "ls_ack" },
86 { 0, NULL }
87 };
88
89 static char tstr[] = " [|ospf]";
90
91 /* Forwards */
92 static inline void ospf6_print_seqage(u_int32_t, time_t);
93 static inline void ospf6_print_bits(const struct bits *, u_char);
94 static void ospf6_print_ls_type(u_int, const rtrid_t *,
95 const rtrid_t *, const char *);
96 static int ospf6_print_lshdr(const struct lsa_hdr *);
97 static int ospf6_print_lsa(const struct lsa *);
98 static int ospf6_decode_v3(const struct ospf6hdr *, const u_char *);
99
100 static inline void
101 ospf6_print_seqage(register u_int32_t seq, register time_t us)
102 {
103 register time_t sec = us % 60;
104 register time_t mins = (us / 60) % 60;
105 register time_t hour = us / 3600;
106
107 printf(" S %X age ", seq);
108 if (hour)
109 printf("%u:%02u:%02u",
110 (u_int32_t) hour, (u_int32_t) mins, (u_int32_t) sec);
111 else if (mins)
112 printf("%u:%02u", (u_int32_t) mins, (u_int32_t) sec);
113 else
114 printf("%u", (u_int32_t) sec);
115 }
116
117
118 static inline void
119 ospf6_print_bits(register const struct bits *bp, register u_char options)
120 {
121 register char sep = ' ';
122
123 do {
124 if (options & bp->bit) {
125 printf("%c%s", sep, bp->str);
126 sep = '/';
127 }
128 } while ((++bp)->bit);
129 }
130
131 static void
132 ospf6_print_ls_type(register u_int ls_type,
133 register const rtrid_t *ls_stateid,
134 register const rtrid_t *ls_router, register const char *fmt)
135 {
136 char *scope;
137
138 switch (ls_type & LS_SCOPE_MASK) {
139 case LS_SCOPE_LINKLOCAL:
140 scope = "linklocal-";
141 break;
142 case LS_SCOPE_AREA:
143 scope = "area-";
144 break;
145 case LS_SCOPE_AS:
146 scope = "AS-";
147 break;
148 default:
149 scope = "";
150 break;
151 }
152
153 switch (ls_type & LS_TYPE_MASK) {
154 case LS_TYPE_ROUTER:
155 printf(" %srtr %s", scope, ipaddr_string(ls_router));
156 break;
157
158 case LS_TYPE_NETWORK:
159 printf(" %snet dr %s if %s", scope,
160 ipaddr_string(ls_router),
161 ipaddr_string(ls_stateid));
162 break;
163
164 case LS_TYPE_INTER_AP:
165 printf(" %sinter-area-prefix %s abr %s", scope,
166 ipaddr_string(ls_stateid),
167 ipaddr_string(ls_router));
168 break;
169
170 case LS_TYPE_INTER_AR:
171 printf(" %sinter-area-router %s rtr %s", scope,
172 ipaddr_string(ls_router),
173 ipaddr_string(ls_stateid));
174 break;
175
176 case LS_TYPE_ASE:
177 printf(" %sase %s asbr %s", scope,
178 ipaddr_string(ls_stateid),
179 ipaddr_string(ls_router));
180 break;
181
182 case LS_TYPE_GROUP:
183 printf(" %sgroup %s rtr %s", scope,
184 ipaddr_string(ls_stateid),
185 ipaddr_string(ls_router));
186 break;
187
188 case LS_TYPE_TYPE7:
189 printf(" %stype7 %s rtr %s", scope,
190 ipaddr_string(ls_stateid),
191 ipaddr_string(ls_router));
192 break;
193
194 case LS_TYPE_LINK:
195 printf(" %slink %s rtr %s", scope,
196 ipaddr_string(ls_stateid),
197 ipaddr_string(ls_router));
198 break;
199
200 case LS_TYPE_INTRA_AP:
201 printf(" %sintra-area-prefix %s rtr %s", scope,
202 ipaddr_string(ls_stateid),
203 ipaddr_string(ls_router));
204 break;
205
206 default:
207 printf(" %s", scope);
208 printf(fmt, ls_type);
209 break;
210 }
211
212 }
213
214 static int
215 ospf6_print_lshdr(register const struct lsa_hdr *lshp)
216 {
217
218 TCHECK(lshp->ls_type);
219 printf(" {"); /* } (ctags) */
220
221 TCHECK(lshp->ls_seq);
222 ospf6_print_seqage(ntohl(lshp->ls_seq), ntohs(lshp->ls_age));
223 ospf6_print_ls_type(ntohs(lshp->ls_type), &lshp->ls_stateid,
224 &lshp->ls_router, "ls_type %d");
225
226 return (0);
227 trunc:
228 return (1);
229 }
230
231 static int
232 ospf6_print_lsaprefix(register const struct lsa_prefix *lsapp)
233 {
234 int k;
235 struct in6_addr prefix;
236
237 TCHECK(*lsapp);
238 k = (lsapp->lsa_p_len + 31) / 32;
239 if (k * 4 > sizeof(struct in6_addr)) {
240 printf("??prefixlen %d??", lsapp->lsa_p_len);
241 goto trunc;
242 }
243 memset(&prefix, 0, sizeof(prefix));
244 memcpy(&prefix, lsapp->lsa_p_prefix, k * 4);
245 printf(" %s/%d", ip6addr_string(&prefix),
246 lsapp->lsa_p_len);
247 if (lsapp->lsa_p_opt)
248 printf("(opt=%x)", lsapp->lsa_p_opt);
249 if (lsapp->lsa_p_mbz)
250 printf("(mbz=%x)", ntohs(lsapp->lsa_p_mbz)); /* XXX */
251 return sizeof(*lsapp) - 4 + k * 4;
252
253 trunc:
254 return -1;
255 }
256
257
258 /*
259 * Print a single link state advertisement. If truncated return 1, else 0.
260 */
261 static int
262 ospf6_print_lsa(register const struct lsa *lsap)
263 {
264 register const u_char *ls_end, *ls_opt;
265 register const struct rlalink *rlp;
266 #if 0
267 register const struct tos_metric *tosp;
268 #endif
269 register const rtrid_t *ap;
270 #if 0
271 register const struct aslametric *almp;
272 register const struct mcla *mcp;
273 #endif
274 register const struct llsa *llsap;
275 register const struct lsa_prefix *lsapp;
276 #if 0
277 register const u_int32_t *lp;
278 #endif
279 register int j, k;
280 u_int32_t flags32;
281
282 if (ospf6_print_lshdr(&lsap->ls_hdr))
283 return (1);
284 TCHECK(lsap->ls_hdr.ls_length);
285 ls_end = (u_char *)lsap + ntohs(lsap->ls_hdr.ls_length);
286 switch (ntohs(lsap->ls_hdr.ls_type)) {
287 case LS_TYPE_ROUTER | LS_SCOPE_AREA:
288 TCHECK(lsap->lsa_un.un_rla.rla_flags);
289 ospf6_print_bits(ospf6_rla_flag_bits,
290 lsap->lsa_un.un_rla.rla_flags);
291 TCHECK(lsap->lsa_un.un_rla.rla_options);
292 ospf6_print_bits(ospf6_option_bits,
293 ntohl(lsap->lsa_un.un_rla.rla_options));
294
295 TCHECK(lsap->lsa_un.un_rla.rla_link);
296 rlp = lsap->lsa_un.un_rla.rla_link;
297 while (rlp + sizeof(*rlp) <= (struct rlalink *)ls_end) {
298 TCHECK(*rlp);
299 printf(" {"); /* } (ctags) */
300 switch (rlp->link_type) {
301
302 case RLA_TYPE_VIRTUAL:
303 printf(" virt");
304 /* Fall through */
305
306 case RLA_TYPE_ROUTER:
307 printf(" nbrid %s nbrif %s if %s",
308 ipaddr_string(&rlp->link_nrtid),
309 ipaddr_string(&rlp->link_nifid),
310 ipaddr_string(&rlp->link_ifid));
311 break;
312
313 case RLA_TYPE_TRANSIT:
314 printf(" dr %s drif %s if %s",
315 ipaddr_string(&rlp->link_nrtid),
316 ipaddr_string(&rlp->link_nifid),
317 ipaddr_string(&rlp->link_ifid));
318 break;
319
320 default:
321 /* { (ctags) */
322 printf(" ??RouterLinksType 0x%02x?? }",
323 rlp->link_type);
324 return (0);
325 }
326 printf(" metric %d", ntohs(rlp->link_metric));
327 /* { (ctags) */
328 printf(" }");
329 rlp++;
330 }
331 break;
332
333 case LS_TYPE_NETWORK | LS_SCOPE_AREA:
334 TCHECK(lsap->lsa_un.un_nla.nla_options);
335 ospf6_print_bits(ospf6_option_bits,
336 ntohl(lsap->lsa_un.un_nla.nla_options));
337 printf(" rtrs");
338 ap = lsap->lsa_un.un_nla.nla_router;
339 while ((u_char *)ap < ls_end) {
340 TCHECK(*ap);
341 printf(" %s", ipaddr_string(ap));
342 ++ap;
343 }
344 break;
345
346 case LS_TYPE_INTER_AP | LS_SCOPE_AREA:
347 TCHECK(lsap->lsa_un.un_inter_ap.inter_ap_metric);
348 printf(" metric %u",
349 (u_int32_t)ntohl(lsap->lsa_un.un_inter_ap.inter_ap_metric) & SLA_MASK_METRIC);
350 lsapp = lsap->lsa_un.un_inter_ap.inter_ap_prefix;
351 while (lsapp + sizeof(lsapp) <= (struct lsa_prefix *)ls_end) {
352 k = ospf6_print_lsaprefix(lsapp);
353 if (k)
354 goto trunc;
355 lsapp = (struct lsa_prefix *)(((u_char *)lsapp) + k);
356 }
357 break;
358 case LS_SCOPE_AS | LS_TYPE_ASE:
359 TCHECK(lsap->lsa_un.un_asla.asla_metric);
360 flags32 = ntohl(lsap->lsa_un.un_asla.asla_metric);
361 ospf6_print_bits(ospf6_asla_flag_bits, flags32);
362 printf(" metric %u",
363 ntohl(lsap->lsa_un.un_asla.asla_metric) &
364 ASLA_MASK_METRIC);
365 lsapp = lsap->lsa_un.un_asla.asla_prefix;
366 k = ospf6_print_lsaprefix(lsapp);
367 if (k < 0)
368 goto trunc;
369 if ((ls_opt = (u_char *)(((u_char *)lsapp) + k)) < ls_end) {
370 struct in6_addr *fwdaddr6;
371
372 if ((flags32 & ASLA_FLAG_FWDADDR) != 0) {
373 fwdaddr6 = (struct in6_addr *)ls_opt;
374 TCHECK(*fwdaddr6);
375 printf(" forward %s",
376 ip6addr_string(fwdaddr6));
377
378 ls_opt += sizeof(struct in6_addr);
379 }
380
381 if ((flags32 & ASLA_FLAG_ROUTETAG) != 0) {
382 TCHECK(*(u_int32_t *)ls_opt);
383 printf(" tag %s",
384 ipaddr_string((u_int32_t *)ls_opt));
385
386 ls_opt += sizeof(u_int32_t);
387 }
388
389 if (lsapp->lsa_p_mbz) {
390 TCHECK(*(u_int32_t *)ls_opt);
391 printf(" RefLSID: %s",
392 ipaddr_string((u_int32_t *)ls_opt));
393
394 ls_opt += sizeof(u_int32_t);
395 }
396 }
397 break;
398 #if 0
399 case LS_TYPE_SUM_ABR:
400 TCHECK(lsap->lsa_un.un_sla.sla_tosmetric);
401 lp = lsap->lsa_un.un_sla.sla_tosmetric;
402 while ((u_char *)lp < ls_end) {
403 register u_int32_t ul;
404
405 TCHECK(*lp);
406 ul = ntohl(*lp);
407 printf(" tos %d metric %d",
408 (ul & SLA_MASK_TOS) >> SLA_SHIFT_TOS,
409 ul & SLA_MASK_METRIC);
410 ++lp;
411 }
412 break;
413
414 case LS_TYPE_GROUP:
415 /* Multicast extensions as of 23 July 1991 */
416 mcp = lsap->lsa_un.un_mcla;
417 while ((u_char *)mcp < ls_end) {
418 TCHECK(mcp->mcla_vid);
419 switch (ntohl(mcp->mcla_vtype)) {
420
421 case MCLA_VERTEX_ROUTER:
422 printf(" rtr rtrid %s",
423 ipaddr_string(&mcp->mcla_vid));
424 break;
425
426 case MCLA_VERTEX_NETWORK:
427 printf(" net dr %s",
428 ipaddr_string(&mcp->mcla_vid));
429 break;
430
431 default:
432 printf(" ??VertexType %u??",
433 (u_int32_t)ntohl(mcp->mcla_vtype));
434 break;
435 }
436 ++mcp;
437 }
438 #endif
439
440 case LS_TYPE_LINK:
441 /* Link LSA */
442 llsap = &lsap->lsa_un.un_llsa;
443 TCHECK(llsap->llsa_options);
444 ospf6_print_bits(ospf6_option_bits, ntohl(llsap->llsa_options));
445 TCHECK(llsap->llsa_nprefix);
446 printf(" pri %d lladdr %s npref %d", llsap->llsa_priority,
447 ip6addr_string(&llsap->llsa_lladdr),
448 (u_int32_t)ntohl(llsap->llsa_nprefix));
449 lsapp = llsap->llsa_prefix;
450 for (j = 0; j < ntohl(llsap->llsa_nprefix); j++) {
451 k = ospf6_print_lsaprefix(lsapp);
452 if (k)
453 goto trunc;
454 lsapp = (struct lsa_prefix *)(((u_char *)lsapp) + k);
455 }
456 break;
457
458 case LS_TYPE_INTRA_AP | LS_SCOPE_AREA:
459 /* Intra-Area-Prefix LSA */
460 TCHECK(lsap->lsa_un.un_intra_ap.intra_ap_rtid);
461 ospf6_print_ls_type(
462 ntohs(lsap->lsa_un.un_intra_ap.intra_ap_lstype),
463 &lsap->lsa_un.un_intra_ap.intra_ap_lsid,
464 &lsap->lsa_un.un_intra_ap.intra_ap_rtid,
465 "LinkStateType %d");
466 TCHECK(lsap->lsa_un.un_intra_ap.intra_ap_nprefix);
467 printf(" npref %d",
468 ntohs(lsap->lsa_un.un_intra_ap.intra_ap_nprefix));
469
470 lsapp = lsap->lsa_un.un_intra_ap.intra_ap_prefix;
471 for (j = 0;
472 j < ntohs(lsap->lsa_un.un_intra_ap.intra_ap_nprefix);
473 j++) {
474 k = ospf6_print_lsaprefix(lsapp);
475 if (k)
476 goto trunc;
477 lsapp = (struct lsa_prefix *)(((u_char *)lsapp) + k);
478 }
479 break;
480
481 default:
482 printf(" ??LinkStateType 0x%04x??",
483 ntohs(lsap->ls_hdr.ls_type));
484 }
485
486 /* { (ctags) */
487 fputs(" }", stdout);
488 return (0);
489 trunc:
490 fputs(" }", stdout);
491 return (1);
492 }
493
494 static int
495 ospf6_decode_v3(register const struct ospf6hdr *op,
496 register const u_char *dataend)
497 {
498 register const rtrid_t *ap;
499 register const struct lsr *lsrp;
500 register const struct lsa_hdr *lshp;
501 register const struct lsa *lsap;
502 register char sep;
503 register int i;
504
505 switch (op->ospf6_type) {
506
507 case OSPF_TYPE_UMD:
508 /*
509 * Rob Coltun's special monitoring packets;
510 * do nothing
511 */
512 break;
513
514 case OSPF_TYPE_HELLO:
515 if (vflag) {
516 TCHECK(op->ospf6_hello.hello_deadint);
517 ospf6_print_bits(ospf6_option_bits,
518 ntohl(op->ospf6_hello.hello_options));
519 printf(" ifid %s pri %d int %d dead %u",
520 ipaddr_string(&op->ospf6_hello.hello_ifid),
521 op->ospf6_hello.hello_priority,
522 ntohs(op->ospf6_hello.hello_helloint),
523 ntohs(op->ospf6_hello.hello_deadint));
524 }
525 TCHECK(op->ospf6_hello.hello_dr);
526 if (op->ospf6_hello.hello_dr != 0)
527 printf(" dr %s",
528 ipaddr_string(&op->ospf6_hello.hello_dr));
529 TCHECK(op->ospf6_hello.hello_bdr);
530 if (op->ospf6_hello.hello_bdr != 0)
531 printf(" bdr %s",
532 ipaddr_string(&op->ospf6_hello.hello_bdr));
533 if (vflag) {
534 printf(" nbrs");
535 ap = op->ospf6_hello.hello_neighbor;
536 while ((u_char *)ap < dataend) {
537 TCHECK(*ap);
538 printf(" %s", ipaddr_string(ap));
539 ++ap;
540 }
541 }
542 break; /* HELLO */
543
544 case OSPF_TYPE_DB:
545 TCHECK(op->ospf6_db.db_options);
546 ospf6_print_bits(ospf6_option_bits,
547 ntohl(op->ospf6_db.db_options));
548 sep = ' ';
549 TCHECK(op->ospf6_db.db_flags);
550 if (op->ospf6_db.db_flags & OSPF6_DB_INIT) {
551 printf("%cI", sep);
552 sep = '/';
553 }
554 if (op->ospf6_db.db_flags & OSPF6_DB_MORE) {
555 printf("%cM", sep);
556 sep = '/';
557 }
558 if (op->ospf6_db.db_flags & OSPF6_DB_MASTER) {
559 printf("%cMS", sep);
560 sep = '/';
561 }
562 TCHECK(op->ospf6_db.db_seq);
563 printf(" mtu %u S %X", ntohs(op->ospf6_db.db_mtu),
564 (u_int32_t)ntohl(op->ospf6_db.db_seq));
565
566 if (vflag) {
567 /* Print all the LS adv's */
568 lshp = op->ospf6_db.db_lshdr;
569
570 while (!ospf6_print_lshdr(lshp)) {
571 /* { (ctags) */
572 printf(" }");
573 ++lshp;
574 }
575 }
576 break;
577
578 case OSPF_TYPE_LSR:
579 if (vflag) {
580 lsrp = op->ospf6_lsr;
581 while ((u_char *)lsrp < dataend) {
582 TCHECK(*lsrp);
583 printf(" {"); /* } (ctags) */
584 ospf6_print_ls_type(ntohs(lsrp->ls_type),
585 &lsrp->ls_stateid,
586 &lsrp->ls_router,
587 "LinkStateType %d");
588 /* { (ctags) */
589 printf(" }");
590 ++lsrp;
591 }
592 }
593 break;
594
595 case OSPF_TYPE_LSU:
596 if (vflag) {
597 lsap = op->ospf6_lsu.lsu_lsa;
598 TCHECK(op->ospf6_lsu.lsu_count);
599 i = ntohl(op->ospf6_lsu.lsu_count);
600 while (i--) {
601 if (ospf6_print_lsa(lsap))
602 goto trunc;
603 lsap = (struct lsa *)((u_char *)lsap +
604 ntohs(lsap->ls_hdr.ls_length));
605 }
606 }
607 break;
608
609
610 case OSPF_TYPE_LSA:
611 if (vflag) {
612 lshp = op->ospf6_lsa.lsa_lshdr;
613
614 while (!ospf6_print_lshdr(lshp)) {
615 /* { (ctags) */
616 printf(" }");
617 ++lshp;
618 }
619 }
620 break;
621
622 default:
623 printf("v3 type %d", op->ospf6_type);
624 break;
625 }
626 return (0);
627 trunc:
628 return (1);
629 }
630
631 void
632 ospf6_print(register const u_char *bp, register u_int length)
633 {
634 register const struct ospf6hdr *op;
635 register const u_char *dataend;
636 register const char *cp;
637
638 op = (struct ospf6hdr *)bp;
639
640 /* If the type is valid translate it, or just print the type */
641 /* value. If it's not valid, say so and return */
642 TCHECK(op->ospf6_type);
643 cp = tok2str(type2str, "type%d", op->ospf6_type);
644 printf("OSPFv%d-%s %d:", op->ospf6_version, cp, length);
645 if (*cp == 't')
646 return;
647
648 TCHECK(op->ospf6_len);
649 if (length != ntohs(op->ospf6_len)) {
650 printf(" [len %d]", ntohs(op->ospf6_len));
651 return;
652 }
653 dataend = bp + length;
654
655 /* Print the routerid if it is not the same as the source */
656 TCHECK(op->ospf6_routerid);
657 printf(" rtrid %s", ipaddr_string(&op->ospf6_routerid));
658
659 TCHECK(op->ospf6_areaid);
660 if (op->ospf6_areaid != 0)
661 printf(" area %s", ipaddr_string(&op->ospf6_areaid));
662 else
663 printf(" backbone");
664 TCHECK(op->ospf6_instanceid);
665 if (op->ospf6_instanceid)
666 printf(" instance %u", op->ospf6_instanceid);
667
668 /* Do rest according to version. */
669 switch (op->ospf6_version) {
670
671 case 3:
672 /* ospf version 3 */
673 if (ospf6_decode_v3(op, dataend))
674 goto trunc;
675 break;
676
677 default:
678 printf(" ospf [version %d]", op->ospf6_version);
679 break;
680 } /* end switch on version */
681
682 return;
683 trunc:
684 fputs(tstr, stdout);
685 }