Changeset View
Changeset View
Standalone View
Standalone View
head/lib/libifconfig/libifconfig_media.c
Show First 20 Lines • Show All 367 Lines • ▼ Show 20 Lines | ifconfig_media_get_status(const struct ifmediareq *ifmr) | ||||
case IFM_ATM: | case IFM_ATM: | ||||
if (ifmr->ifm_status & IFM_ACTIVE) { | if (ifmr->ifm_status & IFM_ACTIVE) { | ||||
return ("active"); | return ("active"); | ||||
} else { | } else { | ||||
return ("no carrier"); | return ("no carrier"); | ||||
} | } | ||||
break; | break; | ||||
case IFM_FDDI: | |||||
case IFM_TOKEN: | |||||
if (ifmr->ifm_status & IFM_ACTIVE) { | |||||
return ("inserted"); | |||||
} else { | |||||
return ("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) { | ||||
return ("associated"); | return ("associated"); | ||||
} else { | } else { | ||||
return ("running"); | return ("running"); | ||||
} | } | ||||
Show All 38 Lines |