diff options
author | Joe Hershberger <joe.hershberger@ni.com> | 2015-04-08 01:41:01 -0500 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-04-18 11:11:32 -0600 |
commit | 049a95a7759c0e384c1fc7b8575d968d56a33997 (patch) | |
tree | c3d30763163e2e67324ebc8f54d6d84d1d8f9c8a /net/sntp.c | |
parent | 2ea4cfdef64a690ced0af005fd7a581751a3e581 (diff) |
net: cosmetic: Change IPaddr_t to struct in_addr
This patch is simply clean-up to make the IPv4 type that is used match
what Linux uses. It also attempts to move all variables that are IP
addresses use good naming instead of CamelCase. No functional change.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'net/sntp.c')
-rw-r--r-- | net/sntp.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/net/sntp.c b/net/sntp.c index 5de19526e63..3e45a8342a3 100644 --- a/net/sntp.c +++ b/net/sntp.c @@ -37,8 +37,8 @@ SntpSend(void) SntpOurPort = 10000 + (get_timer(0) % 4096); sport = NTP_SERVICE_PORT; - NetSendUDPPacket(NetServerEther, NetNtpServerIP, sport, SntpOurPort, - pktlen); + NetSendUDPPacket(NetServerEther, net_ntp_server, sport, SntpOurPort, + pktlen); } static void @@ -49,9 +49,8 @@ SntpTimeout(void) return; } -static void -SntpHandler(uchar *pkt, unsigned dest, IPaddr_t sip, unsigned src, - unsigned len) +static void sntp_handler(uchar *pkt, unsigned dest, struct in_addr sip, + unsigned src, unsigned len) { struct sntp_pkt_t *rpktp = (struct sntp_pkt_t *)pkt; struct rtc_time tm; @@ -85,7 +84,7 @@ SntpStart(void) debug("%s\n", __func__); NetSetTimeout(SNTP_TIMEOUT, SntpTimeout); - net_set_udp_handler(SntpHandler); + net_set_udp_handler(sntp_handler); memset(NetServerEther, 0, sizeof(NetServerEther)); SntpSend(); |