aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/sctp
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/sctp')
-rw-r--r--include/net/sctp/command.h1
-rw-r--r--include/net/sctp/constants.h3
-rw-r--r--include/net/sctp/sctp.h5
-rw-r--r--include/net/sctp/structs.h22
4 files changed, 18 insertions, 13 deletions
diff --git a/include/net/sctp/command.h b/include/net/sctp/command.h
index b8733364557f..c1f797673571 100644
--- a/include/net/sctp/command.h
+++ b/include/net/sctp/command.h
@@ -103,6 +103,7 @@ typedef enum {
103 SCTP_CMD_ASSOC_CHANGE, /* generate and send assoc_change event */ 103 SCTP_CMD_ASSOC_CHANGE, /* generate and send assoc_change event */
104 SCTP_CMD_ADAPTATION_IND, /* generate and send adaptation event */ 104 SCTP_CMD_ADAPTATION_IND, /* generate and send adaptation event */
105 SCTP_CMD_ASSOC_SHKEY, /* generate the association shared keys */ 105 SCTP_CMD_ASSOC_SHKEY, /* generate the association shared keys */
106 SCTP_CMD_T1_RETRAN, /* Mark for retransmission after T1 timeout */
106 SCTP_CMD_LAST 107 SCTP_CMD_LAST
107} sctp_verb_t; 108} sctp_verb_t;
108 109
diff --git a/include/net/sctp/constants.h b/include/net/sctp/constants.h
index da8354e8e33c..f30b537d6952 100644
--- a/include/net/sctp/constants.h
+++ b/include/net/sctp/constants.h
@@ -186,6 +186,8 @@ typedef enum {
186 SCTP_IERROR_AUTH_BAD_HMAC, 186 SCTP_IERROR_AUTH_BAD_HMAC,
187 SCTP_IERROR_AUTH_BAD_KEYID, 187 SCTP_IERROR_AUTH_BAD_KEYID,
188 SCTP_IERROR_PROTO_VIOLATION, 188 SCTP_IERROR_PROTO_VIOLATION,
189 SCTP_IERROR_ERROR,
190 SCTP_IERROR_ABORT,
189} sctp_ierror_t; 191} sctp_ierror_t;
190 192
191 193
@@ -407,6 +409,7 @@ typedef enum {
407 SCTP_RTXR_T3_RTX, 409 SCTP_RTXR_T3_RTX,
408 SCTP_RTXR_FAST_RTX, 410 SCTP_RTXR_FAST_RTX,
409 SCTP_RTXR_PMTUD, 411 SCTP_RTXR_PMTUD,
412 SCTP_RTXR_T1_RTX,
410} sctp_retransmit_reason_t; 413} sctp_retransmit_reason_t;
411 414
412/* Reasons to lower cwnd. */ 415/* Reasons to lower cwnd. */
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
index 93eb708609e7..34318a33a94c 100644
--- a/include/net/sctp/sctp.h
+++ b/include/net/sctp/sctp.h
@@ -65,7 +65,6 @@
65 65
66 66
67#ifdef TEST_FRAME 67#ifdef TEST_FRAME
68#undef CONFIG_PROC_FS
69#undef CONFIG_SCTP_DBG_OBJCNT 68#undef CONFIG_SCTP_DBG_OBJCNT
70#undef CONFIG_SYSCTL 69#undef CONFIG_SYSCTL
71#endif /* TEST_FRAME */ 70#endif /* TEST_FRAME */
@@ -267,6 +266,7 @@ enum
267 SCTP_MIB_T5_SHUTDOWN_GUARD_EXPIREDS, 266 SCTP_MIB_T5_SHUTDOWN_GUARD_EXPIREDS,
268 SCTP_MIB_DELAY_SACK_EXPIREDS, 267 SCTP_MIB_DELAY_SACK_EXPIREDS,
269 SCTP_MIB_AUTOCLOSE_EXPIREDS, 268 SCTP_MIB_AUTOCLOSE_EXPIREDS,
269 SCTP_MIB_T1_RETRANSMITS,
270 SCTP_MIB_T3_RETRANSMITS, 270 SCTP_MIB_T3_RETRANSMITS,
271 SCTP_MIB_PMTUD_RETRANSMITS, 271 SCTP_MIB_PMTUD_RETRANSMITS,
272 SCTP_MIB_FAST_RETRANSMITS, 272 SCTP_MIB_FAST_RETRANSMITS,
@@ -664,6 +664,9 @@ static inline int sctp_vtag_hashfn(__u16 lport, __u16 rport, __u32 vtag)
664 return (h & (sctp_assoc_hashsize-1)); 664 return (h & (sctp_assoc_hashsize-1));
665} 665}
666 666
667#define sctp_for_each_hentry(epb, node, head) \
668 hlist_for_each_entry(epb, node, head, node)
669
667/* Is a socket of this style? */ 670/* Is a socket of this style? */
668#define sctp_style(sk, style) __sctp_style((sk), (SCTP_SOCKET_##style)) 671#define sctp_style(sk, style) __sctp_style((sk), (SCTP_SOCKET_##style))
669static inline int __sctp_style(const struct sock *sk, sctp_socket_type_t style) 672static inline int __sctp_style(const struct sock *sk, sctp_socket_type_t style)
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index ef892e00c833..eb3113c38a94 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -100,20 +100,19 @@ struct crypto_hash;
100struct sctp_bind_bucket { 100struct sctp_bind_bucket {
101 unsigned short port; 101 unsigned short port;
102 unsigned short fastreuse; 102 unsigned short fastreuse;
103 struct sctp_bind_bucket *next; 103 struct hlist_node node;
104 struct sctp_bind_bucket **pprev;
105 struct hlist_head owner; 104 struct hlist_head owner;
106}; 105};
107 106
108struct sctp_bind_hashbucket { 107struct sctp_bind_hashbucket {
109 spinlock_t lock; 108 spinlock_t lock;
110 struct sctp_bind_bucket *chain; 109 struct hlist_head chain;
111}; 110};
112 111
113/* Used for hashing all associations. */ 112/* Used for hashing all associations. */
114struct sctp_hashbucket { 113struct sctp_hashbucket {
115 rwlock_t lock; 114 rwlock_t lock;
116 struct sctp_ep_common *chain; 115 struct hlist_head chain;
117} __attribute__((__aligned__(8))); 116} __attribute__((__aligned__(8)));
118 117
119 118
@@ -212,6 +211,7 @@ extern struct sctp_globals {
212 211
213 /* Flag to indicate if addip is enabled. */ 212 /* Flag to indicate if addip is enabled. */
214 int addip_enable; 213 int addip_enable;
214 int addip_noauth_enable;
215 215
216 /* Flag to indicate if PR-SCTP is enabled. */ 216 /* Flag to indicate if PR-SCTP is enabled. */
217 int prsctp_enable; 217 int prsctp_enable;
@@ -249,6 +249,7 @@ extern struct sctp_globals {
249#define sctp_local_addr_list (sctp_globals.local_addr_list) 249#define sctp_local_addr_list (sctp_globals.local_addr_list)
250#define sctp_local_addr_lock (sctp_globals.addr_list_lock) 250#define sctp_local_addr_lock (sctp_globals.addr_list_lock)
251#define sctp_addip_enable (sctp_globals.addip_enable) 251#define sctp_addip_enable (sctp_globals.addip_enable)
252#define sctp_addip_noauth (sctp_globals.addip_noauth_enable)
252#define sctp_prsctp_enable (sctp_globals.prsctp_enable) 253#define sctp_prsctp_enable (sctp_globals.prsctp_enable)
253#define sctp_auth_enable (sctp_globals.auth_enable) 254#define sctp_auth_enable (sctp_globals.auth_enable)
254 255
@@ -873,10 +874,11 @@ struct sctp_transport {
873 * address list derived from the INIT or INIT ACK chunk, a 874 * address list derived from the INIT or INIT ACK chunk, a
874 * number of data elements needs to be maintained including: 875 * number of data elements needs to be maintained including:
875 */ 876 */
876 __u32 rtt; /* This is the most recent RTT. */
877
878 /* RTO : The current retransmission timeout value. */ 877 /* RTO : The current retransmission timeout value. */
879 unsigned long rto; 878 unsigned long rto;
879 unsigned long last_rto;
880
881 __u32 rtt; /* This is the most recent RTT. */
880 882
881 /* RTTVAR : The current RTT variation. */ 883 /* RTTVAR : The current RTT variation. */
882 __u32 rttvar; 884 __u32 rttvar;
@@ -1184,9 +1186,7 @@ int sctp_bind_addr_copy(struct sctp_bind_addr *dest,
1184 int flags); 1186 int flags);
1185int sctp_add_bind_addr(struct sctp_bind_addr *, union sctp_addr *, 1187int sctp_add_bind_addr(struct sctp_bind_addr *, union sctp_addr *,
1186 __u8 use_as_src, gfp_t gfp); 1188 __u8 use_as_src, gfp_t gfp);
1187int sctp_del_bind_addr(struct sctp_bind_addr *, union sctp_addr *, 1189int sctp_del_bind_addr(struct sctp_bind_addr *, union sctp_addr *);
1188 void fastcall (*rcu_call)(struct rcu_head *,
1189 void (*func)(struct rcu_head *)));
1190int sctp_bind_addr_match(struct sctp_bind_addr *, const union sctp_addr *, 1190int sctp_bind_addr_match(struct sctp_bind_addr *, const union sctp_addr *,
1191 struct sctp_sock *); 1191 struct sctp_sock *);
1192union sctp_addr *sctp_find_unmatch_addr(struct sctp_bind_addr *bp, 1192union sctp_addr *sctp_find_unmatch_addr(struct sctp_bind_addr *bp,
@@ -1229,8 +1229,7 @@ typedef enum {
1229 1229
1230struct sctp_ep_common { 1230struct sctp_ep_common {
1231 /* Fields to help us manage our entries in the hash tables. */ 1231 /* Fields to help us manage our entries in the hash tables. */
1232 struct sctp_ep_common *next; 1232 struct hlist_node node;
1233 struct sctp_ep_common **pprev;
1234 int hashent; 1233 int hashent;
1235 1234
1236 /* Runtime type information. What kind of endpoint is this? */ 1235 /* Runtime type information. What kind of endpoint is this? */
@@ -1541,7 +1540,6 @@ struct sctp_association {
1541 __u8 asconf_capable; /* Does peer support ADDIP? */ 1540 __u8 asconf_capable; /* Does peer support ADDIP? */
1542 __u8 prsctp_capable; /* Can peer do PR-SCTP? */ 1541 __u8 prsctp_capable; /* Can peer do PR-SCTP? */
1543 __u8 auth_capable; /* Is peer doing SCTP-AUTH? */ 1542 __u8 auth_capable; /* Is peer doing SCTP-AUTH? */
1544 __u8 addip_capable; /* Can peer do ADD-IP */
1545 1543
1546 __u32 adaptation_ind; /* Adaptation Code point. */ 1544 __u32 adaptation_ind; /* Adaptation Code point. */
1547 1545