diff options
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r-- | include/linux/skbuff.h | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 83010231db99..0a8ea8b35816 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -1236,8 +1236,7 @@ extern unsigned int datagram_poll(struct file *file, struct socket *sock, | |||
1236 | extern int skb_copy_datagram_iovec(const struct sk_buff *from, | 1236 | extern int skb_copy_datagram_iovec(const struct sk_buff *from, |
1237 | int offset, struct iovec *to, | 1237 | int offset, struct iovec *to, |
1238 | int size); | 1238 | int size); |
1239 | extern int skb_copy_and_csum_datagram_iovec(const | 1239 | extern int skb_copy_and_csum_datagram_iovec(struct sk_buff *skb, |
1240 | struct sk_buff *skb, | ||
1241 | int hlen, | 1240 | int hlen, |
1242 | struct iovec *iov); | 1241 | struct iovec *iov); |
1243 | extern void skb_free_datagram(struct sock *sk, struct sk_buff *skb); | 1242 | extern void skb_free_datagram(struct sock *sk, struct sk_buff *skb); |
@@ -1305,6 +1304,30 @@ static inline void skb_set_timestamp(struct sk_buff *skb, const struct timeval * | |||
1305 | 1304 | ||
1306 | extern void __net_timestamp(struct sk_buff *skb); | 1305 | extern void __net_timestamp(struct sk_buff *skb); |
1307 | 1306 | ||
1307 | extern unsigned int __skb_checksum_complete(struct sk_buff *skb); | ||
1308 | |||
1309 | /** | ||
1310 | * skb_checksum_complete - Calculate checksum of an entire packet | ||
1311 | * @skb: packet to process | ||
1312 | * | ||
1313 | * This function calculates the checksum over the entire packet plus | ||
1314 | * the value of skb->csum. The latter can be used to supply the | ||
1315 | * checksum of a pseudo header as used by TCP/UDP. It returns the | ||
1316 | * checksum. | ||
1317 | * | ||
1318 | * For protocols that contain complete checksums such as ICMP/TCP/UDP, | ||
1319 | * this function can be used to verify that checksum on received | ||
1320 | * packets. In that case the function should return zero if the | ||
1321 | * checksum is correct. In particular, this function will return zero | ||
1322 | * if skb->ip_summed is CHECKSUM_UNNECESSARY which indicates that the | ||
1323 | * hardware has already verified the correctness of the checksum. | ||
1324 | */ | ||
1325 | static inline unsigned int skb_checksum_complete(struct sk_buff *skb) | ||
1326 | { | ||
1327 | return skb->ip_summed != CHECKSUM_UNNECESSARY && | ||
1328 | __skb_checksum_complete(skb); | ||
1329 | } | ||
1330 | |||
1308 | #ifdef CONFIG_NETFILTER | 1331 | #ifdef CONFIG_NETFILTER |
1309 | static inline void nf_conntrack_put(struct nf_conntrack *nfct) | 1332 | static inline void nf_conntrack_put(struct nf_conntrack *nfct) |
1310 | { | 1333 | { |