in6_cksum.c (65637) | in6_cksum.c (78064) |
---|---|
1/* $FreeBSD: head/sys/netinet6/in6_cksum.c 65637 2000-09-09 15:56:46Z itojun $ */ 2/* $KAME: in6_cksum.c,v 1.9 2000/09/09 15:33:31 itojun Exp $ */ | 1/* $FreeBSD: head/sys/netinet6/in6_cksum.c 78064 2001-06-11 12:39:29Z ume $ */ 2/* $KAME: in6_cksum.c,v 1.10 2000/12/03 00:53:59 itojun Exp $ */ |
3 4/* 5 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions 10 * are met: --- 76 unchanged lines hidden (view full) --- 87 * m MUST contain a continuous IP6 header. 88 * off is a offset where TCP/UDP/ICMP6 header starts. 89 * len is a total length of a transport segment. 90 * (e.g. TCP header + TCP payload) 91 */ 92 93int 94in6_cksum(m, nxt, off, len) | 3 4/* 5 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions 10 * are met: --- 76 unchanged lines hidden (view full) --- 87 * m MUST contain a continuous IP6 header. 88 * off is a offset where TCP/UDP/ICMP6 header starts. 89 * len is a total length of a transport segment. 90 * (e.g. TCP header + TCP payload) 91 */ 92 93int 94in6_cksum(m, nxt, off, len) |
95 register struct mbuf *m; | 95 struct mbuf *m; |
96 u_int8_t nxt; 97 u_int32_t off, len; 98{ | 96 u_int8_t nxt; 97 u_int32_t off, len; 98{ |
99 register u_int16_t *w; 100 register int sum = 0; 101 register int mlen = 0; | 99 u_int16_t *w; 100 int sum = 0; 101 int mlen = 0; |
102 int byte_swapped = 0; 103#if 0 104 int srcifid = 0, dstifid = 0; 105#endif 106 struct ip6_hdr *ip6; 107 union { 108 u_int16_t phs[4]; 109 struct { --- 212 unchanged lines hidden --- | 102 int byte_swapped = 0; 103#if 0 104 int srcifid = 0, dstifid = 0; 105#endif 106 struct ip6_hdr *ip6; 107 union { 108 u_int16_t phs[4]; 109 struct { --- 212 unchanged lines hidden --- |