|
|
1.1 root 1: /* netboot
2: *
3: * bootp.h,v
4: * Revision 1.1 1993/07/08 16:03:53 brezak
5: * Diskless boot prom code from Jim McKim ([email protected])
6: *
7: * Revision 1.1 1993/06/30 20:14:07 mckim
8: * Added BOOTP support.
9: *
10: */
11:
12: /*
13: * Bootstrap Protocol (BOOTP). RFC951 and RFC1048.
14: *
15: *
16: * This file specifies the "implementation-independent" BOOTP protocol
17: * information which is common to both client and server.
18: *
19: *
20: * Copyright 1988 by Carnegie Mellon.
21: *
22: * Permission to use, copy, modify, and distribute this program for any
23: * purpose and without fee is hereby granted, provided that this copyright
24: * and permission notice appear on all copies and supporting documentation,
25: * the name of Carnegie Mellon not be used in advertising or publicity
26: * pertaining to distribution of the program without specific prior
27: * permission, and notice be given in supporting documentation that copying
28: * and distribution is by permission of Carnegie Mellon and Stanford
29: * University. Carnegie Mellon makes no representations about the
30: * suitability of this software for any purpose. It is provided "as is"
31: * without express or implied warranty.
32: */
33:
34:
35: struct bootp {
36: unsigned char bp_op; /* packet opcode type */
37: unsigned char bp_htype; /* hardware addr type */
38: unsigned char bp_hlen; /* hardware addr length */
39: unsigned char bp_hops; /* gateway hops */
40: unsigned long bp_xid; /* transaction ID */
41: unsigned short bp_secs; /* seconds since boot began */
42: unsigned short bp_unused;
43: ipaddr_t bp_ciaddr; /* client IP address */
44: ipaddr_t bp_yiaddr; /* 'your' IP address */
45: ipaddr_t bp_siaddr; /* server IP address */
46: ipaddr_t bp_giaddr; /* gateway IP address */
47: unsigned char bp_chaddr[16]; /* client hardware address */
48: unsigned char bp_sname[64]; /* server host name */
49: unsigned char bp_file[128]; /* boot file name */
50: unsigned char bp_vend[64]; /* vendor-specific area */
51: };
52:
53: /*
54: * UDP port numbers, server and client.
55: */
56: #define IPPORT_BOOTPS 67
57: #define IPPORT_BOOTPC 68
58:
59: #define BOOTREPLY 2
60: #define BOOTREQUEST 1
61:
62:
63: /*
64: * Vendor magic cookie (v_magic) for CMU
65: */
66: #define VM_CMU "CMU"
67:
68: /*
69: * Vendor magic cookie (v_magic) for RFC1048
70: */
71: #define VM_RFC1048 { 99, 130, 83, 99 }
72:
73:
74:
75: /*
76: * RFC1048 tag values used to specify what information is being supplied in
77: * the vendor field of the packet.
78: */
79:
80: #define TAG_PAD ((unsigned char) 0)
81: #define TAG_SUBNET_MASK ((unsigned char) 1)
82: #define TAG_TIME_OFFSET ((unsigned char) 2)
83: #define TAG_GATEWAY ((unsigned char) 3)
84: #define TAG_TIME_SERVER ((unsigned char) 4)
85: #define TAG_NAME_SERVER ((unsigned char) 5)
86: #define TAG_DOMAIN_SERVER ((unsigned char) 6)
87: #define TAG_LOG_SERVER ((unsigned char) 7)
88: #define TAG_COOKIE_SERVER ((unsigned char) 8)
89: #define TAG_LPR_SERVER ((unsigned char) 9)
90: #define TAG_IMPRESS_SERVER ((unsigned char) 10)
91: #define TAG_RLP_SERVER ((unsigned char) 11)
92: #define TAG_HOSTNAME ((unsigned char) 12)
93: #define TAG_BOOTSIZE ((unsigned char) 13)
94: #define TAG_END ((unsigned char) 255)
95:
96:
97:
98: /*
99: * "vendor" data permitted for CMU bootp clients.
100: */
101:
102: struct cmu_vend {
103: unsigned char v_magic[4]; /* magic number */
104: unsigned long v_flags; /* flags/opcodes, etc. */
105: ipaddr_t v_smask; /* Subnet mask */
106: ipaddr_t v_dgate; /* Default gateway */
107: ipaddr_t v_dns1, v_dns2; /* Domain name servers */
108: ipaddr_t v_ins1, v_ins2; /* IEN-116 name servers */
109: ipaddr_t v_ts1, v_ts2; /* Time servers */
110: unsigned char v_unused[25]; /* currently unused */
111: };
112:
113:
114: /* v_flags values */
115: #define VF_SMASK 1 /* Subnet mask field contains valid data */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.