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>
diff --git a/net/sntp.c b/net/sntp.c
index 5de1952..3e45a83 100644
--- a/net/sntp.c
+++ b/net/sntp.c
@@ -37,8 +37,8 @@
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 @@
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 @@
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();