Merge branch 'topic/core-cleanup' into for-linus
[safe/jmp/linux-2.6] / include / net / sctp / structs.h
index a48d80e..219043a 100644 (file)
@@ -231,6 +231,11 @@ extern struct sctp_globals {
        /* Flag to indicate whether computing and verifying checksum
         * is disabled. */
         int checksum_disable;
+
+       /* Threshold for rwnd update SACKS.  Receive buffer shifted this many
+        * bits is an indicator of when to send and window update SACK.
+        */
+       int rwnd_update_shift;
 } sctp_globals;
 
 #define sctp_rto_initial               (sctp_globals.rto_initial)
@@ -267,6 +272,7 @@ extern struct sctp_globals {
 #define sctp_prsctp_enable             (sctp_globals.prsctp_enable)
 #define sctp_auth_enable               (sctp_globals.auth_enable)
 #define sctp_checksum_disable          (sctp_globals.checksum_disable)
+#define sctp_rwnd_upd_shift            (sctp_globals.rwnd_update_shift)
 
 /* SCTP Socket type: UDP or TCP style. */
 typedef enum {
@@ -544,7 +550,7 @@ struct sctp_af {
                                         int level,
                                         int optname,
                                         char __user *optval,
-                                        int optlen);
+                                        unsigned int optlen);
        int             (*getsockopt)   (struct sock *sk,
                                         int level,
                                         int optname,
@@ -554,7 +560,7 @@ struct sctp_af {
                                         int level,
                                         int optname,
                                         char __user *optval,
-                                        int optlen);
+                                        unsigned int optlen);
        int             (*compat_getsockopt)    (struct sock *sk,
                                         int level,
                                         int optname,
@@ -772,6 +778,7 @@ int sctp_user_addto_chunk(struct sctp_chunk *chunk, int off, int len,
                          struct iovec *data);
 void sctp_chunk_free(struct sctp_chunk *);
 void  *sctp_addto_chunk(struct sctp_chunk *, int len, const void *data);
+void  *sctp_addto_chunk_fixed(struct sctp_chunk *, int len, const void *data);
 struct sctp_chunk *sctp_chunkify(struct sk_buff *,
                                 const struct sctp_association *,
                                 struct sock *);
@@ -893,7 +900,6 @@ struct sctp_transport {
         */
        /* RTO         : The current retransmission timeout value.  */
        unsigned long rto;
-       unsigned long last_rto;
 
        __u32 rtt;              /* This is the most recent RTT.  */
 
@@ -936,6 +942,8 @@ struct sctp_transport {
        /* Data that has been sent, but not acknowledged. */
        __u32 flight_size;
 
+       __u32 burst_limited;    /* Holds old cwnd when max.burst is applied */
+
        /* TSN marking the fast recovery exit point */
        __u32 fast_recovery_exit;
 
@@ -944,12 +952,6 @@ struct sctp_transport {
        /* Source address. */
        union sctp_addr saddr;
 
-       /* When was the last time(in jiffies) that a data packet was sent on
-        * this transport?  This is used to adjust the cwnd when the transport
-        * becomes inactive.
-        */
-       unsigned long last_time_used;
-
        /* Heartbeat interval: The endpoint sends out a Heartbeat chunk to
         * the destination address every heartbeat interval.
         */
@@ -988,7 +990,7 @@ struct sctp_transport {
        int init_sent_count;
 
        /* state       : The current state of this destination,
-        *             : i.e. SCTP_ACTIVE, SCTP_INACTIVE, SCTP_UNKOWN.
+        *             : i.e. SCTP_ACTIVE, SCTP_INACTIVE, SCTP_UNKNOWN.
         */
        int state;
 
@@ -1008,6 +1010,9 @@ struct sctp_transport {
        /* Heartbeat timer is per destination. */
        struct timer_list hb_timer;
 
+       /* Timer to handle ICMP proto unreachable envets */
+       struct timer_list proto_unreach_timer;
+
        /* Since we're using per-destination retransmission timers
         * (see above), we're also using per-destination "transmitted"
         * queues.  This probably ought to be a private struct
@@ -1070,6 +1075,8 @@ void sctp_transport_put(struct sctp_transport *);
 void sctp_transport_update_rto(struct sctp_transport *, __u32);
 void sctp_transport_raise_cwnd(struct sctp_transport *, __u32, __u32);
 void sctp_transport_lower_cwnd(struct sctp_transport *, sctp_lower_cwnd_t);
+void sctp_transport_burst_limited(struct sctp_transport *);
+void sctp_transport_burst_reset(struct sctp_transport *);
 unsigned long sctp_transport_timeout(struct sctp_transport *);
 void sctp_transport_reset(struct sctp_transport *);
 void sctp_transport_update_pmtu(struct sctp_transport *, u32);
@@ -1568,13 +1575,13 @@ struct sctp_association {
                __u32   sack_cnt;
 
                /* These are capabilities which our peer advertised.  */
-               __u8    ecn_capable;     /* Can peer do ECN? */
-               __u8    ipv4_address;    /* Peer understands IPv4 addresses? */
-               __u8    ipv6_address;    /* Peer understands IPv6 addresses? */
-               __u8    hostname_address;/* Peer understands DNS addresses? */
-               __u8    asconf_capable;  /* Does peer support ADDIP? */
-               __u8    prsctp_capable;  /* Can peer do PR-SCTP? */
-               __u8    auth_capable;    /* Is peer doing SCTP-AUTH? */
+               __u8    ecn_capable:1,      /* Can peer do ECN? */
+                       ipv4_address:1,     /* Peer understands IPv4 addresses? */
+                       ipv6_address:1,     /* Peer understands IPv6 addresses? */
+                       hostname_address:1, /* Peer understands DNS addresses? */
+                       asconf_capable:1,   /* Does peer support ADDIP? */
+                       prsctp_capable:1,   /* Can peer do PR-SCTP? */
+                       auth_capable:1;     /* Is peer doing SCTP-AUTH? */
 
                __u32   adaptation_ind;  /* Adaptation Code point. */
 
@@ -1913,11 +1920,8 @@ struct sctp_association {
 
        __u16 active_key_id;
 
-       /* Need to send an ECNE Chunk? */
-       char need_ecne;
-
-       /* Is it a temporary association? */
-       char temp;
+       __u8 need_ecne:1,       /* Need to send an ECNE Chunk? */
+            temp:1;            /* Is it a temporary association? */
 };
 
 
@@ -1983,7 +1987,7 @@ void sctp_assoc_set_primary(struct sctp_association *,
 void sctp_assoc_del_nonprimary_peers(struct sctp_association *,
                                    struct sctp_transport *);
 int sctp_assoc_set_bind_addr_from_ep(struct sctp_association *,
-                                    gfp_t);
+                                    sctp_scope_t, gfp_t);
 int sctp_assoc_set_bind_addr_from_cookie(struct sctp_association *,
                                         struct sctp_cookie*,
                                         gfp_t gfp);