summaryrefslogtreecommitdiff
path: root/sys/netinet/in.h
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2014-04-20 09:38:20 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2014-04-20 09:38:20 +0000
commitadd004b744839a7a868e7b2de5ef0a3f889342ea (patch)
tree206c084348549327e5fa586e2a8a66e15dced076 /sys/netinet/in.h
parent56da17954f94ab53677b6f0822846c65e64a7485 (diff)
move in_cksum_phdr from in.h (under #ifdef _KERNEL, at least) to ip_output.c
nothing except in_proto_cksum_out() uses it any more, and that's a good thing. was on tech for 3 months, discussed with many
Diffstat (limited to 'sys/netinet/in.h')
-rw-r--r--sys/netinet/in.h33
1 files changed, 1 insertions, 32 deletions
diff --git a/sys/netinet/in.h b/sys/netinet/in.h
index ab8b7649bb8..ac51100f3de 100644
--- a/sys/netinet/in.h
+++ b/sys/netinet/in.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: in.h,v 1.103 2014/04/20 09:30:56 henning Exp $ */
+/* $OpenBSD: in.h,v 1.104 2014/04/20 09:38:19 henning Exp $ */
/* $NetBSD: in.h,v 1.20 1996/02/13 23:41:47 christos Exp $ */
/*
@@ -777,37 +777,6 @@ __END_DECLS
#endif
#else
-/*
- * in_cksum_phdr:
- *
- * Compute significant parts of the IPv4 checksum pseudo-header
- * for use in a delayed TCP/UDP checksum calculation.
- *
- * Args:
- *
- * src Source IP address
- * dst Destination IP address
- * lenproto htons(proto-hdr-len + proto-number)
- */
-static __inline u_int16_t __attribute__((__unused__))
-in_cksum_phdr(u_int32_t src, u_int32_t dst, u_int32_t lenproto)
-{
- u_int32_t sum;
-
- sum = lenproto +
- (u_int16_t)(src >> 16) +
- (u_int16_t)(src /*& 0xffff*/) +
- (u_int16_t)(dst >> 16) +
- (u_int16_t)(dst /*& 0xffff*/);
-
- sum = (u_int16_t)(sum >> 16) + (u_int16_t)(sum /*& 0xffff*/);
-
- if (sum > 0xffff)
- sum -= 0xffff;
-
- return (sum);
-}
-
extern int inetctlerrmap[];
extern struct ifqueue ipintrq; /* ip packet input queue */
extern struct in_addr zeroin_addr;