Lines Matching refs:netconfigp

325 	struct netconfig *netconfigp; /* holds the new netconfig structure */  in fgetnetconfig()  local
352 if ((netconfigp = calloc(1, sizeof (struct netconfig))) == NULL) { in fgetnetconfig()
359 netconfigp->nc_netid = entnetid; in fgetnetconfig()
361 ((netconfigp->nc_semantics = in fgetnetconfig()
364 ((netconfigp->nc_flag = getflag(tok2)) == FAILURE) || in fgetnetconfig()
365 ((netconfigp->nc_protofmly = gettoken(NULL, FALSE)) == NULL) || in fgetnetconfig()
366 ((netconfigp->nc_proto = gettoken(NULL, FALSE)) == NULL) || in fgetnetconfig()
367 ((netconfigp->nc_device = gettoken(NULL, FALSE)) == NULL) || in fgetnetconfig()
369 (((netconfigp->nc_nlookups = getnlookups(tok3)) != 0) && in fgetnetconfig()
370 ((netconfigp->nc_lookups = getlookups(tok3)) == NULL))) { in fgetnetconfig()
371 netconfig_free(netconfigp); in fgetnetconfig()
373 netconfigp = NULL; in fgetnetconfig()
378 return (netconfigp); in fgetnetconfig()
890 netconfig_free(struct netconfig *netconfigp) in netconfig_free() argument
894 if (netconfigp == NULL) in netconfig_free()
896 free_entry(netconfigp->nc_netid); in netconfig_free()
897 free_entry(netconfigp->nc_protofmly); in netconfig_free()
898 free_entry(netconfigp->nc_proto); in netconfig_free()
899 free_entry(netconfigp->nc_device); in netconfig_free()
900 if (netconfigp->nc_lookups) in netconfig_free()
901 for (i = 0; i < netconfigp->nc_nlookups; i++) in netconfig_free()
902 free_entry(netconfigp->nc_lookups[i]); in netconfig_free()
903 free_entry(netconfigp->nc_lookups); in netconfig_free()
904 free(netconfigp); in netconfig_free()
908 netconfig_dup(struct netconfig *netconfigp) in netconfig_dup() argument
918 nconf->nc_netid = strdup(netconfigp->nc_netid); in netconfig_dup()
919 nconf->nc_protofmly = strdup(netconfigp->nc_protofmly); in netconfig_dup()
920 nconf->nc_proto = strdup(netconfigp->nc_proto); in netconfig_dup()
921 nconf->nc_device = strdup(netconfigp->nc_device); in netconfig_dup()
922 nconf->nc_lookups = malloc((netconfigp->nc_nlookups + 1) in netconfig_dup()
932 for (i = 0; i < netconfigp->nc_nlookups; i++) { in netconfig_dup()
933 nconf->nc_lookups[i] = strdup(netconfigp->nc_lookups[i]); in netconfig_dup()
942 nconf->nc_nlookups = netconfigp->nc_nlookups; in netconfig_dup()
943 nconf->nc_flag = netconfigp->nc_flag; in netconfig_dup()
944 nconf->nc_semantics = netconfigp->nc_semantics; in netconfig_dup()