Lines Matching refs:cfp

137 	struct __nsw_switchconfig_v1 *cfp;  in _nsw_getoneconfig_v1()  local
145 if ((cfp = libc_malloc(sizeof (struct __nsw_switchconfig_v1))) in _nsw_getoneconfig_v1()
150 LIBC_STRDUP(cfp->dbase, name); in _nsw_getoneconfig_v1()
151 lkq = &cfp->lookups; in _nsw_getoneconfig_v1()
159 return (cfp); in _nsw_getoneconfig_v1()
164 freeconf_v1(cfp); in _nsw_getoneconfig_v1()
187 cfp->num_lookups++; in _nsw_getoneconfig_v1()
219 return (cfp); in _nsw_getoneconfig_v1()
288 return (cfp); in _nsw_getoneconfig_v1()
304 cfp->num_lookups++; in _nsw_getoneconfig_v1()
305 return (cfp); in _nsw_getoneconfig_v1()
312 cfp->num_lookups++; in _nsw_getoneconfig_v1()
318 freeconf_v1(cfp); in _nsw_getoneconfig_v1()
332 struct __nsw_switchconfig *cfp; in _nsw_getoneconfig() local
340 if ((cfp = libc_malloc(sizeof (struct __nsw_switchconfig))) in _nsw_getoneconfig()
345 LIBC_STRDUP(cfp->dbase, name); in _nsw_getoneconfig()
346 lkq = &cfp->lookups; in _nsw_getoneconfig()
354 return (cfp); in _nsw_getoneconfig()
359 freeconf(cfp); in _nsw_getoneconfig()
380 cfp->num_lookups++; in _nsw_getoneconfig()
406 return (cfp); in _nsw_getoneconfig()
449 return (cfp); in _nsw_getoneconfig()
464 cfp->num_lookups++; in _nsw_getoneconfig()
465 return (cfp); in _nsw_getoneconfig()
471 cfp->num_lookups++; in _nsw_getoneconfig()
477 freeconf(cfp); in _nsw_getoneconfig()
517 struct __nsw_switchconfig_v1 *cfp, *retp = NULL; in __nsw_getconfig_v1() local
525 cfp = scrounge_cache_v1(dbase); in __nsw_getconfig_v1()
526 if (cfp != NULL) { in __nsw_getconfig_v1()
531 return (cfp); in __nsw_getconfig_v1()
570 cfp = scrounge_cache_v1(tokenp); in __nsw_getconfig_v1()
571 if (cfp != NULL) { in __nsw_getconfig_v1()
574 cfp = _nsw_getoneconfig_v1(tokenp, linep, &line_err); in __nsw_getconfig_v1()
575 if (cfp != NULL) { in __nsw_getconfig_v1()
576 (void) add_concell_v1(cfp); in __nsw_getconfig_v1()
577 if (strcmp(cfp->dbase, dbase) == 0) { in __nsw_getconfig_v1()
579 retp = cfp; in __nsw_getconfig_v1()
618 struct __nsw_switchconfig *cfp, *retp = NULL; in __nsw_getconfig() local
626 cfp = scrounge_cache(dbase); in __nsw_getconfig()
627 if (cfp != NULL) { in __nsw_getconfig()
632 return (cfp); in __nsw_getconfig()
671 cfp = scrounge_cache(tokenp); in __nsw_getconfig()
672 if (cfp != NULL) { in __nsw_getconfig()
675 cfp = _nsw_getoneconfig(tokenp, linep, &line_err); in __nsw_getconfig()
676 if (cfp != NULL) { in __nsw_getconfig()
677 (void) add_concell(cfp); in __nsw_getconfig()
678 if (strcmp(cfp->dbase, dbase) == 0) { in __nsw_getconfig()
680 retp = cfp; in __nsw_getconfig()
740 freeconf_v1(struct __nsw_switchconfig_v1 *cfp) in freeconf_v1() argument
742 if (cfp) { in freeconf_v1()
743 if (cfp->dbase) in freeconf_v1()
744 libc_free(cfp->dbase); in freeconf_v1()
745 if (cfp->lookups) { in freeconf_v1()
747 for (cur = cfp->lookups; cur; cur = nex) { in freeconf_v1()
753 libc_free(cfp); in freeconf_v1()
758 freeconf(struct __nsw_switchconfig *cfp) in freeconf() argument
760 if (cfp) { in freeconf()
761 if (cfp->dbase) in freeconf()
762 libc_free(cfp->dbase); in freeconf()
763 if (cfp->lookups) { in freeconf()
765 for (cur = cfp->lookups; cur; cur = nex) { in freeconf()
771 libc_free(cfp); in freeconf()
860 add_concell_v1(struct __nsw_switchconfig_v1 *cfp) in add_concell_v1() argument
864 if (cfp == NULL) in add_concell_v1()
868 cp->sw = cfp; in add_concell_v1()
876 add_concell(struct __nsw_switchconfig *cfp) in add_concell() argument
880 if (cfp == NULL) in add_concell()
884 cp->sw = cfp; in add_concell()