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/drivers/net/sandbox-raw.c b/drivers/net/sandbox-raw.c
index 91da5f5..45c3b18 100644
--- a/drivers/net/sandbox-raw.c
+++ b/drivers/net/sandbox-raw.c
@@ -16,7 +16,7 @@
DECLARE_GLOBAL_DATA_PTR;
static int reply_arp;
-static IPaddr_t arp_ip;
+static struct in_addr arp_ip;
static int sb_eth_raw_start(struct udevice *dev)
{
@@ -55,7 +55,7 @@
* localhost works on a higher-level API in Linux than
* ARP packets, so fake it
*/
- arp_ip = NetReadIP(&arp->ar_tpa);
+ arp_ip = net_read_ip(&arp->ar_tpa);
reply_arp = 1;
return 0;
}
@@ -93,9 +93,9 @@
/* Any non-zero MAC address will work */
memset(&arp->ar_sha, 0x01, ARP_HLEN);
/* Use whatever IP we were looking for (always 127.0.0.1?) */
- NetWriteIP(&arp->ar_spa, arp_ip);
+ net_write_ip(&arp->ar_spa, arp_ip);
memcpy(&arp->ar_tha, pdata->enetaddr, ARP_HLEN);
- NetWriteIP(&arp->ar_tpa, NetOurIP);
+ net_write_ip(&arp->ar_tpa, net_ip);
length = ARP_HDR_SIZE;
} else {
/* If local, the Ethernet header won't be included; skip it */