Lines Matching refs:desc

130 lookup_media_desc(const struct ifmedia_description *desc, const char *name)  in lookup_media_desc()  argument
133 for (; desc->ifmt_string != NULL; ++desc) in lookup_media_desc()
134 if (strcasecmp(desc->ifmt_string, name) == 0) in lookup_media_desc()
135 return (desc); in lookup_media_desc()
141 const struct ifmedia_description *desc; member
146 const struct ifmedia_description *desc; member
151 const struct ifmedia_description *desc; member
221 const struct ifmedia_description *desc; in get_toptype_ttos() local
224 for (desc = ifm_type_descriptions, ttos = ifmedia_types_to_subtypes; in get_toptype_ttos()
225 desc->ifmt_string != NULL; desc++, ttos++) { in get_toptype_ttos()
226 if (IFM_TYPE(media) == desc->ifmt_word) in get_toptype_ttos()
236 const struct ifmedia_description *desc; in ifconfig_media_get_type() local
238 for (desc = ifm_type_descriptions; desc->ifmt_string != NULL; ++desc) { in ifconfig_media_get_type()
239 if (IFM_TYPE(media) == desc->ifmt_word) in ifconfig_media_get_type()
240 return (desc->ifmt_string); in ifconfig_media_get_type()
249 const struct ifmedia_description *desc; in ifconfig_media_lookup_type() local
251 desc = lookup_media_desc(ifm_type_descriptions, name); in ifconfig_media_lookup_type()
252 return (desc == NULL ? INVALID_IFMEDIA : desc->ifmt_word); in ifconfig_media_lookup_type()
258 const struct ifmedia_description *desc; in ifconfig_media_get_subtype() local
267 for (size_t i = 0; ttos->subtypes[i].desc != NULL; ++i) { in ifconfig_media_get_subtype()
270 for (desc = ttos->subtypes[i].desc; in ifconfig_media_get_subtype()
271 desc->ifmt_string != NULL; ++desc) { in ifconfig_media_get_subtype()
272 if (IFM_SUBTYPE(media) == desc->ifmt_word) in ifconfig_media_get_subtype()
273 return (desc->ifmt_string); in ifconfig_media_get_subtype()
283 const struct ifmedia_description *desc; in ifconfig_media_lookup_subtype() local
292 for (size_t i = 0; ttos->subtypes[i].desc != NULL; ++i) { in ifconfig_media_lookup_subtype()
293 desc = lookup_media_desc(ttos->subtypes[i].desc, name); in ifconfig_media_lookup_subtype()
294 if (desc != NULL) in ifconfig_media_lookup_subtype()
295 return (desc->ifmt_word); in ifconfig_media_lookup_subtype()
304 const struct ifmedia_description *desc; in ifconfig_media_get_mode() local
313 for (size_t i = 0; ttos->modes[i].desc != NULL; ++i) { in ifconfig_media_get_mode()
316 for (desc = ttos->modes[i].desc; in ifconfig_media_get_mode()
317 desc->ifmt_string != NULL; ++desc) { in ifconfig_media_get_mode()
318 if (IFM_MODE(media) == desc->ifmt_word) in ifconfig_media_get_mode()
319 return (desc->ifmt_string); in ifconfig_media_get_mode()
329 const struct ifmedia_description *desc; in ifconfig_media_lookup_mode() local
338 for (size_t i = 0; ttos->modes[i].desc != NULL; ++i) { in ifconfig_media_lookup_mode()
339 desc = lookup_media_desc(ttos->modes[i].desc, name); in ifconfig_media_lookup_mode()
340 if (desc != NULL) in ifconfig_media_lookup_mode()
341 return (desc->ifmt_word); in ifconfig_media_lookup_mode()
351 const struct ifmedia_description *desc; in ifconfig_media_get_options() local
362 for (size_t i = 0; ttos->options[i].desc != NULL; ++i) { in ifconfig_media_get_options()
365 for (desc = ttos->options[i].desc; in ifconfig_media_get_options()
366 desc->ifmt_string != NULL; ++desc) { in ifconfig_media_get_options()
367 if ((media & desc->ifmt_word) != 0) in ifconfig_media_get_options()
382 for (size_t i = 0; ttos->options[i].desc != NULL; ++i) { in ifconfig_media_get_options()
385 for (desc = ttos->options[i].desc; in ifconfig_media_get_options()
386 desc->ifmt_string != NULL; ++desc) { in ifconfig_media_get_options()
387 if ((media & desc->ifmt_word) != 0) { in ifconfig_media_get_options()
388 options[n] = desc->ifmt_string; in ifconfig_media_get_options()
400 const struct ifmedia_description *desc, *opt; in ifconfig_media_lookup_options() local
417 for (size_t i = 0; ttos->options[i].desc != NULL; ++i) { in ifconfig_media_lookup_options()
418 desc = ttos->options[i].desc; in ifconfig_media_lookup_options()
420 opt = lookup_media_desc(desc, opts[j]); in ifconfig_media_lookup_options()