summaryrefslogtreecommitdiffstats
path: root/freebsd/sys/h8300/include/machine/in_cksum.h
diff options
context:
space:
mode:
Diffstat (limited to 'freebsd/sys/h8300/include/machine/in_cksum.h')
-rw-r--r--freebsd/sys/h8300/include/machine/in_cksum.h27
1 files changed, 14 insertions, 13 deletions
diff --git a/freebsd/sys/h8300/include/machine/in_cksum.h b/freebsd/sys/h8300/include/machine/in_cksum.h
index 25634a6e..37d88e2e 100644
--- a/freebsd/sys/h8300/include/machine/in_cksum.h
+++ b/freebsd/sys/h8300/include/machine/in_cksum.h
@@ -29,15 +29,16 @@
* 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$
*/
-#ifndef _MACHINE_IN_CKSUM_HH_
-#define _MACHINE_IN_CKSUM_HH_ 1
+#ifndef _MACHINE_IN_CKSUM_H_
+#define _MACHINE_IN_CKSUM_H_ 1
-#include <freebsd/sys/cdefs.h>
+#include <sys/cdefs.h>
-#define in_cksum(m, len) in_cksum_skip(m, len, 0)
+#define in_cksum(m, len) in_cksum_skip(m, len, 0)
/*
* It it useful to have an Internet checksum routine which is inlineable
@@ -57,20 +58,20 @@ in_cksum_update(struct ip *ip)
#else
-#define in_cksum_update(ip) \
- do { \
- int __tmpsum; \
- __tmpsum = (int)ntohs(ip->ip_sum) + 256; \
- ip->ip_sum = htons(__tmpsum + (__tmpsum >> 16)); \
+#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
#ifdef _KERNEL
u_int in_cksum_hdr(const struct ip *ip);
-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);
+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 /* _MACHINE_IN_CKSUM_HH_ */
+#endif /* _MACHINE_IN_CKSUM_H_ */