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.44 by ats, Sat Feb 14 16:58:19 2004 UTC vs.
Revision 1.46 by tdb, Sat Mar 6 19:04:29 2004 UTC

# Line 151 | Line 151 | network_stat_t *get_network_stats(int *entries){
151                  if(network_stat_ptr->interface_name==NULL) return NULL;
152                  net_data=(struct if_data *)net_ptr->ifa_data;
153                  network_stat_ptr->rx=net_data->ifi_ibytes;
154 <                network_stat_ptr->tx=net_data->ifi_obytes;                      
154 >                network_stat_ptr->tx=net_data->ifi_obytes;
155 >                network_stat_ptr->ipackets=net_data->ifi_ipackets;
156 >                network_stat_ptr->opackets=net_data->ifi_opackets;
157 >                network_stat_ptr->ierrors=net_data->ifi_ierrors;
158 >                network_stat_ptr->oerrors=net_data->ifi_oerrors;
159 >                network_stat_ptr->collisions=net_data->ifi_collisions;
160                  network_stat_ptr->systime=time(NULL);
161                  interfaces++;
162          }
# Line 262 | Line 267 | network_stat_t *get_network_stats(int *entries){
267   }
268  
269   long long transfer_diff(long long new, long long old){
270 < #if defined(SOL7) || defined(LINUX) || defined(FREEBSD)
270 > #if defined(SOL7) || defined(LINUX) || defined(FREEBSD) || defined(DFBSD)
271   #define MAXVAL 4294967296LL
272   #else
273   #define MAXVAL 18446744073709551616LL
# Line 477 | Line 482 | network_iface_stat_t *get_network_iface_stats(int *ent
482                          case(IFM_1000_SX):
483                          case(IFM_1000_LX):
484                          case(IFM_1000_CX):
485 < #if defined(FREEBSD) && !defined(FREEBSD5)
486 <                        case(IFM_1000_TX):
487 <                        case(IFM_1000_FX):
488 < #else
489 <                        case(IFM_1000_T):
485 > #ifdef IFM_1000_TX
486 >                        case(IFM_1000_TX): /* FreeBSD 4 and others? */
487 > #endif
488 > #ifdef IFM_1000_FX
489 >                        case(IFM_1000_FX): /* FreeBSD 4 */
490 > #endif
491 > #ifdef IFM_1000_T
492 >                        case(IFM_1000_T): /* FreeBSD 5 */
493   #endif
494                                  network_iface_stat_ptr->speed = 1000;
495                                  break;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines