* tests/netlink_route.c (test_rtnl_neigh): New function. (main): Use it. Co-authored-by: Fabien Siron <fabien.si...@epita.fr> --- tests/netlink_route.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
diff --git a/tests/netlink_route.c b/tests/netlink_route.c index 0c62584..3aba2a0 100644 --- a/tests/netlink_route.c +++ b/tests/netlink_route.c @@ -290,6 +290,26 @@ test_rtnl_rule(const int fd) } #endif +static void +test_rtnl_neigh(const int fd) +{ + void *const nlh0 = tail_alloc(NLMSG_HDRLEN); + const struct ndmsg msg = { + .ndm_family = AF_UNIX, + .ndm_ifindex = IFINDEX_LO, + .ndm_state = NUD_PERMANENT, + .ndm_flags = NTF_PROXY, + .ndm_type = NDA_UNSPEC + }; + + TEST_NL_ROUTE(fd, nlh0, RTM_GETNEIGH, msg, + printf("{ndm_family=AF_UNIX"), + printf(", ndm_ifindex=if_nametoindex(\"lo\")" + ", ndm_state=NUD_PERMANENT" + ", ndm_flags=NTF_PROXY" + ", ndm_type=NDA_UNSPEC}")); +} + int main(void) { skip_if_unavailable("/proc/self/fd/"); @@ -306,6 +326,7 @@ int main(void) #ifdef HAVE_STRUCT_FIB_RULE_HDR test_rtnl_rule(fd); #endif + test_rtnl_neigh(fd); printf("+++ exited with 0 +++\n"); -- 2.7.4 ------------------------------------------------------------------------------ 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