diff options
author | Richard Alpe <richard.alpe@ericsson.com> | 2014-11-20 04:29:20 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-11-21 15:01:32 -0500 |
commit | 1593123a6a4914ccac4699d7f93cdf8057a7d822 (patch) | |
tree | 4dbd419eabf326702b8467761b7ffc5de62152b9 /net/tipc/netlink.c | |
parent | 27c21416727af73df45051acb05331c0f10e50f6 (diff) |
tipc: add name table dump to new netlink api
Add TIPC_NL_NAME_TABLE_GET command to the new tipc netlink API.
This command supports dumping the name table of all nodes.
Netlink logical layout of name table response message:
-> name table
-> publication
-> type
-> lower
-> upper
-> scope
-> node
-> ref
-> key
Signed-off-by: Richard Alpe <richard.alpe@ericsson.com>
Reviewed-by: Erik Hugne <erik.hugne@ericsson.com>
Reviewed-by: Jon Maloy <jon.maloy@ericsson.com>
Acked-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/netlink.c')
-rw-r--r-- | net/tipc/netlink.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/net/tipc/netlink.c b/net/tipc/netlink.c index cb37d30378a8..b891e3905bc4 100644 --- a/net/tipc/netlink.c +++ b/net/tipc/netlink.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include "core.h" | 37 | #include "core.h" |
38 | #include "config.h" | 38 | #include "config.h" |
39 | #include "socket.h" | 39 | #include "socket.h" |
40 | #include "name_table.h" | ||
40 | #include "bearer.h" | 41 | #include "bearer.h" |
41 | #include "link.h" | 42 | #include "link.h" |
42 | #include "node.h" | 43 | #include "node.h" |
@@ -81,7 +82,8 @@ static const struct nla_policy tipc_nl_policy[TIPC_NLA_MAX + 1] = { | |||
81 | [TIPC_NLA_LINK] = { .type = NLA_NESTED, }, | 82 | [TIPC_NLA_LINK] = { .type = NLA_NESTED, }, |
82 | [TIPC_NLA_MEDIA] = { .type = NLA_NESTED, }, | 83 | [TIPC_NLA_MEDIA] = { .type = NLA_NESTED, }, |
83 | [TIPC_NLA_NODE] = { .type = NLA_NESTED, }, | 84 | [TIPC_NLA_NODE] = { .type = NLA_NESTED, }, |
84 | [TIPC_NLA_NET] = { .type = NLA_NESTED, } | 85 | [TIPC_NLA_NET] = { .type = NLA_NESTED, }, |
86 | [TIPC_NLA_NAME_TABLE] = { .type = NLA_NESTED, } | ||
85 | }; | 87 | }; |
86 | 88 | ||
87 | /* Legacy ASCII API */ | 89 | /* Legacy ASCII API */ |
@@ -185,6 +187,11 @@ static const struct genl_ops tipc_genl_v2_ops[] = { | |||
185 | .cmd = TIPC_NL_NET_SET, | 187 | .cmd = TIPC_NL_NET_SET, |
186 | .doit = tipc_nl_net_set, | 188 | .doit = tipc_nl_net_set, |
187 | .policy = tipc_nl_policy, | 189 | .policy = tipc_nl_policy, |
190 | }, | ||
191 | { | ||
192 | .cmd = TIPC_NL_NAME_TABLE_GET, | ||
193 | .dumpit = tipc_nl_name_table_dump, | ||
194 | .policy = tipc_nl_policy, | ||
188 | } | 195 | } |
189 | }; | 196 | }; |
190 | 197 | ||