Blame view
net/tipc/link.h
6.58 KB
b97bf3fd8 [TIPC] Initial merge |
1 2 |
/* * net/tipc/link.h: Include file for TIPC link code |
c43072852 [NET] TIPC: Fix w... |
3 |
* |
50100a5e3 tipc: use pseudo ... |
4 |
* Copyright (c) 1995-2006, 2013-2014, Ericsson AB |
23dd4cce3 tipc: Combine por... |
5 |
* Copyright (c) 2004-2005, 2010-2011, Wind River Systems |
b97bf3fd8 [TIPC] Initial merge |
6 7 |
* All rights reserved. * |
9ea1fd3c1 [TIPC] License he... |
8 |
* Redistribution and use in source and binary forms, with or without |
b97bf3fd8 [TIPC] Initial merge |
9 10 |
* modification, are permitted provided that the following conditions are met: * |
9ea1fd3c1 [TIPC] License he... |
11 12 13 14 15 16 17 18 |
* 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the names of the copyright holders nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. |
b97bf3fd8 [TIPC] Initial merge |
19 |
* |
9ea1fd3c1 [TIPC] License he... |
20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
* Alternatively, this software may be distributed under the terms of the * GNU General Public License ("GPL") version 2 as published by the Free * Software Foundation. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
b97bf3fd8 [TIPC] Initial merge |
34 35 36 37 38 |
* POSSIBILITY OF SUCH DAMAGE. */ #ifndef _TIPC_LINK_H #define _TIPC_LINK_H |
0655f6a86 tipc: add bearer ... |
39 |
#include <net/genetlink.h> |
b97bf3fd8 [TIPC] Initial merge |
40 |
#include "msg.h" |
b97bf3fd8 [TIPC] Initial merge |
41 |
#include "node.h" |
859fc7c0c tipc: cleanup cor... |
42 43 44 |
/* TIPC-specific error codes */ #define ELINKCONG EAGAIN /* link congestion <=> resource unavailable */ |
662921cd0 tipc: merge link-... |
45 |
/* Link FSM events: |
135daee6d tipc: redefine 's... |
46 |
*/ |
d3504c344 tipc: clean up de... |
47 |
enum { |
662921cd0 tipc: merge link-... |
48 49 50 51 52 53 54 55 |
LINK_ESTABLISH_EVT = 0xec1ab1e, LINK_PEER_RESET_EVT = 0x9eed0e, LINK_FAILURE_EVT = 0xfa110e, LINK_RESET_EVT = 0x10ca1d0e, LINK_FAILOVER_BEGIN_EVT = 0xfa110bee, LINK_FAILOVER_END_EVT = 0xfa110ede, LINK_SYNCH_BEGIN_EVT = 0xc1ccbee, LINK_SYNCH_END_EVT = 0xc1ccede |
d3504c344 tipc: clean up de... |
56 |
}; |
135daee6d tipc: redefine 's... |
57 |
|
d999297c3 tipc: reduce lock... |
58 |
/* Events returned from link at packet reception or at timeout |
6ab30f9cb tipc: improve lin... |
59 60 61 |
*/ enum { TIPC_LINK_UP_EVT = 1, |
526669866 tipc: let broadca... |
62 |
TIPC_LINK_DOWN_EVT = (1 << 1), |
02d11ca20 tipc: transfer br... |
63 |
TIPC_LINK_SND_STATE = (1 << 2) |
6ab30f9cb tipc: improve lin... |
64 |
}; |
135daee6d tipc: redefine 's... |
65 |
/* Starting value for maximum packet size negotiation on unicast links |
b97bf3fd8 [TIPC] Initial merge |
66 67 |
* (unless bearer MTU is less) */ |
b97bf3fd8 [TIPC] Initial merge |
68 |
#define MAX_PKT_DEFAULT 1500 |
c72fa872a tipc: eliminate l... |
69 |
bool tipc_link_create(struct net *net, char *if_name, int bearer_id, |
0e05498e9 tipc: make link i... |
70 |
int tolerance, char net_plane, u32 mtu, int priority, |
25b0b9c4e tipc: handle coll... |
71 72 |
int window, u32 session, u32 ownnode, u32 peer, u8 *peer_id, u16 peer_caps, |
526669866 tipc: let broadca... |
73 74 75 76 |
struct tipc_link *bc_sndlink, struct tipc_link *bc_rcvlink, struct sk_buff_head *inputq, struct sk_buff_head *namedq, |
440d8963c tipc: clean up li... |
77 |
struct tipc_link **link); |
c72fa872a tipc: eliminate l... |
78 |
bool tipc_link_bc_create(struct net *net, u32 ownnode, u32 peer, |
526669866 tipc: let broadca... |
79 80 |
int mtu, int window, u16 peer_caps, struct sk_buff_head *inputq, |
323019069 tipc: use explici... |
81 |
struct sk_buff_head *namedq, |
526669866 tipc: let broadca... |
82 |
struct tipc_link *bc_sndlink, |
323019069 tipc: use explici... |
83 |
struct tipc_link **link); |
6e498158a tipc: move link s... |
84 85 |
void tipc_link_tnl_prepare(struct tipc_link *l, struct tipc_link *tnl, int mtyp, struct sk_buff_head *xmitq); |
c140eb166 tipc: fix failove... |
86 87 |
void tipc_link_create_dummy_tnl_msg(struct tipc_link *tnl, struct sk_buff_head *xmitq); |
c0b14a085 tipc: fix missing... |
88 89 |
void tipc_link_failover_prepare(struct tipc_link *l, struct tipc_link *tnl, struct sk_buff_head *xmitq); |
282b3a056 tipc: send out RE... |
90 |
void tipc_link_build_reset_msg(struct tipc_link *l, struct sk_buff_head *xmitq); |
662921cd0 tipc: merge link-... |
91 |
int tipc_link_fsm_evt(struct tipc_link *l, int evt); |
662921cd0 tipc: merge link-... |
92 |
bool tipc_link_is_up(struct tipc_link *l); |
c81993009 tipc: update node... |
93 |
bool tipc_link_peer_is_down(struct tipc_link *l); |
662921cd0 tipc: merge link-... |
94 |
bool tipc_link_is_reset(struct tipc_link *l); |
73f646cec tipc: delay ESTAB... |
95 |
bool tipc_link_is_establishing(struct tipc_link *l); |
662921cd0 tipc: merge link-... |
96 97 98 |
bool tipc_link_is_synching(struct tipc_link *l); bool tipc_link_is_failingover(struct tipc_link *l); bool tipc_link_is_blocked(struct tipc_link *l); |
c72fa872a tipc: eliminate l... |
99 |
void tipc_link_set_active(struct tipc_link *l, bool active); |
1a90632da tipc: eliminate r... |
100 |
void tipc_link_reset(struct tipc_link *l); |
38206d593 tipc: narrow down... |
101 102 |
void tipc_link_reset_stats(struct tipc_link *l); int tipc_link_xmit(struct tipc_link *link, struct sk_buff_head *list, |
af9b028e2 tipc: make media ... |
103 |
struct sk_buff_head *xmitq); |
38206d593 tipc: narrow down... |
104 105 106 107 108 |
struct sk_buff_head *tipc_link_inputq(struct tipc_link *l); u16 tipc_link_rcv_nxt(struct tipc_link *l); u16 tipc_link_acked(struct tipc_link *l); u32 tipc_link_id(struct tipc_link *l); char *tipc_link_name(struct tipc_link *l); |
b4b9771bc tipc: enable trac... |
109 |
char *tipc_link_name_ext(struct tipc_link *l, char *buf); |
c140eb166 tipc: fix failove... |
110 |
u32 tipc_link_state(struct tipc_link *l); |
38206d593 tipc: narrow down... |
111 112 113 |
char tipc_link_plane(struct tipc_link *l); int tipc_link_prio(struct tipc_link *l); int tipc_link_window(struct tipc_link *l); |
9012de508 tipc: add sequenc... |
114 |
void tipc_link_update_caps(struct tipc_link *l, u16 capabilities); |
7ea817f4e tipc: check sessi... |
115 |
bool tipc_link_validate_msg(struct tipc_link *l, struct tipc_msg *hdr); |
38206d593 tipc: narrow down... |
116 |
unsigned long tipc_link_tolerance(struct tipc_link *l); |
d01332f1a tipc: fix link at... |
117 118 119 120 |
void tipc_link_set_tolerance(struct tipc_link *l, u32 tol, struct sk_buff_head *xmitq); void tipc_link_set_prio(struct tipc_link *l, u32 prio, struct sk_buff_head *xmitq); |
38206d593 tipc: narrow down... |
121 |
void tipc_link_set_abort_limit(struct tipc_link *l, u32 limit); |
2af5ae372 tipc: clean up un... |
122 |
void tipc_link_set_queue_limits(struct tipc_link *l, u32 window); |
5be9c0867 tipc: narrow down... |
123 124 |
int __tipc_nl_add_link(struct net *net, struct tipc_nl_msg *msg, struct tipc_link *link, int nlflags); |
0655f6a86 tipc: add bearer ... |
125 |
int tipc_nl_parse_link_prop(struct nlattr *prop, struct nlattr *props[]); |
333ef69ed tipc: simplify li... |
126 |
int tipc_link_timeout(struct tipc_link *l, struct sk_buff_head *xmitq); |
d999297c3 tipc: reduce lock... |
127 128 |
int tipc_link_rcv(struct tipc_link *l, struct sk_buff *skb, struct sk_buff_head *xmitq); |
34b9cd64c tipc: let first m... |
129 |
int tipc_link_build_state_msg(struct tipc_link *l, struct sk_buff_head *xmitq); |
526669866 tipc: let broadca... |
130 131 132 133 134 135 |
void tipc_link_add_bc_peer(struct tipc_link *snd_l, struct tipc_link *uc_l, struct sk_buff_head *xmitq); void tipc_link_remove_bc_peer(struct tipc_link *snd_l, struct tipc_link *rcv_l, struct sk_buff_head *xmitq); |
2f5661245 tipc: let broadca... |
136 |
int tipc_link_bc_peers(struct tipc_link *l); |
959e1781a tipc: introduce j... |
137 138 |
void tipc_link_set_mtu(struct tipc_link *l, int mtu); int tipc_link_mtu(struct tipc_link *l); |
526669866 tipc: let broadca... |
139 140 141 142 143 |
void tipc_link_bc_ack_rcv(struct tipc_link *l, u16 acked, struct sk_buff_head *xmitq); void tipc_link_build_bc_sync_msg(struct tipc_link *l, struct sk_buff_head *xmitq); void tipc_link_bc_init_rcv(struct tipc_link *l, struct tipc_msg *hdr); |
02d11ca20 tipc: transfer br... |
144 145 |
int tipc_link_bc_sync_rcv(struct tipc_link *l, struct tipc_msg *hdr, struct sk_buff_head *xmitq); |
526669866 tipc: let broadca... |
146 147 |
int tipc_link_bc_nack_rcv(struct tipc_link *l, struct sk_buff *skb, struct sk_buff_head *xmitq); |
26574db0c tipc: add trace_e... |
148 |
bool tipc_link_too_silent(struct tipc_link *l); |
b97bf3fd8 [TIPC] Initial merge |
149 |
#endif |