WIZlib Library API
ver 1.0
WIZlib Library API User Menual
Main Page
Modules
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
library
protocol
DHCP
dhcp.h
Go to the documentation of this file.
1
12
#ifndef _DHCP_H
13
#define _DHCP_H
14
15
//#include "common/common.h"
16
25
typedef
enum
{
26
DHCP_STATE_INIT
,
27
DHCP_STATE_SEARCHING
,
28
DHCP_STATE_SELECTING
,
29
DHCP_STATE_REQUESTING
,
30
DHCP_STATE_IP_CHECK
,
31
DHCP_STATE_BOUND
,
32
DHCP_STATE_FAILED
33
}
dhcp_state
;
34
38
typedef
enum
{
39
DHCP_ACT_NONE
,
40
DHCP_ACT_START
,
41
DHCP_ACT_RENEW
,
42
DHCP_ACT_REBIND
,
43
}
dhcp_action
;
44
45
/* @} */
46
47
48
//#define DHCP_AUTO // if not, you should handle manually => You can set this in wizconfig.h
49
//#define DHCP_ASYNC // if not, it works using sync function => You can set this in wizconfig.h
50
51
#undef dhcp_init
52
#undef dhcp_manual
53
#undef dhcp_get_state
54
#undef dhcp_set_storage
55
#undef dhcp_get_storage
56
#undef dhcp_static_mode
57
#undef dhcp_auto_start
58
59
int8
dhcp_init
(uint8 sock,
void_func
ip_update_hook,
void_func
ip_conflict_hook,
wiz_NetInfo
*def);
60
int8
dhcp_manual
(
dhcp_action
action, uint32 *renew, uint32 *rebind);
// blocking function
61
dhcp_state
dhcp_get_state
(
void
);
62
void
dhcp_set_storage
(
wiz_NetInfo
*net);
63
void
dhcp_get_storage
(
wiz_NetInfo
*net);
64
void
dhcp_static_mode
(
wiz_NetInfo
*net);
65
void
dhcp_auto_start
(
void
);
66
#if !defined(DHCP_AUTO) && defined(DHCP_ASYNC)
67
#error DHCP_ASYNC define without DHCP_AUTO is not allowed
68
#endif
69
70
71
#endif //_DHCP_H
72
Generated on Wed Mar 13 2013 16:12:38 for WIZlib Library API by
1.8.3.1