diff options
Diffstat (limited to 'net/tipc/node.h')
| -rw-r--r-- | net/tipc/node.h | 37 |
1 files changed, 16 insertions, 21 deletions
diff --git a/net/tipc/node.h b/net/tipc/node.h index 0b1c5f8b6996..72561c971d67 100644 --- a/net/tipc/node.h +++ b/net/tipc/node.h | |||
| @@ -42,6 +42,11 @@ | |||
| 42 | #include "net.h" | 42 | #include "net.h" |
| 43 | #include "bearer.h" | 43 | #include "bearer.h" |
| 44 | 44 | ||
| 45 | /* | ||
| 46 | * Out-of-range value for node signature | ||
| 47 | */ | ||
| 48 | #define INVALID_NODE_SIG 0x10000 | ||
| 49 | |||
| 45 | /* Flags used to block (re)establishment of contact with a neighboring node */ | 50 | /* Flags used to block (re)establishment of contact with a neighboring node */ |
| 46 | 51 | ||
| 47 | #define WAIT_PEER_DOWN 0x0001 /* wait to see that peer's links are down */ | 52 | #define WAIT_PEER_DOWN 0x0001 /* wait to see that peer's links are down */ |
| @@ -61,13 +66,15 @@ | |||
| 61 | * @block_setup: bit mask of conditions preventing link establishment to node | 66 | * @block_setup: bit mask of conditions preventing link establishment to node |
| 62 | * @link_cnt: number of links to node | 67 | * @link_cnt: number of links to node |
| 63 | * @permit_changeover: non-zero if node has redundant links to this system | 68 | * @permit_changeover: non-zero if node has redundant links to this system |
| 69 | * @signature: node instance identifier | ||
| 64 | * @bclink: broadcast-related info | 70 | * @bclink: broadcast-related info |
| 71 | * @supportable: non-zero if node supports TIPC b'cast link capability | ||
| 65 | * @supported: non-zero if node supports TIPC b'cast capability | 72 | * @supported: non-zero if node supports TIPC b'cast capability |
| 66 | * @acked: sequence # of last outbound b'cast message acknowledged by node | 73 | * @acked: sequence # of last outbound b'cast message acknowledged by node |
| 67 | * @last_in: sequence # of last in-sequence b'cast message received from node | 74 | * @last_in: sequence # of last in-sequence b'cast message received from node |
| 68 | * @gap_after: sequence # of last message not requiring a NAK request | 75 | * @last_sent: sequence # of last b'cast message sent by node |
| 69 | * @gap_to: sequence # of last message requiring a NAK request | 76 | * @oos_state: state tracker for handling OOS b'cast messages |
| 70 | * @nack_sync: counter that determines when NAK requests should be sent | 77 | * @deferred_size: number of OOS b'cast messages in deferred queue |
| 71 | * @deferred_head: oldest OOS b'cast message received from node | 78 | * @deferred_head: oldest OOS b'cast message received from node |
| 72 | * @deferred_tail: newest OOS b'cast message received from node | 79 | * @deferred_tail: newest OOS b'cast message received from node |
| 73 | * @defragm: list of partially reassembled b'cast message fragments from node | 80 | * @defragm: list of partially reassembled b'cast message fragments from node |
| @@ -85,35 +92,23 @@ struct tipc_node { | |||
| 85 | int working_links; | 92 | int working_links; |
| 86 | int block_setup; | 93 | int block_setup; |
| 87 | int permit_changeover; | 94 | int permit_changeover; |
| 95 | u32 signature; | ||
| 88 | struct { | 96 | struct { |
| 89 | int supported; | 97 | u8 supportable; |
| 98 | u8 supported; | ||
| 90 | u32 acked; | 99 | u32 acked; |
| 91 | u32 last_in; | 100 | u32 last_in; |
| 92 | u32 gap_after; | 101 | u32 last_sent; |
| 93 | u32 gap_to; | 102 | u32 oos_state; |
| 94 | u32 nack_sync; | 103 | u32 deferred_size; |
| 95 | struct sk_buff *deferred_head; | 104 | struct sk_buff *deferred_head; |
| 96 | struct sk_buff *deferred_tail; | 105 | struct sk_buff *deferred_tail; |
| 97 | struct sk_buff *defragm; | 106 | struct sk_buff *defragm; |
| 98 | } bclink; | 107 | } bclink; |
| 99 | }; | 108 | }; |
| 100 | 109 | ||
| 101 | #define NODE_HTABLE_SIZE 512 | ||
| 102 | extern struct list_head tipc_node_list; | 110 | extern struct list_head tipc_node_list; |
| 103 | 111 | ||
| 104 | /* | ||
| 105 | * A trivial power-of-two bitmask technique is used for speed, since this | ||
| 106 | * operation is done for every incoming TIPC packet. The number of hash table | ||
| 107 | * entries has been chosen so that no hash chain exceeds 8 nodes and will | ||
| 108 | * usually be much smaller (typically only a single node). | ||
| 109 | */ | ||
| 110 | static inline unsigned int tipc_hashfn(u32 addr) | ||
| 111 | { | ||
| 112 | return addr & (NODE_HTABLE_SIZE - 1); | ||
| 113 | } | ||
| 114 | |||
| 115 | extern u32 tipc_own_tag; | ||
| 116 | |||
| 117 | struct tipc_node *tipc_node_find(u32 addr); | 112 | struct tipc_node *tipc_node_find(u32 addr); |
| 118 | struct tipc_node *tipc_node_create(u32 addr); | 113 | struct tipc_node *tipc_node_create(u32 addr); |
| 119 | void tipc_node_delete(struct tipc_node *n_ptr); | 114 | void tipc_node_delete(struct tipc_node *n_ptr); |
