don't we all love functions implemented in header files? was under #ifdef
_KERNEL at least.
incremental checksum updates don't really make sense any more, this is
incredibly hard to get right, and doesn't fit the way our kernel deals
with the checksums these days. consequently, nothing uses in_cksum_addword
any more.
was on tech for 3 months, tested by & discussed with many.
-/* $OpenBSD: in.h,v 1.102 2014/01/23 01:10:42 naddy Exp $ */
+/* $OpenBSD: in.h,v 1.103 2014/04/20 09:30:56 henning Exp $ */
/* $NetBSD: in.h,v 1.20 1996/02/13 23:41:47 christos Exp $ */
/*
return (sum);
}
-/*
- * in_cksum_addword:
- *
- * Add the two 16-bit network-order values, carry, and return.
- */
-static __inline u_int16_t __attribute__((__unused__))
-in_cksum_addword(u_int16_t a, u_int16_t b)
-{
- u_int32_t sum = a + b;
-
- if (sum > 0xffff)
- sum -= 0xffff;
-
- return (sum);
-}
-
extern int inetctlerrmap[];
extern struct ifqueue ipintrq; /* ip packet input queue */
extern struct in_addr zeroin_addr;