[Babel-users] [PATCHv4] Allow to independently monitor and dump events for neighbour, interface, route, xroute

Antonin Décimo antonin.decimo at gmail.com
Fri Oct 4 09:48:17 BST 2019


Hello Christof,

I took a look at your patch. For some reason, git doesn't let me apply
it on top of Juliusz' master branch. I think that it is good to go,
but you can make the following changes:

- stylistic changes in configuration.c:
  + put the curly braces in the same line as if(token2),
  + remove the space in `if (` in the chain of if/else if.

- SHOW_* macros should directly point to their bit, like the IF_*
  macros in interface.h
  -#define SHOW_NEIGHBOUR 1
  -#define SHOW_INTERFACE 2
  +#define SHOW_NEIGHBOUR (1 << 0)
  +#define SHOW_INTERFACE (1 << 1)
  ...
  -    if(mask & (0x01 << SHOW_INTERFACE))
  -        local_notify_all_interface_1(s);
  +    if(mask & SHOW_INTERFACE)
  +        local_notify_all_interface_1(s);

  The function show_flags_map also need to be changed if you do this.

- In the case:
  +    case CONFIG_ACTION_MONITOR:
  +    case CONFIG_ACTION_UNMONITOR:
  +    case CONFIG_ACTION_DUMP:
  +        return 0xff;

  Maybe do this:
  +#define SHOW_ALL (SHOW_NEIGHBOUR | SHOW_INTERFACE | SHOW_ROUTE |
  +                  SHOW_XROUTE)
  and
  +        return SHOW_ALL;
  or return the or'ed flags directly without defining SHOW_ALL.

Thank you!



More information about the Babel-users mailing list