lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] SNTP client does not work


From: Karl Karpfen
Subject: Re: [lwip-users] SNTP client does not work
Date: Tue, 3 Feb 2015 15:08:48 +0100

Hi Sylvain,

that is not a solution since I have to parse a string containing the IP.

Meanwhile it is working. The trick: I have to do a htonl/s() for all addresses that are used to configure the network interface (IP, netmask, gateway) but not for the IP and port number of the SNTP server to be contacted.

Somewhat strange but works this way.

Karl


2015-01-29 18:04 GMT+01:00 Sylvain Rochet <address@hidden>:
Hi Karl,

On Thu, Jan 29, 2015 at 05:57:50PM +0100, Karl Karpfen wrote:
> 2015-01-29 15:56 GMT+01:00 Simon Goldschmidt <address@hidden>:
>
> > Karl Karpfen wrote:
> > > No but there I have to specify the IP of the NTP-server to communcate
> > with
> > > My assumption: when I have to ntohl() the netif-IP, I have to do that for
> > > the NTP-IP and the port-number too. Is this wrong?
> >
> > Yes.
> >
> > Do you have evidence that there is an endianness problem here? Have you
> > checked with wireshark what gets sent?
> >
> > BTW: ipaddr_aton already returns network byte order and udp_sendto() takes
> > a host byte order port. Please first check your code before assuming bugs
> > in other people's code ;-)
> >
>
> Sorry but I did nowhere and never blamed somebody for bugs, I just asked a
> question regarding USAGE of lwIP - or isn't this allowed here in this
> maling list?

I didn't read thoroughly, what about IP4_ADDR(*, a, b, c, d) ?

Sylvain

_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users


reply via email to

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