Lines Matching defs:netconfigp

324 	struct netconfig *netconfigp; /* holds the new netconfig structure */
351 if ((netconfigp = calloc(1, sizeof (struct netconfig))) == NULL) {
358 netconfigp->nc_netid = entnetid;
360 ((netconfigp->nc_semantics =
363 ((netconfigp->nc_flag = getflag(tok2)) == FAILURE) ||
364 ((netconfigp->nc_protofmly = gettoken(NULL, FALSE)) == NULL) ||
365 ((netconfigp->nc_proto = gettoken(NULL, FALSE)) == NULL) ||
366 ((netconfigp->nc_device = gettoken(NULL, FALSE)) == NULL) ||
368 (((netconfigp->nc_nlookups = getnlookups(tok3)) != 0) &&
369 ((netconfigp->nc_lookups = getlookups(tok3)) == NULL))) {
370 netconfig_free(netconfigp);
372 netconfigp = NULL;
377 return (netconfigp);
891 netconfig_free(struct netconfig *netconfigp)
895 if (netconfigp == NULL)
897 free_entry(netconfigp->nc_netid);
898 free_entry(netconfigp->nc_protofmly);
899 free_entry(netconfigp->nc_proto);
900 free_entry(netconfigp->nc_device);
901 if (netconfigp->nc_lookups)
902 for (i = 0; i < netconfigp->nc_nlookups; i++)
903 free_entry(netconfigp->nc_lookups[i]);
904 free_entry(netconfigp->nc_lookups);
905 free(netconfigp);
909 netconfig_dup(struct netconfig *netconfigp)
919 nconf->nc_netid = strdup(netconfigp->nc_netid);
920 nconf->nc_protofmly = strdup(netconfigp->nc_protofmly);
921 nconf->nc_proto = strdup(netconfigp->nc_proto);
922 nconf->nc_device = strdup(netconfigp->nc_device);
923 nconf->nc_lookups = malloc((netconfigp->nc_nlookups + 1)
933 for (i = 0; i < netconfigp->nc_nlookups; i++) {
934 nconf->nc_lookups[i] = strdup(netconfigp->nc_lookups[i]);
943 nconf->nc_nlookups = netconfigp->nc_nlookups;
944 nconf->nc_flag = netconfigp->nc_flag;
945 nconf->nc_semantics = netconfigp->nc_semantics;