diff options
Diffstat (limited to 'net/tipc/node.h')
| -rw-r--r-- | net/tipc/node.h | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/net/tipc/node.h b/net/tipc/node.h index 67513c3c852c..cbe0e950f1cc 100644 --- a/net/tipc/node.h +++ b/net/tipc/node.h | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * net/tipc/node.h: Include file for TIPC node management routines | 2 | * net/tipc/node.h: Include file for TIPC node management routines |
| 3 | * | 3 | * |
| 4 | * Copyright (c) 2000-2006, Ericsson AB | 4 | * Copyright (c) 2000-2006, 2014, Ericsson AB |
| 5 | * Copyright (c) 2005, 2010-2014, Wind River Systems | 5 | * Copyright (c) 2005, 2010-2014, Wind River Systems |
| 6 | * All rights reserved. | 6 | * All rights reserved. |
| 7 | * | 7 | * |
| @@ -37,7 +37,6 @@ | |||
| 37 | #ifndef _TIPC_NODE_H | 37 | #ifndef _TIPC_NODE_H |
| 38 | #define _TIPC_NODE_H | 38 | #define _TIPC_NODE_H |
| 39 | 39 | ||
| 40 | #include "node_subscr.h" | ||
| 41 | #include "addr.h" | 40 | #include "addr.h" |
| 42 | #include "net.h" | 41 | #include "net.h" |
| 43 | #include "bearer.h" | 42 | #include "bearer.h" |
| @@ -53,6 +52,7 @@ | |||
| 53 | * TIPC_WAIT_OWN_LINKS_DOWN: wait until peer node is declared down | 52 | * TIPC_WAIT_OWN_LINKS_DOWN: wait until peer node is declared down |
| 54 | * TIPC_NOTIFY_NODE_DOWN: notify node is down | 53 | * TIPC_NOTIFY_NODE_DOWN: notify node is down |
| 55 | * TIPC_NOTIFY_NODE_UP: notify node is up | 54 | * TIPC_NOTIFY_NODE_UP: notify node is up |
| 55 | * TIPC_DISTRIBUTE_NAME: publish or withdraw link state name type | ||
| 56 | */ | 56 | */ |
| 57 | enum { | 57 | enum { |
| 58 | TIPC_WAIT_PEER_LINKS_DOWN = (1 << 1), | 58 | TIPC_WAIT_PEER_LINKS_DOWN = (1 << 1), |
| @@ -60,7 +60,9 @@ enum { | |||
| 60 | TIPC_NOTIFY_NODE_DOWN = (1 << 3), | 60 | TIPC_NOTIFY_NODE_DOWN = (1 << 3), |
| 61 | TIPC_NOTIFY_NODE_UP = (1 << 4), | 61 | TIPC_NOTIFY_NODE_UP = (1 << 4), |
| 62 | TIPC_WAKEUP_USERS = (1 << 5), | 62 | TIPC_WAKEUP_USERS = (1 << 5), |
| 63 | TIPC_WAKEUP_BCAST_USERS = (1 << 6) | 63 | TIPC_WAKEUP_BCAST_USERS = (1 << 6), |
| 64 | TIPC_NOTIFY_LINK_UP = (1 << 7), | ||
| 65 | TIPC_NOTIFY_LINK_DOWN = (1 << 8) | ||
| 64 | }; | 66 | }; |
| 65 | 67 | ||
| 66 | /** | 68 | /** |
| @@ -69,9 +71,7 @@ enum { | |||
| 69 | * @last_in: sequence # of last in-sequence b'cast message received from node | 71 | * @last_in: sequence # of last in-sequence b'cast message received from node |
| 70 | * @last_sent: sequence # of last b'cast message sent by node | 72 | * @last_sent: sequence # of last b'cast message sent by node |
| 71 | * @oos_state: state tracker for handling OOS b'cast messages | 73 | * @oos_state: state tracker for handling OOS b'cast messages |
| 72 | * @deferred_size: number of OOS b'cast messages in deferred queue | 74 | * @deferred_queue: deferred queue saved OOS b'cast message received from node |
| 73 | * @deferred_head: oldest OOS b'cast message received from node | ||
| 74 | * @deferred_tail: newest OOS b'cast message received from node | ||
| 75 | * @reasm_buf: broadcast reassembly queue head from node | 75 | * @reasm_buf: broadcast reassembly queue head from node |
| 76 | * @recv_permitted: true if node is allowed to receive b'cast messages | 76 | * @recv_permitted: true if node is allowed to receive b'cast messages |
| 77 | */ | 77 | */ |
| @@ -81,8 +81,7 @@ struct tipc_node_bclink { | |||
| 81 | u32 last_sent; | 81 | u32 last_sent; |
| 82 | u32 oos_state; | 82 | u32 oos_state; |
| 83 | u32 deferred_size; | 83 | u32 deferred_size; |
| 84 | struct sk_buff *deferred_head; | 84 | struct sk_buff_head deferred_queue; |
| 85 | struct sk_buff *deferred_tail; | ||
| 86 | struct sk_buff *reasm_buf; | 85 | struct sk_buff *reasm_buf; |
| 87 | bool recv_permitted; | 86 | bool recv_permitted; |
| 88 | }; | 87 | }; |
| @@ -100,7 +99,8 @@ struct tipc_node_bclink { | |||
| 100 | * @working_links: number of working links to node (both active and standby) | 99 | * @working_links: number of working links to node (both active and standby) |
| 101 | * @link_cnt: number of links to node | 100 | * @link_cnt: number of links to node |
| 102 | * @signature: node instance identifier | 101 | * @signature: node instance identifier |
| 103 | * @nsub: list of "node down" subscriptions monitoring node | 102 | * @link_id: local and remote bearer ids of changing link, if any |
| 103 | * @publ_list: list of publications | ||
| 104 | * @rcu: rcu struct for tipc_node | 104 | * @rcu: rcu struct for tipc_node |
| 105 | */ | 105 | */ |
| 106 | struct tipc_node { | 106 | struct tipc_node { |
| @@ -116,7 +116,8 @@ struct tipc_node { | |||
| 116 | int link_cnt; | 116 | int link_cnt; |
| 117 | int working_links; | 117 | int working_links; |
| 118 | u32 signature; | 118 | u32 signature; |
| 119 | struct list_head nsub; | 119 | u32 link_id; |
| 120 | struct list_head publ_list; | ||
| 120 | struct sk_buff_head waiting_sks; | 121 | struct sk_buff_head waiting_sks; |
| 121 | struct list_head conn_sks; | 122 | struct list_head conn_sks; |
| 122 | struct rcu_head rcu; | 123 | struct rcu_head rcu; |
| @@ -140,6 +141,8 @@ void tipc_node_unlock(struct tipc_node *node); | |||
| 140 | int tipc_node_add_conn(u32 dnode, u32 port, u32 peer_port); | 141 | int tipc_node_add_conn(u32 dnode, u32 port, u32 peer_port); |
| 141 | void tipc_node_remove_conn(u32 dnode, u32 port); | 142 | void tipc_node_remove_conn(u32 dnode, u32 port); |
| 142 | 143 | ||
| 144 | int tipc_nl_node_dump(struct sk_buff *skb, struct netlink_callback *cb); | ||
| 145 | |||
| 143 | static inline void tipc_node_lock(struct tipc_node *node) | 146 | static inline void tipc_node_lock(struct tipc_node *node) |
| 144 | { | 147 | { |
| 145 | spin_lock_bh(&node->lock); | 148 | spin_lock_bh(&node->lock); |
