X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Usermode%2FApplications%2Fifconfig_src%2Fmain.c;h=ba788383db2076a3d89ccd5a6f4cf47ce7f31cbd;hb=45f9a29e481ce9ea7ca7121541f0e0f90147f5b1;hp=7f8746b3562386f329a41207235d288ec60c46c1;hpb=7514bb8053931759b99f77d3f9ad70446b0625ac;p=tpg%2Facess2.git diff --git a/Usermode/Applications/ifconfig_src/main.c b/Usermode/Applications/ifconfig_src/main.c index 7f8746b3..ba788383 100644 --- a/Usermode/Applications/ifconfig_src/main.c +++ b/Usermode/Applications/ifconfig_src/main.c @@ -61,7 +61,6 @@ void DumpInterfaces(int DumpAll) while( readdir(dp, filename) ) { if(filename[0] == '.') continue; - if(filename[0] != 'i' || filename[1] != 'p') continue; fd = open(path, OPENFLAG_READ); if(fd == -1) { @@ -71,6 +70,13 @@ void DumpInterfaces(int DumpAll) 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: @@ -126,7 +132,7 @@ int AddInterface( char *Device ) 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; } @@ -142,7 +148,7 @@ int DoAutoConfig( char *Device ) 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 ) {