diff options
Diffstat (limited to 'examples/rtnl/rtnl-neigh-dump.c')
-rw-r--r-- | examples/rtnl/rtnl-neigh-dump.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/rtnl/rtnl-neigh-dump.c b/examples/rtnl/rtnl-neigh-dump.c index f4d5000..8dd5f7e 100644 --- a/examples/rtnl/rtnl-neigh-dump.c +++ b/examples/rtnl/rtnl-neigh-dump.c @@ -99,12 +99,12 @@ static int data_cb(const struct nlmsghdr *nlh, void *data) int main(int argc, char *argv[]) { + char buf[MNL_SOCKET_DUMP_SIZE]; + unsigned int seq, portid; struct mnl_socket *nl; - char buf[MNL_SOCKET_BUFFER_SIZE]; struct nlmsghdr *nlh; - struct rtgenmsg *rt; + struct ndmsg *nd; int ret; - unsigned int seq, portid; if (argc != 2) { fprintf(stderr, "Usage: %s <inet|inet6>\n", argv[0]); @@ -116,11 +116,11 @@ int main(int argc, char *argv[]) nlh->nlmsg_flags = NLM_F_REQUEST | NLM_F_DUMP; nlh->nlmsg_seq = seq = time(NULL); - rt = mnl_nlmsg_put_extra_header(nlh, sizeof(struct rtgenmsg)); + nd = mnl_nlmsg_put_extra_header(nlh, sizeof(struct ndmsg)); if (strcmp(argv[1], "inet") == 0) - rt->rtgen_family = AF_INET; + nd->ndm_family = AF_INET; else if (strcmp(argv[1], "inet6") == 0) - rt->rtgen_family = AF_INET6; + nd->ndm_family = AF_INET6; nl = mnl_socket_open(NETLINK_ROUTE); if (nl == NULL) { |