Date: Fri, 26 May 2006 14:30:42 -0700 From: Julian Elischer <julian@elischer.org> To: Amit Mondal <amit.freebsd@gmail.com> Cc: freebsd-net@freebsd.org Subject: Re: TCP checksum Message-ID: <44777382.9070602@elischer.org> In-Reply-To: <a6cf19a10605261340i33e59d9aja8abab02ffacaa73@mail.gmail.com> References: <a6cf19a10605261340i33e59d9aja8abab02ffacaa73@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Amit Mondal wrote: > Hi, > > Could anyone pls tell me the function freebsd provides for calculating > TCP > checksum. > > What I am doing, I am sniffing packet using divert packet and changing > the > destination address of the packet. Now, since TCP checksum calculation > include Pseudo head (src dest IP ....) I need to recalculate TCP > checksum. > Is there any way to recalculate the checksum incrementally. look at libalias. (also check the port for the divert based daemon that does the mss fixup. I forget what it is called) if you change a few bytes in the packet you can change the checksum appropriatly without recalculating the whole thing. You should be able to find lots of examples from google, and I'm pretty sure libalias does it.. > > Thanks in advance. > > Rgds > -Amit > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44777382.9070602>