[Top][All Lists]

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

RE : [lwip-devel] IGMP patch to fix iphdr

From: Frédéric BERNON
Subject: RE : [lwip-devel] IGMP patch to fix iphdr
Date: Mon, 10 Mar 2008 15:13:06 +0100

I will take a look to your patch.
I think the first is correct (we already do that on some other pbuf_header calls).
For the second, to be honest, the HAVE_BITFIELDS option isn't used in the other parts of the lwIP code, so, I think it will be better to remove this part of the code.
For the use of htons, I don't have yet an explain, but no call to inet_chksum does it (icmp by example). So, it need some investigations.
Frédéric BERNON
Chef de projet informatique
Microsoft Certified Professional
Tél. : +33 (0)4-67-87-61-10
Fax. : +33 (0)4-67-70-85-44
Email : address@hiddenr
Web Site : http://www.hymatom.fr
P Avant d'imprimer, penser à l'environnement
-----Message d'origine-----
De : address@hidden [mailto:address@hidden De la part de Edward Kerekes
Envoyé : vendredi 7 mars 2008 21:47
À : address@hidden
Objet : [lwip-devel] IGMP patch to fix iphdr

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...





Attachment: Frédéric BERNON.vcf
Description: Frédéric BERNON.vcf

reply via email to

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