Changeset View
Changeset View
Standalone View
Standalone View
head/sbin/ifconfig/ifmedia.c
Show First 20 Lines • Show All 162 Lines • ▼ Show 20 Lines | if (ifmr.ifm_status & IFM_AVALID) { | ||||
case IFM_ETHER: | case IFM_ETHER: | ||||
case IFM_ATM: | case IFM_ATM: | ||||
if (ifmr.ifm_status & IFM_ACTIVE) | if (ifmr.ifm_status & IFM_ACTIVE) | ||||
printf("active"); | printf("active"); | ||||
else | else | ||||
printf("no carrier"); | printf("no carrier"); | ||||
break; | break; | ||||
case IFM_FDDI: | |||||
case IFM_TOKEN: | |||||
if (ifmr.ifm_status & IFM_ACTIVE) | |||||
printf("inserted"); | |||||
else | |||||
printf("no ring"); | |||||
break; | |||||
case IFM_IEEE80211: | case IFM_IEEE80211: | ||||
if (ifmr.ifm_status & IFM_ACTIVE) { | if (ifmr.ifm_status & IFM_ACTIVE) { | ||||
/* NB: only sta mode associates */ | /* NB: only sta mode associates */ | ||||
if (IFM_OPMODE(ifmr.ifm_active) == IFM_IEEE80211_STA) | if (IFM_OPMODE(ifmr.ifm_active) == IFM_IEEE80211_STA) | ||||
printf("associated"); | printf("associated"); | ||||
else | else | ||||
printf("running"); | printf("running"); | ||||
} else | } else | ||||
▲ Show 20 Lines • Show All 642 Lines • Show Last 20 Lines |