forked from thiseldo/EtherShield
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dhcp.h
36 lines (28 loc) · 984 Bytes
/
dhcp.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/*********************************************
* vim:sw=8:ts=8:si:et
* To use the above modeline in vim you must have "set modeline" in your .vimrc
* Author:
* Copyright: GPL V2
*
* DHCP look-up functions based on the udp client
*
* Chip type : ATMEGA88/ATMEGA168/ATMEGA328p with ENC28J60
*********************************************/
//@{
#ifndef DHCP_H
#define DHCP_H 1
// to use this you need to enable UDP_client in the file ip_config.h
#if defined (UDP_client)
// Some defines
#define DHCP_BOOTREQUEST 1
#define DHCP_BOOTRESPONSE 2
extern void dhcp_start(uint8_t *buf, uint8_t *macaddrin, uint8_t *ipaddrin,
uint8_t *maskin, uint8_t *gwipin, uint8_t *dhcpsvrin,
uint8_t *dnssvrin );
extern uint8_t dhcp_state( void );
uint8_t check_for_dhcp_answer(uint8_t *buf,uint16_t plen);
uint8_t have_dhcpoffer(uint8_t *buf,uint16_t plen);
uint8_t have_dhcpack(uint8_t *buf,uint16_t plen);
#endif /* UDP_client */
#endif /* DHCP_H */
//@}