Lines Matching defs:s

186 			fprintf(stdout, "targethost = %s\n", targethost);
192 "%s: cannot get IP address for %s\n",
199 "%s: cannot find host entry for %s\n",
213 fprintf(stdout, "Trying arg %s\n",
220 int s;
222 if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
227 if (ioctl(s, SIOCGIFNUM, (char *)&numifs) < 0) {
241 if (ioctl(s, SIOCGIFCONF, (char *)&ifc) < 0) {
248 if (ioctl(s, SIOCGIFFLAGS, (char *)ifr) < 0) {
258 fprintf(stdout, "If %s not suitable\n",
263 fprintf(stdout, "Trying device %s\n",
273 (void) close(s);
286 int s;
302 if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
306 if (ioctl(s, SIOCADDRT, (char *)&route) == -1) {
310 (void) close(s);
334 fprintf(stdout, "From [%s]: ",
339 fprintf(stdout, "hostname = %s\n", res->client_name);
340 fprintf(stdout, "\t\typdomain = %s\n", res->domain_name);
341 fprintf(stdout, "\t\trouter = %s\n", inet_ntoa(router_addr));
347 * Only allow one pass through this code; There's no reason
358 "sysinfo(SI_SET_HOSTNAME)(%s)",
363 (void) fprintf(stdout, "%s\n",
371 "setdomainname(%s)", res->domain_name);
401 fprintf(stdout, "bp_whoami on interface %s addr %s\n", device,
413 fprintf(stdout, "lookup address is %s\n",
462 int s;
464 if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
471 (void) fprintf(stderr, "Device name too long %s\n",
477 if (ioctl(s, SIOCGIFADDR, (caddr_t)&ifr) < 0) {
484 (void) fprintf(stderr, "Interface '%s' address %s\n",
489 if (ioctl(s, SIOCGIFNETMASK, (caddr_t)&ifr) < 0) {
497 "Interface '%s' subnet mask %s\n", dev,
501 (void) close(s);
516 (void) fprintf(stderr, "usage: %s [-v] [-n] [-m] [-h] [<ifname>] "