home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume27 / bootptest-1.1 / part01 / vdgenstd.c < prev   
Encoding:
C/C++ Source or Header  |  1993-10-11  |  665 b   |  56 lines

  1.  
  2. /* This program creates an option template file in RFC 1048 format. */
  3.  
  4. struct in_addr { long s_addr; };
  5.  
  6. #include "bootp.h"
  7.  
  8. /* Note that this template uses padding to keep data aligned. */
  9. char vend[] = {
  10.     /* magic number for RFC1048 data */
  11.     99, 130, 83, 99,
  12.  
  13.     /* netmask */
  14.     0,0,1,4,
  15.     0,0,0,0,
  16.  
  17.     /* gateway list */
  18.     0,0,3,4,
  19.     0,0,0,0,
  20.  
  21.     /* hostname */
  22.     0,0, 12, 16,
  23.     0,0,0,0,
  24.     0,0,0,0,
  25.     0,0,0,0,
  26.     0,0,0,0,
  27.  
  28.     /* DNS list */
  29.     0,0,6,8,
  30.     0,0,0,0,
  31.     0,0,0,0,
  32.  
  33. #if 1
  34.  
  35.     /* NIS server list */
  36.     0,0, 15, 4,
  37.     0,0,0,0,
  38.  
  39.     /* NIS domain name */
  40.     0,0, 14, 12,
  41.     0,0,0,0,
  42.     0,0,0,0,
  43.     0,0,0,0,
  44.  
  45. #endif
  46.  
  47.     /* end */
  48.     255, 0
  49. };
  50.  
  51.  
  52. main() {
  53.     write(1, vend, sizeof(vend));
  54.     exit(0);
  55. }
  56.