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);





_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to