ReactOS 0.4.16-dev-258-g81860b4
dhcp.h File Reference
#include "lwip/opt.h"
#include "lwip/arch.h"
#include "lwip/prot/ip4.h"
Include dependency graph for dhcp.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  dhcp_msg
 

Macros

#define DHCP_CHADDR_LEN   16U
 
#define DHCP_SNAME_OFS   44U
 
#define DHCP_SNAME_LEN   64U
 
#define DHCP_FILE_OFS   108U
 
#define DHCP_FILE_LEN   128U
 
#define DHCP_MSG_LEN   236U
 
#define DHCP_OPTIONS_OFS   (DHCP_MSG_LEN + 4U) /* 4 byte: cookie */
 
#define DHCP_MIN_OPTIONS_LEN   68U
 
#define DHCP_OPTIONS_LEN   DHCP_MIN_OPTIONS_LEN
 
#define DHCP_BOOTREQUEST   1
 
#define DHCP_BOOTREPLY   2
 
#define DHCP_DISCOVER   1
 
#define DHCP_OFFER   2
 
#define DHCP_REQUEST   3
 
#define DHCP_DECLINE   4
 
#define DHCP_ACK   5
 
#define DHCP_NAK   6
 
#define DHCP_RELEASE   7
 
#define DHCP_INFORM   8
 
#define DHCP_MAGIC_COOKIE   0x63825363UL
 
#define DHCP_OPTION_PAD   0
 
#define DHCP_OPTION_SUBNET_MASK   1 /* RFC 2132 3.3 */
 
#define DHCP_OPTION_ROUTER   3
 
#define DHCP_OPTION_DNS_SERVER   6
 
#define DHCP_OPTION_HOSTNAME   12
 
#define DHCP_OPTION_IP_TTL   23
 
#define DHCP_OPTION_MTU   26
 
#define DHCP_OPTION_BROADCAST   28
 
#define DHCP_OPTION_TCP_TTL   37
 
#define DHCP_OPTION_NTP   42
 
#define DHCP_OPTION_END   255
 
#define DHCP_OPTION_REQUESTED_IP   50 /* RFC 2132 9.1, requested IP address */
 
#define DHCP_OPTION_LEASE_TIME   51 /* RFC 2132 9.2, time in seconds, in 4 bytes */
 
#define DHCP_OPTION_OVERLOAD   52 /* RFC2132 9.3, use file and/or sname field for options */
 
#define DHCP_OPTION_MESSAGE_TYPE   53 /* RFC 2132 9.6, important for DHCP */
 
#define DHCP_OPTION_MESSAGE_TYPE_LEN   1
 
#define DHCP_OPTION_SERVER_ID   54 /* RFC 2132 9.7, server IP address */
 
#define DHCP_OPTION_PARAMETER_REQUEST_LIST   55 /* RFC 2132 9.8, requested option types */
 
#define DHCP_OPTION_MAX_MSG_SIZE   57 /* RFC 2132 9.10, message size accepted >= 576 */
 
#define DHCP_OPTION_MAX_MSG_SIZE_LEN   2
 
#define DHCP_OPTION_T1   58 /* T1 renewal time */
 
#define DHCP_OPTION_T2   59 /* T2 rebinding time */
 
#define DHCP_OPTION_US   60
 
#define DHCP_OPTION_CLIENT_ID   61
 
#define DHCP_OPTION_TFTP_SERVERNAME   66
 
#define DHCP_OPTION_BOOTFILE   67
 
#define DHCP_OVERLOAD_NONE   0
 
#define DHCP_OVERLOAD_FILE   1
 
#define DHCP_OVERLOAD_SNAME   2
 
#define DHCP_OVERLOAD_SNAME_FILE   3
 

Enumerations

enum  dhcp_state_enum_t {
  DHCP_STATE_OFF = 0 , DHCP_STATE_REQUESTING = 1 , DHCP_STATE_INIT = 2 , DHCP_STATE_REBOOTING = 3 ,
  DHCP_STATE_REBINDING = 4 , DHCP_STATE_RENEWING = 5 , DHCP_STATE_SELECTING = 6 , DHCP_STATE_INFORMING = 7 ,
  DHCP_STATE_CHECKING = 8 , DHCP_STATE_PERMANENT = 9 , DHCP_STATE_BOUND = 10 , DHCP_STATE_RELEASING = 11 ,
  DHCP_STATE_BACKING_OFF = 12
}
 

Variables

PACK_STRUCT_BEGIN struct dhcp_msg PACK_STRUCT_STRUCT
 

Detailed Description

DHCP protocol definitions

Definition in file dhcp.h.

Macro Definition Documentation

◆ DHCP_ACK

#define DHCP_ACK   5

Definition at line 124 of file dhcp.h.

◆ DHCP_BOOTREPLY

#define DHCP_BOOTREPLY   2

Definition at line 117 of file dhcp.h.

◆ DHCP_BOOTREQUEST

