Definitions for the DHCP client.
The Dynamic Host Configuration Protocol's (DHCP) purpose is getting IP configuration data from a server.
Adam Dunkels' original copyright notice
Copyright (c) 2005, Swedish Institute of Computer Science. All rights reserved.
(contained in this file) still holds. For modifications:
Copyright © 2011 Albrecht Weinert, Bochum
Data Structures | |
struct | dhcpMsg_t |
The DHCP message structure. More... | |
struct | dhcpOption_t |
The structure of a DHCP message option field. More... | |
struct | dhcpState_t |
Structure for DHCP application state. More... | |
Defines | |
#define | BOOTP_BROADCAST 0x8000 |
DHCP message flag value. | |
#define | DHCP_HLEN_ETHERNET 6 |
DHCP message hardware address length. | |
#define | DHCP_HTYPE_ETHERNET 1 |
DHCP message type value. | |
#define | DHCP_OPTION_BROADCAST_ADDR 28 |
DHCP option field code: broadcast address. | |
#define | DHCP_OPTION_CLIENT_NAME 12 |
DHCP option field code: host name. | |
#define | DHCP_OPTION_DEFAULT_TTL 23 |
DHCP option field code: default IP TTL. | |
#define | DHCP_OPTION_DNS_SERVER 6 |
DHCP option field code. | |
#define | DHCP_OPTION_DOMAIN_NAME 15 |
DHCP option field code: domain name. | |
#define | DHCP_OPTION_END 255 |
DHCP option field code: end of all options. | |
#define | DHCP_OPTION_LEASE_TIME 51 |
The address lease time. | |
#define | DHCP_OPTION_MSG_TYPE 53 |
DHCP option field code: message type. | |
#define | DHCP_OPTION_NAME_SERVERS 5 |
DHCP option field code: name server(s) | |
#define | DHCP_OPTION_NTP_SERVERS |
DHCP option field code: time server(s) | |
#define | DHCP_OPTION_REBND_TIME 59 |
DHCP option field code. | |
#define | DHCP_OPTION_RENEW_TIME 58 |
DHCP option field code. | |
#define | DHCP_OPTION_REQ_IPADDR 50 |
DHCP option field code. | |
#define | DHCP_OPTION_REQ_LIST 55 |
DHCP request option field code: Parameter Request List. | |
#define | DHCP_OPTION_ROUTER 3 |
DHCP option field code. | |
#define | DHCP_OPTION_SERVER_ID 54 |
DHCP option field code: DHCH server IP address. | |
#define | DHCP_OPTION_SMTP_SERVERS 69 |
DHCP option field code: SMTP server(s) | |
#define | DHCP_OPTION_SUBNET_MASK 1 |
DHCP option field code. | |
#define | DHCP_OPTION_TIME_OFFSET 2 |
DHCP option field code: time offset. | |
#define | DHCP_OPTION_TIME_SERVERS 4 |
DHCP option field code: time server(s) | |
#define | DHCP_REPLY 2 |
DHCP message operation type. | |
#define | DHCP_REQUEST 1 |
DHCP message operation type. | |
#define | DHCPACK 5 |
DHCP message type. | |
#define | DHCPC_CLIENT_PORT 68 |
Used DHCP client port. | |
#define | DHCPC_SERVER_PORT 67 |
Well known DHCP server port. | |
#define | DHCPDECLINE 4 |
DHCP message type. | |
#define | DHCPDISCOVER 1 |
DHCP message type. | |
#define | DHCPINFORM 8 |
DHCP message type. | |
#define | DHCPNAK 6 |
DHCP message type. | |
#define | DHCPOFFER 2 |
DHCP message type. | |
#define | DHCPRELEASE 7 |
DHCP message type. | |
#define | DHCPREQUEST 3 |
DHCP message type. | |
#define | STATE_CONFIG_RECEIVED 3 |
DHCP state machine state. | |
#define | STATE_INITIAL 0 |
DHCP state machine state. | |
#define | STATE_OFFER_RECEIVED 2 |
DHCP state machine state. | |
#define | STATE_SENDING 1 |
DHCP state machine state. | |
Functions | |
ptfnct_t | dhcpc_appcall (void) |
Handle DHCP server events. | |
void | dhcpc_configured (uint8_t respType, const uint16_t ipAddr[]) |
DHCP success. | |
void | dhcpcGotOption (const struct dhcpOption_t *dhcpOption) |
DHCP option received. | |
void | dhcpInit (void const *mac_addr) |
Initialise the DHCP (client) | |
void | dhcpReset (void) |
Reset the DHCP (client) | |
Variables | |
struct dhcpState_t | dhcpState |
DHCP application state. |