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.31 by ats, Fri Feb 13 15:12:26 2004 UTC vs.
Revision 1.34 by tdb, Fri Feb 13 15:40:13 2004 UTC

# Line 50 | Line 50 | typedef __uint16_t u16;
50   typedef __uint32_t u32;
51   #include <linux/ethtool.h>
52   #include <linux/sockios.h>
53 + #include <unistd.h>
54   #endif
55   #ifdef ALLBSD
56   #include <sys/types.h>
# Line 501 | Line 502 | network_iface_stat_t *get_network_iface_stats(int *ent
502                                  continue;
503                          }
504  
505 <                        if(knp->value.ui64 == 0){
505 >                        network_iface_stat_ptr->dup = UNKNOWN_DUPLEX;
506 >                        if(knp->value.ui32 == 2){
507                                  network_iface_stat_ptr->dup = FULL_DUPLEX;
508 <                        }else{
508 >                        }
509 >                        if(knp->value.ui32 == 1){
510                                  network_iface_stat_ptr->dup = HALF_DUPLEX;
511                          }
512  
# Line 575 | Line 578 | network_iface_stat_t *get_network_iface_stats(int *ent
578                  network_iface_stat_ptr = network_iface_stats + ifaces;
579                  network_iface_stat_ptr->interface_name = strdup(name);
580                  network_iface_stat_ptr->speed = ethcmd->speed;
581 <                network_iface_stat_ptr->dup = UNKNOWN_DUPEX;
581 >                network_iface_stat_ptr->dup = UNKNOWN_DUPLEX;
582                  if(ethcmd->duplex == 0x00){
583                          network_iface_stat_ptr->dup = FULL_DUPLEX;
584                  }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines