Commit | Line | Data |
---|---|---|
920dae64 AT |
1 | \ ========== Copyright Header Begin ========================================== |
2 | \ | |
3 | \ Hypervisor Software File: dhcp-h.fth | |
4 | \ | |
5 | \ Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved. | |
6 | \ | |
7 | \ - Do no alter or remove copyright notices | |
8 | \ | |
9 | \ - Redistribution and use of this software in source and binary forms, with | |
10 | \ or without modification, are permitted provided that the following | |
11 | \ conditions are met: | |
12 | \ | |
13 | \ - Redistribution of source code must retain the above copyright notice, | |
14 | \ this list of conditions and the following disclaimer. | |
15 | \ | |
16 | \ - Redistribution in binary form must reproduce the above copyright notice, | |
17 | \ this list of conditions and the following disclaimer in the | |
18 | \ documentation and/or other materials provided with the distribution. | |
19 | \ | |
20 | \ Neither the name of Sun Microsystems, Inc. or the names of contributors | |
21 | \ may be used to endorse or promote products derived from this software | |
22 | \ without specific prior written permission. | |
23 | \ | |
24 | \ This software is provided "AS IS," without a warranty of any kind. | |
25 | \ ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, | |
26 | \ INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A | |
27 | \ PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN | |
28 | \ MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR | |
29 | \ ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR | |
30 | \ DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN | |
31 | \ OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR | |
32 | \ FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE | |
33 | \ DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, | |
34 | \ ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF | |
35 | \ SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. | |
36 | \ | |
37 | \ You acknowledge that this software is not designed, licensed or | |
38 | \ intended for use in the design, construction, operation or maintenance of | |
39 | \ any nuclear facility. | |
40 | \ | |
41 | \ ========== Copyright Header End ============================================ | |
42 | id: @(#)dhcp-h.fth 1.1 04/09/07 | |
43 | purpose: | |
44 | copyright: Copyright 2004 Sun Microsystems, Inc. All Rights Reserved | |
45 | copyright: Use is subject to license terms. | |
46 | ||
47 | headerless | |
48 | ||
49 | struct | |
50 | /c field >dhcp-op \ Message opcode | |
51 | /c field >dhcp-htype \ Hardware address type | |
52 | /c field >dhcp-hlen \ Hardware address length | |
53 | /c field >dhcp-hops \ Used by relay agents | |
54 | /l field >dhcp-xid \ Transaction ID | |
55 | /w field >dhcp-secs \ Time since boot began | |
56 | /w field >dhcp-flags \ Flags | |
57 | /ip-addr field >dhcp-ciaddr \ Client IP address | |
58 | /ip-addr field >dhcp-yiaddr \ "Your" IP address (from server) | |
59 | /ip-addr field >dhcp-siaddr \ Boot server IP address | |
60 | /ip-addr field >dhcp-giaddr \ Relay agent IP address | |
61 | d# 16 field >dhcp-chaddr \ Client hardware address | |
62 | d# 64 field >dhcp-sname \ Boot server hostname | |
63 | d# 128 field >dhcp-file \ Boot filename | |
64 | d# 4 field >dhcp-cookie \ Magic cookie | |
65 | 0 field >dhcp-options \ Options, variable length | |
66 | constant /dhcp-header | |
67 | ||
68 | d# 300 constant DHCP_MIN_PKTLEN \ Minimum length of DHCP/BOOTP packet | |
69 | ||
70 | \ Message opcode types | |
71 | 1 constant BOOTREQUEST \ BOOTP Request Opcode | |
72 | 2 constant BOOTREPLY \ BOOTP Reply Opcode | |
73 | ||
74 | \ Magic cookie | |
75 | h# 63.82.53.63 constant BOOTMAGIC \ RFC 1048 Magic Cookie | |
76 | ||
77 | \ DHCP message types | |
78 | 1 constant DHCP_DISCOVER | |
79 | 2 constant DHCP_OFFER | |
80 | 3 constant DHCP_REQUEST | |
81 | d# 4 constant DHCP_DECLINE | |
82 | d# 5 constant DHCP_ACK | |
83 | d# 6 constant DHCP_NAK | |
84 | d# 7 constant DHCP_RELEASE | |
85 | d# 8 constant DHCP_INFORM | |
86 | ||
87 | \ Generic DHCP option structure | |
88 | struct | |
89 | 1 field >dhcpopt-code | |
90 | 1 field >dhcpopt-len | |
91 | 0 field >dhcpopt-data | |
92 | constant /dhcp-option | |
93 | ||
94 | \ DHCP Option Codes | |
95 | 0 constant CD_PAD | |
96 | 1 constant CD_SUBNETMASK | |
97 | 3 constant CD_ROUTER | |
98 | d# 12 constant CD_HOSTNAME | |
99 | d# 43 constant CD_VENDOR_SPEC | |
100 | d# 50 constant CD_REQ_IPADDR | |
101 | d# 52 constant CD_OPTION_OVERLOAD | |
102 | d# 53 constant CD_DHCP_TYPE | |
103 | d# 54 constant CD_SERVER_ID | |
104 | d# 55 constant CD_REQUEST_LIST | |
105 | d# 57 constant CD_MAXMSG_SIZE | |
106 | d# 60 constant CD_CLASSID | |
107 | d# 61 constant CD_CLIENTID | |
108 | d# 67 constant CD_BOOTFILE_NAME | |
109 | d# 255 constant CD_END | |
110 | ||
111 | \ Sun Vendor specific options | |
112 | d# 16 constant VS_BOOT_URI \ Boot file URI | |
113 | d# 17 constant VS_HTTP_PROXY \ HTTP Proxy URL for WAN boot | |
114 | ||
115 | \ DHCP states | |
116 | 0 constant DHCPS_INIT | |
117 | 1 constant DHCPS_INFORM | |
118 | 2 constant DHCPS_SELECTING | |
119 | 3 constant DHCPS_REQUESTING | |
120 | d# 4 constant DHCPS_VERIFYING | |
121 | d# 5 constant DHCPS_BOUND | |
122 | d# 6 constant DHCPS_CONFIGURED | |
123 | ||
124 | headers |