38 |
|
DOUBLE, |
39 |
|
STRING, |
40 |
|
INT, |
41 |
+ |
BOOL, |
42 |
|
DUPLEX |
43 |
|
} stat_type; |
44 |
|
|
375 |
|
|
376 |
|
add_stat(INT, &iface[i].speed, |
377 |
|
"net", name, "speed", NULL); |
378 |
+ |
add_stat(BOOL, &iface[i].up, |
379 |
+ |
"net", name, "up", NULL); |
380 |
|
add_stat(DUPLEX, &iface[i].dup, |
381 |
|
"net", name, "duplex", NULL); |
382 |
|
} |
477 |
|
case INT: |
478 |
|
printf("%d", *(int *)v); |
479 |
|
break; |
480 |
+ |
case BOOL: |
481 |
+ |
printf("%s", *(int *)v ? "true" : "false"); |
482 |
+ |
break; |
483 |
|
case DUPLEX: |
484 |
< |
switch (*(duplex *) v) { |
484 |
> |
switch (*(statgrab_duplex *) v) { |
485 |
|
case FULL_DUPLEX: |
486 |
|
printf("full"); |
487 |
|
break; |