aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/netlink.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/tipc/netlink.c')
-rw-r--r--net/tipc/netlink.c27
1 files changed, 25 insertions, 2 deletions
diff --git a/net/tipc/netlink.c b/net/tipc/netlink.c
index 56935df2167a..a84daec0afe9 100644
--- a/net/tipc/netlink.c
+++ b/net/tipc/netlink.c
@@ -52,7 +52,8 @@ static const struct nla_policy tipc_nl_policy[TIPC_NLA_MAX + 1] = {
52 [TIPC_NLA_MEDIA] = { .type = NLA_NESTED, }, 52 [TIPC_NLA_MEDIA] = { .type = NLA_NESTED, },
53 [TIPC_NLA_NODE] = { .type = NLA_NESTED, }, 53 [TIPC_NLA_NODE] = { .type = NLA_NESTED, },
54 [TIPC_NLA_NET] = { .type = NLA_NESTED, }, 54 [TIPC_NLA_NET] = { .type = NLA_NESTED, },
55 [TIPC_NLA_NAME_TABLE] = { .type = NLA_NESTED, } 55 [TIPC_NLA_NAME_TABLE] = { .type = NLA_NESTED, },
56 [TIPC_NLA_MON] = { .type = NLA_NESTED, },
56}; 57};
57 58
58const struct nla_policy 59const struct nla_policy
@@ -61,6 +62,12 @@ tipc_nl_name_table_policy[TIPC_NLA_NAME_TABLE_MAX + 1] = {
61 [TIPC_NLA_NAME_TABLE_PUBL] = { .type = NLA_NESTED } 62 [TIPC_NLA_NAME_TABLE_PUBL] = { .type = NLA_NESTED }
62}; 63};
63 64
65const struct nla_policy tipc_nl_monitor_policy[TIPC_NLA_MON_MAX + 1] = {
66 [TIPC_NLA_MON_UNSPEC] = { .type = NLA_UNSPEC },
67 [TIPC_NLA_MON_REF] = { .type = NLA_U32 },
68 [TIPC_NLA_MON_ACTIVATION_THRESHOLD] = { .type = NLA_U32 },
69};
70
64const struct nla_policy tipc_nl_sock_policy[TIPC_NLA_SOCK_MAX + 1] = { 71const struct nla_policy tipc_nl_sock_policy[TIPC_NLA_SOCK_MAX + 1] = {
65 [TIPC_NLA_SOCK_UNSPEC] = { .type = NLA_UNSPEC }, 72 [TIPC_NLA_SOCK_UNSPEC] = { .type = NLA_UNSPEC },
66 [TIPC_NLA_SOCK_ADDR] = { .type = NLA_U32 }, 73 [TIPC_NLA_SOCK_ADDR] = { .type = NLA_U32 },
@@ -214,7 +221,23 @@ static const struct genl_ops tipc_genl_v2_ops[] = {
214 .cmd = TIPC_NL_NAME_TABLE_GET, 221 .cmd = TIPC_NL_NAME_TABLE_GET,
215 .dumpit = tipc_nl_name_table_dump, 222 .dumpit = tipc_nl_name_table_dump,
216 .policy = tipc_nl_policy, 223 .policy = tipc_nl_policy,
217 } 224 },
225 {
226 .cmd = TIPC_NL_MON_SET,
227 .doit = tipc_nl_node_set_monitor,
228 .policy = tipc_nl_policy,
229 },
230 {
231 .cmd = TIPC_NL_MON_GET,
232 .doit = tipc_nl_node_get_monitor,
233 .dumpit = tipc_nl_node_dump_monitor,
234 .policy = tipc_nl_policy,
235 },
236 {
237 .cmd = TIPC_NL_MON_PEER_GET,
238 .dumpit = tipc_nl_node_dump_monitor_peer,
239 .policy = tipc_nl_policy,
240 },
218}; 241};
219 242
220int tipc_nlmsg_parse(const struct nlmsghdr *nlh, struct nlattr ***attr) 243int tipc_nlmsg_parse(const struct nlmsghdr *nlh, struct nlattr ***attr)