ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/libstatgrab/src/libstatgrab/network_stats.c
(Generate patch)

Comparing projects/libstatgrab/src/libstatgrab/network_stats.c (file contents):
Revision 1.46 by tdb, Sat Mar 6 19:04:29 2004 UTC vs.
Revision 1.47 by tdb, Sat Mar 6 21:49:13 2004 UTC

# Line 77 | Line 77 | void network_stat_init(int start, int end, network_sta
77                  net_stats->interface_name=NULL;
78                  net_stats->tx=0;
79                  net_stats->rx=0;
80 +                net_stats->ipackets=0;
81 +                net_stats->opackets=0;
82 +                net_stats->ierrors=0;
83 +                net_stats->oerrors=0;
84 +                net_stats->collisions=0;
85                  net_stats++;
86          }
87   }
# Line 311 | Line 316 | network_stat_t *get_network_stats_diff(int *entries) {
316                  dest->interface_name = strdup(src->interface_name);
317                  dest->rx = src->rx;
318                  dest->tx = src->tx;
319 +                dest->ipackets = src->ipackets;
320 +                dest->opackets = src->opackets;
321 +                dest->ierrors = src->ierrors;
322 +                dest->oerrors = src->oerrors;
323 +                dest->collisions = src->collisions;
324                  dest->systime = src->systime;
325          }
326  
# Line 341 | Line 351 | network_stat_t *get_network_stats_diff(int *entries) {
351                     difference. */
352                  dest->rx = transfer_diff(src->rx, dest->rx);
353                  dest->tx = transfer_diff(src->tx, dest->tx);
354 +                dest->ipackets = transfer_diff(src->ipackets, dest->ipackets);
355 +                dest->opackets = transfer_diff(src->opackets, dest->opackets);
356 +                dest->ierrors = transfer_diff(src->ierrors, dest->ierrors);
357 +                dest->oerrors = transfer_diff(src->oerrors, dest->oerrors);
358 +                dest->collisions = transfer_diff(src->collisions, dest->collisions);
359                  dest->systime = src->systime - dest->systime;
360          }
361  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines