lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] IGMP patch to fix iphdr


From: Edward Kerekes
Subject: [lwip-devel] IGMP patch to fix iphdr
Date: Fri, 7 Mar 2008 15:46:33 -0500

Hello all,

 

While implementing IGMP multicast in my application, I found 3 rather minor things

that I would like to bring to your attention regarding the current HEAD

version of igmp.c.

 

1.         Line 353

This code is negating an unsigned number and gives the following warning:

Warning : C1853 : Unary minus operator applied to unsigned type.

This is a minor issue, but I suggest a cast to s16_t to fix this.

 

2.         Line 726  #ifdef HAVE_BITFIELDS

The code in both the if and else blocks doesn’t format the _v_hl_tos

field correctly.

 

I’m not sure exactly what the point of the first block of code was - but it is left

shifting by 16 and 24 on a 16-bit word - which doesn’t seem right.

 

I’m using the “else” block - see the code in my patch file that corrects this.

 

3.         There were a couple of other places that seemed to need the htons() macro. 

            My system is BIG_ENDIAN so it doesn’t affect me.

 

I have provided a patch file to show the details - I hope this helps...

 

My hat is off to both the IGMP contributor and all of the lwIP developers for this

great software!  The code seems well structured and easy to read. 

 

I had very little trouble upgrading from 1.1.0 and implementing some new

application features with multicast.  I’m using the sockets interface with a

proprietary non-preemptive multitasking system...

 

I have been running RC1.3.0 now for over a week and haven’t experienced any problems... 

Although my companies network doesn’t have any sophisticated routers...  There

are lots of PC’s and devices running, but I believe it’s all “local” routing - So not much

of the IGMP is being really tested yet.  It looks good with WireShark though...

 

Thanks again to all those involved...

Ed

 

 

 

Attachment: igmp1.txt
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]