#define DHCP_BOOTREQUEST   1

Definition at line 116 of file dhcp.h.

◆ DHCP_CHADDR_LEN

#define DHCP_CHADDR_LEN   16U

Definition at line 50 of file dhcp.h.

◆ DHCP_DECLINE

#define DHCP_DECLINE   4

Definition at line 123 of file dhcp.h.

◆ DHCP_DISCOVER

#define DHCP_DISCOVER   1

Definition at line 120 of file dhcp.h.

◆ DHCP_FILE_LEN

#define DHCP_FILE_LEN   128U

Definition at line 54 of file dhcp.h.

◆ DHCP_FILE_OFS

#define DHCP_FILE_OFS   108U

Definition at line 53 of file dhcp.h.

◆ DHCP_INFORM

#define DHCP_INFORM   8

Definition at line 127 of file dhcp.h.

◆ DHCP_MAGIC_COOKIE

#define DHCP_MAGIC_COOKIE   0x63825363UL

Definition at line 129 of file dhcp.h.

◆ DHCP_MIN_OPTIONS_LEN

#define DHCP_MIN_OPTIONS_LEN   68U

Definition at line 80 of file dhcp.h.

◆ DHCP_MSG_LEN

#define DHCP_MSG_LEN   236U

Definition at line 55 of file dhcp.h.

◆ DHCP_NAK

#define DHCP_NAK   6

Definition at line 125 of file dhcp.h.

◆ DHCP_OFFER

#define DHCP_OFFER   2

Definition at line 121 of file dhcp.h.

◆ DHCP_OPTION_BOOTFILE

#define DHCP_OPTION_BOOTFILE   67

Definition at line 165 of file dhcp.h.

◆ DHCP_OPTION_BROADCAST

#define DHCP_OPTION_BROADCAST   28

Definition at line 141 of file dhcp.h.

◆ DHCP_OPTION_CLIENT_ID

#define DHCP_OPTION_CLIENT_ID   61

Definition at line 163 of file dhcp.h.

◆ DHCP_OPTION_DNS_SERVER

#define DHCP_OPTION_DNS_SERVER   6

Definition at line 137 of file dhcp.h.

◆ DHCP_OPTION_END

#define DHCP_OPTION_END   255

Definition at line 144 of file dhcp.h.

◆ DHCP_OPTION_HOSTNAME

#define DHCP_OPTION_HOSTNAME   12

Definition at line 138 of file dhcp.h.

◆ DHCP_OPTION_IP_TTL

#define DHCP_OPTION_IP_TTL   23

Definition at line 139 of file dhcp.h.

◆ DHCP_OPTION_LEASE_TIME

#define DHCP_OPTION_LEASE_TIME   51 /* RFC 2132 9.2, time in seconds, in 4 bytes */

Definition at line 148 of file dhcp.h.

◆ DHCP_OPTION_MAX_MSG_SIZE

#define DHCP_OPTION_MAX_MSG_SIZE   57 /* RFC 2132 9.10, message size accepted >= 576 */

Definition at line 157 of file dhcp.h.

◆ DHCP_OPTION_MAX_MSG_SIZE_LEN

#define DHCP_OPTION_MAX_MSG_SIZE_LEN   2

Definition at line 158 of file dhcp.h.

◆ DHCP_OPTION_MESSAGE_TYPE

#define DHCP_OPTION_MESSAGE_TYPE   53 /* RFC 2132 9.6, important for DHCP */

Definition at line 151 of file dhcp.h.

◆ DHCP_OPTION_MESSAGE_TYPE_LEN

#define DHCP_OPTION_MESSAGE_TYPE_LEN   1

Definition at line 152 of file dhcp.h.

◆ DHCP_OPTION_MTU

#define DHCP_OPTION_MTU   26

Definition at line 140 of file dhcp.h.

◆ DHCP_OPTION_NTP

#define DHCP_OPTION_NTP   42

Definition at line 143 of file dhcp.h.

◆ DHCP_OPTION_OVERLOAD

#define DHCP_OPTION_OVERLOAD   52 /* RFC2132 9.3, use file and/or sname field for options */

Definition at line 149 of file dhcp.h.

◆ DHCP_OPTION_PAD

#define DHCP_OPTION_PAD   0

Definition at line 134 of file dhcp.h.

◆ DHCP_OPTION_PARAMETER_REQUEST_LIST

#define DHCP_OPTION_PARAMETER_REQUEST_LIST   55 /* RFC 2132 9.8, requested option types */

Definition at line 155 of file dhcp.h.

◆ DHCP_OPTION_REQUESTED_IP

#define DHCP_OPTION_REQUESTED_IP   50 /* RFC 2132 9.1, requested IP address */

Definition at line 147 of file dhcp.h.

◆ DHCP_OPTION_ROUTER

#define DHCP_OPTION_ROUTER   3

Definition at line 136 of file dhcp.h.

◆ DHCP_OPTION_SERVER_ID

