summaryrefslogtreecommitdiffstats
path: root/examples/genl-family-get.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2010-04-04 16:29:58 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2010-04-04 16:29:58 +0200
commit8bc402318be9f09b70cdb61d81799e90d8a64e7b (patch)
tree6eebf08f463f15d87c6a151b4cc43969588a3b70 /examples/genl-family-get.c
parentbd00b928e678b3ede5dbc5abc933539fe5cc31e6 (diff)
rename mnl_attr_type_invalid() by mnl_attr_type_ok()
And include the prototype in libmnl.h, since it was missing Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'examples/genl-family-get.c')
-rw-r--r--examples/genl-family-get.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/genl-family-get.c b/examples/genl-family-get.c
index fbe1bf1..c8352ab 100644
--- a/examples/genl-family-get.c
+++ b/examples/genl-family-get.c
@@ -10,8 +10,8 @@ static int parse_mc_grps_cb(const struct nlattr *attr, void *data)
const struct nlattr **tb = (const struct nlattr **)data;
int type = mnl_attr_get_type(attr);
- if (mnl_attr_type_invalid(attr, CTRL_ATTR_MCAST_GRP_MAX) < 0) {
- perror("mnl_attr_type_invalid");
+ if (mnl_attr_type_ok(attr, CTRL_ATTR_MCAST_GRP_MAX) < 0) {
+ perror("mnl_attr_type_ok");
return MNL_CB_ERROR;
}
@@ -59,8 +59,8 @@ static int parse_family_ops_cb(const struct nlattr *attr, void *data)
const struct nlattr **tb = (const struct nlattr **)data;
int type = mnl_attr_get_type(attr);
- if (mnl_attr_type_invalid(attr, CTRL_ATTR_OP_MAX) < 0) {
- perror("mnl_attr_type_invalid");
+ if (mnl_attr_type_ok(attr, CTRL_ATTR_OP_MAX) < 0) {
+ perror("mnl_attr_type_ok");
return MNL_CB_ERROR;
}
@@ -105,8 +105,8 @@ static int data_attr_cb(const struct nlattr *attr, void *data)
const struct nlattr **tb = (const struct nlattr **)data;
int type = mnl_attr_get_type(attr);
- if (mnl_attr_type_invalid(attr, CTRL_ATTR_MAX) < 0) {
- perror("mnl_attr_type_invalid");
+ if (mnl_attr_type_ok(attr, CTRL_ATTR_MAX) < 0) {
+ perror("mnl_attr_type_ok");
return MNL_CB_ERROR;
}