--- projects/pystatgrab/_statgrab.pyx 2004/02/13 12:03:29 1.6 +++ projects/pystatgrab/_statgrab.pyx 2004/02/14 18:07:30 1.8 @@ -17,7 +17,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # -# $Id: _statgrab.pyx,v 1.6 2004/02/13 12:03:29 tdb Exp $ +# $Id: _statgrab.pyx,v 1.8 2004/02/14 18:07:30 tdb Exp $ # ctypedef long time_t @@ -100,15 +100,16 @@ cdef extern from "statgrab.h": long long rx time_t systime - ctypedef enum duplex: + ctypedef enum statgrab_duplex: FULL_DUPLEX HALF_DUPLEX - NO_DUPLEX + UNKNOWN_DUPLEX ctypedef struct network_iface_stat_t: char *interface_name int speed - duplex dup + statgrab_duplex dup + int up ctypedef struct page_stat_t: long long pages_pagein @@ -136,6 +137,11 @@ cdef extern from "statgrab.h": cdef extern int statgrab_drop_privileges() +py_FULL_DUPLEX = FULL_DUPLEX +py_HALF_DUPLEX = HALF_DUPLEX +py_UNKNOWN_DUPLEX = UNKNOWN_DUPLEX + + class Result: def __init__(self, attrs): self.attrs = attrs @@ -387,6 +393,7 @@ def py_get_network_iface_stats(): {'interface_name': s.interface_name, 'speed': s.speed, 'dup': s.dup, + 'up' : s.up, } )) s = s + 1