Job Snijders([email protected]) on 2019.04.01 15:42:02 +0200:
> Dear all,
> 
> I've consulted with numerous user interface experts, their consistent
> advice was to facilitate internalization by provoking simpler, stronger
> emotions through the text based interface.
> 
> bgpctl(8) will now provide simplified 'SAD' or 'HAPPY' ascii ideograms
> to help network operators quickly understand whether a route is valid or
> not. I suspect this patch is the final missing piece to make the
> struggle for RPKI adoption a thing of the past.

I've been using this diff since we spoke about it in Leipzig. Works fine.

ok benno@

 
> Example output:
> 
>     $ bgpctl show rib
>     flags: * = Valid, > = Selected, I = via IBGP, A = Announced,
>            S = Stale, E = Error
>     origin validation state: ? = not-found, :-) = valid, :-( = invalid
>     origin: i = IGP, e = EGP, ? = Incomplete
> 
>     flags ovs destination          gateway          lpref   med aspath origin
>     I*>   :-) 1.0.0.0/24           192.147.168.1      100     0 2914 13335 i
>     I*>     ? 199.185.136.0/23     192.147.168.1      100     0 2914 3257 
> 22512 i
>     I*>   :-( 199.47.227.0/24      192.147.168.1      100     0 2914 7018 
> 17216 i
> 
> Kind regards,
> 
> Job
> 
> diff --git usr.sbin/bgpctl/bgpctl.c usr.sbin/bgpctl/bgpctl.c
> index ae5dab9c620..f998514fe90 100644
> --- usr.sbin/bgpctl/bgpctl.c
> +++ usr.sbin/bgpctl/bgpctl.c
> @@ -1127,7 +1127,7 @@ show_rib_summary_head(void)
>  {
>     printf("flags: * = Valid, > = Selected, I = via IBGP, A = Announced,\n"
>         "       S = Stale, E = Error\n");
> -   printf("origin validation state: N = not-found, V = valid, ! = 
> invalid\n");
> +   printf("origin validation state: ? = not-found, :-) = valid, :-( = 
> invalid\n");
>     printf("origin: i = IGP, e = EGP, ? = Incomplete\n\n");
>     printf("%-5s %3s %-20s %-15s  %5s %5s %s\n", "flags", "ovs", 
> "destination",
>         "gateway", "lpref", "med", "aspath origin");
> @@ -1204,11 +1204,11 @@ print_ovs(u_int8_t validation_state, int sum)
>  {
>     switch (validation_state) {
>     case ROA_INVALID:
> -       return (sum ? "!" : "invalid");
> +       return (sum ? ":-(" : "invalid");
>     case ROA_VALID:
> -       return (sum ? "V" : "valid");
> +       return (sum ? ":-)" : "valid");
>     default:
> -       return (sum ? "N" : "not-found");
> +       return (sum ? "?" : "not-found");
>     }
>  }
> 

Reply via email to