Lines Matching refs:netconfigp

327 	struct netconfig *netconfigp; /* holds the new netconfig structure */  in fgetnetconfig()  local
354 if ((netconfigp = calloc(1, sizeof (struct netconfig))) == NULL) { in fgetnetconfig()
361 netconfigp->nc_netid = entnetid; in fgetnetconfig()
363 ((netconfigp->nc_semantics = in fgetnetconfig()
366 ((netconfigp->nc_flag = getflag(tok2)) == FAILURE) || in fgetnetconfig()
367 ((netconfigp->nc_protofmly = gettoken(NULL, FALSE)) == NULL) || in fgetnetconfig()
368 ((netconfigp->nc_proto = gettoken(NULL, FALSE)) == NULL) || in fgetnetconfig()
369 ((netconfigp->nc_device = gettoken(NULL, FALSE)) == NULL) || in fgetnetconfig()
371 (((netconfigp->nc_nlookups = getnlookups(tok3)) != 0) && in fgetnetconfig()
372 ((netconfigp->nc_lookups = getlookups(tok3)) == NULL))) { in fgetnetconfig()
373 netconfig_free(netconfigp); in fgetnetconfig()
375 netconfigp = NULL; in fgetnetconfig()
380 return (netconfigp); in fgetnetconfig()
892 netconfig_free(struct netconfig *netconfigp) in netconfig_free() argument
896 if (netconfigp == NULL) in netconfig_free()
898 free_entry(netconfigp->nc_netid); in netconfig_free()
899 free_entry(netconfigp->nc_protofmly); in netconfig_free()
900 free_entry(netconfigp->nc_proto); in netconfig_free()
901 free_entry(netconfigp->nc_device); in netconfig_free()
902 if (netconfigp->nc_lookups) in netconfig_free()
903 for (i = 0; i < netconfigp->nc_nlookups; i++) in netconfig_free()
904 free_entry(netconfigp->nc_lookups[i]); in netconfig_free()
905 free_entry(netconfigp->nc_lookups); in netconfig_free()
906 free(netconfigp); in netconfig_free()
910 netconfig_dup(struct netconfig *netconfigp) in netconfig_dup() argument
920 nconf->nc_netid = strdup(netconfigp->nc_netid); in netconfig_dup()
921 nconf->nc_protofmly = strdup(netconfigp->nc_protofmly); in netconfig_dup()
922 nconf->nc_proto = strdup(netconfigp->nc_proto); in netconfig_dup()
923 nconf->nc_device = strdup(netconfigp->nc_device); in netconfig_dup()
924 nconf->nc_lookups = malloc((netconfigp->nc_nlookups + 1) in netconfig_dup()
934 for (i = 0; i < netconfigp->nc_nlookups; i++) { in netconfig_dup()
935 nconf->nc_lookups[i] = strdup(netconfigp->nc_lookups[i]); in netconfig_dup()
944 nconf->nc_nlookups = netconfigp->nc_nlookups; in netconfig_dup()
945 nconf->nc_flag = netconfigp->nc_flag; in netconfig_dup()
946 nconf->nc_semantics = netconfigp->nc_semantics; in netconfig_dup()