Lines Matching refs:service
64 static char register_failed[] = "ypserv: Unable to register service for ";
159 ypservice_t service[] = {
166 #define MAXSERVICES (sizeof (service)/sizeof (service[0]))
277 for (i = 0; i < sizeof (service)/sizeof (ypservice_t); i++) {
281 if ((nconf = getnetconfigent(service[i].netid)) == NULL) {
283 service[i].netid);
287 if ((service[i].fd = t_open(nconf->nc_device, O_RDWR, NULL)) <
289 logprintf("t_open failed for %s\n", service[i].netid);
294 if (netdir_options(nconf, ND_SET_RESERVEDPORT, service[i].fd,
297 service[i].netid);
298 (void) close(service[i].fd);
299 service[i].fd = -1;
304 if ((service[i].xprt = svc_tli_create(service[i].fd, nconf,
307 service[i].netid);
308 (void) close(service[i].fd);
309 service[i].fd = -1;
314 if (!svc_reg(service[i].xprt, YPPROG, YPVERS, ypdispatch,
316 logprintf("%s %s\n", service[i].netid, register_failed);
317 svc_destroy(service[i].xprt);
318 service[i].xprt = 0;
319 (void) close(service[i].fd);
320 service[i].fd = -1;
325 if (service[i].olddispatch && !svc_reg(service[i].xprt, YPPROG,
328 service[i].netid, register_failed);
330 svc_destroy(service[i].xprt);
331 service[i].xprt = 0;
332 (void) close(service[i].fd);
333 service[i].fd = -1;
339 service[i].ok = 1;
340 service_classes[i] = service[i].class;
360 if (service[i].ok == 0 &&
361 service[i].class ==
365 service[i].class);