read /proc/net/dev with sscanf?
i try to read the /proc/net/dev network device file with fgets and the use sscanf to save the elements to some variables
i tried sscanf(buff," %s:%ld %d %d ...",&interfacename,&receivedbytes,&receivedpackets,...);
the problem is that after receivedbytes every variable is 0
i think it's because of the spaces are depending on the size of the value i want to read
sometimes 2 spaces, sometimes 1 space sometimes more
anyone knows a workaround, or maybe i have false sscanf syntax, to (ignore) read more space characters?