Porting lwIP

classic Classic list List threaded Threaded
23 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Porting lwIP

Matthias Weisser
Hi

I plan to port lwIP to my embedded system. My question is now if I understand all the requirements. I think I have to:

1. Write a sys_arch.c and implement the functions as documented in sys_arch.txt
2. Write a cc.h, perf.h and sys_arch.h with the typedefs, macros, ... named in sys_arch.txt
3. Extend the functions in ethernetif.c to send an receive ethernet packages

I am currently able to send and receive ethernet packages without problems. Is it possible to run ethernetif_output() and ethernetif_input() in different threads (besides hardware issues)?

Anything else I have overseen? Is there a preferred way to integrate the new files into the directory structure of lwIP?


Regards,

Matthias Weisser



_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

RE: Porting lwIP

Goldschmidt Simon
Hi,

> I am currently able to send and receive ethernet packages
> without problems. Is it possible to run ethernetif_output()
> and ethernetif_input() in different threads (besides hardware issues)?

For that you have to set SYS_LIGHTWEIGHT_PROT to 1 so that the MEMP
pools are protected from concurrent access.
And beware that you don't call core functions (everything not in
src/api, except inet.c pbuf.c, sys.c and stats.c)
from multiple threads at a time.
I'm guessing you want to have the sockets API. In that case, start the
core processing thread by calling
tcpip_init() (that thread will call netif->output() later) and start a
rx-thread which pulls packets off
the MAC into pbufs calling netif->input() (which must be tcpip_input()
or tcpip_ethinput()).
Then you create application threads wich can call the functions in
api.h/socket.h/netifapi.h

Doing that you should be thread-safe :-)

(I'm writing this in detail since I don't think we have enough
documentation about this, yet.)

>
> Anything else I have overseen? Is there a preferred way to
> integrate the new files into the directory structure of lwIP?

You'd normally have a directory outside of the main lwip directory.
Other than that, it's up to you.
You only have to provide a directory (which you must include in your
compiler's search path) that provides
the 'arch' directory where cc.h/perf.h/sys_arch.h reside.

Hope that helps,

Simon.


_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Problem with sending packets with a LPC2368 and lwIP

Spies, Dominik
In reply to this post by Matthias Weisser
Hallo!

I posted some pronlems regarding DHCP yesterday, and now I found out
that DHCP works fine, it's not the problem.
I use this port of FreeRTOS and lwIP:
http://www.sirsydom.de/permalinks/MCB2300FreeRTOSlwIP.rar (Originally
from Yahoo Groups LPC2000 Group File Section)

So the problem is the following:
When connected to a PC with a 10/100MBit Hub or Switch the Devvice
operates at 100MBit. If so, somehow packets that should have been sent
by the decice out on the netowrk never reach the network. E.g. Ping
replies or TCP traffic. But not all Traffic is lost (some ping replies
are recieved..) and TCP works also after some retransmissions. DHCP
works *always* correct, it seems. ARP Requests (Answers on ARP Requests)
are also not answered.
That doesn't mean the device or the lwIP Stack does something wrong or
displays errors. The send function returns 0, The TX Status registers
are correct (show no errors).

The strange thing is that *some* ping replies are recieved by the PC..
About 5-10%, sometimes up to 50%..

What is even stranger:
When I connect via Cross-Link Cable directly or use a 10Mbit Hub all
works great..

Does anyone have some hints for me where I can continue searching for
the error? I have no more ideas..

Kind Regards,

Dominik


_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

RE: Problem with sending packets with a LPC2368 and lwIP

Goldschmidt Simon

> Hallo!

Hello!

> [...]
> What is even stranger:
> When I connect via Cross-Link Cable directly or use a 10Mbit
> Hub all works great..
>
> Does anyone have some hints for me where I can continue
> searching for the error? I have no more ideas..

To me it seems you might somehow have mixed half duplex / full duplex
devices.
That would explain why it works with a direct cross link connection...


Simon


_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

RE: Problem with sending packets with a LPC2368 and lwIP

Spies, Dominik
 Thanks, was a good hint.
