aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2007-10-26 06:50:02 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-26 06:50:02 -0400
commit8c56a347c1dfbe384b1ffb65d8828faa36dbaea4 (patch)
tree44dfa8621b387fc76168db3858996466b278f38e /include
parentd892afe2ca905ddb00a4f16927c8b465cdd31b20 (diff)
parent24c667db59a9cc4caaafe4f77f6f4ef85899a454 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/acme/net-2.6
Diffstat (limited to 'include')
-rw-r--r--include/linux/dccp.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/linux/dccp.h b/include/linux/dccp.h
index f3fc4392e93d..333c3ea82a5d 100644
--- a/include/linux/dccp.h
+++ b/include/linux/dccp.h
@@ -144,6 +144,8 @@ enum dccp_reset_codes {
144 DCCP_RESET_CODE_TOO_BUSY, 144 DCCP_RESET_CODE_TOO_BUSY,
145 DCCP_RESET_CODE_BAD_INIT_COOKIE, 145 DCCP_RESET_CODE_BAD_INIT_COOKIE,
146 DCCP_RESET_CODE_AGGRESSION_PENALTY, 146 DCCP_RESET_CODE_AGGRESSION_PENALTY,
147
148 DCCP_MAX_RESET_CODES /* Leave at the end! */
147}; 149};
148 150
149/* DCCP options */ 151/* DCCP options */
@@ -270,10 +272,9 @@ static inline struct dccp_hdr *dccp_zeroed_hdr(struct sk_buff *skb, int headlen)
270 return memset(skb_transport_header(skb), 0, headlen); 272 return memset(skb_transport_header(skb), 0, headlen);
271} 273}
272 274
273static inline struct dccp_hdr_ext *dccp_hdrx(const struct sk_buff *skb) 275static inline struct dccp_hdr_ext *dccp_hdrx(const struct dccp_hdr *dh)
274{ 276{
275 return (struct dccp_hdr_ext *)(skb_transport_header(skb) + 277 return (struct dccp_hdr_ext *)((unsigned char *)dh + sizeof(*dh));
276 sizeof(struct dccp_hdr));
277} 278}
278 279
279static inline unsigned int __dccp_basic_hdr_len(const struct dccp_hdr *dh) 280static inline unsigned int __dccp_basic_hdr_len(const struct dccp_hdr *dh)
@@ -287,13 +288,12 @@ static inline unsigned int dccp_basic_hdr_len(const struct sk_buff *skb)
287 return __dccp_basic_hdr_len(dh); 288 return __dccp_basic_hdr_len(dh);
288} 289}
289 290
290static inline __u64 dccp_hdr_seq(const struct sk_buff *skb) 291static inline __u64 dccp_hdr_seq(const struct dccp_hdr *dh)
291{ 292{
292 const struct dccp_hdr *dh = dccp_hdr(skb);
293 __u64 seq_nr = ntohs(dh->dccph_seq); 293 __u64 seq_nr = ntohs(dh->dccph_seq);
294 294
295 if (dh->dccph_x != 0) 295 if (dh->dccph_x != 0)
296 seq_nr = (seq_nr << 32) + ntohl(dccp_hdrx(skb)->dccph_seq_low); 296 seq_nr = (seq_nr << 32) + ntohl(dccp_hdrx(dh)->dccph_seq_low);
297 else 297 else
298 seq_nr += (u32)dh->dccph_seq2 << 16; 298 seq_nr += (u32)dh->dccph_seq2 << 16;
299 299