WIZlib Library API  ver 1.0
WIZlib Library API User Menual
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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 {
33 } dhcp_state;
34 
38 typedef enum {
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
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