mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
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>
This commit is contained in:
parent
2ea4cfdef6
commit
049a95a775
22 changed files with 362 additions and 336 deletions
11
net/sntp.c
11
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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue