diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2006-11-15 00:40:42 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-03 00:23:38 -0500 |
commit | b51655b958dfb1176bfcf99466231fdbef8751ff (patch) | |
tree | a53d0ec00d8db4169ba8c1c487fffbd34d6dde03 /include | |
parent | b1550f221255f7dd06048d832bf0f3d166840e1c (diff) |
[NET]: Annotate __skb_checksum_complete() and friends.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/netfilter.h | 6 | ||||
-rw-r--r-- | include/linux/netfilter_ipv4.h | 2 | ||||
-rw-r--r-- | include/linux/netfilter_ipv6.h | 2 | ||||
-rw-r--r-- | include/linux/skbuff.h | 2 | ||||
-rw-r--r-- | include/net/tcp.h | 2 | ||||
-rw-r--r-- | include/net/udp.h | 8 |
6 files changed, 11 insertions, 11 deletions
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h index b7e67d1d4382..707bb2e53c4e 100644 --- a/include/linux/netfilter.h +++ b/include/linux/netfilter.h | |||
@@ -290,7 +290,7 @@ extern u_int16_t nf_proto_csum_update(struct sk_buff *skb, | |||
290 | 290 | ||
291 | struct nf_afinfo { | 291 | struct nf_afinfo { |
292 | unsigned short family; | 292 | unsigned short family; |
293 | unsigned int (*checksum)(struct sk_buff *skb, unsigned int hook, | 293 | __sum16 (*checksum)(struct sk_buff *skb, unsigned int hook, |
294 | unsigned int dataoff, u_int8_t protocol); | 294 | unsigned int dataoff, u_int8_t protocol); |
295 | void (*saveroute)(const struct sk_buff *skb, | 295 | void (*saveroute)(const struct sk_buff *skb, |
296 | struct nf_info *info); | 296 | struct nf_info *info); |
@@ -305,12 +305,12 @@ static inline struct nf_afinfo *nf_get_afinfo(unsigned short family) | |||
305 | return rcu_dereference(nf_afinfo[family]); | 305 | return rcu_dereference(nf_afinfo[family]); |
306 | } | 306 | } |
307 | 307 | ||
308 | static inline unsigned int | 308 | static inline __sum16 |
309 | nf_checksum(struct sk_buff *skb, unsigned int hook, unsigned int dataoff, | 309 | nf_checksum(struct sk_buff *skb, unsigned int hook, unsigned int dataoff, |
310 | u_int8_t protocol, unsigned short family) | 310 | u_int8_t protocol, unsigned short family) |
311 | { | 311 | { |
312 | struct nf_afinfo *afinfo; | 312 | struct nf_afinfo *afinfo; |
313 | unsigned int csum = 0; | 313 | __sum16 csum = 0; |
314 | 314 | ||
315 | rcu_read_lock(); | 315 | rcu_read_lock(); |
316 | afinfo = nf_get_afinfo(family); | 316 | afinfo = nf_get_afinfo(family); |
diff --git a/include/linux/netfilter_ipv4.h b/include/linux/netfilter_ipv4.h index 5b63a231a76b..5821eb5a0a3e 100644 --- a/include/linux/netfilter_ipv4.h +++ b/include/linux/netfilter_ipv4.h | |||
@@ -79,7 +79,7 @@ enum nf_ip_hook_priorities { | |||
79 | #ifdef __KERNEL__ | 79 | #ifdef __KERNEL__ |
80 | extern int ip_route_me_harder(struct sk_buff **pskb, unsigned addr_type); | 80 | extern int ip_route_me_harder(struct sk_buff **pskb, unsigned addr_type); |
81 | extern int ip_xfrm_me_harder(struct sk_buff **pskb); | 81 | extern int ip_xfrm_me_harder(struct sk_buff **pskb); |
82 | extern unsigned int nf_ip_checksum(struct sk_buff *skb, unsigned int hook, | 82 | extern __sum16 nf_ip_checksum(struct sk_buff *skb, unsigned int hook, |
83 | unsigned int dataoff, u_int8_t protocol); | 83 | unsigned int dataoff, u_int8_t protocol); |
84 | #endif /*__KERNEL__*/ | 84 | #endif /*__KERNEL__*/ |
85 | 85 | ||
diff --git a/include/linux/netfilter_ipv6.h b/include/linux/netfilter_ipv6.h index d97e268cdfe5..ab81a6dc94ea 100644 --- a/include/linux/netfilter_ipv6.h +++ b/include/linux/netfilter_ipv6.h | |||
@@ -74,7 +74,7 @@ enum nf_ip6_hook_priorities { | |||
74 | 74 | ||
75 | #ifdef CONFIG_NETFILTER | 75 | #ifdef CONFIG_NETFILTER |
76 | extern int ip6_route_me_harder(struct sk_buff *skb); | 76 | extern int ip6_route_me_harder(struct sk_buff *skb); |
77 | extern unsigned int nf_ip6_checksum(struct sk_buff *skb, unsigned int hook, | 77 | extern __sum16 nf_ip6_checksum(struct sk_buff *skb, unsigned int hook, |
78 | unsigned int dataoff, u_int8_t protocol); | 78 | unsigned int dataoff, u_int8_t protocol); |
79 | 79 | ||
80 | extern int ipv6_netfilter_init(void); | 80 | extern int ipv6_netfilter_init(void); |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 874ca029fbb9..41753667541d 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -1398,7 +1398,7 @@ static inline void skb_set_timestamp(struct sk_buff *skb, const struct timeval * | |||
1398 | 1398 | ||
1399 | extern void __net_timestamp(struct sk_buff *skb); | 1399 | extern void __net_timestamp(struct sk_buff *skb); |
1400 | 1400 | ||
1401 | extern unsigned int __skb_checksum_complete(struct sk_buff *skb); | 1401 | extern __sum16 __skb_checksum_complete(struct sk_buff *skb); |
1402 | 1402 | ||
1403 | /** | 1403 | /** |
1404 | * skb_checksum_complete - Calculate checksum of an entire packet | 1404 | * skb_checksum_complete - Calculate checksum of an entire packet |
diff --git a/include/net/tcp.h b/include/net/tcp.h index 826aaecdb994..aa7989c53791 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -814,7 +814,7 @@ static inline __sum16 tcp_v4_check(struct tcphdr *th, int len, | |||
814 | return csum_tcpudp_magic(saddr,daddr,len,IPPROTO_TCP,base); | 814 | return csum_tcpudp_magic(saddr,daddr,len,IPPROTO_TCP,base); |
815 | } | 815 | } |
816 | 816 | ||
817 | static inline int __tcp_checksum_complete(struct sk_buff *skb) | 817 | static inline __sum16 __tcp_checksum_complete(struct sk_buff *skb) |
818 | { | 818 | { |
819 | return __skb_checksum_complete(skb); | 819 | return __skb_checksum_complete(skb); |
820 | } | 820 | } |
diff --git a/include/net/udp.h b/include/net/udp.h index 39e825a6909a..c5ccd9a3387b 100644 --- a/include/net/udp.h +++ b/include/net/udp.h | |||
@@ -69,15 +69,15 @@ struct sk_buff; | |||
69 | /* | 69 | /* |
70 | * Generic checksumming routines for UDP(-Lite) v4 and v6 | 70 | * Generic checksumming routines for UDP(-Lite) v4 and v6 |
71 | */ | 71 | */ |
72 | static inline u16 __udp_lib_checksum_complete(struct sk_buff *skb) | 72 | static inline __sum16 __udp_lib_checksum_complete(struct sk_buff *skb) |
73 | { | 73 | { |
74 | if (! UDP_SKB_CB(skb)->partial_cov) | 74 | if (! UDP_SKB_CB(skb)->partial_cov) |
75 | return __skb_checksum_complete(skb); | 75 | return __skb_checksum_complete(skb); |
76 | return csum_fold(skb_checksum(skb, 0, UDP_SKB_CB(skb)->cscov, | 76 | return csum_fold(skb_checksum(skb, 0, UDP_SKB_CB(skb)->cscov, |
77 | skb->csum)); | 77 | skb->csum)); |
78 | } | 78 | } |
79 | 79 | ||
80 | static __inline__ int udp_lib_checksum_complete(struct sk_buff *skb) | 80 | static inline __sum16 udp_lib_checksum_complete(struct sk_buff *skb) |
81 | { | 81 | { |
82 | return skb->ip_summed != CHECKSUM_UNNECESSARY && | 82 | return skb->ip_summed != CHECKSUM_UNNECESSARY && |
83 | __udp_lib_checksum_complete(skb); | 83 | __udp_lib_checksum_complete(skb); |