+#ifdef HAVE_LINUX_FIB_RULES_H
+static void
+test_rtnl_rule(const int fd)
+{
+ void *const nlh0 = tail_alloc(NLMSG_HDRLEN);
+ struct rtmsg msg = {
+ .rtm_family = AF_UNIX,
+ .rtm_dst_len = 0xaf,
+ .rtm_src_len = 0xda,
+ .rtm_tos = IPTOS_LOWDELAY,
+ .rtm_table = RT_TABLE_UNSPEC,
+ .rtm_type = FR_ACT_TO_TBL,
+ .rtm_flags = FIB_RULE_INVERT
+ };
+
+ TEST_NL_ROUTE(fd, nlh0, RTM_GETRULE, msg,
+ printf("{family=AF_UNIX"),
+ printf(", dst_len=%u, src_len=%u"
+ ", tos=IPTOS_LOWDELAY"
+ ", table=RT_TABLE_UNSPEC"
+ ", action=FR_ACT_TO_TBL"
+ ", flags=FIB_RULE_INVERT}",
+ msg.rtm_dst_len,
+ msg.rtm_src_len));
+}
+#endif
+