#define DHCP_OPTION_SERVER_ID   54 /* RFC 2132 9.7, server IP address */

Definition at line 154 of file dhcp.h.

◆ DHCP_OPTION_SUBNET_MASK

#define DHCP_OPTION_SUBNET_MASK   1 /* RFC 2132 3.3 */

Definition at line 135 of file dhcp.h.

◆ DHCP_OPTION_T1

#define DHCP_OPTION_T1   58 /* T1 renewal time */

Definition at line 160 of file dhcp.h.

◆ DHCP_OPTION_T2

#define DHCP_OPTION_T2   59 /* T2 rebinding time */

Definition at line 161 of file dhcp.h.

◆ DHCP_OPTION_TCP_TTL

#define DHCP_OPTION_TCP_TTL   37

Definition at line 142 of file dhcp.h.

◆ DHCP_OPTION_TFTP_SERVERNAME

#define DHCP_OPTION_TFTP_SERVERNAME   66

Definition at line 164 of file dhcp.h.

◆ DHCP_OPTION_US

#define DHCP_OPTION_US   60

Definition at line 162 of file dhcp.h.

◆ DHCP_OPTIONS_LEN

#define DHCP_OPTIONS_LEN   DHCP_MIN_OPTIONS_LEN

make sure user does not configure this too small allow this to be configured in lwipopts.h, but not too small set this to be sufficient for your options in outgoing DHCP msgs

Definition at line 88 of file dhcp.h.

◆ DHCP_OPTIONS_OFS

#define DHCP_OPTIONS_OFS   (DHCP_MSG_LEN + 4U) /* 4 byte: cookie */

Definition at line 56 of file dhcp.h.

◆ DHCP_OVERLOAD_FILE

#define DHCP_OVERLOAD_FILE   1

Definition at line 169 of file dhcp.h.

◆ DHCP_OVERLOAD_NONE

#define DHCP_OVERLOAD_NONE   0

Definition at line 168 of file dhcp.h.

◆ DHCP_OVERLOAD_SNAME

#define DHCP_OVERLOAD_SNAME   2

Definition at line 170 of file dhcp.h.

◆ DHCP_OVERLOAD_SNAME_FILE

#define DHCP_OVERLOAD_SNAME_FILE   3

Definition at line 171 of file dhcp.h.

◆ DHCP_RELEASE

#define DHCP_RELEASE   7

Definition at line 126 of file dhcp.h.

◆ DHCP_REQUEST

#define DHCP_REQUEST   3

Definition at line 122 of file dhcp.h.

◆ DHCP_SNAME_LEN

#define DHCP_SNAME_LEN   64U

Definition at line 52 of file dhcp.h.

◆ DHCP_SNAME_OFS

#define DHCP_SNAME_OFS   44U

Definition at line 51 of file dhcp.h.

Enumeration Type Documentation

◆ dhcp_state_enum_t

Enumerator
DHCP_STATE_OFF 
DHCP_STATE_REQUESTING 
DHCP_STATE_INIT 
DHCP_STATE_REBOOTING 
DHCP_STATE_REBINDING 
DHCP_STATE_RENEWING 
DHCP_STATE_SELECTING 
DHCP_STATE_INFORMING 
DHCP_STATE_CHECKING 
DHCP_STATE_PERMANENT 
DHCP_STATE_BOUND 
DHCP_STATE_RELEASING 
DHCP_STATE_BACKING_OFF 

Definition at line 99 of file dhcp.h.

99 {
100 DHCP_STATE_OFF = 0,
102 DHCP_STATE_INIT = 2,
109 DHCP_STATE_PERMANENT = 9, /* not yet implemented */
110 DHCP_STATE_BOUND = 10,
111 DHCP_STATE_RELEASING = 11, /* not yet implemented */
dhcp_state_enum_t
Definition: dhcp.h:99
@ DHCP_STATE_OFF
Definition: dhcp.h:100
@ DHCP_STATE_INIT
Definition: dhcp.h:102
@ DHCP_STATE_BOUND
Definition: dhcp.h:110
@ DHCP_STATE_BACKING_OFF
Definition: dhcp.h:112
@ DHCP_STATE_PERMANENT
Definition: dhcp.h:109
@ DHCP_STATE_CHECKING
Definition: dhcp.h:108
@ DHCP_STATE_REBOOTING
Definition: dhcp.h:103
@ DHCP_STATE_SELECTING
Definition: dhcp.h:106
@ DHCP_STATE_REQUESTING
Definition: dhcp.h:101
@ DHCP_STATE_RELEASING
Definition: dhcp.h:111
@ DHCP_STATE_RENEWING
Definition: dhcp.h:105
@ DHCP_STATE_REBINDING
Definition: dhcp.h:104
@ DHCP_STATE_INFORMING
Definition: dhcp.h:107

Variable Documentation

◆ PACK_STRUCT_STRUCT

PACK_STRUCT_BEGIN struct dhcp_msg PACK_STRUCT_STRUCT