diff options
Diffstat (limited to 'net/tipc/link.h')
| -rw-r--r-- | net/tipc/link.h | 57 |
1 files changed, 28 insertions, 29 deletions
diff --git a/net/tipc/link.h b/net/tipc/link.h index 3b6aa65b608c..8c0b49b5b2ee 100644 --- a/net/tipc/link.h +++ b/net/tipc/link.h | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * net/tipc/link.h: Include file for TIPC link code | 2 | * net/tipc/link.h: Include file for TIPC link code |
| 3 | * | 3 | * |
| 4 | * Copyright (c) 1995-2006, Ericsson AB | 4 | * Copyright (c) 1995-2006, 2013, Ericsson AB |
| 5 | * Copyright (c) 2004-2005, 2010-2011, Wind River Systems | 5 | * Copyright (c) 2004-2005, 2010-2011, Wind River Systems |
| 6 | * All rights reserved. | 6 | * All rights reserved. |
| 7 | * | 7 | * |
| @@ -40,27 +40,28 @@ | |||
| 40 | #include "msg.h" | 40 | #include "msg.h" |
| 41 | #include "node.h" | 41 | #include "node.h" |
| 42 | 42 | ||
| 43 | /* | 43 | /* Link reassembly status codes |
| 44 | * Link reassembly status codes | ||
| 45 | */ | 44 | */ |
| 46 | #define LINK_REASM_ERROR -1 | 45 | #define LINK_REASM_ERROR -1 |
| 47 | #define LINK_REASM_COMPLETE 1 | 46 | #define LINK_REASM_COMPLETE 1 |
| 48 | 47 | ||
| 49 | /* | 48 | /* Out-of-range value for link sequence numbers |
| 50 | * Out-of-range value for link sequence numbers | ||
| 51 | */ | 49 | */ |
| 52 | #define INVALID_LINK_SEQ 0x10000 | 50 | #define INVALID_LINK_SEQ 0x10000 |
| 53 | 51 | ||
| 54 | /* | 52 | /* Link working states |
| 55 | * Link states | ||
| 56 | */ | 53 | */ |
| 57 | #define WORKING_WORKING 560810u | 54 | #define WORKING_WORKING 560810u |
| 58 | #define WORKING_UNKNOWN 560811u | 55 | #define WORKING_UNKNOWN 560811u |
| 59 | #define RESET_UNKNOWN 560812u | 56 | #define RESET_UNKNOWN 560812u |
| 60 | #define RESET_RESET 560813u | 57 | #define RESET_RESET 560813u |
| 61 | 58 | ||
| 62 | /* | 59 | /* Link endpoint execution states |
| 63 | * Starting value for maximum packet size negotiation on unicast links | 60 | */ |
| 61 | #define LINK_STARTED 0x0001 | ||
| 62 | #define LINK_STOPPED 0x0002 | ||
| 63 | |||
| 64 | /* Starting value for maximum packet size negotiation on unicast links | ||
| 64 | * (unless bearer MTU is less) | 65 | * (unless bearer MTU is less) |
| 65 | */ | 66 | */ |
| 66 | #define MAX_PKT_DEFAULT 1500 | 67 | #define MAX_PKT_DEFAULT 1500 |
| @@ -102,8 +103,7 @@ struct tipc_stats { | |||
| 102 | * @media_addr: media address to use when sending messages over link | 103 | * @media_addr: media address to use when sending messages over link |
| 103 | * @timer: link timer | 104 | * @timer: link timer |
| 104 | * @owner: pointer to peer node | 105 | * @owner: pointer to peer node |
| 105 | * @link_list: adjacent links in bearer's list of links | 106 | * @flags: execution state flags for link endpoint instance |
| 106 | * @started: indicates if link has been started | ||
| 107 | * @checkpoint: reference point for triggering link continuity checking | 107 | * @checkpoint: reference point for triggering link continuity checking |
| 108 | * @peer_session: link session # being used by peer end of link | 108 | * @peer_session: link session # being used by peer end of link |
| 109 | * @peer_bearer_id: bearer id used by link's peer endpoint | 109 | * @peer_bearer_id: bearer id used by link's peer endpoint |
| @@ -149,10 +149,9 @@ struct tipc_link { | |||
| 149 | struct tipc_media_addr media_addr; | 149 | struct tipc_media_addr media_addr; |
| 150 | struct timer_list timer; | 150 | struct timer_list timer; |
| 151 | struct tipc_node *owner; | 151 | struct tipc_node *owner; |
| 152 | struct list_head link_list; | ||
| 153 | 152 | ||
| 154 | /* Management and link supervision data */ | 153 | /* Management and link supervision data */ |
| 155 | int started; | 154 | unsigned int flags; |
| 156 | u32 checkpoint; | 155 | u32 checkpoint; |
| 157 | u32 peer_session; | 156 | u32 peer_session; |
| 158 | u32 peer_bearer_id; | 157 | u32 peer_bearer_id; |
| @@ -215,10 +214,9 @@ struct tipc_port; | |||
| 215 | struct tipc_link *tipc_link_create(struct tipc_node *n_ptr, | 214 | struct tipc_link *tipc_link_create(struct tipc_node *n_ptr, |
| 216 | struct tipc_bearer *b_ptr, | 215 | struct tipc_bearer *b_ptr, |
| 217 | const struct tipc_media_addr *media_addr); | 216 | const struct tipc_media_addr *media_addr); |
| 218 | void tipc_link_delete(struct tipc_link *l_ptr); | 217 | void tipc_link_delete_list(unsigned int bearer_id, bool shutting_down); |
| 219 | void tipc_link_failover_send_queue(struct tipc_link *l_ptr); | 218 | void tipc_link_failover_send_queue(struct tipc_link *l_ptr); |
| 220 | void tipc_link_dup_send_queue(struct tipc_link *l_ptr, | 219 | void tipc_link_dup_queue_xmit(struct tipc_link *l_ptr, struct tipc_link *dest); |
| 221 | struct tipc_link *dest); | ||
| 222 | void tipc_link_reset_fragments(struct tipc_link *l_ptr); | 220 | void tipc_link_reset_fragments(struct tipc_link *l_ptr); |
| 223 | int tipc_link_is_up(struct tipc_link *l_ptr); | 221 | int tipc_link_is_up(struct tipc_link *l_ptr); |
| 224 | int tipc_link_is_active(struct tipc_link *l_ptr); | 222 | int tipc_link_is_active(struct tipc_link *l_ptr); |
| @@ -231,23 +229,24 @@ struct sk_buff *tipc_link_cmd_show_stats(const void *req_tlv_area, | |||
| 231 | struct sk_buff *tipc_link_cmd_reset_stats(const void *req_tlv_area, | 229 | struct sk_buff *tipc_link_cmd_reset_stats(const void *req_tlv_area, |
| 232 | int req_tlv_space); | 230 | int req_tlv_space); |
| 233 | void tipc_link_reset(struct tipc_link *l_ptr); | 231 | void tipc_link_reset(struct tipc_link *l_ptr); |
| 234 | int tipc_link_send(struct sk_buff *buf, u32 dest, u32 selector); | 232 | void tipc_link_reset_list(unsigned int bearer_id); |
| 235 | void tipc_link_send_names(struct list_head *message_list, u32 dest); | 233 | int tipc_link_xmit(struct sk_buff *buf, u32 dest, u32 selector); |
| 234 | void tipc_link_names_xmit(struct list_head *message_list, u32 dest); | ||
| 235 | int __tipc_link_xmit(struct tipc_link *l_ptr, struct sk_buff *buf); | ||
| 236 | int tipc_link_send_buf(struct tipc_link *l_ptr, struct sk_buff *buf); | 236 | int tipc_link_send_buf(struct tipc_link *l_ptr, struct sk_buff *buf); |
| 237 | u32 tipc_link_get_max_pkt(u32 dest, u32 selector); | 237 | u32 tipc_link_get_max_pkt(u32 dest, u32 selector); |
| 238 | int tipc_link_send_sections_fast(struct tipc_port *sender, | 238 | int tipc_link_iovec_xmit_fast(struct tipc_port *sender, |
| 239 | struct iovec const *msg_sect, | 239 | struct iovec const *msg_sect, |
| 240 | unsigned int len, u32 destnode); | 240 | unsigned int len, u32 destnode); |
| 241 | void tipc_link_recv_bundle(struct sk_buff *buf); | 241 | void tipc_link_bundle_rcv(struct sk_buff *buf); |
| 242 | int tipc_link_recv_fragment(struct sk_buff **reasm_head, | 242 | int tipc_link_frag_rcv(struct sk_buff **reasm_head, |
| 243 | struct sk_buff **reasm_tail, | 243 | struct sk_buff **reasm_tail, |
| 244 | struct sk_buff **fbuf); | 244 | struct sk_buff **fbuf); |
| 245 | void tipc_link_send_proto_msg(struct tipc_link *l_ptr, u32 msg_typ, int prob, | 245 | void tipc_link_proto_xmit(struct tipc_link *l_ptr, u32 msg_typ, int prob, |
| 246 | u32 gap, u32 tolerance, u32 priority, | 246 | u32 gap, u32 tolerance, u32 priority, u32 acked_mtu); |
| 247 | u32 acked_mtu); | ||
| 248 | void tipc_link_push_queue(struct tipc_link *l_ptr); | 247 | void tipc_link_push_queue(struct tipc_link *l_ptr); |
| 249 | u32 tipc_link_defer_pkt(struct sk_buff **head, struct sk_buff **tail, | 248 | u32 tipc_link_defer_pkt(struct sk_buff **head, struct sk_buff **tail, |
| 250 | struct sk_buff *buf); | 249 | struct sk_buff *buf); |
| 251 | void tipc_link_wakeup_ports(struct tipc_link *l_ptr, int all); | 250 | void tipc_link_wakeup_ports(struct tipc_link *l_ptr, int all); |
| 252 | void tipc_link_set_queue_limits(struct tipc_link *l_ptr, u32 window); | 251 | void tipc_link_set_queue_limits(struct tipc_link *l_ptr, u32 window); |
| 253 | void tipc_link_retransmit(struct tipc_link *l_ptr, | 252 | void tipc_link_retransmit(struct tipc_link *l_ptr, |
