On 02/07/2013 09:14 PM, Scott Talbert wrote:
> On Tue, 5 Feb 2013, Phil Dibowitz wrote:
> 
>> +    /*
>> +     * Subtract both TCP (4) and UDP (2) headers from pkt[0] which is
>> +     *  len - 1.  (len = pkt[0] + 1 - 6)
>> +     */
>> +    len = pkt[0] - 5;
>>
>> That comment uses 'len' to mean two different things... which is SUPER
>> confusing. I had to read that several times to parse it correctly.
> 
> I agree the comment is confusing now that I read it again.  :-)  Addressed 
> below.

Much better, thanks.

> Your understanding is close, but not quite right.  The size byte is included
> in the TCP header byte count, so payload size is really pkt[0] - TCP_HDR_SIZE
> - UDP_HDR_SIZE + 1.  Yes, the old code was just broken.  I don't think 'len'
> was actually ever used by the old code, so it didn't hurt anything.

Its much much clearer with the defines, thanks.

This patch is applied, thanks for your patience and work.

-- 
Phil Dibowitz                             p...@ipom.com
Open Source software and tech docs        Insanity Palace of Metallica
http://www.phildev.net/                   http://www.ipom.com/

"Be who you are and say what you feel, because those who mind don't matter
 and those who matter don't mind."
 - Dr. Seuss


Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
Own the Future-Intel(R) Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest. Compete 
for recognition, cash, and the chance to get your game on Steam. 
$5K grand prize plus 10 genre and skill prizes. Submit your demo 
by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2
_______________________________________________
concordance-devel mailing list
concordance-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/concordance-devel

Reply via email to