[ECOS] Re: Can't Connect,TCP CHECKSUM INCORRECT

Grant Edwards grante@visi.com
Tue Oct 30 04:17:00 GMT 2007


On 2007-10-30, ariga masahiro <ariga@link-lab.co.jp> wrote:

> I traced TCP checksum routine,and I am not sure they are correct.

Oh please.

The BSD IP checksum routines have been used in hundreds of
different OSes and network stacks for _decades_.  They're
probably some of the most scrutinized routines on the planet.
They've been tested, examined, reviewed, and tuned by hundreds
of different people.

They are correct.

They are the de-fact _definition_ of what an IP checksum is.
They are the gold standard, the platinum sphere, the be-all and
end-all of IP checksum routines.

It took me _weeks_ of blood, sweat, and tears (not to mention
help from some other people far smarter than I) to come up with
an ARM assembly language routine that could match the
C-language BSD IP checksum routines in execution time.

The BSD routines work for everbody on the flippin' planet
except you, and you think your code is OK, and the BSD routines
are broken?  [Damn, to be young again...]

There's something wrong with your code.  

Really.

Trust me.

One thing you learn after a decade or two is that it's not the
compiler, it's not the library code, it's not the processor,
it's not the linker, it's _your_ code that's broken.  

Except for that one time out of a thousand when it isn't.

But this isn't one of those times.

-- 
Grant Edwards                   grante             Yow!  BARBARA STANWYCK
                                  at               makes me nervous!!
                               visi.com            


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list