Changeset View
Changeset View
Standalone View
Standalone View
sys/amd64/include/in_cksum.h
Show All 31 Lines | |||||
* from: @(#)in_cksum.c 1.3 (Berkeley) 1/19/91 | * 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: Id: in_cksum.c,v 1.8 1995/12/03 18:35:19 bde Exp | ||||
* $FreeBSD$ | * $FreeBSD$ | ||||
*/ | */ | ||||
#ifndef _MACHINE_IN_CKSUM_H_ | #ifndef _MACHINE_IN_CKSUM_H_ | ||||
#define _MACHINE_IN_CKSUM_H_ 1 | #define _MACHINE_IN_CKSUM_H_ 1 | ||||
#ifndef _SYS_CDEFS_H_ | |||||
#error this file needs sys/cdefs.h as a prerequisite | |||||
#endif | |||||
#include <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) | ||||
#ifdef _KERNEL | #ifdef _KERNEL | ||||
#if defined(IPVERSION) && (IPVERSION == 4) | #if defined(IPVERSION) && (IPVERSION == 4) | ||||
u_int in_cksum_hdr(const struct ip *ip); | u_int in_cksum_hdr(const struct ip *ip); | ||||
#endif | #endif | ||||
u_short in_addword(u_short sum, u_short b); | 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_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_cksum_skip(struct mbuf *m, int len, int skip); | ||||
#endif | #endif | ||||
#endif /* _MACHINE_IN_CKSUM_H_ */ | #endif /* _MACHINE_IN_CKSUM_H_ */ |