Lines Matching refs:np_sessionp

87     struct netpath_vars *np_sessionp;   /* this session's variables */  in setnetpath()  local
94 if ((np_sessionp = in setnetpath()
98 if ((np_sessionp->nc_handlep = setnetconfig()) == NULL) { in setnetpath()
102 np_sessionp->valid = NP_VALID; in setnetpath()
103 np_sessionp->ncp_list = NULL; in setnetpath()
105 np_sessionp->netpath = NULL; in setnetpath()
107 (void) endnetconfig(np_sessionp->nc_handlep);/* won't need nc session*/ in setnetpath()
108 np_sessionp->nc_handlep = NULL; in setnetpath()
109 if ((np_sessionp->netpath = malloc(strlen(npp)+1)) == NULL) in setnetpath()
112 (void) strcpy(np_sessionp->netpath, npp); in setnetpath()
115 np_sessionp->netpath_start = np_sessionp->netpath; in setnetpath()
116 return ((void *)np_sessionp); in setnetpath()
119 free(np_sessionp); in setnetpath()
145 struct netpath_vars *np_sessionp = (struct netpath_vars *)handlep; in getnetpath() local
150 if (np_sessionp == NULL || np_sessionp->valid != NP_VALID) { in getnetpath()
154 if (np_sessionp->netpath_start == NULL) { /* NETPATH was not set */ in getnetpath()
156 if (np_sessionp->nc_handlep == NULL) { in getnetpath()
157 np_sessionp->nc_handlep = setnetconfig(); in getnetpath()
158 if (np_sessionp->nc_handlep == NULL) in getnetpath()
161 if ((ncp = getnetconfig(np_sessionp->nc_handlep)) == NULL) { in getnetpath()
170 while ((npp = np_sessionp->netpath) != NULL && strlen(npp) != 0) { in getnetpath()
171 np_sessionp->netpath = _get_next_token(npp, ':'); in getnetpath()
180 if (np_sessionp->ncp_list == NULL) { in getnetpath()
181 np_sessionp->ncp_list = chainp; in getnetpath()
183 np_sessionp->ncp_list->nchain_next = chainp; in getnetpath()
200 struct netpath_vars *np_sessionp = (struct netpath_vars *)handlep; in endnetpath() local
203 if (np_sessionp == NULL || np_sessionp->valid != NP_VALID) { in endnetpath()
207 if (np_sessionp->nc_handlep != NULL) in endnetpath()
208 endnetconfig(np_sessionp->nc_handlep); in endnetpath()
209 if (np_sessionp->netpath_start != NULL) in endnetpath()
210 free(np_sessionp->netpath_start); in endnetpath()
211 for (chainp = np_sessionp->ncp_list; chainp != NULL; in endnetpath()
215 free(np_sessionp); in endnetpath()