sctp: Clean up TEST_FRAME hacks.
[safe/jmp/linux-2.6] / include / net / sctp / structs.h
index 535a18f..23f08fe 100644 (file)
@@ -218,6 +218,10 @@ extern struct sctp_globals {
 
        /* Flag to idicate if SCTP-AUTH is enabled */
        int auth_enable;
+
+       /* Flag to indicate whether computing and verifying checksum
+        * is disabled. */
+        int checksum_disable;
 } sctp_globals;
 
 #define sctp_rto_initial               (sctp_globals.rto_initial)
@@ -252,6 +256,7 @@ extern struct sctp_globals {
 #define sctp_addip_noauth              (sctp_globals.addip_noauth_enable)
 #define sctp_prsctp_enable             (sctp_globals.prsctp_enable)
 #define sctp_auth_enable               (sctp_globals.auth_enable)
+#define sctp_checksum_disable          (sctp_globals.checksum_disable)
 
 /* SCTP Socket type: UDP or TCP style. */
 typedef enum {
@@ -524,8 +529,7 @@ static inline void sctp_ssn_skip(struct sctp_stream *stream, __u16 id,
  */
 struct sctp_af {
        int             (*sctp_xmit)    (struct sk_buff *skb,
-                                        struct sctp_transport *,
-                                        int ipfragok);
+                                        struct sctp_transport *);
        int             (*setsockopt)   (struct sock *sk,
                                         int level,
                                         int optname,
@@ -732,20 +736,23 @@ struct sctp_chunk {
         */
        struct sk_buff *auth_chunk;
 
-       __u8 rtt_in_progress;   /* Is this chunk used for RTT calculation? */
-       __u8 resent;            /* Has this chunk ever been retransmitted. */
-       __u8 has_tsn;           /* Does this chunk have a TSN yet? */
-       __u8 has_ssn;           /* Does this chunk have a SSN yet? */
-       __u8 singleton;         /* Was this the only chunk in the packet? */
-       __u8 end_of_packet;     /* Was this the last chunk in the packet? */
-       __u8 ecn_ce_done;       /* Have we processed the ECN CE bit? */
-       __u8 pdiscard;          /* Discard the whole packet now? */
-       __u8 tsn_gap_acked;     /* Is this chunk acked by a GAP ACK? */
-       __s8 fast_retransmit;    /* Is this chunk fast retransmitted? */
-       __u8 tsn_missing_report; /* Data chunk missing counter. */
-       __u8 data_accepted;     /* At least 1 chunk in this packet accepted */
-       __u8 auth;              /* IN: was auth'ed | OUT: needs auth */
-       __u8 has_asconf;        /* IN: have seen an asconf before */
+#define SCTP_CAN_FRTX 0x0
+#define SCTP_NEED_FRTX 0x1
+#define SCTP_DONT_FRTX 0x2
+       __u16   rtt_in_progress:1,      /* This chunk used for RTT calc? */
+               resent:1,               /* Has this chunk ever been resent. */
+               has_tsn:1,              /* Does this chunk have a TSN yet? */
+               has_ssn:1,              /* Does this chunk have a SSN yet? */
+               singleton:1,            /* Only chunk in the packet? */
+               end_of_packet:1,        /* Last chunk in the packet? */
+               ecn_ce_done:1,          /* Have we processed the ECN CE bit? */
+               pdiscard:1,             /* Discard the whole packet now? */
+               tsn_gap_acked:1,        /* Is this chunk acked by a GAP ACK? */
+               data_accepted:1,        /* At least 1 chunk accepted */
+               auth:1,                 /* IN: was auth'ed | OUT: needs auth */
+               has_asconf:1,           /* IN: have seen an asconf before */
+               tsn_missing_report:2,   /* Data chunk missing counter. */
+               fast_retransmit:2;      /* Is this chunk fast retransmitted? */
 };
 
 void sctp_chunk_hold(struct sctp_chunk *);
@@ -903,8 +910,10 @@ struct sctp_transport {
         *              should be set. Every time the RTT
         *              calculation completes (i.e. the DATA chunk
         *              is SACK'd) clear this flag.
+        * hb_sent : a flag that signals that we have a pending heartbeat.
         */
        __u8 rto_pending;
+       __u8 hb_sent;
 
        /* Flag to track the current fast recovery state */
        __u8 fast_recovery;
@@ -1226,7 +1235,7 @@ int sctp_raw_to_bind_addrs(struct sctp_bind_addr *bp, __u8 *raw, int len,
 
 sctp_scope_t sctp_scope(const union sctp_addr *);
 int sctp_in_scope(const union sctp_addr *addr, const sctp_scope_t scope);
-int sctp_is_any(const union sctp_addr *addr);
+int sctp_is_any(struct sock *sk, const union sctp_addr *addr);
 int sctp_addr_is_valid(const union sctp_addr *addr);
 
 
@@ -1543,7 +1552,6 @@ struct sctp_association {
                 * in tsn_map--we get it by calling sctp_tsnmap_get_ctsn().
                 */
                struct sctp_tsnmap tsn_map;
-               __u8 _map[sctp_tsnmap_storage_size(SCTP_TSN_MAP_SIZE)];
 
                /* Ack State   : This flag indicates if the next received
                 *             : packet is to be responded to with a