465 |
|
break; |
466 |
|
} |
467 |
|
|
468 |
+ |
if((ifmr.ifm_status & IFM_ACTIVE)){ |
469 |
+ |
network_iface_stat_ptr->up = 1; |
470 |
+ |
}else{ |
471 |
+ |
network_iface_stat_ptr->up = 0; |
472 |
+ |
} |
473 |
+ |
|
474 |
|
if( (ifmed.ifm_active | IFM_FDX) == ifmed.ifm_active ){ |
475 |
|
network_iface_stat_ptr->dup = FULL_DUPLEX; |
476 |
|
}else if( (ifmed.ifm_active | IFM_HDX) == ifmed.ifm_active ){ |
503 |
|
network_iface_stat_ptr = network_iface_stats + ifaces; |
504 |
|
network_iface_stat_ptr->speed = knp->value.ui64 / (1000*1000); |
505 |
|
|
506 |
+ |
if((knp=kstat_data_lookup(ksp, "link_up"))==NULL){ |
507 |
+ |
/* Not a network interface, so skip to the next entry */ |
508 |
+ |
continue; |
509 |
+ |
} |
510 |
+ |
/* Solaris has 1 for up, and 0 for not. As we do too */ |
511 |
+ |
network_iface_stat_ptr->up = value.ui32; |
512 |
+ |
|
513 |
|
if((knp=kstat_data_lookup(ksp, "link_duplex"))==NULL){ |
514 |
|
/* Not a network interface, so skip to the next entry */ |
515 |
|
continue; |
591 |
|
network_iface_stat_ptr = network_iface_stats + ifaces; |
592 |
|
network_iface_stat_ptr->interface_name = strdup(name); |
593 |
|
network_iface_stat_ptr->speed = ethcmd->speed; |
594 |
+ |
if((ifr.ifr_flags & IFF_UP) != 0){ |
595 |
+ |
network_iface_stat_ptr->up = 1; |
596 |
+ |
}else{ |
597 |
+ |
network_iface_stat_ptr->up = 0; |
598 |
+ |
} |
599 |
+ |
|
600 |
|
network_iface_stat_ptr->dup = UNKNOWN_DUPLEX; |
601 |
|
if(ethcmd->duplex == 0x00){ |
602 |
|
network_iface_stat_ptr->dup = FULL_DUPLEX; |