Lines Matching +full:timeout +full:- +full:minutes
2 * bootpgw.c - BOOTP GateWay
109 { /* fifteen minutes */
139 * Initialization such as command-line processing is done and then the
146 struct timeval *timeout; in main() local
208 timeout = &actualtimeout; in main()
219 bcopy(hep->h_addr, (char *)&my_ip_addr, sizeof(my_ip_addr)); in main()
224 for (argc--, argv++; argc > 0; argc--, argv++) { in main()
225 if (argv[0][0] != '-') in main()
235 } else if (argv[1] && argv[1][0] == '-') { in main()
237 * Backwards-compatible behavior: in main()
243 argc--; in main()
258 argc--; in main()
279 case 't': /* timeout */ in main()
283 argc--; in main()
288 warnx("invalid timeout specification"); in main()
293 * If the actual timeout is zero, pass a NULL pointer in main()
295 * point to the actual timeout value. in main()
297 timeout = (n > 0) ? &actualtimeout : NULL; in main()
304 argc--; in main()
318 warnx("unknown switch: -%c", argv[0][1]); in main()
340 bcopy(hep->h_addr, (char *)&server_ipa, sizeof(server_ipa)); in main()
346 * XXX - This is not the POSIX way (Should use setsid). -gwr in main()
366 * Nuke any timeout value in main()
368 timeout = NULL; in main()
390 bootps_port = ntohs((u_short) servp->s_port); in main()
394 "bootps/udp: unknown service -- using port %d", in main()
416 bootpc_port = ntohs(servp->s_port); in main()
419 "bootpc/udp: unknown service -- using port %d", in main()
433 if (timeout) in main()
434 tv = *timeout; in main()
437 (timeout) ? &tv : NULL); in main()
445 report(LOG_INFO, "exiting after %ld minutes of inactivity", in main()
467 switch (bp->bp_op) { in main()
490 "usage: bootpgw [-a] [-i | -s] [-d level] [-h count] [-t timeout]\n" in usage()
491 " [-w time] server\n"); in usage()
492 fprintf(stderr, "\t -a\tdon't modify ARP table\n"); in usage()
493 fprintf(stderr, "\t -d n\tset debug level\n"); in usage()
494 fprintf(stderr, "\t -h n\tset max hop count\n"); in usage()
495 fprintf(stderr, "\t -i\tforce inetd mode (run as child of inetd)\n"); in usage()
496 fprintf(stderr, "\t -s\tforce standalone mode (run without inetd)\n"); in usage()
497 fprintf(stderr, "\t -t n\tset inetd exit timeout to n minutes\n"); in usage()
498 fprintf(stderr, "\t -w n\tset min wait time (secs)\n"); in usage()
516 /* XXX - SLIP init: Set bp_ciaddr = recv_addr here? */ in handle_request()
523 secs = ntohs(bp->bp_secs); in handle_request()
528 hops = bp->bp_hops; in handle_request()
534 bp->bp_hops = hops; in handle_request()
543 if (bp->bp_giaddr.s_addr == 0) { in handle_request()
548 * XXX - This picks the wrong interface when the receive addr in handle_request()
550 * find out which interface a broadcast was received on. -gwr in handle_request()
559 sip = (struct sockaddr_in *) &(ifr->ifr_addr); in handle_request()
560 bp->bp_giaddr = sip->sin_addr; in handle_request()
563 * XXX - Just set "giaddr" to our "official" IP address. in handle_request()
573 bp->bp_giaddr = my_ip_addr; in handle_request()
577 * XXX - DHCP says to insert a subnet mask option into the in handle_request()
611 inet_ntoa(bp->bp_yiaddr)); in handle_reply()
614 ifr = getif(s, &(bp->bp_yiaddr)); in handle_reply()
617 inet_ntoa(bp->bp_yiaddr)); in handle_reply()
628 sip = (struct sockaddr_in *) &(ifr->ifr_addr); in handle_reply()
629 bp->bp_giaddr = sip->sin_addr; in handle_reply()
634 send_addr.sin_addr = bp->bp_yiaddr; in handle_reply()
639 ha = bp->bp_chaddr; in handle_reply()
640 len = bp->bp_hlen; in handle_reply()
645 haf = (int) bp->bp_htype; in handle_reply()
650 report(LOG_INFO, "setarp %s - %s", in handle_reply()
666 * tab-width: 4
667 * c-indent-level: 4
668 * c-argdecl-indent: 4
669 * c-continued-statement-offset: 4
670 * c-continued-brace-offset: -4
671 * c-label-offset: -4
672 * c-brace-offset: 0