[lwip-users] DHCP.h need to include "lwip/prot/dhcp.h" ?

2017-09-08 Thread antonio
Dear All, I found a small problem, while porting lwip from 1.4.1 to 2.0.2. I have an application that requires including dhcp.h, however, since the DHCP state messages are in prot/dhcp.h I got a compile error.. " error: 'DHCP_STATE_BOUND' undeclared (first use in this function)

[lwip-users] udp_send / udp_recv thread safefy

2017-09-08 Thread Ricardo Martins
Hi, I'm doing some work with LWIP 2.0.2 using the raw API to send and receive UDP datagrams and I have a doubt regarding the thread safety of udp_send and udp_recv. Right now I have a single UDP PCB instance and I'm handling incoming datagrams in one thread using the recv callback (I assume this t

[lwip-users] Handle received data only partial

2017-09-08 Thread Paul Plankton
Hello, within my tcp_recv()-function the "struct pbuf" which hands over the received data sometimes contains chained buffers pbuf->next where "next" points to the next buffer of data. My problem: I'm running on an embedded system where I can't waste too much time with handling network data. So I

Re: [lwip-users] udp_send / udp_recv thread safefy

2017-09-08 Thread Dirk Ziegelmeier
No, its not OK to call raw API functions from another thread. See http://www.nongnu.org/lwip/2_0_x/pitfalls.html Dirk On Fri, Sep 8, 2017 at 12:04 PM, Ricardo Martins wrote: > Hi, > > I'm doing some work with LWIP 2.0.2 using the raw API to send and receive > UDP datagrams and I have a doubt r

Re: [lwip-users] udp_send / udp_recv thread safefy

2017-09-08 Thread Ricardo Martins
Thanks, I'll use the tcpip_callback then. Kind regards, Ricardo martins On Fri, Sep 8, 2017 at 2:52 PM, Dirk Ziegelmeier wrote: > No, its not OK to call raw API functions from another thread. > > See http://www.nongnu.org/lwip/2_0_x/pitfalls.html > > Dirk > > On Fri, Sep 8, 2017 at 12:04 PM, Ri

Re: [lwip-users] LWIP_MPU_COMPATIBLE set to 1, but still get memory management fault in lwip_select.

2017-09-08 Thread David Lockyer
So something like attached? I removed my raise/reset macro's. It appears to work for me, I added a new private pool, not sure if this was what you intended or not. Let me know what you think. BR David On 07/09/17 19:40, goldsi...@gmx.de wrote: David Lockyer wrote: Okay, thank you for the s

Re: [lwip-users] LWIP_MPU_COMPATIBLE set to 1, but still get memory management fault in lwip_select.

2017-09-08 Thread Joel Cunningham
David, Would you mind opening a bug report at https://savannah.nongnu.org/bugs/?func=additem&group=lwip and attaching the patches so we can do the review there? Also, it would be preferable to have the changes in a git patchset that c

[lwip-users] Fix GCC warnings regarding two macros?

2017-09-08 Thread Nathan Hartman
When building lwIP-1.4.1 on Linaro GCC v4.9.3 with -Wall, GCC issues warnings in two places where the macro ip_addr_isany(addr1) is used, saying the comparison against NULL will always evaluate to false. This warning is correct in both cases because the macro is given the address of a local stack v

Re: [lwip-users] Handle received data only partial

2017-09-08 Thread goldsi...@gmx.de
Paul Plankton wrote: My problem: I'm running on an embedded system where I can't waste too much time with handling network data. This and the statement about handling "1460 bytes during one interrupt call" is somewhat disturbing. Are you sure you don't violate lwIP's threading requirements?

Re: [lwip-users] Fix GCC warnings regarding two macros?

2017-09-08 Thread goldsi...@gmx.de
Nathan Hartman wrote: When building lwIP-1.4.1 Honestly, I stopped paying attention here. 1.4.1 is nearly five years old. Please do test the new version instead of cross-reading the sources ;-) Have you found 'ip_addr_isany_val()'? Simon ___ lwip

Re: [lwip-users] DHCP.h need to include "lwip/prot/dhcp.h" ?

2017-09-08 Thread goldsi...@gmx.de
antonio wrote: I have an application that requires including dhcp.h, however, since the DHCP state messages are in prot/dhcp.h I got a compile error.. " error: 'DHCP_STATE_BOUND' undeclared (first use in this function) if (new_state == DHCP_STATE_BOUND) {" when I included "lwi