Lines Matching defs:svi
104 ndr_svinfo_t *svi;
109 while ((svi = list_head(&ndr_svlist.svl_list)) != NULL) {
110 list_remove(&ndr_svlist.svl_list, svi);
111 free(svi->svi_svinfo.sv_name);
112 free(svi->svi_svinfo.sv_comment);
113 free(svi);
593 ndr_svinfo_t *svi;
599 svi = list_head(&ndr_svlist.svl_list);
600 while (svi != NULL) {
601 if (ndr_svinfo_expired(svi)) {
602 svi = list_head(&ndr_svlist.svl_list);
606 if (ndr_svinfo_match(server, domain, svi)) {
607 bcopy(&svi->svi_svinfo, svinfo,
615 svi = list_next(&ndr_svlist.svl_list, svi);
618 if ((svi = malloc(sizeof (ndr_svinfo_t))) == NULL) {
623 if (srvsvc_net_server_getinfo(server, domain, &svi->svi_svinfo) < 0) {
625 free(svi);
629 (void) time(&svi->svi_tcached);
630 (void) strlcpy(svi->svi_server, server, MAXNAMELEN);
631 (void) strlcpy(svi->svi_domain, domain, MAXNAMELEN);
632 list_insert_tail(&ndr_svlist.svl_list, svi);
633 bcopy(&svi->svi_svinfo, svinfo, sizeof (srvsvc_server_info_t));
648 const ndr_svinfo_t *svi)
650 if ((smb_strcasecmp(server, svi->svi_server, 0) == 0) &&
651 (smb_strcasecmp(domain, svi->svi_domain, 0) == 0)) {
666 ndr_svinfo_expired(ndr_svinfo_t *svi)
672 if (difftime(tnow, svi->svi_tcached) > NDR_SVINFO_TIMEOUT) {
673 list_remove(&ndr_svlist.svl_list, svi);
674 free(svi->svi_svinfo.sv_name);
675 free(svi->svi_svinfo.sv_comment);
676 free(svi);