-#else
- snprintf (response, len_response, "%s/%s: unknown service", protocol, service);
- return NOTOK;
-#endif
- }
-
- ap = arguments;
- if (args != NULL && *args != 0) {
- ap = client_copyip (client_brkstring (client_getcpy (args), " ", "\n"),
- ap, MAXARGS);
- } else {
- if (servers != NULL && *servers != 0)
- ap = client_copyip (client_brkstring (client_getcpy (servers), " ", "\n"),
- ap, MAXARGS);
- }
- if (ap == arguments) {
- *ap++ = client_getcpy ("localhost");
- *ap = NULL;
- }
-
- n1 = nets;
- n2 = nets + sizeof(nets) / sizeof(nets[0]);
-
- h1 = hosts;
- h2 = hosts + sizeof(hosts) / sizeof(hosts[0]);
-
- for (ap = arguments; *ap; ap++) {
- if (**ap == '\01') {
-/*
- * the assumption here is that if the system doesn't have a
- * gethostbyname() function, it must not use DNS. So we need to look
- * into the /etc/hosts using gethostent(). There probablly aren't any
- * systems still like this, but you never know. On every system I have
- * access to, this section is ignored.
- */
-#ifndef HAVE_GETHOSTBYNAME
- if ((np = getnetbyname (*ap + 1))) {
-#ifdef HAVE_SETHOSTENT
- sethostent (1);
-#endif /* HAVE_SETHOSTENT */
- while ((hp = gethostent()))
- if (np->n_addrtype == hp->h_addrtype
- && inet (hp, np->n_net)) {
- switch (sd = rcaux (sp, hp, rproto, response, len_response)) {
- case NOTOK:
- continue;
- case OOPS1:
- break;
- case OOPS2:
- return NOTOK;
-
- default:
- return sd;
- }
- break;
- }
- }
-#endif /* don't HAVE_GETHOSTBYNAME */
- continue;