On Tue, May 30, 2017 at 10:21:17AM +0200, Michal Mazurek wrote:
> On 12:15:06, 29.05.17, Job Snijders wrote:
> > perhaps add a comment like /* RFC 6608 */ above the below:
> 
> Right, it will make it more consistent.
> 
> > > +static const char *bgpnotify_minor_fsm[] = {
> > > + NULL, "In OpenSent State", "In OpenConfirm State",
> > > + "In Established State",
> > > +};
> > 
> > and maybe s/NULL/"Unspecified Error"/
> 
> If it's NULL, then tcpdump will print out the number:
> 
>       if (p == NULL) {
>               snprintf(buf, sizeof(buf), "#%d", minor);
> 

OK claudio@

> 
> Index: usr.sbin/tcpdump/print-bgp.c
> ===================================================================
> RCS file: /cvs/src/usr.sbin/tcpdump/print-bgp.c,v
> retrieving revision 1.21
> diff -u -p -r1.21 print-bgp.c
> --- usr.sbin/tcpdump/print-bgp.c      24 Apr 2017 20:35:35 -0000      1.21
> +++ usr.sbin/tcpdump/print-bgp.c      30 May 2017 08:12:17 -0000
> @@ -226,6 +226,16 @@ static const char *bgpnotify_minor_updat
>       "Invalid Network Field", "Malformed AS_PATH",
>  };
>  
> +static const char *bgpnotify_minor_holdtime[] = {
> +     NULL,
> +};
> +
> +/* RFC 6608 */
> +static const char *bgpnotify_minor_fsm[] = {
> +     NULL, "In OpenSent State", "In OpenConfirm State",
> +     "In Established State",
> +};
> +
>  /* RFC 4486 */
>  #define BGP_NOTIFY_MINOR_CEASE_MAXPRFX  1
>  /* draft-ietf-idr-shutdown-07 */
> @@ -246,14 +256,16 @@ static const char *bgpnotify_minor_cap[]
>  
>  static const char **bgpnotify_minor[] = {
>       NULL, bgpnotify_minor_msg, bgpnotify_minor_open, bgpnotify_minor_update,
> +     bgpnotify_minor_holdtime, bgpnotify_minor_fsm, bgpnotify_minor_cease,
> +     bgpnotify_minor_cap,
>  };
>  static const int bgpnotify_minor_siz[] = {
>       0,
>       sizeof(bgpnotify_minor_msg)/sizeof(bgpnotify_minor_msg[0]),
>       sizeof(bgpnotify_minor_open)/sizeof(bgpnotify_minor_open[0]),
>       sizeof(bgpnotify_minor_update)/sizeof(bgpnotify_minor_update[0]),
> -     0,
> -     0,
> +     sizeof(bgpnotify_minor_holdtime)/sizeof(bgpnotify_minor_holdtime[0]),
> +     sizeof(bgpnotify_minor_fsm)/sizeof(bgpnotify_minor_fsm[0]),
>       sizeof(bgpnotify_minor_cease)/sizeof(bgpnotify_minor_cease[0]),
>       sizeof(bgpnotify_minor_cap)/sizeof(bgpnotify_minor_cap[0]),
>  };
> 
> -- 
> Michal Mazurek
> 

-- 
:wq Claudio

Reply via email to