Lines Matching defs:net
125 struct netconfig *net;
129 net = _s_match_netconf(family, type, protocol, &nethandle);
130 if (net == NULL)
133 if (strcmp(net->nc_proto, NC_NOPROTO) != 0)
139 if (stat(net->nc_device, &stats) < 0) {
160 *pathp = malloc(strlen(net->nc_device) + 1);
166 (void) strcpy(*pathp, net->nc_device);
178 struct netconfig *net;
204 while ((net = getnetconfig(*nethandle)) != NULL) {
206 * We make a copy of net->nc_semantics rather than modifying
211 unsigned int semantics = net->nc_semantics;
216 if (strcmp(net->nc_protofmly, family_sw[family]) == 0 &&
218 strcmp(net->nc_proto, oproto) == 0)
221 if (strcmp(net->nc_protofmly, family_sw[family]) == 0 &&
224 strcmp(net->nc_proto, NC_NOPROTO) == 0 &&
226 maybe = net; /* in case no exact match */
230 if (strcmp(net->nc_protofmly, family_sw[family]) == 0 &&
236 if (net == NULL && maybe)
237 net = maybe;
239 if (net == NULL) {
245 return (net);