Lines Matching defs:iflist

403 	smb_hostifs_t *iflist;
432 iflist = list_head(&hlist.h_list);
435 for (i = 0; i < iflist->if_num; i++) {
436 ifname = iflist->if_names[i];
445 (void) strlcpy(nc->nic_host, iflist->if_host,
447 (void) strlcpy(nc->nic_cmnt, iflist->if_cmnt,
462 } while ((iflist = list_next(&hlist.h_list, iflist)) != NULL);
573 smb_hostifs_t *iflist;
578 while ((iflist = list_head(&hlist->h_list)) != NULL) {
579 list_remove(&hlist->h_list, iflist);
580 smb_nic_iflist_destroy(iflist);
604 smb_hostifs_t *iflist;
652 iflist = smb_nic_iflist_create(host, cmnt, lifn.lifn_count);
653 if (iflist == NULL) {
661 if (smb_nic_isduplicate(lifrp, iflist))
672 smb_nic_iflist_destroy(iflist);
675 iflist->if_names[iflist->if_num++] = ifname;
678 hlist->h_ifnum = iflist->if_num;
680 list_insert_tail(&hlist->h_list, iflist);
689 * given list (iflist)
692 smb_nic_isduplicate(struct lifreq *lifrp, smb_hostifs_t *iflist)
696 for (j = 0; j < iflist->if_num; j++)
697 if (strcmp(iflist->if_names[j], lifrp->lifr_name) == 0)
728 smb_hostifs_t *iflist;
764 iflist = smb_nic_iflist_decode(vm, &err);
765 if (iflist == NULL)
768 list_insert_tail(&hlist->h_list, iflist);
770 hlist->h_ifnum += iflist->if_num;
802 smb_hostifs_t *iflist;
823 iflist = smb_nic_iflist_create(host, cmnt, if_num);
824 if (iflist == NULL) {
831 iflist->if_names[iflist->if_num++] = strndup(ifnames,
835 iflist->if_names[iflist->if_num++] = strdup(ifnames);
837 for (if_num = 0; if_num < iflist->if_num; if_num++) {
838 if (iflist->if_names[if_num] == NULL) {
839 smb_nic_iflist_destroy(iflist);
846 return (iflist);
853 * than 'if_num'. iflist->if_num indicates the actual number of interfaces
854 * in iflist->if_names array so it's initialized to 0.
859 smb_hostifs_t *iflist;
861 if ((iflist = malloc(sizeof (smb_hostifs_t))) == NULL)
864 iflist->if_names = calloc(if_num, sizeof (char *));
865 if (iflist->if_names == NULL) {
866 free(iflist);
870 iflist->if_num = 0;
871 (void) strlcpy(iflist->if_host, hostname, sizeof (iflist->if_host));
872 (void) strlcpy(iflist->if_cmnt, (cmnt) ? cmnt : "",
873 sizeof (iflist->if_cmnt));
875 return (iflist);
884 smb_nic_iflist_destroy(smb_hostifs_t *iflist)
888 if (iflist == NULL)
891 if (iflist->if_names != NULL) {
892 for (i = 0; i < iflist->if_num; i++)
893 free(iflist->if_names[i]);
894 free(iflist->if_names);
897 free(iflist);
1197 smb_nic_nbt_get_exclude_list(char *excludestr, char **iflist, int max_nifs)
1202 bzero(iflist, SMB_NIC_MAXEXCLLIST_NUM * sizeof (char *));
1210 while (((iflist[n] = strsep(&excludestr, ",")) != NULL) &&
1212 entry = iflist[n];