Deleted Added
full compact
bootpef.c (3229) bootpef.c (13572)
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

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

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
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

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

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
23#ifndef lint
24static char rcsid[] = "$Id: bootpef.c,v 1.1.1.1 1994/09/10 14:44:54 csgr Exp $";
25#endif
26
27
28/*
29 * bootpef - BOOTP Extension File generator
30 * Makes an "Extension File" for each host entry that
31 * defines an and Extension File. (See RFC1497, tag 18.)
32 *
33 * HISTORY
34 * See ./Changes
35 *

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

92 */
93
94#ifdef __STDC__
95#define P(args) args
96#else
97#define P(args) ()
98#endif
99
23/*
24 * bootpef - BOOTP Extension File generator
25 * Makes an "Extension File" for each host entry that
26 * defines an and Extension File. (See RFC1497, tag 18.)
27 *
28 * HISTORY
29 * See ./Changes
30 *

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

87 */
88
89#ifdef __STDC__
90#define P(args) args
91#else
92#define P(args) ()
93#endif
94
100static void dovend_rfc1048 P((struct bootp *, struct host *, int32));
101static void mktagfile P((struct host *));
102static void usage P((void));
103
104#undef P
105
106
107/*
108 * General

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

286
287static void
288mktagfile(hp)
289 struct host *hp;
290{
291 FILE *fp;
292 int bytesleft, len;
293 byte *vp;
95static void mktagfile P((struct host *));
96static void usage P((void));
97
98#undef P
99
100
101/*
102 * General

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

280
281static void
282mktagfile(hp)
283 struct host *hp;
284{
285 FILE *fp;
286 int bytesleft, len;
287 byte *vp;
294 char *tmpstr;
295
296 if (!hp->flags.exten_file)
297 return;
298
299 vp = buffer;
300 bytesleft = BUFFERSIZE;
301 bcopy(vm_rfc1048, vp, 4); /* Copy in the magic cookie */
302 vp += 4;

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

327 }
328 len = vp - buffer;
329 if (len != fwrite(buffer, 1, len, fp)) {
330 report(LOG_ERR, "write failed on \"%s\" : %s",
331 hp->exten_file->string, get_errmsg());
332 }
333 fclose(fp);
334
288
289 if (!hp->flags.exten_file)
290 return;
291
292 vp = buffer;
293 bytesleft = BUFFERSIZE;
294 bcopy(vm_rfc1048, vp, 4); /* Copy in the magic cookie */
295 vp += 4;

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

320 }
321 len = vp - buffer;
322 if (len != fwrite(buffer, 1, len, fp)) {
323 report(LOG_ERR, "write failed on \"%s\" : %s",
324 hp->exten_file->string, get_errmsg());
325 }
326 fclose(fp);
327
335} /* dovend_rfc1048 */
328} /* mktagfile */
336
337/*
338 * Local Variables:
339 * tab-width: 4
340 * c-indent-level: 4
341 * c-argdecl-indent: 4
342 * c-continued-statement-offset: 4
343 * c-continued-brace-offset: -4
344 * c-label-offset: -4
345 * c-brace-offset: 0
346 * End:
347 */
329
330/*
331 * Local Variables:
332 * tab-width: 4
333 * c-indent-level: 4
334 * c-argdecl-indent: 4
335 * c-continued-statement-offset: 4
336 * c-continued-brace-offset: -4
337 * c-label-offset: -4
338 * c-brace-offset: 0
339 * End:
340 */