--- projects/libstatgrab/src/libstatgrab/statgrab.h 2003/10/20 15:25:47 1.14 +++ projects/libstatgrab/src/libstatgrab/statgrab.h 2004/02/13 14:39:34 1.26 @@ -1,21 +1,24 @@ -/* +/* * i-scream central monitoring system * http://www.i-scream.org - * Copyright (C) 2000-2003 i-scream + * Copyright (C) 2000-2004 i-scream * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. * - * This program is distributed in the hope that it will be useful, + * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + * 02111-1307 USA + * + * $Id: statgrab.h,v 1.26 2004/02/13 14:39:34 pajs Exp $ */ #include @@ -54,13 +57,6 @@ typedef struct{ double min15; }load_stat_t; -#ifdef SOLARIS -#define MAX_LOGIN_NAME_SIZE 8 -#endif -#if defined(LINUX) || defined(FREEBSD) -#define MAX_LOGIN_NAME_SIZE UT_NAMESIZE -#endif - typedef struct{ char *name_list; int num_entries; @@ -115,7 +111,19 @@ typedef struct{ time_t systime; }network_stat_t; +typedef enum{ + FULL_DUPLEX, + HALF_DUPLEX, + UNKNOWN_DUPLEX +}statgrab_duplex; + typedef struct{ + char *interface_name; + int speed; /* In megabits/sec */ + statgrab_duplex dup; +}network_iface_stat_t; + +typedef struct{ long long pages_pagein; long long pages_pageout; time_t systime; @@ -144,7 +152,11 @@ process_stat_t *get_process_stats(); network_stat_t *get_network_stats(int *entries); network_stat_t *get_network_stats_diff(int *entries); +network_iface_stat_t *get_network_iface_stats(int *entries); + page_stat_t *get_page_stats(); page_stat_t *get_page_stats_diff(); int statgrab_init(void); +int statgrab_drop_privileges(void); +