summaryrefslogtreecommitdiff
path: root/src/xlat/rtnl_nexthop_attrs.in
Commit message (Collapse)AuthorAgeFilesLines
* Assume linux/nexthop.h is bundledDmitry V. Levin2021-11-071-2/+1
| | | | | | | | | | | | | | | * configure.ac (AC_CHECK_HEADERS): Remove linux/nexthop.h. * src/xlat/rtnl_nexthop_attrs.in: Add #unconditional, remove #enum, do not include <linux/nexthop.h>. * src/xlat/rtnl_nexthop_grp_types.in: Likewise. * src/xlat/rtnl_nha_res_bucket_attrs.in: Likewise. * src/xlat/rtnl_nha_res_group_attrs.in: Likewise. * tests/netlink_route.c: Include <linux/nexthop.h> unconditionally, do not define struct_nhmsg, use struct nhmsg instead. * tests/nlattr_nhmsg.c: Include <linux/nexthop.h> unconditionally, do not define struct nhmsg and struct nexthop_grp. Complements: v5.14-90-gb17393bc3 "netlink_route: implement RTM_{NEW,DEL,GET}NEXTHOP decoding"
* netlink_route: implement RTM_{NEW,DEL,GET}NEXTHOP decodingEugene Syromyatnikov2021-10-141-0/+17
* bundled/linux/include/uapi/linux/nexthop.h: Add version at Linux commit v5.13-rc1~94^2~581^2~10. * bundled/Makefile.am (EXTRA_DIST): Add it. * configure.ac (AC_CHECK_HEADERS): Add linux/nexthop.h. * src/Makefile.am (libstrace_a_SOURCES): Add rtnl_nh.c. * src/defs.h (route_nexthop_flags, routing_protocols): New declarations. * src/netlink_route.c (route_decoders) <[RTM_NEWNEXTHOP - RTM_BASE], [RTM_DELNEXTHOP - RTM_BASE], [RTM_GETNEXTHOP - RTM_BASE]>: Decode using decode_nhmsg. * src/netlink_route.h (DECL_NETLINK_ROUTE_DECODER(decode_nhmsg)): New declaration. * src/rtnl_nh.c: New file. * src/xlat/rtnl_nexthop_attrs.in: Likewise. * src/xlat/rtnl_nexthop_grp_types.in: Likewise. * src/xlat/rtnl_nha_res_bucket_attrs.in: Likewise. * src/xlat/rtnl_nha_res_group_attrs.in: Likewise. * tests/.gitignore: Add nlattr_nhmsg, nlattr_nhmsg-Xabbrev, nlattr_nhmsg-Xraw, and nlattr_nhmsg-Xverbose. * tests/pure_executables.list: Likewise. * tests/gen_tests.in (nlattr_nhmsg, nlattr_nhmsg-Xabbrev, nlattr_nhmsg-Xraw, nlattr_nhmsg-Xverbose): New tests. * tests/netlink_route.c: Add checks for struct nhmsg (RTM_NEWNEXTHOP, RTM_DELNEXTHOP, and RTM_GETNEXTHOP) messages. * tests/nlattr_nhmsg.c: New file. * tests/nlattr_nhmsg-Xabbrev.c: Likewise. * tests/nlattr_nhmsg-Xraw.c: Likewise. * tests/nlattr_nhmsg-Xverbose.c: Likewise. * NEWS: Mention it.