rtnl_link: use internal rtnl_link_stats* and ifla_port_vsi definitions
Define substitutes for struct rtnl_link_stats, struct
rtnl_link_stats64, and struct ifla_port_vsi internally.
Add a static_assert that informs about future growth of the structures
provided by the kernel headers.
* rtnl_link.c (struct_rtnl_link_stats, struct_rtnl_link_stats64,
struct_ifla_port_vsi): New typedefs.
[HAVE_STRUCT_RTNL_LINK_STATS_RX_NOHANDLER]: Add a static_assert to check
that sizeof(struct rtnl_link_stats) has the expected value.
[HAVE_STRUCT_RTNL_LINK_STATS64_RX_NOHANDLER]: Add a static_assert
to check that sizeof(struct rtnl_link_stats) has the expected value.
[HAVE_STRUCT_IFLA_PORT_VSI]: Add a static_assert to check
that sizeof(struct ifla_port_vsi) has the expected value.
(decode_rtnl_link_stats) [HAVE_STRUCT_RTNL_LINK_STATS_RX_NOHANDLER]:
Remove guard.
(decode_rtnl_link_stats): Change the type of st variable to
struct_rtnl_link_stats; use struct_rtnl_link_stats in offsetofend
statement for min_size definition.
(decode_rtnl_link_stats64) [HAVE_STRUCT_RTNL_LINK_STATS64,
HAVE_STRUCT_RTNL_LINK_STATS64_RX_NOHANDLER]: Remove guards.
(decode_rtnl_link_stats64): Change the type of st variable
to struct_rtnl_link_stats64.
(decode_ifla_port_vsi) [HAVE_STRUCT_IFLA_PORT_VSI]: Remove guard.
(decode_ifla_port_vsi): Change the type of vsi variable
to struct_ifla_port_vsi.
References: https://bugzilla.redhat.com/show_bug.cgi?id=
1758201