[En-Nut-Discussion] NutIpRouteList
Tóth Szabolcs
toth.szabolcs at eworldcom.hu
Mon Dec 19 13:50:06 CET 2005
Hi,
I wanted to list the route table, but something strange. It gives back
really curious ip addresses.
One of the route entry should be this:
ip: 0.0.0.0; mask: 0.0.0.0; gw: 192.168.2.1
but I got this:
ip: 173.222.153.112; mask: 0.0.240.185; gw: 128.123.193.180!
The number of entries value is good (2). Has somebody any idea what
could be the problem?
Here is my small code:
RTENTRY * rte;
int numEntries;
rte = (RTENTRY *)NutIpRouteList(&numEntries);
u_short i;
for (i=0; i<numEntries; i++) {
printf("ip: %s; ", inet_ntoa(rte->rt_ip) );
printf("mask: %s; ", inet_ntoa(rte->rt_mask) );
printf("gw: %s \n", inet_ntoa(rte->rt_gateway) );
rte = rte->rt_next;
}
PS: I cannot find the string.h.
Best Regards,
Szabolcs Toth
More information about the En-Nut-Discussion
mailing list