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/rarp.c | |
parent | 2ea4cfdef64a690ced0af005fd7a581751a3e581 (diff) | |
download | u-boot-imx-049a95a7759c0e384c1fc7b8575d968d56a33997.zip u-boot-imx-049a95a7759c0e384c1fc7b8575d968d56a33997.tar.gz u-boot-imx-049a95a7759c0e384c1fc7b8575d968d56a33997.tar.bz2 |
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/rarp.c')
-rw-r--r-- | net/rarp.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -43,9 +43,9 @@ void rarp_receive(struct ip_udp_hdr *ip, unsigned len) puts("invalid RARP header\n"); } else { - NetCopyIP(&NetOurIP, &arp->ar_data[16]); - if (NetServerIP == 0) - NetCopyIP(&NetServerIP, &arp->ar_data[6]); + net_copy_ip(&net_ip, &arp->ar_data[16]); + if (net_server_ip.s_addr == 0) + net_copy_ip(&net_server_ip, &arp->ar_data[6]); memcpy(NetServerEther, &arp->ar_data[0], 6); debug_cond(DEBUG_DEV_PKT, "Got good RARP\n"); net_auto_load(); @@ -88,7 +88,7 @@ void RarpRequest(void) rarp->ar_pln = 4; rarp->ar_op = htons(RARPOP_REQUEST); memcpy(&rarp->ar_data[0], NetOurEther, 6); /* source ET addr */ - memcpy(&rarp->ar_data[6], &NetOurIP, 4); /* source IP addr */ + memcpy(&rarp->ar_data[6], &net_ip, 4); /* source IP addr */ /* dest ET addr = source ET addr ??*/ memcpy(&rarp->ar_data[10], NetOurEther, 6); /* dest IP addr set to broadcast */ |