On Sun, Aug 13, 2017 at 10:22:23AM +0800, JingPiao Chen wrote: > * defs.h (routing_table_ids): New xlat prototype. > * netlink_route.c: New file. > * Makefile.am (strace_SOURCES): Add it. > * defs.h (ip_type_of_services, > routing_table_ids): New xlat prototypes. > * netlink_route.h (decode_fib_rule_hdr): New prototype. > * configure.ac (AC_CHECK_HEADERS): Add linux/fib_rules.h. > * netlink_route.c (route_decoders): Add RTM_DELRULE, > RTM_GETRULE and RTM_NEWRULE. > * xlat/fib_rule_actions.in: New file. > * xlat/fib_rule_flags.in: Likewise. [...] > +#include "defs.h" > + > +#include "netlink_route.h" > +#include "print_fields.h" > + > +#ifdef HAVE_LINUX_FIB_RULES_H > +# include <linux/fib_rules.h> > +#endif > + > +#include "xlat/fib_rule_actions.h" > +#include "xlat/fib_rule_flags.h" > + > +DECL_NETLINK_ROUTE_DECODER(decode_fib_rule_hdr) > +{ > + /* > + * struct rtmsg and struct fib_rule_hdr are essentially > + * the same structure, use struct rtmsg but treat it as > + * struct fib_rule_hdr. > + */ > + struct rtmsg msg = { .rtm_family = family };
If <linux/fib_rules.h> is not available, then <linux/rtnetlink.h> has to be used, otherwise the code won't compile on older systems. -- ldv
signature.asc
Description: PGP signature
------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________ Strace-devel mailing list Strace-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/strace-devel