aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/netlink.c
diff options
context:
space:
mode:
authorParthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com>2016-07-26 02:47:22 -0400
committerDavid S. Miller <davem@davemloft.net>2016-07-26 17:26:42 -0400
commitcf6f7e1d51090772d5ff7355aaf0fcff17f20d1a (patch)
treef80b57ee326824ceda895bab95b821eb14b9b9d1 /net/tipc/netlink.c
parentff0d3e78a67a8edd09688f073361de9ed8abf9dc (diff)
tipc: dump monitor attributes
In this commit, we dump the monitor attributes when queried. The link monitor attributes are separated into two kinds: 1. general attributes per bearer 2. specific attributes per node/peer This style resembles the socket attributes and the nametable publications per socket. Reviewed-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/netlink.c')
-rw-r--r--net/tipc/netlink.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/tipc/netlink.c b/net/tipc/netlink.c
index 2cfc5f7c6380..a84daec0afe9 100644
--- a/net/tipc/netlink.c
+++ b/net/tipc/netlink.c
@@ -64,6 +64,7 @@ tipc_nl_name_table_policy[TIPC_NLA_NAME_TABLE_MAX + 1] = {
64 64
65const struct nla_policy tipc_nl_monitor_policy[TIPC_NLA_MON_MAX + 1] = { 65const struct nla_policy tipc_nl_monitor_policy[TIPC_NLA_MON_MAX + 1] = {
66 [TIPC_NLA_MON_UNSPEC] = { .type = NLA_UNSPEC }, 66 [TIPC_NLA_MON_UNSPEC] = { .type = NLA_UNSPEC },
67 [TIPC_NLA_MON_REF] = { .type = NLA_U32 },
67 [TIPC_NLA_MON_ACTIVATION_THRESHOLD] = { .type = NLA_U32 }, 68 [TIPC_NLA_MON_ACTIVATION_THRESHOLD] = { .type = NLA_U32 },
68}; 69};
69 70
@@ -229,6 +230,12 @@ static const struct genl_ops tipc_genl_v2_ops[] = {
229 { 230 {
230 .cmd = TIPC_NL_MON_GET, 231 .cmd = TIPC_NL_MON_GET,
231 .doit = tipc_nl_node_get_monitor, 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,
232 .policy = tipc_nl_policy, 239 .policy = tipc_nl_policy,
233 }, 240 },
234}; 241};