]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - include/net/sctp/structs.h
[SCTP]: Verify all the paths to a peer via heartbeat before using them.
[net-next-2.6.git] / include / net / sctp / structs.h
index 072f407848a6fe1464a77a4d2bd1f47a052e6e40..268f2e19ccbb08535feb8f7e1f3cc2ab961982ff 100644 (file)
@@ -445,6 +445,7 @@ typedef struct sctp_sender_hb_info {
        struct sctp_paramhdr param_hdr;
        union sctp_addr daddr;
        unsigned long sent_at;
+       __u64 hb_nonce;
 } __attribute__((packed)) sctp_sender_hb_info_t;
 
 /*
@@ -514,6 +515,16 @@ struct sctp_af {
                                         int optname,
                                         char __user *optval,
                                         int __user *optlen);
+       int             (*compat_setsockopt)    (struct sock *sk,
+                                        int level,
+                                        int optname,
+                                        char __user *optval,
+                                        int optlen);
+       int             (*compat_getsockopt)    (struct sock *sk,
+                                        int level,
+                                        int optname,
+                                        char __user *optval,
+                                        int __user *optlen);
        struct dst_entry *(*get_dst)    (struct sctp_association *asoc,
                                         union sctp_addr *daddr,
                                         union sctp_addr *saddr);
@@ -545,7 +556,8 @@ struct sctp_af {
        int             (*to_addr_param) (const union sctp_addr *,
                                          union sctp_addr_param *); 
        int             (*addr_valid)   (union sctp_addr *,
-                                        struct sctp_sock *);
+                                        struct sctp_sock *,
+                                        const struct sk_buff *);
        sctp_scope_t    (*scope) (union sctp_addr *);
        void            (*inaddr_any)   (union sctp_addr *, unsigned short);
        int             (*is_any)       (const union sctp_addr *);
@@ -702,6 +714,7 @@ struct sctp_chunk {
        __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 */
 };
 
 void sctp_chunk_hold(struct sctp_chunk *);
@@ -972,6 +985,9 @@ struct sctp_transport {
                 */
                char cacc_saw_newack;
        } cacc;
+
+       /* 64-bit random number sent with heartbeat. */
+       __u64 hb_nonce;
 };
 
 struct sctp_transport *sctp_transport_new(const union sctp_addr *,