[Babel-users] [PATCH] v2: Allow to independently monitor events for neighbour, interface, route, xroute
Juliusz Chroboczek
jch at irif.fr
Sat Dec 22 16:44:57 GMT 2018
Great, I've been planning that for a long time.
> +.B neighbour-monitor
> +and
> +.BR neighbour-unmonitor ;
Please use the syntax "monitor neighbours" and "unmonitor neighbours".
Two keywords.
> +#define CONFIG_ACTION_NEIGHBOUR_MONITOR 6
> +#define CONFIG_ACTION_NEIGHBOUR_UNMONITOR 7
> +#define CONFIG_ACTION_ROUTE_MONITOR 8
> +#define CONFIG_ACTION_ROUTE_UNMONITOR 9
> +#define CONFIG_ACTION_XROUTE_MONITOR 10
> +#define CONFIG_ACTION_XROUTE_UNMONITOR 11
> +#define CONFIG_ACTION_INTERFACE_MONITOR 12
> +#define CONFIG_ACTION_INTERFACE_UNMONITOR 13
Please use a single action with a parameter.
> +static void
> +local_notify_all_1(struct local_socket *s)
> +{
> + local_notify_all_interface_1(s);
> + local_notify_all_neighbour_1(s);
> + local_notify_all_xroute_1(s);
> + local_notify_all_route_1(s);
> }
Why is that refactoring necessary?
> +inline void set_flag(uint8_t *d, uint8_t flag) {
> + *d |= 0x01 << flag;
> +}
Please don't -- just but the bit manipulation inline, I find that easier
to read.
-- Juliusz
More information about the Babel-users
mailing list