aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/udp.h
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2011-03-17 03:44:08 -0400
committerPaul Mundt <lethal@linux-sh.org>2011-03-17 03:44:08 -0400
commit1d2a1959fe534279cf37aba20b08c24c20840e52 (patch)
tree67c0b9aa7fe22a44bf0b4af88947799203eb8f67 /include/net/udp.h
parent5a79ce76e9bb8f4b2cd8106ee36d15ee05013bcf (diff)
parent054cfaacf88865bff1dd58d305443d5d6c068a08 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into sh-latest
Diffstat (limited to 'include/net/udp.h')
-rw-r--r--include/net/udp.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/include/net/udp.h b/include/net/udp.h
index bb967dd59bf7..67ea6fcb3ec0 100644
--- a/include/net/udp.h
+++ b/include/net/udp.h
@@ -144,6 +144,17 @@ static inline __wsum udp_csum_outgoing(struct sock *sk, struct sk_buff *skb)
144 return csum; 144 return csum;
145} 145}
146 146
147static inline __wsum udp_csum(struct sk_buff *skb)
148{
149 __wsum csum = csum_partial(skb_transport_header(skb),
150 sizeof(struct udphdr), skb->csum);
151
152 for (skb = skb_shinfo(skb)->frag_list; skb; skb = skb->next) {
153 csum = csum_add(csum, skb->csum);
154 }
155 return csum;
156}
157
147/* hash routines shared between UDPv4/6 and UDP-Litev4/6 */ 158/* hash routines shared between UDPv4/6 and UDP-Litev4/6 */
148static inline void udp_lib_hash(struct sock *sk) 159static inline void udp_lib_hash(struct sock *sk)
149{ 160{
@@ -245,5 +256,5 @@ extern void udp4_proc_exit(void);
245extern void udp_init(void); 256extern void udp_init(void);
246 257
247extern int udp4_ufo_send_check(struct sk_buff *skb); 258extern int udp4_ufo_send_check(struct sk_buff *skb);
248extern struct sk_buff *udp4_ufo_fragment(struct sk_buff *skb, int features); 259extern struct sk_buff *udp4_ufo_fragment(struct sk_buff *skb, u32 features);
249#endif /* _UDP_H */ 260#endif /* _UDP_H */