Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Sep 2001 22:40:26 -0500
From:      Matt Finlay <matt@ipperformance.com>
To:        Les Biffle <les@safety.net>, davep@afterswish.com, Alfred Perlstein <bright@mu.org>, hackers@FreeBSD.ORG
Subject:   Re: sendto not sending what I asked...
Message-ID:  <3BAAB6AA.9D7EDD99@ipperformance.com>
References:  <200109210250.f8L2oO615274@ns3.safety.net> <3BAAB547.C065FF97@ipperformance.com>

next in thread | previous in thread | raw e-mail | index | archive | help
come to think of it...  perhaps you are not calculating the tcp checksum
correctly because of the tcp/ip pseudo header.  i no longer have the code that
was posted, but thinking back i believe this might be the case.

Matt Finlay wrote:

> Les Biffle wrote:
>
> > >       pkt.ipbit.ip_sum=in_cksum((unsigned short*)(void*)&pkt,20);
> > >       pkt.tcpbit.th_sum=tcpsum(&pkt.ipbit);
> >
> > You need to do the TCP checksum first.  It changes the payload (the TCP
> > checksum).  The IP checksum includes all data, so must be done after the
> > payload changes are done.
>
> i think this is incorrect.  the IP checksum only includes the IP header and
> any IP options.  therefore order should not matter.
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-hackers" in the body of the message


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3BAAB6AA.9D7EDD99>