Lines Matching refs:desc

428 		struct ifmedia_description *desc;
432 struct ifmedia_description *desc;
436 struct ifmedia_description *desc;
540 struct ifmedia_description *desc;
545 for (desc = ifm_type_descriptions, ttos = ifmedia_types_to_subtypes;
546 desc->ifmt_string != NULL; desc++, ttos++)
547 if (type == desc->ifmt_word)
549 if (desc->ifmt_string == NULL)
552 for (i = 0; ttos->subtypes[i].desc != NULL; i++) {
553 rval = lookup_media_word(ttos->subtypes[i].desc, val);
564 struct ifmedia_description *desc;
569 for (desc = ifm_type_descriptions, ttos = ifmedia_types_to_subtypes;
570 desc->ifmt_string != NULL; desc++, ttos++)
571 if (type == desc->ifmt_word)
573 if (desc->ifmt_string == NULL)
576 for (i = 0; ttos->modes[i].desc != NULL; i++) {
577 rval = lookup_media_word(ttos->modes[i].desc, val);
587 struct ifmedia_description *desc;
598 for (desc = ifm_type_descriptions, ttos = ifmedia_types_to_subtypes;
599 desc->ifmt_string != NULL; desc++, ttos++)
600 if (type == desc->ifmt_word)
602 if (desc->ifmt_string == NULL)
611 for (i = 0; ttos->options[i].desc != NULL; i++) {
612 option = lookup_media_word(ttos->options[i].desc, optptr);
626 lookup_media_word(struct ifmedia_description *desc, const char *val)
629 for (; desc->ifmt_string != NULL; desc++)
630 if (strcasecmp(desc->ifmt_string, val) == 0)
631 return (desc->ifmt_word);
638 struct ifmedia_description *desc;
640 for (desc = ifm_type_descriptions; desc->ifmt_string != NULL; desc++)
641 if (IFM_TYPE(ifmw) == desc->ifmt_word)
644 return desc;
649 struct ifmedia_description *desc;
652 for (desc = ifm_type_descriptions, ttos = ifmedia_types_to_subtypes;
653 desc->ifmt_string != NULL; desc++, ttos++)
654 if (IFM_TYPE(ifmw) == desc->ifmt_word)
664 struct ifmedia_description *desc;
666 for (i = 0; ttos->subtypes[i].desc != NULL; i++) {
669 for (desc = ttos->subtypes[i].desc;
670 desc->ifmt_string != NULL; desc++) {
671 if (IFM_SUBTYPE(ifmw) == desc->ifmt_word)
672 return desc;
683 struct ifmedia_description *desc;
685 for (i = 0; ttos->modes[i].desc != NULL; i++) {
688 for (desc = ttos->modes[i].desc;
689 desc->ifmt_string != NULL; desc++) {
690 if (IFM_MODE(ifmw) == desc->ifmt_word)
691 return desc;
701 struct ifmedia_description *desc;
706 desc = get_toptype_desc(ifmw);
708 if (desc->ifmt_string == NULL) {
712 printf("%s", desc->ifmt_string);
721 desc = get_subtype_desc(ifmw, ttos);
722 if (desc == NULL) {
730 printf("%s", desc->ifmt_string);
733 desc = get_mode_desc(ifmw, ttos);
734 if (desc != NULL && strcasecmp("autoselect", desc->ifmt_string))
735 printf(" mode %s", desc->ifmt_string);
739 for (i = 0; ttos->options[i].desc != NULL; i++) {
742 for (desc = ttos->options[i].desc;
743 desc->ifmt_string != NULL; desc++) {
744 if (ifmw & desc->ifmt_word) {
748 desc->ifmt_string);
761 struct ifmedia_description *desc;
766 desc = get_toptype_desc(ifmw);
768 if (desc->ifmt_string == NULL) {
779 desc = get_subtype_desc(ifmw, ttos);
780 if (desc == NULL) {
785 printf("media %s", desc->ifmt_string);
787 desc = get_mode_desc(ifmw, ttos);
788 if (desc != NULL)
789 printf(" mode %s", desc->ifmt_string);
792 for (i = 0; ttos->options[i].desc != NULL; i++) {
795 for (desc = ttos->options[i].desc;
796 desc->ifmt_string != NULL; desc++) {
797 if (ifmw & desc->ifmt_word) {
801 desc->ifmt_string);