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.h23
1 files changed, 22 insertions, 1 deletions
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index 7df327a6d56..ec86952fb57 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -60,7 +60,7 @@
60#include <linux/in6.h> /* We get struct in6_addr */ 60#include <linux/in6.h> /* We get struct in6_addr */
61#include <linux/ipv6.h> 61#include <linux/ipv6.h>
62#include <asm/param.h> /* We get MAXHOSTNAMELEN. */ 62#include <asm/param.h> /* We get MAXHOSTNAMELEN. */
63#include <asm/atomic.h> /* This gets us atomic counters. */ 63#include <linux/atomic.h> /* This gets us atomic counters. */
64#include <linux/skbuff.h> /* We need sk_buff_head. */ 64#include <linux/skbuff.h> /* We need sk_buff_head. */
65#include <linux/workqueue.h> /* We need tq_struct. */ 65#include <linux/workqueue.h> /* We need tq_struct. */
66#include <linux/sctp.h> /* We need sctp* header structs. */ 66#include <linux/sctp.h> /* We need sctp* header structs. */
@@ -205,6 +205,11 @@ extern struct sctp_globals {
205 * It is a list of sctp_sockaddr_entry. 205 * It is a list of sctp_sockaddr_entry.
206 */ 206 */
207 struct list_head local_addr_list; 207 struct list_head local_addr_list;
208 int default_auto_asconf;
209 struct list_head addr_waitq;
210 struct timer_list addr_wq_timer;
211 struct list_head auto_asconf_splist;
212 spinlock_t addr_wq_lock;
208 213
209 /* Lock that protects the local_addr_list writers */ 214 /* Lock that protects the local_addr_list writers */
210 spinlock_t addr_list_lock; 215 spinlock_t addr_list_lock;
@@ -236,6 +241,9 @@ extern struct sctp_globals {
236 * bits is an indicator of when to send and window update SACK. 241 * bits is an indicator of when to send and window update SACK.
237 */ 242 */
238 int rwnd_update_shift; 243 int rwnd_update_shift;
244
245 /* Threshold for autoclose timeout, in seconds. */
246 unsigned long max_autoclose;
239} sctp_globals; 247} sctp_globals;
240 248
241#define sctp_rto_initial (sctp_globals.rto_initial) 249#define sctp_rto_initial (sctp_globals.rto_initial)
@@ -264,6 +272,11 @@ extern struct sctp_globals {
264#define sctp_port_hashtable (sctp_globals.port_hashtable) 272#define sctp_port_hashtable (sctp_globals.port_hashtable)
265#define sctp_local_addr_list (sctp_globals.local_addr_list) 273#define sctp_local_addr_list (sctp_globals.local_addr_list)
266#define sctp_local_addr_lock (sctp_globals.addr_list_lock) 274#define sctp_local_addr_lock (sctp_globals.addr_list_lock)
275#define sctp_auto_asconf_splist (sctp_globals.auto_asconf_splist)
276#define sctp_addr_waitq (sctp_globals.addr_waitq)
277#define sctp_addr_wq_timer (sctp_globals.addr_wq_timer)
278#define sctp_addr_wq_lock (sctp_globals.addr_wq_lock)
279#define sctp_default_auto_asconf (sctp_globals.default_auto_asconf)
267#define sctp_scope_policy (sctp_globals.ipv4_scope_policy) 280#define sctp_scope_policy (sctp_globals.ipv4_scope_policy)
268#define sctp_addip_enable (sctp_globals.addip_enable) 281#define sctp_addip_enable (sctp_globals.addip_enable)
269#define sctp_addip_noauth (sctp_globals.addip_noauth_enable) 282#define sctp_addip_noauth (sctp_globals.addip_noauth_enable)
@@ -271,6 +284,7 @@ extern struct sctp_globals {
271#define sctp_auth_enable (sctp_globals.auth_enable) 284#define sctp_auth_enable (sctp_globals.auth_enable)
272#define sctp_checksum_disable (sctp_globals.checksum_disable) 285#define sctp_checksum_disable (sctp_globals.checksum_disable)
273#define sctp_rwnd_upd_shift (sctp_globals.rwnd_update_shift) 286#define sctp_rwnd_upd_shift (sctp_globals.rwnd_update_shift)
287#define sctp_max_autoclose (sctp_globals.max_autoclose)
274 288
275/* SCTP Socket type: UDP or TCP style. */ 289/* SCTP Socket type: UDP or TCP style. */
276typedef enum { 290typedef enum {
@@ -341,6 +355,8 @@ struct sctp_sock {
341 atomic_t pd_mode; 355 atomic_t pd_mode;
342 /* Receive to here while partial delivery is in effect. */ 356 /* Receive to here while partial delivery is in effect. */
343 struct sk_buff_head pd_lobby; 357 struct sk_buff_head pd_lobby;
358 struct list_head auto_asconf_list;
359 int do_auto_asconf;
344}; 360};
345 361
346static inline struct sctp_sock *sctp_sk(const struct sock *sk) 362static inline struct sctp_sock *sctp_sk(const struct sock *sk)
@@ -792,6 +808,8 @@ struct sctp_sockaddr_entry {
792 __u8 valid; 808 __u8 valid;
793}; 809};
794 810
811#define SCTP_ADDRESS_TICK_DELAY 500
812
795typedef struct sctp_chunk *(sctp_packet_phandler_t)(struct sctp_association *); 813typedef struct sctp_chunk *(sctp_packet_phandler_t)(struct sctp_association *);
796 814
797/* This structure holds lists of chunks as we are assembling for 815/* This structure holds lists of chunks as we are assembling for
@@ -1236,6 +1254,7 @@ sctp_scope_t sctp_scope(const union sctp_addr *);
1236int sctp_in_scope(const union sctp_addr *addr, const sctp_scope_t scope); 1254int sctp_in_scope(const union sctp_addr *addr, const sctp_scope_t scope);
1237int sctp_is_any(struct sock *sk, const union sctp_addr *addr); 1255int sctp_is_any(struct sock *sk, const union sctp_addr *addr);
1238int sctp_addr_is_valid(const union sctp_addr *addr); 1256int sctp_addr_is_valid(const union sctp_addr *addr);
1257int sctp_is_ep_boundall(struct sock *sk);
1239 1258
1240 1259
1241/* What type of endpoint? */ 1260/* What type of endpoint? */
@@ -1898,6 +1917,8 @@ struct sctp_association {
1898 * after reaching 4294967295. 1917 * after reaching 4294967295.
1899 */ 1918 */
1900 __u32 addip_serial; 1919 __u32 addip_serial;
1920 union sctp_addr *asconf_addr_del_pending;
1921 int src_out_of_asoc_ok;
1901 1922
1902 /* SCTP AUTH: list of the endpoint shared keys. These 1923 /* SCTP AUTH: list of the endpoint shared keys. These
1903 * keys are provided out of band by the user applicaton 1924 * keys are provided out of band by the user applicaton