1 |
|
# |
2 |
< |
# i-scream central monitoring system |
2 |
> |
# i-scream pystatgrab |
3 |
|
# http://www.i-scream.org |
4 |
|
# Copyright (C) 2000-2004 i-scream |
5 |
|
# |
98 |
|
char *interface_name |
99 |
|
long long tx |
100 |
|
long long rx |
101 |
+ |
long long ipackets |
102 |
+ |
long long opackets |
103 |
+ |
long long ierrors |
104 |
+ |
long long oerrors |
105 |
+ |
long long collisions |
106 |
|
time_t systime |
107 |
|
|
108 |
|
ctypedef enum statgrab_duplex: |
362 |
|
{'interface_name': s.interface_name, |
363 |
|
'tx': s.tx, |
364 |
|
'rx': s.rx, |
365 |
+ |
'ipackets': s.ipackets, |
366 |
+ |
'opackets': s.opackets, |
367 |
+ |
'ierrors': s.ierrors, |
368 |
+ |
'oerrors': s.oerrors, |
369 |
+ |
'collisions': s.collisions, |
370 |
|
'systime': s.systime, |
371 |
|
} |
372 |
|
)) |
385 |
|
{'interface_name': s.interface_name, |
386 |
|
'tx': s.tx, |
387 |
|
'rx': s.rx, |
388 |
+ |
'ipackets': s.ipackets, |
389 |
+ |
'opackets': s.opackets, |
390 |
+ |
'ierrors': s.ierrors, |
391 |
+ |
'oerrors': s.oerrors, |
392 |
+ |
'collisions': s.collisions, |
393 |
|
'systime': s.systime, |
394 |
|
} |
395 |
|
)) |
437 |
|
) |
438 |
|
|
439 |
|
def py_statgrab_init(): |
440 |
< |
return statgrab_init() |
440 |
> |
if statgrab_init() == 0: |
441 |
> |
return True |
442 |
> |
else: |
443 |
> |
return False |
444 |
|
|
445 |
|
def py_statgrab_drop_privileges(): |
446 |
< |
return statgrab_drop_privileges() |
446 |
> |
if statgrab_drop_privileges() == 0: |
447 |
> |
return True |
448 |
> |
else: |
449 |
> |
return False |