From ba57ffc48d3a97421c8358947bc8cf9f2e7ff7c6 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Sat, 3 Apr 2010 13:25:37 +0200 Subject: revert abcaad6b65ed368c13c353ed71619332f76d9c2a it's deeply broken 8-) --- examples/genl-family-get.c | 4 ---- examples/rtnl-link-dump.c | 4 ---- examples/rtnl-link-event.c | 4 ---- examples/rtnl-route-dump.c | 4 ---- 4 files changed, 16 deletions(-) (limited to 'examples') diff --git a/examples/genl-family-get.c b/examples/genl-family-get.c index e6033af..3e741cb 100644 --- a/examples/genl-family-get.c +++ b/examples/genl-family-get.c @@ -51,10 +51,6 @@ static int data_cb(const struct nlmsghdr *nlh, void *data) struct nlattr *tb[CTRL_ATTR_MAX+1]; struct genlmsghdr *genl = mnl_nlmsg_get_data(nlh); - /* this does not come from the kernel. */ - if (nlh->nlmsg_pid != 0) - return MNL_CB_OK; - mnl_attr_parse_at_offset(nlh, sizeof(*genl), tb, CTRL_ATTR_MAX); if (tb[CTRL_ATTR_FAMILY_NAME]) { printf("name=%s\t", diff --git a/examples/rtnl-link-dump.c b/examples/rtnl-link-dump.c index cc3fdf7..7cf061d 100644 --- a/examples/rtnl-link-dump.c +++ b/examples/rtnl-link-dump.c @@ -14,10 +14,6 @@ static int data_cb(const struct nlmsghdr *nlh, void *data) int len = mnl_nlmsg_get_len(nlh); struct nlattr *attr; - /* this does not come from the kernel. */ - if (nlh->nlmsg_pid != 0) - return MNL_CB_OK; - printf("index=%d type=%d flags=%d family=%d ", ifm->ifi_index, ifm->ifi_type, ifm->ifi_flags, ifm->ifi_family); diff --git a/examples/rtnl-link-event.c b/examples/rtnl-link-event.c index 3cff82d..ed5a577 100644 --- a/examples/rtnl-link-event.c +++ b/examples/rtnl-link-event.c @@ -14,10 +14,6 @@ static int data_cb(const struct nlmsghdr *nlh, void *data) int len = mnl_nlmsg_get_len(nlh); struct nlattr *attr; - /* this does not come from the kernel. */ - if (nlh->nlmsg_pid != 0) - return MNL_CB_OK; - printf("index=%d type=%d flags=%d family=%d ", ifm->ifi_index, ifm->ifi_type, ifm->ifi_flags, ifm->ifi_family); diff --git a/examples/rtnl-route-dump.c b/examples/rtnl-route-dump.c index 131d344..e8f3a0c 100644 --- a/examples/rtnl-route-dump.c +++ b/examples/rtnl-route-dump.c @@ -55,10 +55,6 @@ static int data_cb(const struct nlmsghdr *nlh, void *data) int len = mnl_nlmsg_get_len(nlh); struct nlattr *attr; - /* this does not come from the kernel. */ - if (nlh->nlmsg_pid != 0) - return MNL_CB_OK; - /* protocol family = AF_INET | AF_INET6 */ printf("family=%u ", rm->rtm_family); -- cgit v1.2.3