summaryrefslogtreecommitdiff
path: root/net/rarp.c
diff options
context:
space:
mode:
authorJoe Hershberger <joe.hershberger@ni.com>2015-04-08 06:41:01 (GMT)
committerSimon Glass <sjg@chromium.org>2015-04-18 17:11:32 (GMT)
commit049a95a7759c0e384c1fc7b8575d968d56a33997 (patch)
treec3d30763163e2e67324ebc8f54d6d84d1d8f9c8a /net/rarp.c
parent2ea4cfdef64a690ced0af005fd7a581751a3e581 (diff)
downloadu-boot-fsl-qoriq-049a95a7759c0e384c1fc7b8575d968d56a33997.tar.xz
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.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/rarp.c b/net/rarp.c
index a8e0851..3e1c74c 100644
--- a/net/rarp.c
+++ b/net/rarp.c
@@ -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 */