Lines Matching refs:desc
403 struct ifmedia_description *desc; member
407 struct ifmedia_description *desc; member
411 struct ifmedia_description *desc; member
479 struct ifmedia_description *desc; in get_media_subtype() local
484 for (desc = ifm_type_descriptions, ttos = ifmedia_types_to_subtypes; in get_media_subtype()
485 desc->ifmt_string != NULL; desc++, ttos++) in get_media_subtype()
486 if (type == desc->ifmt_word) in get_media_subtype()
488 if (desc->ifmt_string == NULL) in get_media_subtype()
491 for (i = 0; ttos->subtypes[i].desc != NULL; i++) { in get_media_subtype()
492 rval = lookup_media_word(ttos->subtypes[i].desc, val); in get_media_subtype()
503 struct ifmedia_description *desc; in get_media_mode() local
508 for (desc = ifm_type_descriptions, ttos = ifmedia_types_to_subtypes; in get_media_mode()
509 desc->ifmt_string != NULL; desc++, ttos++) in get_media_mode()
510 if (type == desc->ifmt_word) in get_media_mode()
512 if (desc->ifmt_string == NULL) in get_media_mode()
515 for (i = 0; ttos->modes[i].desc != NULL; i++) { in get_media_mode()
516 rval = lookup_media_word(ttos->modes[i].desc, val); in get_media_mode()
526 struct ifmedia_description *desc; in get_media_options() local
537 for (desc = ifm_type_descriptions, ttos = ifmedia_types_to_subtypes; in get_media_options()
538 desc->ifmt_string != NULL; desc++, ttos++) in get_media_options()
539 if (type == desc->ifmt_word) in get_media_options()
541 if (desc->ifmt_string == NULL) in get_media_options()
550 for (i = 0; ttos->options[i].desc != NULL; i++) { in get_media_options()
551 option = lookup_media_word(ttos->options[i].desc, optptr); in get_media_options()
565 lookup_media_word(struct ifmedia_description *desc, const char *val) in lookup_media_word() argument
568 for (; desc->ifmt_string != NULL; desc++) in lookup_media_word()
569 if (strcasecmp(desc->ifmt_string, val) == 0) in lookup_media_word()
570 return (desc->ifmt_word); in lookup_media_word()
577 struct ifmedia_description *desc; in get_toptype_desc() local
579 for (desc = ifm_type_descriptions; desc->ifmt_string != NULL; desc++) in get_toptype_desc()
580 if (IFM_TYPE(ifmw) == desc->ifmt_word) in get_toptype_desc()
583 return desc; in get_toptype_desc()
588 struct ifmedia_description *desc; in get_toptype_ttos() local
591 for (desc = ifm_type_descriptions, ttos = ifmedia_types_to_subtypes; in get_toptype_ttos()
592 desc->ifmt_string != NULL; desc++, ttos++) in get_toptype_ttos()
593 if (IFM_TYPE(ifmw) == desc->ifmt_word) in get_toptype_ttos()
603 struct ifmedia_description *desc; in get_subtype_desc() local
605 for (i = 0; ttos->subtypes[i].desc != NULL; i++) { in get_subtype_desc()
608 for (desc = ttos->subtypes[i].desc; in get_subtype_desc()
609 desc->ifmt_string != NULL; desc++) { in get_subtype_desc()
610 if (IFM_SUBTYPE(ifmw) == desc->ifmt_word) in get_subtype_desc()
611 return desc; in get_subtype_desc()
622 struct ifmedia_description *desc; in get_mode_desc() local
624 for (i = 0; ttos->modes[i].desc != NULL; i++) { in get_mode_desc()
627 for (desc = ttos->modes[i].desc; in get_mode_desc()
628 desc->ifmt_string != NULL; desc++) { in get_mode_desc()
629 if (IFM_MODE(ifmw) == desc->ifmt_word) in get_mode_desc()
630 return desc; in get_mode_desc()
640 struct ifmedia_description *desc; in print_media_word() local
645 desc = get_toptype_desc(ifmw); in print_media_word()
647 if (desc->ifmt_string == NULL) { in print_media_word()
651 printf("%s", desc->ifmt_string); in print_media_word()
660 desc = get_subtype_desc(ifmw, ttos); in print_media_word()
661 if (desc == NULL) { in print_media_word()
669 printf("%s", desc->ifmt_string); in print_media_word()
672 desc = get_mode_desc(ifmw, ttos); in print_media_word()
673 if (desc != NULL && strcasecmp("autoselect", desc->ifmt_string)) in print_media_word()
674 printf(" mode %s", desc->ifmt_string); in print_media_word()
678 for (i = 0; ttos->options[i].desc != NULL; i++) { in print_media_word()
681 for (desc = ttos->options[i].desc; in print_media_word()
682 desc->ifmt_string != NULL; desc++) { in print_media_word()
683 if (ifmw & desc->ifmt_word) { in print_media_word()
687 desc->ifmt_string); in print_media_word()
700 struct ifmedia_description *desc; in print_media_word_ifconfig() local
705 desc = get_toptype_desc(ifmw); in print_media_word_ifconfig()
707 if (desc->ifmt_string == NULL) { in print_media_word_ifconfig()
718 desc = get_subtype_desc(ifmw, ttos); in print_media_word_ifconfig()
719 if (desc == NULL) { in print_media_word_ifconfig()
724 printf("media %s", desc->ifmt_string); in print_media_word_ifconfig()
726 desc = get_mode_desc(ifmw, ttos); in print_media_word_ifconfig()
727 if (desc != NULL) in print_media_word_ifconfig()
728 printf(" mode %s", desc->ifmt_string); in print_media_word_ifconfig()
731 for (i = 0; ttos->options[i].desc != NULL; i++) { in print_media_word_ifconfig()
734 for (desc = ttos->options[i].desc; in print_media_word_ifconfig()
735 desc->ifmt_string != NULL; desc++) { in print_media_word_ifconfig()
736 if (ifmw & desc->ifmt_word) { in print_media_word_ifconfig()
740 desc->ifmt_string); in print_media_word_ifconfig()