Deleted Added
full compact
bootpd.c (25717) bootpd.c (36617)
1/************************************************************************
2 Copyright 1988, 1991 by Carnegie Mellon University
3
4 All Rights Reserved
5
6Permission to use, copy, modify, and distribute this software and its
7documentation for any purpose and without fee is hereby granted, provided
8that the above copyright notice appear in all copies and that both that

--- 5 unchanged lines hidden (view full) ---

14CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
15SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
16IN NO EVENT SHALL CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
17DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
18PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
19ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
20SOFTWARE.
21
1/************************************************************************
2 Copyright 1988, 1991 by Carnegie Mellon University
3
4 All Rights Reserved
5
6Permission to use, copy, modify, and distribute this software and its
7documentation for any purpose and without fee is hereby granted, provided
8that the above copyright notice appear in all copies and that both that

--- 5 unchanged lines hidden (view full) ---

14CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
15SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
16IN NO EVENT SHALL CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
17DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
18PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
19ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
20SOFTWARE.
21
22 $Id: bootpd.c,v 1.6 1997/02/22 14:21:02 peter Exp $
22 $Id: bootpd.c,v 1.7 1997/05/11 14:27:03 phk Exp $
23
24************************************************************************/
25
26/*
27 * BOOTP (bootstrap protocol) server daemon.
28 *
29 * Answers BOOTP request packets from booting client machines.
30 * See [SRI-NIC]<RFC>RFC951.TXT for a description of the protocol.

--- 126 unchanged lines hidden (view full) ---

157
158int s; /* Socket file descriptor */
159char *pktbuf; /* Receive packet buffer */
160int pktlen;
161char *progname;
162char *chdir_path;
163struct in_addr my_ip_addr;
164
23
24************************************************************************/
25
26/*
27 * BOOTP (bootstrap protocol) server daemon.
28 *
29 * Answers BOOTP request packets from booting client machines.
30 * See [SRI-NIC]<RFC>RFC951.TXT for a description of the protocol.

--- 126 unchanged lines hidden (view full) ---

157
158int s; /* Socket file descriptor */
159char *pktbuf; /* Receive packet buffer */
160int pktlen;
161char *progname;
162char *chdir_path;
163struct in_addr my_ip_addr;
164
165struct utsname my_uname;
166char *hostname;
165char *hostname, default_hostname[MAXHOSTNAMELEN + 1];
167
168/* Flags set by signal catcher. */
169PRIVATE int do_readtab = 0;
170PRIVATE int do_dumptab = 0;
171
172/*
173 * Globals below are associated with the bootp database file (bootptab).
174 */

--- 76 unchanged lines hidden (view full) ---

251 }
252
253 /*
254 * Set defaults that might be changed by option switches.
255 */
256 stmp = NULL;
257 timeout = &actualtimeout;
258
166
167/* Flags set by signal catcher. */
168PRIVATE int do_readtab = 0;
169PRIVATE int do_dumptab = 0;
170
171/*
172 * Globals below are associated with the bootp database file (bootptab).
173 */

--- 76 unchanged lines hidden (view full) ---

250 }
251
252 /*
253 * Set defaults that might be changed by option switches.
254 */
255 stmp = NULL;
256 timeout = &actualtimeout;
257
259 if (uname(&my_uname) < 0) {
258 if (gethostname(default_hostname, MAXHOSTNAMELEN) < 0) {
260 report(LOG_ERR, "bootpd: can't get hostname\n");
261 exit(1);
262 }
259 report(LOG_ERR, "bootpd: can't get hostname\n");
260 exit(1);
261 }
263 hostname = my_uname.nodename;
262 hostname = default_hostname;
264
265 /*
266 * Read switches.
267 */
268 for (argc--, argv++; argc > 0; argc--, argv++) {
269 if (argv[0][0] != '-')
270 break;
271 switch (argv[0][1]) {

--- 1135 unchanged lines hidden ---
263
264 /*
265 * Read switches.
266 */
267 for (argc--, argv++; argc > 0; argc--, argv++) {
268 if (argv[0][0] != '-')
269 break;
270 switch (argv[0][1]) {

--- 1135 unchanged lines hidden ---