summaryrefslogtreecommitdiff
path: root/libc/inet/if_nametoindex.c
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2005-12-08 14:29:53 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2005-12-08 14:29:53 +0000
commit11b9aee8ff8c9ab70ef6e5b6d68f75cd8a44c4d5 (patch)
tree40fa6c344cdb770bfb6edd104b41417fe6a8ba88 /libc/inet/if_nametoindex.c
parentab9d3f10ea97362d3c8ed875f2a721bf56c0f0ed (diff)
Again rpc ;-( , all *inet*, *addr*
Diffstat (limited to 'libc/inet/if_nametoindex.c')
-rw-r--r--libc/inet/if_nametoindex.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libc/inet/if_nametoindex.c b/libc/inet/if_nametoindex.c
index 0e556dba8..909cf503a 100644
--- a/libc/inet/if_nametoindex.c
+++ b/libc/inet/if_nametoindex.c
@@ -52,7 +52,7 @@ unsigned int if_nametoindex(const char* ifname)
if (fd < 0)
return 0;
__strncpy (ifr.ifr_name, ifname, sizeof (ifr.ifr_name));
- if (ioctl(fd,SIOCGIFINDEX,&ifr) < 0) {
+ if (__ioctl(fd,SIOCGIFINDEX,&ifr) < 0) {
int saved_errno = errno;
__close(fd);
if (saved_errno == EINVAL)
@@ -102,7 +102,7 @@ struct if_nameindex * if_nameindex (void)
/* Read all the interfaces out of the kernel. */
do {
ifc.ifc_buf = realloc(ifc.ifc_buf, ifc.ifc_len = rq_len);
- if (ifc.ifc_buf == NULL || ioctl(fd, SIOCGIFCONF, &ifc) < 0) {
+ if (ifc.ifc_buf == NULL || __ioctl(fd, SIOCGIFCONF, &ifc) < 0) {
__close(fd);
return NULL;
}
@@ -121,7 +121,7 @@ struct if_nameindex * if_nameindex (void)
for (i = 0; i < nifs; ++i) {
struct ifreq *ifr = &ifc.ifc_req[i];
idx[i].if_name = __strdup (ifr->ifr_name);
- if (idx[i].if_name == NULL || ioctl(fd,SIOCGIFINDEX,ifr) < 0) {
+ if (idx[i].if_name == NULL || __ioctl(fd,SIOCGIFINDEX,ifr) < 0) {
int saved_errno = errno;
unsigned int j;
for (j = 0; j < i; ++j)
@@ -159,7 +159,7 @@ char * if_indextoname (unsigned int ifindex, char *ifname)
return NULL;
ifr.ifr_ifindex = ifindex;
- if (ioctl (fd, SIOCGIFNAME, &ifr) < 0) {
+ if (__ioctl (fd, SIOCGIFNAME, &ifr) < 0) {
saved_errno = errno;
__close (fd);
__set_errno (saved_errno);