diff options
author | Richard Alpe <richard.alpe@ericsson.com> | 2016-03-04 11:04:42 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-03-07 14:56:41 -0500 |
commit | 49cc66eaee19e772997b63b057ea4b4bf7d48db0 (patch) | |
tree | 94239e052435b3c2d505c8be6e2f7582db5d1da8 /net/tipc/node.c | |
parent | 8dfd329fbc240729938d24bf87aca49ea89289c5 (diff) |
tipc: move netlink policies to netlink.c
Make the c files less cluttered and enable netlink attributes to be
shared between files.
Signed-off-by: Richard Alpe <richard.alpe@ericsson.com>
Reviewed-by: Jon Maloy <jon.maloy@ericsson.com>
Acked-by: Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/node.c')
-rw-r--r-- | net/tipc/node.c | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/net/tipc/node.c b/net/tipc/node.c index 590d597589cf..ace178fd3850 100644 --- a/net/tipc/node.c +++ b/net/tipc/node.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include "socket.h" | 41 | #include "socket.h" |
42 | #include "bcast.h" | 42 | #include "bcast.h" |
43 | #include "discover.h" | 43 | #include "discover.h" |
44 | #include "netlink.h" | ||
44 | 45 | ||
45 | #define INVALID_NODE_SIG 0x10000 | 46 | #define INVALID_NODE_SIG 0x10000 |
46 | 47 | ||
@@ -164,28 +165,6 @@ struct tipc_sock_conn { | |||
164 | struct list_head list; | 165 | struct list_head list; |
165 | }; | 166 | }; |
166 | 167 | ||
167 | static const struct nla_policy tipc_nl_link_policy[TIPC_NLA_LINK_MAX + 1] = { | ||
168 | [TIPC_NLA_LINK_UNSPEC] = { .type = NLA_UNSPEC }, | ||
169 | [TIPC_NLA_LINK_NAME] = { | ||
170 | .type = NLA_STRING, | ||
171 | .len = TIPC_MAX_LINK_NAME | ||
172 | }, | ||
173 | [TIPC_NLA_LINK_MTU] = { .type = NLA_U32 }, | ||
174 | [TIPC_NLA_LINK_BROADCAST] = { .type = NLA_FLAG }, | ||
175 | [TIPC_NLA_LINK_UP] = { .type = NLA_FLAG }, | ||
176 | [TIPC_NLA_LINK_ACTIVE] = { .type = NLA_FLAG }, | ||
177 | [TIPC_NLA_LINK_PROP] = { .type = NLA_NESTED }, | ||
178 | [TIPC_NLA_LINK_STATS] = { .type = NLA_NESTED }, | ||
179 | [TIPC_NLA_LINK_RX] = { .type = NLA_U32 }, | ||
180 | [TIPC_NLA_LINK_TX] = { .type = NLA_U32 } | ||
181 | }; | ||
182 | |||
183 | static const struct nla_policy tipc_nl_node_policy[TIPC_NLA_NODE_MAX + 1] = { | ||
184 | [TIPC_NLA_NODE_UNSPEC] = { .type = NLA_UNSPEC }, | ||
185 | [TIPC_NLA_NODE_ADDR] = { .type = NLA_U32 }, | ||
186 | [TIPC_NLA_NODE_UP] = { .type = NLA_FLAG } | ||
187 | }; | ||
188 | |||
189 | static struct tipc_link *node_active_link(struct tipc_node *n, int sel) | 168 | static struct tipc_link *node_active_link(struct tipc_node *n, int sel) |
190 | { | 169 | { |
191 | int bearer_id = n->active_links[sel & 1]; | 170 | int bearer_id = n->active_links[sel & 1]; |