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.66 by tdb, Wed Apr 7 21:08:40 2004 UTC vs.
Revision 1.68 by ats, Thu Apr 8 13:44:44 2004 UTC

# Line 45 | Line 45
45   #ifdef LINUX
46   #include <stdio.h>
47   #include <sys/types.h>
48 #include <regex.h>
48   #include <sys/ioctl.h>
49   #include <sys/socket.h>
50   #include <net/if.h>
# Line 391 | Line 390 | sg_network_io_stats *sg_get_network_io_stats_diff(int
390          return diff;
391   }
392  
393 + int sg_network_io_compare_name(const void *va, const void *vb) {
394 +        const sg_network_io_stats *a = (const sg_network_io_stats *)va;
395 +        const sg_network_io_stats *b = (const sg_network_io_stats *)vb;
396 +
397 +        return strcmp(a->interface_name, b->interface_name);
398 + }
399 +
400   /* NETWORK INTERFACE STATS */
401  
402   static void network_iface_stat_init(sg_network_iface_stats *s) {
# Line 687 | Line 693 | sg_network_iface_stats *sg_get_network_iface_stats(int
693   #endif
694          *entries = ifaces;
695          return network_iface_stats;
696 + }
697 +
698 + int sg_network_iface_compare_name(const void *va, const void *vb) {
699 +        const sg_network_iface_stats *a = (const sg_network_iface_stats *)va;
700 +        const sg_network_iface_stats *b = (const sg_network_iface_stats *)vb;
701 +
702 +        return strcmp(a->interface_name, b->interface_name);
703   }
704  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines