Code

traffic plugin: Store the packet- and error-counter for the proc interface, too.
authorocto <octo>
Thu, 25 May 2006 11:53:25 +0000 (11:53 +0000)
committerocto <octo>
Thu, 25 May 2006 11:53:25 +0000 (11:53 +0000)
src/traffic.c

index cefff898d81306e7233feee0c99cfb23b2d40171..5fdcb5dfd64f3afd0bc28afc1b79c33b7ec4ae09 100644 (file)
@@ -380,13 +380,20 @@ static void traffic_read (void)
                
                numfields = strsplit (dummy, fields, 16);
 
-               if (numfields < 9)
+               if (numfields < 11)
                        continue;
 
                incoming = atoll (fields[0]);
                outgoing = atoll (fields[8]);
-
                bytes_submit (device, incoming, outgoing);
+
+               incoming = atoll (fields[1]);
+               incoming = atoll (fields[9]);
+               packets_submit (device, incoming, outgoing);
+
+               incoming = atoll (fields[2]);
+               incoming = atoll (fields[10]);
+               errors_submit (device, incoming, outgoing);
        }
 
        fclose (fh);