xref: /haiku/src/libs/compat/freebsd_network/compat/machine/in_cksum.h (revision dba28784c21beab5d397068303881fe024a76859)
1 /*
2  * Copyright 2007, Axel Dörfler, axeld@pinc-software.de. All Rights Reserved.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef _FBSD_COMPAT_MACHINE_IN_CKSUM_H_
6 #define _FBSD_COMPAT_MACHINE_IN_CKSUM_H_
7 
8 
9 #include <stdint.h>
10 
11 
12 #define in_cksum(m, len)	in_cksum_skip(m, len, 0)
13 
14 
15 static inline u_short
in_pseudo(u_int sum,u_int b,u_int c)16 in_pseudo(u_int sum, u_int b, u_int c)
17 {
18 	// should never be called
19 	panic("in_pseudo() called");
20 	return 0;
21 }
22 
23 
24 static inline u_short
in_cksum_skip(struct mbuf * m,int len,int skip)25 in_cksum_skip(struct mbuf* m, int len, int skip)
26 {
27 	// should never be called
28 	panic("in_cksum_skip() called");
29 	return 0;
30 }
31 
32 #endif	/* _FBSD_COMPAT_MACHINE_IN_CKSUM_H_ */
33