lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Sending a packet to ETH standard gateway with an active


From: address@hidden
Subject: Re: [lwip-users] Sending a packet to ETH standard gateway with an active PPP connection
Date: Tue, 15 Dec 2009 18:40:16 +0100
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; de; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0

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

reply via email to

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