aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/sctp/structs.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/sctp/structs.h')
-rw-r--r--include/net/sctp/structs.h45
1 files changed, 36 insertions, 9 deletions
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index 6c24d9cd3d66..47727c7cc628 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -161,6 +161,9 @@ extern struct sctp_globals {
161 */ 161 */
162 int sndbuf_policy; 162 int sndbuf_policy;
163 163
164 /* Delayed SACK timeout 200ms default*/
165 int sack_timeout;
166
164 /* HB.interval - 30 seconds */ 167 /* HB.interval - 30 seconds */
165 int hb_interval; 168 int hb_interval;
166 169
@@ -217,6 +220,7 @@ extern struct sctp_globals {
217#define sctp_sndbuf_policy (sctp_globals.sndbuf_policy) 220#define sctp_sndbuf_policy (sctp_globals.sndbuf_policy)
218#define sctp_max_retrans_path (sctp_globals.max_retrans_path) 221#define sctp_max_retrans_path (sctp_globals.max_retrans_path)
219#define sctp_max_retrans_init (sctp_globals.max_retrans_init) 222#define sctp_max_retrans_init (sctp_globals.max_retrans_init)
223#define sctp_sack_timeout (sctp_globals.sack_timeout)
220#define sctp_hb_interval (sctp_globals.hb_interval) 224#define sctp_hb_interval (sctp_globals.hb_interval)
221#define sctp_max_instreams (sctp_globals.max_instreams) 225#define sctp_max_instreams (sctp_globals.max_instreams)
222#define sctp_max_outstreams (sctp_globals.max_outstreams) 226#define sctp_max_outstreams (sctp_globals.max_outstreams)
@@ -867,10 +871,13 @@ struct sctp_transport {
867 */ 871 */
868 unsigned long last_time_ecne_reduced; 872 unsigned long last_time_ecne_reduced;
869 873
870 /* active : The current active state of this destination, 874 /* The number of times INIT has been sent on this transport. */
871 * : i.e. DOWN, UP, etc. 875 int init_sent_count;
876
877 /* state : The current state of this destination,
878 * : i.e. SCTP_ACTIVE, SCTP_INACTIVE, SCTP_UNKOWN.
872 */ 879 */
873 int active; 880 int state;
874 881
875 /* hb_allowed : The current heartbeat state of this destination, 882 /* hb_allowed : The current heartbeat state of this destination,
876 * : i.e. ALLOW-HB, NO-HEARTBEAT, etc. 883 * : i.e. ALLOW-HB, NO-HEARTBEAT, etc.
@@ -1222,9 +1229,6 @@ struct sctp_endpoint {
1222 1229
1223 /* sendbuf acct. policy. */ 1230 /* sendbuf acct. policy. */
1224 __u32 sndbuf_policy; 1231 __u32 sndbuf_policy;
1225
1226 /* Name for debugging output... */
1227 char *debug_name;
1228}; 1232};
1229 1233
1230/* Recover the outter endpoint structure. */ 1234/* Recover the outter endpoint structure. */
@@ -1314,11 +1318,23 @@ struct sctp_association {
1314 * : association. Normally this information is 1318 * : association. Normally this information is
1315 * : hashed or keyed for quick lookup and access 1319 * : hashed or keyed for quick lookup and access
1316 * : of the TCB. 1320 * : of the TCB.
1321 * : The list is also initialized with the list
1322 * : of addresses passed with the sctp_connectx()
1323 * : call.
1317 * 1324 *
1318 * It is a list of SCTP_transport's. 1325 * It is a list of SCTP_transport's.
1319 */ 1326 */
1320 struct list_head transport_addr_list; 1327 struct list_head transport_addr_list;
1321 1328
1329 /* transport_count
1330 *
1331 * Peer : A count of the number of peer addresses
1332 * Transport : in the Peer Transport Address List.
1333 * Address :
1334 * Count :
1335 */
1336 __u16 transport_count;
1337
1322 /* port 1338 /* port
1323 * The transport layer port number. 1339 * The transport layer port number.
1324 */ 1340 */
@@ -1486,6 +1502,9 @@ struct sctp_association {
1486 /* Transport to which SHUTDOWN chunk was last sent. */ 1502 /* Transport to which SHUTDOWN chunk was last sent. */
1487 struct sctp_transport *shutdown_last_sent_to; 1503 struct sctp_transport *shutdown_last_sent_to;
1488 1504
1505 /* Transport to which INIT chunk was last sent. */
1506 struct sctp_transport *init_last_sent_to;
1507
1489 /* Next TSN : The next TSN number to be assigned to a new 1508 /* Next TSN : The next TSN number to be assigned to a new
1490 * : DATA chunk. This is sent in the INIT or INIT 1509 * : DATA chunk. This is sent in the INIT or INIT
1491 * : ACK chunk to the peer and incremented each 1510 * : ACK chunk to the peer and incremented each
@@ -1549,8 +1568,11 @@ struct sctp_association {
1549 /* The message size at which SCTP fragmentation will occur. */ 1568 /* The message size at which SCTP fragmentation will occur. */
1550 __u32 frag_point; 1569 __u32 frag_point;
1551 1570
1552 /* Currently only one counter is used to count INIT errors. */ 1571 /* Counter used to count INIT errors. */
1553 int counters[SCTP_NUMBER_COUNTERS]; 1572 int init_err_counter;
1573
1574 /* Count the number of INIT cycles (for doubling timeout). */
1575 int init_cycle;
1554 1576
1555 /* Default send parameters. */ 1577 /* Default send parameters. */
1556 __u16 default_stream; 1578 __u16 default_stream;
@@ -1708,6 +1730,8 @@ void sctp_association_free(struct sctp_association *);
1708void sctp_association_put(struct sctp_association *); 1730void sctp_association_put(struct sctp_association *);
1709void sctp_association_hold(struct sctp_association *); 1731void sctp_association_hold(struct sctp_association *);
1710 1732
1733struct sctp_transport *sctp_assoc_choose_init_transport(
1734 struct sctp_association *);
1711struct sctp_transport *sctp_assoc_choose_shutdown_transport( 1735struct sctp_transport *sctp_assoc_choose_shutdown_transport(
1712 struct sctp_association *); 1736 struct sctp_association *);
1713void sctp_assoc_update_retran_path(struct sctp_association *); 1737void sctp_assoc_update_retran_path(struct sctp_association *);
@@ -1717,9 +1741,12 @@ int sctp_assoc_lookup_laddr(struct sctp_association *asoc,
1717 const union sctp_addr *laddr); 1741 const union sctp_addr *laddr);
1718struct sctp_transport *sctp_assoc_add_peer(struct sctp_association *, 1742struct sctp_transport *sctp_assoc_add_peer(struct sctp_association *,
1719 const union sctp_addr *address, 1743 const union sctp_addr *address,
1720 const int gfp); 1744 const int gfp,
1745 const int peer_state);
1721void sctp_assoc_del_peer(struct sctp_association *asoc, 1746void sctp_assoc_del_peer(struct sctp_association *asoc,
1722 const union sctp_addr *addr); 1747 const union sctp_addr *addr);
1748void sctp_assoc_rm_peer(struct sctp_association *asoc,
1749 struct sctp_transport *peer);
1723void sctp_assoc_control_transport(struct sctp_association *, 1750void sctp_assoc_control_transport(struct sctp_association *,
1724 struct sctp_transport *, 1751 struct sctp_transport *,
1725 sctp_transport_cmd_t, sctp_sn_error_t); 1752 sctp_transport_cmd_t, sctp_sn_error_t);