Marco Jakobs wrote:
Hi @all,

i've written a SNTP client function for my project, which is polling the time from a NTP server.
Did you know there's an SNTP client available for lwIPin the contrib module, available via CVS? No need to write your own.
This works pretty good, the packets are sent out of the ethernet interface using the defined standard gateway.

But i'm also using PPP in my project. As soon as the PPP link is getting active, the SNTP is not sent out of the ethernet anymore - it's now sent over the PPP link.

To avoid this, i bind my UDP connection for the SNTP to the IP of my ethernet interface, thinking this will force lwIP to send out this packet only on the ethernet port, using its standardgateway. Without an active PPP connection, this does also work - but with an active PPP connection nothing is sent out.
lwIP doesn't implement a real routing table. In addition (if I remember correctly), PPP sets its netif as default netif, meaning if no best match is found, the packet will be sent via PPP. Still, binding to the ethernet netif's address should somehow work... You might want to take a look at ip_route() when the PPP netif is up.

Simon
_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to