summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKinsey Moore <kinsey.moore@oarcorp.com>2021-12-15 09:11:22 -0600
committerJoel Sherrill <joel@rtems.org>2021-12-16 08:53:10 -0600
commitf4cf022ad48a054e9b568bbedb92c82969843c76 (patch)
treea3827c63671a39fdbd77e2f24b0bebc00ab06b37
parent25a883272ab87d7e551d68f55c38ea5e96710617 (diff)
downloadrtems-libbsd-6-freebsd-12.tar.bz2
Import arm64 in_cksum.h correctly6-freebsd-12
When this file was brought in, it came from the wrong location or freebsd-org hash. This corrects the file such that freebsd-to-rtems.py runs cleanly.
-rw-r--r--freebsd/sys/arm64/include/machine/in_cksum.h43
1 files changed, 6 insertions, 37 deletions
diff --git a/freebsd/sys/arm64/include/machine/in_cksum.h b/freebsd/sys/arm64/include/machine/in_cksum.h
index d55b838b..522ba005 100644
--- a/freebsd/sys/arm64/include/machine/in_cksum.h
+++ b/freebsd/sys/arm64/include/machine/in_cksum.h
@@ -1,6 +1,4 @@
/*-
- * SPDX-License-Identifier: BSD-3-Clause
- *
* Copyright (c) 1990 The Regents of the University of California.
* All rights reserved.
*
@@ -31,7 +29,6 @@
* from tahoe: in_cksum.c 1.2 86/01/05
* from: @(#)in_cksum.c 1.3 (Berkeley) 1/19/91
* from: Id: in_cksum.c,v 1.8 1995/12/03 18:35:19 bde Exp
- * from: src/sys/alpha/include/in_cksum.h,v 1.7 2005/03/02 21:33:20 joerg
* $FreeBSD$
*/
@@ -40,44 +37,16 @@
#include <sys/cdefs.h>
+#ifdef _KERNEL
#define in_cksum(m, len) in_cksum_skip(m, len, 0)
-
+u_short in_addword(u_short sum, u_short b);
+u_short in_cksum_skip(struct mbuf *m, int len, int skip);
+u_int do_cksum(const void *, int);
#if defined(IPVERSION) && (IPVERSION == 4)
-/*
- * It it useful to have an Internet checksum routine which is inlineable
- * and optimized specifically for the task of computing IP header checksums
- * in the normal case (where there are no options and the header length is
- * therefore always exactly five 32-bit words.
- */
-#ifdef __CC_SUPPORTS___INLINE
-
-static __inline void
-in_cksum_update(struct ip *ip)
-{
- int __tmpsum;
- __tmpsum = (int)ntohs(ip->ip_sum) + 256;
- ip->ip_sum = htons(__tmpsum + (__tmpsum >> 16));
-}
-
-#else
-
-#define in_cksum_update(ip) \
- do { \
- int __tmpsum; \
- __tmpsum = (int)ntohs(ip->ip_sum) + 256; \
- ip->ip_sum = htons(__tmpsum + (__tmpsum >> 16)); \
- } while(0)
-
-#endif
+u_int in_cksum_hdr(const struct ip *);
#endif
-#ifdef _KERNEL
-#if defined(IPVERSION) && (IPVERSION == 4)
-u_int in_cksum_hdr(const struct ip *ip);
-#endif
-u_short in_addword(u_short sum, u_short b);
u_short in_pseudo(u_int sum, u_int b, u_int c);
-u_short in_cksum_skip(struct mbuf *m, int len, int skip);
-#endif
+#endif /* _KERNEL */
#endif /* _MACHINE_IN_CKSUM_H_ */