[PATCH] bgpctl(8): improve user interface for RPKI Origin Validation

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] bgpctl(8): improve user interface for RPKI Origin Validation

Job Snijders-2
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.

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 | Threaded
Open this post in threaded view
|

Re: [PATCH] bgpctl(8): improve user interface for RPKI Origin Validation

Theo de Raadt-2
Job Snijders <[hidden email]> wrote:

> 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.

It depends how strongly you feel about invalid RPKI.  Did your experts
consider using U+1F4A9?

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] bgpctl(8): improve user interface for RPKI Origin Validation

Claudio Jeker
In reply to this post by Job Snijders-2
On Mon, Apr 01, 2019 at 03:42:02PM +0200, Job Snijders wrote:

> 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 would suggest we check the locale for UTF-8 and use emoji characters in
that case to compress the output so we get more onto a single line?
 

> 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");
>     }
>  }
>

--
:wq Claudio

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] bgpctl(8): improve user interface for RPKI Origin Validation

Sebastian Benoit-3
In reply to this post by Job Snijders-2
Job Snijders([hidden email]) 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");
>     }
>  }
>