Lines Matching refs:np_sessionp

90     struct netpath_vars *np_sessionp;   /* this session's variables */  in setnetpath()  local
97 if ((np_sessionp = in setnetpath()
101 if ((np_sessionp->nc_handlep = setnetconfig()) == NULL) { in setnetpath()
105 np_sessionp->valid = NP_VALID; in setnetpath()
106 np_sessionp->ncp_list = NULL; in setnetpath()
108 np_sessionp->netpath = NULL; in setnetpath()
110 (void) endnetconfig(np_sessionp->nc_handlep);/* won't need nc session*/ in setnetpath()
111 np_sessionp->nc_handlep = NULL; in setnetpath()
112 if ((np_sessionp->netpath = malloc(strlen(npp)+1)) == NULL) in setnetpath()
115 (void) strcpy(np_sessionp->netpath, npp); in setnetpath()
118 np_sessionp->netpath_start = np_sessionp->netpath; in setnetpath()
119 return ((void *)np_sessionp); in setnetpath()
122 free(np_sessionp); in setnetpath()
148 struct netpath_vars *np_sessionp = (struct netpath_vars *)handlep; in getnetpath() local
153 if (np_sessionp == NULL || np_sessionp->valid != NP_VALID) { in getnetpath()
157 if (np_sessionp->netpath_start == NULL) { /* NETPATH was not set */ in getnetpath()
159 if (np_sessionp->nc_handlep == NULL) { in getnetpath()
160 np_sessionp->nc_handlep = setnetconfig(); in getnetpath()
161 if (np_sessionp->nc_handlep == NULL) in getnetpath()
164 if ((ncp = getnetconfig(np_sessionp->nc_handlep)) == NULL) { in getnetpath()
173 while ((npp = np_sessionp->netpath) != NULL && strlen(npp) != 0) { in getnetpath()
174 np_sessionp->netpath = _get_next_token(npp, ':'); in getnetpath()
183 if (np_sessionp->ncp_list == NULL) { in getnetpath()
184 np_sessionp->ncp_list = chainp; in getnetpath()
186 np_sessionp->ncp_list->nchain_next = chainp; in getnetpath()
203 struct netpath_vars *np_sessionp = (struct netpath_vars *)handlep; in endnetpath() local
206 if (np_sessionp == NULL || np_sessionp->valid != NP_VALID) { in endnetpath()
210 if (np_sessionp->nc_handlep != NULL) in endnetpath()
211 endnetconfig(np_sessionp->nc_handlep); in endnetpath()
212 if (np_sessionp->netpath_start != NULL) in endnetpath()
213 free(np_sessionp->netpath_start); in endnetpath()
214 for (chainp = np_sessionp->ncp_list; chainp != NULL; in endnetpath()
218 free(np_sessionp); in endnetpath()