]> granicus.if.org Git - strace/commit
tests: move common ifinfomsg boilerplate into a separate header
authorEugene Syromyatnikov <evgsyr@gmail.com>
Thu, 24 May 2018 23:49:08 +0000 (01:49 +0200)
committerDmitry V. Levin <ldv@altlinux.org>
Wed, 6 Jun 2018 15:10:37 +0000 (15:10 +0000)
commite62b6a5e929cbefef0f6ef20ab3f00671b139c65
tree504761db3c8c4f313ec301790a24f1e1bef0e785
parent4eab3a43fd90aa0a1a085d303726f385950dfc6a
tests: move common ifinfomsg boilerplate into a separate header

* configure.ac (AC_CHECK_DECLS): Check for IFLA_PORT_SELF, IFLA_PROTINFO, and
IFLA_XDP in <linux/rtnetlink.h>.
* tests/nlattr_ifla.h: New file.
* tests/Makefile.am (EXTRA_DIST): Add it.
* tests/nlattr_ifla_brport.c [!HAVE_DECL_IFLA_PROTINFO] (IFLA_PROTINFO):
New declaration.
(hdrlen, init_ifinfomsg, print_ifinfomsg): Remove.
(IFLA_ATTR): Define to IFLA_PROTINFO.
Include nlattr_ifla.h.
* tests/nlattr_ifla_port.c [!HAVE_DECL_IFLA_PORT_SELF] (IFLA_PORT_SELF):
New declaration.
(hdrlen, init_ifinfomsg, print_ifinfomsg): Remove.
(IFLA_ATTR): Define to IFLA_PORT_SELF.
Include nlattr_ifla.h.
* tests/nlattr_ifla_xdp.c
* tests/nlattr_ifla_xdp.c [!HAVE_DECL_IFLA_XDP] (IFLA_XDP): New
declaration.
(hdrlen, init_ifinfomsg, print_ifinfomsg): Remove.
(IFLA_ATTR): Define to IFLA_XDP.
Include nlattr_ifla.h.
configure.ac
tests/Makefile.am
tests/nlattr_ifla.h [new file with mode: 0644]
tests/nlattr_ifla_brport.c
tests/nlattr_ifla_port.c
tests/nlattr_ifla_xdp.c