[TIPC]: Fix headercheck wrt. tipc_config.h
[linux-2.6-block.git] / include / linux / dccp.h
index 4ed82e2c9f6588d1e152854068dfa46d5a1155cc..333c3ea82a5ddc8d044a59d817a38b344eaae7d2 100644 (file)
@@ -144,6 +144,8 @@ enum dccp_reset_codes {
        DCCP_RESET_CODE_TOO_BUSY,
        DCCP_RESET_CODE_BAD_INIT_COOKIE,
        DCCP_RESET_CODE_AGGRESSION_PENALTY,
+
+       DCCP_MAX_RESET_CODES            /* Leave at the end!  */
 };
 
 /* DCCP options */
@@ -202,6 +204,7 @@ struct dccp_so_feat {
 #define DCCP_SOCKOPT_SERVICE           2
 #define DCCP_SOCKOPT_CHANGE_L          3
 #define DCCP_SOCKOPT_CHANGE_R          4
+#define DCCP_SOCKOPT_GET_CUR_MPS       5
 #define DCCP_SOCKOPT_SEND_CSCOV                10
 #define DCCP_SOCKOPT_RECV_CSCOV                11
 #define DCCP_SOCKOPT_CCID_RX_INFO      128
@@ -269,10 +272,9 @@ static inline struct dccp_hdr *dccp_zeroed_hdr(struct sk_buff *skb, int headlen)
        return memset(skb_transport_header(skb), 0, headlen);
 }
 
-static inline struct dccp_hdr_ext *dccp_hdrx(const struct sk_buff *skb)
+static inline struct dccp_hdr_ext *dccp_hdrx(const struct dccp_hdr *dh)
 {
-       return (struct dccp_hdr_ext *)(skb_transport_header(skb) +
-                                      sizeof(struct dccp_hdr));
+       return (struct dccp_hdr_ext *)((unsigned char *)dh + sizeof(*dh));
 }
 
 static inline unsigned int __dccp_basic_hdr_len(const struct dccp_hdr *dh)
@@ -286,13 +288,12 @@ static inline unsigned int dccp_basic_hdr_len(const struct sk_buff *skb)
        return __dccp_basic_hdr_len(dh);
 }
 
-static inline __u64 dccp_hdr_seq(const struct sk_buff *skb)
+static inline __u64 dccp_hdr_seq(const struct dccp_hdr *dh)
 {
-       const struct dccp_hdr *dh = dccp_hdr(skb);
        __u64 seq_nr =  ntohs(dh->dccph_seq);
 
        if (dh->dccph_x != 0)
-               seq_nr = (seq_nr << 32) + ntohl(dccp_hdrx(skb)->dccph_seq_low);
+               seq_nr = (seq_nr << 32) + ntohl(dccp_hdrx(dh)->dccph_seq_low);
        else
                seq_nr += (u32)dh->dccph_seq2 << 16;
 
@@ -390,7 +391,6 @@ struct dccp_opt_pend {
        struct dccp_opt_conf    *dccpop_sc;
 };
 
-extern void __dccp_minisock_init(struct dccp_minisock *dmsk);
 extern void dccp_minisock_init(struct dccp_minisock *dmsk);
 
 extern int dccp_parse_options(struct sock *sk, struct sk_buff *skb);