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: Fri, 6 Feb 2015 08:57:06 +0100



2015-02-03 15:24 GMT+01:00 Simon Goldschmidt <address@hidden>:
Karl Karpfen wrote:

There's nothing strange here: the contents of ip_addr_t needs to be in network byte order and the sntp client calls a function that returns the correct byte order.



OK, to clarify that: to get the ip_addr_t that is used to configure my network interface I have to do the following for IP, gateway and netmask:

    ipaddr_aton(c, &globalConfig.ip);
    globalConfig.ip.addr=htonl(globalConfig.ip.addr);

For getting the ip_addr_t for the SNTP-server this is not neccesary, there a plain

    ipaddr_aton(c, &globalConfig.sntp_ip);

works (without the need to do a htonl() on the addr member).

So this is different depending on the usage of the IP - for what reason ever.


reply via email to

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