summaryrefslogtreecommitdiff
path: root/networking/udhcp/options.h
diff options
context:
space:
mode:
Diffstat (limited to 'networking/udhcp/options.h')
-rw-r--r--networking/udhcp/options.h30
1 files changed, 10 insertions, 20 deletions
diff --git a/networking/udhcp/options.h b/networking/udhcp/options.h
index 05090f12e..3ca4dc42d 100644
--- a/networking/udhcp/options.h
+++ b/networking/udhcp/options.h
@@ -5,7 +5,6 @@
5 5
6PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN 6PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN
7 7
8#define TYPE_MASK 0x0F
9 8
10enum { 9enum {
11 OPTION_IP = 1, 10 OPTION_IP = 1,
@@ -21,19 +20,13 @@ enum {
21 OPTION_U32, 20 OPTION_U32,
22 OPTION_S32, 21 OPTION_S32,
23 OPTION_STATIC_ROUTES, 22 OPTION_STATIC_ROUTES,
24};
25
26/* Client requests this option by default */
27#define OPTION_REQ 0x10
28/* There can be a list of 1 or more of these */
29#define OPTION_LIST 0x20
30 23
31/*****************************************************************/ 24 OPTION_TYPE_MASK = 0x0f,
32/* Do not modify below here unless you know what you are doing!! */ 25 /* Client requests this option by default */
33/*****************************************************************/ 26 OPTION_REQ = 0x10,
34 27 /* There can be a list of 1 or more of these */
35/* DHCP protocol. See RFC 2131 */ 28 OPTION_LIST = 0x20,
36#define DHCP_MAGIC 0x63825363 29};
37 30
38/* DHCP option codes (partial list). See RFC 2132 and 31/* DHCP option codes (partial list). See RFC 2132 and
39 * http://www.iana.org/assignments/bootp-dhcp-parameters/ 32 * http://www.iana.org/assignments/bootp-dhcp-parameters/
@@ -81,7 +74,6 @@ enum {
81//#define DHCP_WPAD 0xfc /* MSIE's Web Proxy Autodiscovery Protocol */ 74//#define DHCP_WPAD 0xfc /* MSIE's Web Proxy Autodiscovery Protocol */
82#define DHCP_END 0xff 75#define DHCP_END 0xff
83 76
84
85/* Offsets in option byte sequence */ 77/* Offsets in option byte sequence */
86#define OPT_CODE 0 78#define OPT_CODE 0
87#define OPT_LEN 1 79#define OPT_LEN 1
@@ -91,12 +83,7 @@ enum {
91#define FILE_FIELD 1 83#define FILE_FIELD 1
92#define SNAME_FIELD 2 84#define SNAME_FIELD 2
93 85
94#define BOOTREQUEST 1 86/* DHCP_MESSAGE_TYPE values */
95#define BOOTREPLY 2
96
97#define ETH_10MB 1
98#define ETH_10MB_LEN 6
99
100#define DHCPDISCOVER 1 /* client -> server */ 87#define DHCPDISCOVER 1 /* client -> server */
101#define DHCPOFFER 2 /* client <- server */ 88#define DHCPOFFER 2 /* client <- server */
102#define DHCPREQUEST 3 /* client -> server */ 89#define DHCPREQUEST 3 /* client -> server */
@@ -105,6 +92,9 @@ enum {
105#define DHCPNAK 6 /* client <- server */ 92#define DHCPNAK 6 /* client <- server */
106#define DHCPRELEASE 7 /* client -> server */ 93#define DHCPRELEASE 7 /* client -> server */
107#define DHCPINFORM 8 /* client -> server */ 94#define DHCPINFORM 8 /* client -> server */
95#define DHCP_MINTYPE DHCPDISCOVER
96#define DHCP_MAXTYPE DHCPINFORM
97
108 98
109struct dhcp_option { 99struct dhcp_option {
110 uint8_t flags; 100 uint8_t flags;