On Tue, Jun 05, 2018 at 10:34:59PM +0200, Stefan Sperling wrote:
> On Tue, Jun 05, 2018 at 10:20:51PM +0200, Remi Locherer wrote:
> > Hi,
> >
> > this adds "Metric: XXXX" to the output of "ospf6ctl show database intra".
> >
> > It looks like this:
> >
> > ----------
> > LS age: 1152
> > LS Type: Intra Area (Prefix)
> > Link State ID: 1.0.0.0
> > Advertising Router: 192.168.250.101
> > LS Seq Number: 0x80000005
> > Checksum: 0x27c3
> > Length: 56
> > Referenced LS Type: Router
> > Referenced Link State ID: 0.0.0.0
> > Referenced Advertising Router: 192.168.250.101
> > Number of Prefixes: 2
> >     Prefix: 2001:db8:1::/56 Metric: 44552
> >     Prefix: 2001:db8:99::/64 Metric: 56832
> >
> > LS age: 1281
> > LS Type: Intra Area (Prefix)
> > Link State ID: 0.0.0.1
> > Advertising Router: 192.168.250.102
> > LS Seq Number: 0x80000001
> > Checksum: 0x89bd
> > Length: 44
> > Referenced LS Type: Network
> > Referenced Link State ID: 0.0.0.1
> > Referenced Advertising Router: 192.168.250.102
> > Number of Prefixes: 1
> >     Prefix: 2001:db8::/64 Metric: 0
> > ----------
> >
> > OK?
> 
> Yes, I am OK with this.
> 

Me too

> >
> > Remi
> >
> >
> > Index: ospf6ctl.c
> > ===================================================================
> > RCS file: /cvs/src/usr.sbin/ospf6ctl/ospf6ctl.c,v
> > retrieving revision 1.47
> > diff -u -p -r1.47 ospf6ctl.c
> > --- ospf6ctl.c      5 Nov 2017 16:56:02 -0000       1.47
> > +++ ospf6ctl.c      5 Jun 2018 19:51:57 -0000
> > @@ -944,9 +944,10 @@ show_db_msg_detail(struct imsg *imsg)
> >                     bcopy(prefix + 1, &ia6,
> >                         LSA_PREFIXSIZE(prefix->prefixlen));
> >
> > -                   printf("    Prefix: %s/%d%s\n", log_in6addr(&ia6),
> > -                       prefix->prefixlen,
> > -                       print_prefix_opt(prefix->options));
> > +                   printf("    Prefix: %s/%d%s Metric: %d\n",
> > +                       log_in6addr(&ia6), prefix->prefixlen,
> > +                       print_prefix_opt(prefix->options),
> > +                       ntohs(prefix->metric));
> >
> >                     off += sizeof(struct lsa_prefix)
> >                         + LSA_PREFIXSIZE(prefix->prefixlen);
> >
> 

-- 
:wq Claudio

Reply via email to