[lwip-users] Why doesn't udp_recv callback contain the received netif?

2019-06-24 Thread Wayne Uroda
Hi, Please forgive me if this is a stupid question. I am writing a DHCP server and using udp_recv functionality to handle incoming broadcast messages on a udp pcb. I have enabled the BROADCAST flag on the PCB and I can receive the incoming packets just fine. The udp pcb is bound to ip_addr_any.

Re: [lwip-users] ip_addr_copy alignment issue

2017-09-25 Thread Wayne Uroda
Hi Ran, What about using memcpy, since it can handle unaligned access? #define ip_addr_copy(dest, src) memcpy(&((dest).addr), &((src).addr), sizeof((dest).addr)) Maybe that would work? I am not 100% sure though. - Wayne On Mon, Sep 25, 2017 at 4:45 PM, Dirk Ziegelmeier wrote: > Can't help yo

Re: [lwip-users] Correct way to use SNTP safely

2017-09-21 Thread Wayne Uroda
rs" information which I never read in the first place? Thanks - Wayne On Fri, Sep 22, 2017 at 3:43 PM, Simon Goldschmidt wrote: > Wayne Uroda wrote: > >> Which functions are you talking about? > > I am calling only sntp_setservername and sntp_init from my code. > &g

Re: [lwip-users] Correct way to use SNTP safely

2017-09-21 Thread Wayne Uroda
timeout linked list if another thread happened to be in a critical part of code at the same time. I concede I might be too paranoid, but I'd rather look stupid asking the question than not :) On Fri, Sep 22, 2017 at 2:16 PM, Simon Goldschmidt wrote: > Wayne Uroda wrote: > >

[lwip-users] Correct way to use SNTP safely

2017-09-21 Thread Wayne Uroda
I have been looking at how SNTP works, as I want to allow the user to change the SNTP_UPDATE_DELAY somewhat dynamically (I understand I will need to enforce minimum 15 seconds between requests). It got me thinking about how sys_timeout works. This function manipulates a linked list in timers.c. I

Re: [lwip-users] TCPIP and MAC thread task priorities

2017-02-28 Thread Wayne Uroda
Thank you Simon, and everyone else who contributed to the discussion. I have had both tasks set at the same priority (RTOS task priority, nothing to do with the Cortex interrupt priority). I have not noticed any issues with this so I will leave it as is for now. I don't think that the comment is a

[lwip-users] TCPIP and MAC thread task priorities

2017-02-26 Thread Wayne Uroda
I was looking through my codebase recently (a mix of code from LPC Open, and also a project I inherited) and I saw a comment which I want to fact check: /* TCPIP thread must run at higher priority than MAC threads! */ My software is using FreeRTOS. The Ethernet interrupt only signals a semaphore