diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-06-16 10:23:55 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-06-16 10:23:55 +0200 |
commit | 990a617edfd9040594c0889d2dd23eb7ef91c695 (patch) | |
tree | 25a41246927426fa64ffb10217332bc065df8887 /networking/udhcp/socket.c | |
parent | 1d924f59b1854e9638c63a743642e63c1bef38b9 (diff) | |
download | busybox-w32-990a617edfd9040594c0889d2dd23eb7ef91c695.tar.gz busybox-w32-990a617edfd9040594c0889d2dd23eb7ef91c695.tar.bz2 busybox-w32-990a617edfd9040594c0889d2dd23eb7ef91c695.zip |
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>
Diffstat (limited to 'networking/udhcp/socket.c')
-rw-r--r-- | networking/udhcp/socket.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/networking/udhcp/socket.c b/networking/udhcp/socket.c index edf4355b5..449fcb7aa 100644 --- a/networking/udhcp/socket.c +++ b/networking/udhcp/socket.c | |||
@@ -37,7 +37,7 @@ | |||
37 | #include "common.h" | 37 | #include "common.h" |
38 | 38 | ||
39 | 39 | ||
40 | int FAST_FUNC udhcp_read_interface(const char *interface, int *ifindex, uint32_t *addr, uint8_t *arp) | 40 | int FAST_FUNC udhcp_read_interface(const char *interface, int *ifindex, uint32_t *nip, uint8_t *arp) |
41 | { | 41 | { |
42 | int fd; | 42 | int fd; |
43 | struct ifreq ifr; | 43 | struct ifreq ifr; |
@@ -48,7 +48,7 @@ int FAST_FUNC udhcp_read_interface(const char *interface, int *ifindex, uint32_t | |||
48 | 48 | ||
49 | ifr.ifr_addr.sa_family = AF_INET; | 49 | ifr.ifr_addr.sa_family = AF_INET; |
50 | strncpy_IFNAMSIZ(ifr.ifr_name, interface); | 50 | strncpy_IFNAMSIZ(ifr.ifr_name, interface); |
51 | if (addr) { | 51 | if (nip) { |
52 | if (ioctl_or_perror(fd, SIOCGIFADDR, &ifr, | 52 | if (ioctl_or_perror(fd, SIOCGIFADDR, &ifr, |
53 | "is interface %s up and configured?", interface) | 53 | "is interface %s up and configured?", interface) |
54 | ) { | 54 | ) { |
@@ -56,7 +56,7 @@ int FAST_FUNC udhcp_read_interface(const char *interface, int *ifindex, uint32_t | |||
56 | return -1; | 56 | return -1; |
57 | } | 57 | } |
58 | our_ip = (struct sockaddr_in *) &ifr.ifr_addr; | 58 | our_ip = (struct sockaddr_in *) &ifr.ifr_addr; |
59 | *addr = our_ip->sin_addr.s_addr; | 59 | *nip = our_ip->sin_addr.s_addr; |
60 | DEBUG("ip of %s = %s", interface, inet_ntoa(our_ip->sin_addr)); | 60 | DEBUG("ip of %s = %s", interface, inet_ntoa(our_ip->sin_addr)); |
61 | } | 61 | } |
62 | 62 | ||