while( readdir(dp, filename) )
{
if(filename[0] == '.') continue;
- if(filename[0] != 'i' || filename[1] != 'p') continue;
fd = open(path, OPENFLAG_READ);
if(fd == -1) {
type = ioctl(fd, 4, NULL);
printf("%s:\t", filename);
+ {
+ int len = ioctl(fd, ioctl(fd, 3, "get_device"), NULL);
+ char *buf = malloc(len+1);
+ ioctl(fd, ioctl(fd, 3, "get_device"), buf);
+ printf("'%s'\t", buf);
+ free(buf);
+ }
switch(type)
{
case 0:
return -1;
}
- printf("-- Added '"IPSTACK_ROOT"/ip%i' using device %s\n", ret, Device);
+ printf("-- Added '"IPSTACK_ROOT"/%i' using device %s\n", ret, Device);
return ret;
}
tmp = AddInterface(Device);
if( tmp < 0 ) return tmp;
- sprintf(path, IPSTACK_ROOT"/ip%i", tmp);
+ sprintf(path, IPSTACK_ROOT"/%i", tmp);
fd = open(path, OPENFLAG_READ);
if( fd == -1 ) {