--- projects/libstatgrab/src/libstatgrab/statgrab.h 2004/04/08 13:44:44 1.49 +++ projects/libstatgrab/src/libstatgrab/statgrab.h 2005/07/13 09:31:54 1.55 @@ -18,9 +18,12 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA * 02111-1307 USA * - * $Id: statgrab.h,v 1.49 2004/04/08 13:44:44 ats Exp $ + * $Id: statgrab.h,v 1.55 2005/07/13 09:31:54 tdb Exp $ */ +#ifndef STATGRAB_H +#define STATGRAB_H + #include /* FIXME typedefs for 32/64-bit types */ @@ -60,12 +63,15 @@ typedef enum { SG_ERROR_SYSCTLNAMETOMIB, SG_ERROR_UNAME, SG_ERROR_UNSUPPORTED, - SG_ERROR_XSW_VER_MISMATCH + SG_ERROR_XSW_VER_MISMATCH, + SG_ERROR_PSTAT } sg_error; void sg_set_error(sg_error code, const char *arg); +void sg_set_error_with_errno(sg_error code, const char *arg); sg_error sg_get_error(); const char *sg_get_error_arg(); +int sg_get_error_errno(); const char *sg_str_error(sg_error code); typedef struct { @@ -192,7 +198,10 @@ typedef enum { typedef struct { char *interface_name; int speed; /* In megabits/sec */ + sg_iface_duplex duplex; +#ifdef SG_ENABLE_DEPRECATED sg_iface_duplex dup; +#endif int up; } sg_network_iface_stats; @@ -263,3 +272,4 @@ sg_process_count *sg_get_process_count(); #include #endif +#endif