Subject: winex/dlls/iphlpapi ipstats.c,1.5,1.6Update of /var/lib/cvsd/cvsroot/winex/dlls/iphlpapi
In directory agravaine:/tmp/cvs-serv17501/dlls/iphlpapi
Modified Files:
ipstats.c
Log Message:
- cut down on the number of #ifdefs for cleanliness
Index: ipstats.c
===================================================================
RCS file: /var/lib/cvsd/cvsroot/winex/dlls/iphlpapi/ipstats.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- ipstats.c 30 Mar 2007 20:18:03 -0000 1.5
+++ ipstats.c 30 Mar 2007 20:25:44 -0000 1.6
@@ -91,10 +91,6 @@
if (!entry)
return ERROR_INVALID_PARAMETER;
-#ifdef __APPLE__
- ERR ("unimplemented!\n");
-#endif
-
/* get interface stats from /proc/net/dev, no error if can't
no inUnknownProtos, outNUcastPkts, outQLen */
fp = fopen("/proc/net/dev", "r");
@@ -167,6 +163,9 @@
}
fclose(fp);
}
+ else
+ ERR ("unimplemented!\n");
+
return NO_ERROR;
}
@@ -177,10 +176,6 @@
if (!stats)
return ERROR_INVALID_PARAMETER;
-#ifdef __APPLE__
- ERR ("unimplemented!\n");
-#endif
-
memset(stats, 0, sizeof(MIB_ICMP));
/* get most of these stats from /proc/net/snmp, no error if can't */
fp = fopen("/proc/net/snmp", "r");
@@ -298,6 +293,9 @@
}
fclose(fp);
}
+ else
+ ERR ("unimplemented!\n");
+
return NO_ERROR;
}
@@ -308,10 +306,6 @@
if (!stats)
return ERROR_INVALID_PARAMETER;
-#ifdef __APPLE__
- ERR ("unimplemented!\n");
-#endif
-
memset(stats, 0, sizeof(MIB_IPSTATS));
stats->dwNumIf = stats->dwNumAddr = getNumInterfaces();
stats->dwNumRoutes = getNumRoutes();
@@ -413,6 +407,9 @@
}
fclose(fp);
}
+ else
+ ERR ("unimplemented!\n");
+
return NO_ERROR;
}
@@ -423,10 +420,6 @@
if (!stats)
return ERROR_INVALID_PARAMETER;
-#ifdef __APPLE__
- ERR ("unimplemented!\n");
-#endif
-
memset(stats, 0, sizeof(MIB_TCPSTATS));
/* get from /proc/net/snmp, no error if can't */
@@ -507,6 +500,9 @@
}
fclose(fp);
}
+ else
+ ERR ("unimplemented!\n");
+
return NO_ERROR;
}
@@ -517,10 +513,6 @@
if (!stats)
return ERROR_INVALID_PARAMETER;
-#ifdef __APPLE__
- ERR ("unimplemented!\n");
-#endif
-
memset(stats, 0, sizeof(MIB_UDPSTATS));
/* get from /proc/net/snmp, no error if can't */
@@ -564,6 +556,9 @@
}
fclose(fp);
}
+ else
+ ERR ("unimplemented!\n");
+
return NO_ERROR;
}
@@ -587,6 +582,9 @@
}
fclose(fp);
}
+ else
+ ERR ("Unable to open '%s' to count entries!\n", filename);
+
return ret;
}
@@ -864,10 +862,6 @@
DWORD getNumArpEntries(void)
{
-#ifdef __APPLE__
- ERR ("unimplemented!\n");
-#endif
-
return getNumWithOneHeader("/proc/net/arp");
}
@@ -877,6 +871,7 @@
#ifdef __APPLE__
ERR ("unimplemented!\n");
+ return ERROR_INVALID_PARAMETER;
#endif
if (!ppIpNetTable)
@@ -965,10 +960,6 @@
DWORD getNumUdpEntries(void)
{
-#ifdef __APPLE__
- ERR ("unimplemented!\n");
-#endif
-
return getNumWithOneHeader("/proc/net/udp");
}
@@ -978,6 +969,7 @@
#ifdef __APPLE__
ERR ("unimplemented!\n");
+ return ERROR_INVALID_PARAMETER;
#endif
if (!ppUdpTable)
@@ -1036,10 +1028,6 @@
DWORD getNumTcpEntries(void)
{
-#ifdef __APPLE__
- ERR ("unimplemented!\n");
-#endif
-
return getNumWithOneHeader("/proc/net/tcp");
}
@@ -1049,6 +1037,7 @@
#ifdef __APPLE__
ERR ("unimplemented!\n");
+ return ERROR_INVALID_PARAMETER;
#endif
if (!ppTcpTable)
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.