lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] "netconn_bind" broken for UDP connections in LwIP 1.4.0


From: Marco Jakobs
Subject: Re: [lwip-users] "netconn_bind" broken for UDP connections in LwIP 1.4.0?
Date: Wed, 02 May 2012 21:04:52 +0200
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:12.0) Gecko/20120428 Thunderbird/12.0.1

Hi Sylvain,

this looks like socket interface ... but i'm using NETCONN ...


Am 02.05.2012 18:15, schrieb Sylvain Rochet:
Maybe this is pretty old for 1.4.0, but it may help you.

I wrote several years ago a NTP server, NTP uses the same port for source
and destination in most cases, which is 123/UDP.

This is what I used:


Bind, so use source port = 123:

udp_bind(n->udp_socket, IP_ADDR_ANY, 123);
udp_recv(n->udp_socket, ntp_net_recv_callback, n);


Send to using port 123 as destination, on the same socket, so source and
destination port = 123:

udp_sendto(n->udp_socket, pkt_buf, ntpserver, 123);







reply via email to

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