diff options
author | wollman <wollman@FreeBSD.org> | 1997-08-16 19:16:27 +0000 |
---|---|---|
committer | wollman <wollman@FreeBSD.org> | 1997-08-16 19:16:27 +0000 |
commit | 4542c1cf5d7077caf33d6d9468f5e647cd9d19e5 (patch) | |
tree | 69fd093ef1e8c080592999507b664fe6315c0e10 /sys/i386/include/in_cksum.h | |
parent | f4edc7fc6748272644fb845fc8636a5c261247d6 (diff) | |
download | FreeBSD-src-4542c1cf5d7077caf33d6d9468f5e647cd9d19e5.zip FreeBSD-src-4542c1cf5d7077caf33d6d9468f5e647cd9d19e5.tar.gz |
Fix all areas of the system (or at least all those in LINT) to avoid storing
socket addresses in mbufs. (Socket buffers are the one exception.) A number
of kernel APIs needed to get fixed in order to make this happen. Also,
fix three protocol families which kept PCBs in mbufs to not malloc them
instead. Delete some old compatibility cruft while we're at it, and add
some new routines in the in_cksum family.
Diffstat (limited to 'sys/i386/include/in_cksum.h')
-rw-r--r-- | sys/i386/include/in_cksum.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/i386/include/in_cksum.h b/sys/i386/include/in_cksum.h index 49932f5..acfa10d 100644 --- a/sys/i386/include/in_cksum.h +++ b/sys/i386/include/in_cksum.h @@ -33,7 +33,7 @@ * 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 - * $Id$ + * $Id: in_cksum.h,v 1.4 1997/02/22 09:34:42 peter Exp $ */ #ifndef _MACHINE_IN_CKSUM_H_ @@ -63,6 +63,9 @@ in_cksum_hdr(const struct ip *ip) ADDC(12); ADDC(16); MOP; +#undef ADD +#undef ADDC +#undef MOP sum = (sum & 0xffff) + (sum >> 16); if (sum > 0xffff) sum -= 0xffff; @@ -89,4 +92,10 @@ u_int in_cksum_hdr __P((const struct ip *)); #endif +typedef unsigned in_psum_t; +#ifdef KERNEL +in_psum_t in_cksum_partial(in_psum_t psum, const u_short *w, int len); +int in_cksum_finalize(in_psum_t psum); +#endif /* KERNEL */ + #endif /* _MACHINE_IN_CKSUM_H_ */ |