I found out that it was not Full/Half-Duplex but it is the 100MBit Mode.
Somehow one of my Ethernet-NICs used 10MBit while connected by
Cross-Link as default - when I set it to use 100MBit, the described
errors also occure while connected with CrossLink..

So now I just need to find out why 100Mbit is not working..

Dominik

-----Original Message-----
From: lwip-users-bounces+dominik.spies=[hidden email]
[mailto:lwip-users-bounces+dominik.spies=[hidden email]] On
Behalf Of Goldschmidt Simon
Sent: Mittwoch, 16. Mai 2007 11:10
To: Mailing list for lwIP users
Subject: RE: [lwip-users] Problem with sending packets with a LPC2368
and lwIP


> Hallo!

Hello!

> [...]
> What is even stranger:
> When I connect via Cross-Link Cable directly or use a 10Mbit
> Hub all works great..
>
> Does anyone have some hints for me where I can continue
> searching for the error? I have no more ideas..

To me it seems you might somehow have mixed half duplex / full duplex
devices.
That would explain why it works with a direct cross link connection...


Simon


_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users


_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

RE: Problem with sending packets with a LPC2368 and lwIP

Spies, Dominik
In reply to this post by Goldschmidt Simon
Hi,

It seems to be that my prcessroe is somehow buggy. The reason why packet
do not arrive while in 100Mbit Mode is that these packets are mostly
invalid (driver drops them..). Under Linux i can see the error-counter
increasing in ifconfig.
I have not ethernet analyzer, but my guess is that the device maybe
calculates the CRC-Checksum wrong.
When i run the procesor at 48MHz all works great..

-----Original Message-----
From: lwip-users-bounces+dominik.spies=[hidden email]
[mailto:lwip-users-bounces+dominik.spies=[hidden email]] On
Behalf Of Goldschmidt Simon
Sent: Mittwoch, 16. Mai 2007 11:10
To: Mailing list for lwIP users
Subject: RE: [lwip-users] Problem with sending packets with a LPC2368
and lwIP


> Hallo!

Hello!

> [...]
> What is even stranger:
> When I connect via Cross-Link Cable directly or use a 10Mbit
> Hub all works great..
>
> Does anyone have some hints for me where I can continue
> searching for the error? I have no more ideas..

To me it seems you might somehow have mixed half duplex / full duplex
devices.
That would explain why it works with a direct cross link connection...


Simon


_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users


_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

APIPA / AutoIP / Zeroconf / RFC 3927 Module

Spies, Dominik
In reply to this post by Goldschmidt Simon
Hi!

Additional to DHCP I need a APIPA configuration if no DHCP is there for
my application.

So did one ever try to or succesfull implement such feature in lwIP ?

My idea is to integrate this in the dhcp module, because interaction is
very close..

What do you think?

Regards,

Dominik


_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

RE: Problem with sending packets with a LPC2368 and lwIP

Kieran Mansley
In reply to this post by Spies, Dominik
On Fri, 2007-05-18 at 11:23 +0200, Spies, Dominik wrote:

> When i run the procesor at 48MHz all works great..

I'd do that then.  Glad you have a solution.

Kieran



_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

RE : APIPA / AutoIP / Zeroconf / RFC 3927 Module

Frédéric BERNON
In reply to this post by Spies, Dominik
In my project, I have to enable something like in these three scenarios:

1/ dhcp only (netif never up if no dhcp is available)
2/ autoip only
3/ dhcp with fallback on autoip if no dhcp response before a defined timeout.

But in my case, because it's just to avoid to never up, 2/ & 3/ implementations are very "simples" : the thread which exec the dhcp_start() just poll the netif's ip address until it changes, or until a timeout, and in this last case, just do a dhcp_stop() and direct set to the netif a static AUTOIP address (I don't even check if the autoip is already used, even if it's not a big job...). Of course, all that is done in my port level (where I add my interfaces, etc...)

Do you intend to share your autoip feature, or is it just for you? If you want to share it, I suggest you to add autoip.h/.c files, and not just patch dhcp, because like this, people which only want a autoip device without dhcp (or the inverse) could got a smaller footprint...

