lwip-users
[Top][All Lists]
Advanced

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

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


From: Marco Jakobs
Subject: [lwip-users] Sending a packet to ETH standard gateway with an active PPP connection
Date: Tue, 15 Dec 2009 15:14:17 +0100
User-agent: Thunderbird 2.0.0.23 (Windows/20090812)

Hi @all,

i've written a SNTP client function for my project, which is polling the time from a NTP server. 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.

Any hints are highly appreciated ...

Marco


Here are the UDP traces:
===================



Bound to NULL, packet is sent over the PPP link:

udp_bind(ipaddr = 0.0.0.0, port = 45980)
udp_bind: bound to 0.0.0.0, port 45980
udp_connect: connected to 192.53.103.108,port 123
udp_send
udp_send: added header pbuf 0020b888 before given pbuf 0020f67c
udp_send: sending datagram of length 56
udp_send: UDP packet length 56
udp_send: UDP checksum 0xa9ce
udp_send: ip_output_if (,,,,IP_PROTO_UDP,)
SNTP request sent.

SNTP request timeout.




Bound to NULL, PPP link is down, packet is sent over Ethernet:

udp_bind(ipaddr = 0.0.0.0, port = 45980)
udp_bind: bound to 0.0.0.0, port 45980
udp_connect: connected to 192.53.103.108,port 123
udp_send
udp_send: added header pbuf 0020b26c before given pbuf 0020f68c
udp_send: sending datagram of length 56
udp_send: UDP packet length 56
udp_send: UDP checksum 0x5e57
udp_send: ip_output_if (,,,,IP_PROTO_UDP,)
SNTP request sent.

udp_input: received datagram of length 56
UDP header:
+-------------------------------+
|       123     |     45980     | (src port, dest port)
+-------------------------------+
|        56     |     0x7932    | (len, chksum)
+-------------------------------+
udp (192.168.0.190, 45980) <-- (192.53.103.108, 123)
pcb (0.0.0.0, 45980) --- (192.53.103.108, 123)
udp_input: calculating checksum
SNTP data received.

SNTP Time: Tue Dec 15 14:56:42 2009





Bound to Ethernet IP, PPP is up -> Packet is not sent out:

udp_bind(ipaddr = 192.168.0.190, port = 45980)
udp_bind: bound to 192.168.0.190, port 45980
udp_connect: connected to 192.53.103.108,port 123
udp_send
udp_send: added header pbuf 0020b888 before given pbuf 0020f67c
SNTP request sent.

SNTP request timeout.





Bound to Ethernet IP, PPP is down -> Packet is sent over Ethernet:

udp_bind(ipaddr = 192.168.0.190, port = 45980)
udp_bind: bound to 192.168.0.190, port 45980
udp_connect: connected to 192.53.103.108,port 123
udp_send
udp_send: added header pbuf 0020b26c before given pbuf 0020f68c
udp_send: sending datagram of length 56
udp_send: UDP packet length 56
udp_send: UDP checksum 0x5e57
udp_send: ip_output_if (,,,,IP_PROTO_UDP,)
SNTP request sent.

udp_input: received datagram of length 56
UDP header:
+-------------------------------+
|       123     |     45980     | (src port, dest port)
+-------------------------------+
|        56     |     0xa2a1    | (len, chksum)
+-------------------------------+
udp (192.168.0.190, 45980) <-- (192.53.103.108, 123)
pcb (192.168.0.190, 45980) --- (192.53.103.108, 123)
udp_input: calculating checksum
SNTP data received.

SNTP Time: Tue Dec 15 14:50:26 2009



reply via email to

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