Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / obp / obp / pkg / netinet / dhcp-h.fth
CommitLineData
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 ============================================
42id: @(#)dhcp-h.fth 1.1 04/09/07
43purpose:
44copyright: Copyright 2004 Sun Microsystems, Inc. All Rights Reserved
45copyright: Use is subject to license terms.
46
47headerless
48
49struct
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
66constant /dhcp-header
67
68d# 300 constant DHCP_MIN_PKTLEN \ Minimum length of DHCP/BOOTP packet
69
70\ Message opcode types
711 constant BOOTREQUEST \ BOOTP Request Opcode
722 constant BOOTREPLY \ BOOTP Reply Opcode
73
74\ Magic cookie
75h# 63.82.53.63 constant BOOTMAGIC \ RFC 1048 Magic Cookie
76
77\ DHCP message types
781 constant DHCP_DISCOVER
792 constant DHCP_OFFER
803 constant DHCP_REQUEST
81d# 4 constant DHCP_DECLINE
82d# 5 constant DHCP_ACK
83d# 6 constant DHCP_NAK
84d# 7 constant DHCP_RELEASE
85d# 8 constant DHCP_INFORM
86
87\ Generic DHCP option structure
88struct
89 1 field >dhcpopt-code
90 1 field >dhcpopt-len
91 0 field >dhcpopt-data
92constant /dhcp-option
93
94\ DHCP Option Codes
950 constant CD_PAD
961 constant CD_SUBNETMASK
973 constant CD_ROUTER
98d# 12 constant CD_HOSTNAME
99d# 43 constant CD_VENDOR_SPEC
100d# 50 constant CD_REQ_IPADDR
101d# 52 constant CD_OPTION_OVERLOAD
102d# 53 constant CD_DHCP_TYPE
103d# 54 constant CD_SERVER_ID
104d# 55 constant CD_REQUEST_LIST
105d# 57 constant CD_MAXMSG_SIZE
106d# 60 constant CD_CLASSID
107d# 61 constant CD_CLIENTID
108d# 67 constant CD_BOOTFILE_NAME
109d# 255 constant CD_END
110
111\ Sun Vendor specific options
112d# 16 constant VS_BOOT_URI \ Boot file URI
113d# 17 constant VS_HTTP_PROXY \ HTTP Proxy URL for WAN boot
114
115\ DHCP states
1160 constant DHCPS_INIT
1171 constant DHCPS_INFORM
1182 constant DHCPS_SELECTING
1193 constant DHCPS_REQUESTING
120d# 4 constant DHCPS_VERIFYING
121d# 5 constant DHCPS_BOUND
122d# 6 constant DHCPS_CONFIGURED
123
124headers