To check if the Autoip is already used, look how DHCP_DOES_ARP_CHECK is implemented (each ARP reply on a interface is handle by dhcp_arp_reply(), which "decline" the IP is the interface is always in DHCP_CHECKING state).

If you want some help, tell me, I would like to improve my current "implementation"...

 
====================================
Frédéric BERNON
HYMATOM SA
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 : [hidden email]
Web Site : http://www.hymatom.fr 
====================================
P Avant d'imprimer, penser à l'environnement
 


-----Message d'origine-----
De : lwip-users-bounces+frederic.bernon=[hidden email] [mailto:lwip-users-bounces+frederic.bernon=[hidden email]] De la part de Spies, Dominik
Envoyé : vendredi 18 mai 2007 11:28
À : Mailing list for lwIP users
Objet : [lwip-users] APIPA / AutoIP / Zeroconf / RFC 3927 Module


Hi!

Additional to DHCP I need a APIPA configuration if no DHCP is there for my application.

So did one ever try to or succesfull implement such feature in lwIP ?

My idea is to integrate this in the dhcp module, because interaction is very close..

What do you think?

Regards,

Dominik


_______________________________________________
lwip-users mailing list
[hidden email] http://lists.nongnu.org/mailman/listinfo/lwip-users

_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users

=?iso-8859-1?Q?Fr=E9d=E9ric_BERNON=2Evcf?= (810 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: RE : APIPA / AutoIP / Zeroconf / RFC 3927 Module

Spies, Dominik
Hi!

I need a fully RFC-compliant AutoIP feature and I'm willing to share it under terms of a free license (think the same license as lwIP would fit best).

Thanks for your help offer, I'll ask if I get stuck anywhere.

The RFC requires to continously check if there are ARP reply packets with the same IP-Address as destination as the own one to detect address conflicts. So I have to place a hook in the ARP Layer so I can check this in my autoip module. Or is there a better solution?

Dominik

-----Original Message-----
From: lwip-users-bounces+dominik.spies=[hidden email] [mailto:lwip-users-bounces+dominik.spies=[hidden email]] On Behalf Of Frédéric BERNON
Sent: Freitag, 18. Mai 2007 12:13
To: Mailing list for lwIP users
Subject: RE : [lwip-users] APIPA / AutoIP / Zeroconf / RFC 3927 Module

In my project, I have to enable something like in these three scenarios:

1/ dhcp only (netif never up if no dhcp is available)
2/ autoip only
3/ dhcp with fallback on autoip if no dhcp response before a defined timeout.

But in my case, because it's just to avoid to never up, 2/ & 3/ implementations are very "simples" : the thread which exec the dhcp_start() just poll the netif's ip address until it changes, or until a timeout, and in this last case, just do a dhcp_stop() and direct set to the netif a static AUTOIP address (I don't even check if the autoip is already used, even if it's not a big job...). Of course, all that is done in my port level (where I add my interfaces, etc...)

Do you intend to share your autoip feature, or is it just for you? If you want to share it, I suggest you to add autoip.h/.c files, and not just patch dhcp, because like this, people which only want a autoip device without dhcp (or the inverse) could got a smaller footprint...

To check if the Autoip is already used, look how DHCP_DOES_ARP_CHECK is implemented (each ARP reply on a interface is handle by dhcp_arp_reply(), which "decline" the IP is the interface is always in DHCP_CHECKING state).

If you want some help, tell me, I would like to improve my current "implementation"...

 
====================================
Frédéric BERNON
HYMATOM SA
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 : [hidden email]
Web Site : http://www.hymatom.fr 
====================================
P Avant d'imprimer, penser à l'environnement
 


-----Message d'origine-----
De : lwip-users-bounces+frederic.bernon=[hidden email] [mailto:lwip-users-bounces+frederic.bernon=[hidden email]] De la part de Spies, Dominik
Envoyé : vendredi 18 mai 2007 11:28
À : Mailing list for lwIP users
Objet : [lwip-users] APIPA / AutoIP / Zeroconf / RFC 3927 Module


Hi!

Additional to DHCP I need a APIPA configuration if no DHCP is there for my application.

So did one ever try to or succesfull implement such feature in lwIP ?

My idea is to integrate this in the dhcp module, because interaction is very close..

What do you think?

Regards,

Dominik


_______________________________________________
lwip-users mailing list
[hidden email] http://lists.nongnu.org/mailman/listinfo/lwip-users


_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

RE : RE : APIPA / AutoIP / Zeroconf / RFC 3927 Module

Frédéric BERNON
In reply to this post by Frédéric BERNON
>I need a fully RFC-compliant AutoIP feature and I'm willing to share it under terms of a free license (think the same license as lwIP would fit best).
Agree, and if you really want to share it, I even think it's the good solution

>Thanks for your help offer, I'll ask if I get stuck anywhere.
No problem
 
>The RFC requires to continously check if there are ARP reply packets with the same IP-Address as destination as the own one to detect address conflicts. So I have to place a hook in the ARP Layer so I can check this in my autoip module. Or is there a better solution?

No, and it's even the solution used by dhcp when you set DHCP_DOES_ARP_CHECK=1, to call dhcp_arp_reply in ehtarp.c.

Gook luke, and give us any reports of your solution...
 
====================================
Frédéric BERNON
HYMATOM SA
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 : [hidden email]
Web Site : http://www.hymatom.fr 
====================================
P Avant d'imprimer, penser à l'environnement
 


-----Message d'origine-----
De : lwip-users-bounces+frederic.bernon=[hidden email] [mailto:lwip-users-bounces+frederic.bernon=[hidden email]] De la part de Spies, Dominik
Envoyé : vendredi 18 mai 2007 12:32
À : Mailing list for lwIP users
Objet : RE: RE : [lwip-users] APIPA / AutoIP / Zeroconf / RFC 3927 Module


Hi!

I need a fully RFC-compliant AutoIP feature and I'm willing to share it under terms of a free license (think the same license as lwIP would fit best).

Thanks for your help offer, I'll ask if I get stuck anywhere.

The RFC requires to continously check if there are ARP reply packets with the same IP-Address as destination as the own one to detect address conflicts. So I have to place a hook in the ARP Layer so I can check this in my autoip module. Or is there a better solution?

Dominik

-----Original Message-----
From: lwip-users-bounces+dominik.spies=[hidden email] [mailto:lwip-users-bounces+dominik.spies=[hidden email]] On Behalf Of Frédéric BERNON
Sent: Freitag, 18. Mai 2007 12:13
To: Mailing list for lwIP users
Subject: RE : [lwip-users] APIPA / AutoIP / Zeroconf / RFC 3927 Module

In my project, I have to enable something like in these three scenarios:

1/ dhcp only (netif never up if no dhcp is available)
2/ autoip only
3/ dhcp with fallback on autoip if no dhcp response before a defined timeout.

But in my case, because it's just to avoid to never up, 2/ & 3/ implementations are very "simples" : the thread which exec the dhcp_start() just poll the netif's ip address until it changes, or until a timeout, and in this last case, just do a dhcp_stop() and direct set to the netif a static AUTOIP address (I don't even check if the autoip is already used, even if it's not a big job...). Of course, all that is done in my port level (where I add my interfaces, etc...)

Do you intend to share your autoip feature, or is it just for you? If you want to share it, I suggest you to add autoip.h/.c files, and not just patch dhcp, because like this, people which only want a autoip device without dhcp (or the inverse) could got a smaller footprint...

To check if the Autoip is already used, look how DHCP_DOES_ARP_CHECK is implemented (each ARP reply on a interface is handle by dhcp_arp_reply(), which "decline" the IP is the interface is always in DHCP_CHECKING state).

If you want some help, tell me, I would like to improve my current "implementation"...

 
====================================
Frédéric BERNON
HYMATOM SA
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 : [hidden email]
Web Site : http://www.hymatom.fr 
====================================
P Avant d'imprimer, penser à l'environnement
 


-----Message d'origine-----
De : lwip-users-bounces+frederic.bernon=[hidden email] [mailto:lwip-users-bounces+frederic.bernon=[hidden email]] De la part de Spies, Dominik Envoyé : vendredi 18 mai 2007 11:28 À : Mailing list for lwIP users Objet : [lwip-users] APIPA / AutoIP / Zeroconf / RFC 3927 Module


Hi!

Additional to DHCP I need a APIPA configuration if no DHCP is there for my application.

So did one ever try to or succesfull implement such feature in lwIP ?

My idea is to integrate this in the dhcp module, because interaction is very close..

What do you think?

Regards,

Dominik


_______________________________________________
lwip-users mailing list
[hidden email] http://lists.nongnu.org/mailman/listinfo/lwip-users


_______________________________________________
lwip-users mailing list
[hidden email] http://lists.nongnu.org/mailman/listinfo/lwip-users

_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users

=?iso-8859-1?Q?Fr=E9d=E9ric_BERNON=2Evcf?= (810 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE : APIPA / AutoIP / Zeroconf / RFC 3927 Module

Spies, Dominik
In reply to this post by Frédéric BERNON
Hi!

I finished step one of my APIPA Module today, but there are some
remaining problems, espacially the include thing I sent on the list this
morning.

I think this APIPA module is fully compliant to RFC 3927 and works ok.
There are some thing to do, so e.g. reset all TCP-Connections at a
retreat and cooperation with the dhcp client.

It would be great if some guys could have a quick look over it, maybe
compile it and give me a hint with the compiler-warning thing:

warning: 'struct etharp_hdr' declared inside parameter list
lwip/include/lwip apipa.h line 93
warning: its scope is only this definition or declaration, which is
probably not what you want lwip/include/lwip apipa.h line 93
warning: passing argument 2 of 'apipa_arp_reply' from incompatible
pointer type lwip/arch etharp.c line 547

Regards,

Dominik

_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users

lwIP APIPA.zip (32K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE : RE : APIPA / AutoIP / Zeroconf / RFC 3927 Module

Frédéric BERNON
In reply to this post by Frédéric BERNON
Hi,

I will look your module with big attention. Just, I think that "APIPA" name is not "very good", just because it's the name of Microsoft implementation (from memory)...
 
 
====================================
Frédéric BERNON
HYMATOM SA
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 : [hidden email]
Web Site : http://www.hymatom.fr 
====================================
P Avant d'imprimer, penser à l'environnement
 


-----Message d'origine-----
De : lwip-users-bounces+frederic.bernon=[hidden email] [mailto:lwip-users-bounces+frederic.bernon=[hidden email]] De la part de Spies, Dominik
Envoyé : mardi 22 mai 2007 15:20
À : Mailing list for lwIP users
Objet : RE : [lwip-users] APIPA / AutoIP / Zeroconf / RFC 3927 Module


Hi!

I finished step one of my APIPA Module today, but there are some remaining problems, espacially the include thing I sent on the list this morning.

I think this APIPA module is fully compliant to RFC 3927 and works ok. There are some thing to do, so e.g. reset all TCP-Connections at a retreat and cooperation with the dhcp client.

It would be great if some guys could have a quick look over it, maybe compile it and give me a hint with the compiler-warning thing:

warning: 'struct etharp_hdr' declared inside parameter list lwip/include/lwip apipa.h line 93
warning: its scope is only this definition or declaration, which is probably not what you want lwip/include/lwip apipa.h line 93
warning: passing argument 2 of 'apipa_arp_reply' from incompatible pointer type lwip/arch etharp.c line 547

Regards,

Dominik


_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users

=?iso-8859-1?Q?Fr=E9d=E9ric_BERNON=2Evcf?= (810 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: RE : APIPA / AutoIP / Zeroconf / RFC 3927 Module

Kieran Mansley
In reply to this post by Spies, Dominik
On Tue, 2007-05-22 at 15:19 +0200, Spies, Dominik wrote:

> Hi!
>
> I finished step one of my APIPA Module today, but there are some
> remaining problems, espacially the include thing I sent on the list this
> morning.
>
> I think this APIPA module is fully compliant to RFC 3927 and works ok.
> There are some thing to do, so e.g. reset all TCP-Connections at a
> retreat and cooperation with the dhcp client.
>
> It would be great if some guys could have a quick look over it, maybe
> compile it and give me a hint with the compiler-warning thing:
>
> warning: 'struct etharp_hdr' declared inside parameter list
> lwip/include/lwip apipa.h line 93

This is a C question, rather than an lwIP question, but the above error
suggests that when the compiler gets to that line in lwip_apipa.h, it
has not yet included etharp.h (or whatever the file is that defines
struct etharp_hdr).  Make sure that in the lwip_apipa.h header you have
included this file before you refer to struct etharp_hdr.

Kieran




_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

RE : RE : APIPA / AutoIP / Zeroconf / RFC 3927 Module

Frédéric BERNON
In reply to this post by Frédéric BERNON
I note your patch is not done on last CVS HEAD code...
 
====================================
Frédéric BERNON
HYMATOM SA
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 : [hidden email]
Web Site : http://www.hymatom.fr 
====================================
P Avant d'imprimer, penser à l'environnement
 


-----Message d'origine-----
De : lwip-users-bounces+frederic.bernon=[hidden email] [mailto:lwip-users-bounces+frederic.bernon=[hidden email]] De la part de Spies, Dominik
Envoyé : mardi 22 mai 2007 15:20
À : Mailing list for lwIP users
Objet : RE : [lwip-users] APIPA / AutoIP / Zeroconf / RFC 3927 Module


Hi!

I finished step one of my APIPA Module today, but there are some remaining problems, espacially the include thing I sent on the list this morning.

I think this APIPA module is fully compliant to RFC 3927 and works ok. There are some thing to do, so e.g. reset all TCP-Connections at a retreat and cooperation with the dhcp client.

It would be great if some guys could have a quick look over it, maybe compile it and give me a hint with the compiler-warning thing:

warning: 'struct etharp_hdr' declared inside parameter list lwip/include/lwip apipa.h line 93
warning: its scope is only this definition or declaration, which is probably not what you want lwip/include/lwip apipa.h line 93
warning: passing argument 2 of 'apipa_arp_reply' from incompatible pointer type lwip/arch etharp.c line 547

Regards,

Dominik


_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users

=?iso-8859-1?Q?Fr=E9d=E9ric_BERNON=2Evcf?= (810 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: RE : APIPA / AutoIP / Zeroconf / RFC 3927 Module

Spies, Dominik
In reply to this post by Kieran Mansley
This is exactly what I did, without success. -.- hmmm

-----Original Message-----
From: lwip-users-bounces+dominik.spies=[hidden email]
[mailto:lwip-users-bounces+dominik.spies=[hidden email]] On
Behalf Of Kieran Mansley
Sent: Dienstag, 22. Mai 2007 15:38
To: Mailing list for lwIP users
Subject: Re: RE : [lwip-users] APIPA / AutoIP / Zeroconf / RFC 3927
Module

On Tue, 2007-05-22 at 15:19 +0200, Spies, Dominik wrote:
> Hi!
>
> I finished step one of my APIPA Module today, but there are some
> remaining problems, espacially the include thing I sent on the list
this

> morning.
>
> I think this APIPA module is fully compliant to RFC 3927 and works ok.
> There are some thing to do, so e.g. reset all TCP-Connections at a
> retreat and cooperation with the dhcp client.
>
> It would be great if some guys could have a quick look over it, maybe
> compile it and give me a hint with the compiler-warning thing:
>
> warning: 'struct etharp_hdr' declared inside parameter list
> lwip/include/lwip apipa.h line 93

This is a C question, rather than an lwIP question, but the above error
suggests that when the compiler gets to that line in lwip_apipa.h, it
has not yet included etharp.h (or whatever the file is that defines
struct etharp_hdr).  Make sure that in the lwip_apipa.h header you have
included this file before you refer to struct etharp_hdr.

Kieran




_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users


_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

RE: RE : RE : APIPA / AutoIP / Zeroconf / RFC 3927 Module

Spies, Dominik
In reply to this post by Frédéric BERNON
Yes you are right, it's based on the last stable release because my application is based on the last stable release.
And no, I don't think APIPA is the name if Microsoft's implementation. It's just a name for that mechanism, the name is widely spread on the internet and also reffered e.g. in Gentoo documentation..
But I'm not 100% sure..

Dominik

-----Original Message-----
From: lwip-users-bounces+dominik.spies=[hidden email] [mailto:lwip-users-bounces+dominik.spies=[hidden email]] On Behalf Of Frédéric BERNON
Sent: Dienstag, 22. Mai 2007 15:42
To: Mailing list for lwIP users
Subject: RE : RE : [lwip-users] APIPA / AutoIP / Zeroconf / RFC 3927 Module

I note your patch is not done on last CVS HEAD code...
 
====================================
Frédéric BERNON
HYMATOM SA
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 : [hidden email]
Web Site : http://www.hymatom.fr 
====================================
P Avant d'imprimer, penser à l'environnement
 


-----Message d'origine-----
De : lwip-users-bounces+frederic.bernon=[hidden email] [mailto:lwip-users-bounces+frederic.bernon=[hidden email]] De la part de Spies, Dominik
Envoyé : mardi 22 mai 2007 15:20
À : Mailing list for lwIP users
Objet : RE : [lwip-users] APIPA / AutoIP / Zeroconf / RFC 3927 Module


Hi!

I finished step one of my APIPA Module today, but there are some remaining problems, espacially the include thing I sent on the list this morning.

I think this APIPA module is fully compliant to RFC 3927 and works ok. There are some thing to do, so e.g. reset all TCP-Connections at a retreat and cooperation with the dhcp client.

It would be great if some guys could have a quick look over it, maybe compile it and give me a hint with the compiler-warning thing:

warning: 'struct etharp_hdr' declared inside parameter list lwip/include/lwip apipa.h line 93
warning: its scope is only this definition or declaration, which is probably not what you want lwip/include/lwip apipa.h line 93
warning: passing argument 2 of 'apipa_arp_reply' from incompatible pointer type lwip/arch etharp.c line 547

Regards,

Dominik



_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

RE: RE : APIPA / AutoIP / Zeroconf / RFC 3927 Module

Kieran Mansley
In reply to this post by Spies, Dominik
On Tue, 2007-05-22 at 15:49 +0200, Spies, Dominik wrote:
> This is exactly what I did, without success. -.- hmmm

In that case you either made a mistake or your compiler has a bug.

Kieran



_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

RE: RE : APIPA / AutoIP / Zeroconf / RFC 3927 Module

Spies, Dominik
It's unlikely the comliler has a bug ;)

I'm not a c expert, maybe this is caused by a cyclic include? Because:
apipa.h includes etharp.h and netif.h
netif.h includes apipa.h
etharp.h includes netif.h

And if it is, how can one solve this?

Dominik

-----Original Message-----
From: lwip-users-bounces+dominik.spies=[hidden email]
[mailto:lwip-users-bounces+dominik.spies=[hidden email]] On
Behalf Of Kieran Mansley
Sent: Dienstag, 22. Mai 2007 15:55
To: Mailing list for lwIP users
Subject: RE: RE : [lwip-users] APIPA / AutoIP / Zeroconf / RFC 3927
Module

On Tue, 2007-05-22 at 15:49 +0200, Spies, Dominik wrote:
> This is exactly what I did, without success. -.- hmmm

In that case you either made a mistake or your compiler has a bug.

Kieran



_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users


_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

RE: RE : APIPA / AutoIP / Zeroconf / RFC 3927 Module

Kieran Mansley
On Tue, 2007-05-22 at 16:01 +0200, Spies, Dominik wrote:
> It's unlikely the comliler has a bug ;)

My guess is a typo on the include file name, or the wrong include path.

> I'm not a c expert, maybe this is caused by a cyclic include? Because:
> apipa.h includes etharp.h and netif.h
> netif.h includes apipa.h
> etharp.h includes netif.h
>
> And if it is, how can one solve this?

Headers normally have something like this (where THIS_HEADER'S_CONSTANT
is replaced with something specific to that file):

#ifndef THIS_HEADER'S_CONSTANT
#define THIS_HEADER'S_CONSTANT

<insert rest of the header here>

#endif /* THIS_HEADER'S_CONSTANT */

That way the contents of each header are only included once in the
cycle.  Look at the other lwIP headers for examples of this.

Kieran



_______________________________________________
lwip-users mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/lwip-users
12