udhcp: rename giaddr to gateway_nip and server to server_nip
"nip" stands for "IP in network order"
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
diff --git a/networking/udhcp/socket.c b/networking/udhcp/socket.c
index edf4355..449fcb7 100644
--- a/networking/udhcp/socket.c
+++ b/networking/udhcp/socket.c
@@ -37,7 +37,7 @@
#include "common.h"
-int FAST_FUNC udhcp_read_interface(const char *interface, int *ifindex, uint32_t *addr, uint8_t *arp)
+int FAST_FUNC udhcp_read_interface(const char *interface, int *ifindex, uint32_t *nip, uint8_t *arp)
{
int fd;
struct ifreq ifr;
@@ -48,7 +48,7 @@
ifr.ifr_addr.sa_family = AF_INET;
strncpy_IFNAMSIZ(ifr.ifr_name, interface);
- if (addr) {
+ if (nip) {
if (ioctl_or_perror(fd, SIOCGIFADDR, &ifr,
"is interface %s up and configured?", interface)
) {
@@ -56,7 +56,7 @@
return -1;
}
our_ip = (struct sockaddr_in *) &ifr.ifr_addr;
- *addr = our_ip->sin_addr.s_addr;
+ *nip = our_ip->sin_addr.s_addr;
DEBUG("ip of %s = %s", interface, inet_ntoa(our_ip->sin_addr));
}