io6Library
WIZnet Dual Stack TCP/IP Ethernet Controller Driver
dhcpv6.h
Go to the documentation of this file.
1 //*****************************************************************************
2 //
40 //
41 //*****************************************************************************
42 #ifndef _DHCP6_H_
43 #define _DHCP6_H_
44 #include <stdint.h>
45 #include "w6100.h"
46 #include "socket.h"
47 /*
48  * @brief
49  * @details If you want to display debug & procssing message, Define _DHCP_DEBUG_
50  * @note If defined, it dependens on <stdio.h>
51  */
52 //#define _DHCP_DEBUG_
53 
54 /* Retry to processing DHCP */
55 #define MAX_DHCP_RETRY 2
56 #define DHCP_WAIT_TIME 10
57 
58 /* UDP port numbers for DHCP */
59 #define DHCP_SERVER_PORT 547
60 #define DHCP_CLIENT_PORT 546
61 
62 #define DCHP_HOST_NAME "WIZnet\0"
63 
64 /*
65  * @brief return value of @ref DHCP_run()
66  */
67 enum
68 {
75 };
76 
83 void InitDhcpOption(unsigned asize, unsigned agrowby);
89 void AppendDhcpOption(uint8_t value);
95 void DumpDhcpOption(char *sMark);
101 void DHCP_Option_Select(uint8_t Option);
102 /*
103  * @brief DHCP client initialization (outside of the main loop)
104  * @param s - socket number
105  * @param buf - buffer for procssing DHCP message
106  */
107 void DHCP_init(uint8_t s, uint8_t *buf);
108 
109 /*
110  * @brief DHCP 1s Tick Timer handler
111  * @note SHOULD BE register to your system 1s Tick timer handler
112  */
113 void DHCP_time_handler(void);
114 
121 uint8_t DHCP_run(wiz_NetInfo *netinfo);
122 
128 uint8_t DHCP_run2(void);
129 
130 /*
131  * @brief Stop DHCP procssing
132  * @note If you want to restart. call DHCP_init() and DHCP_run()
133  */
134 void DHCP_stop(void);
135 
136 #endif /* _DHCP_H_ */
DHCP_IP_CHANGED
@ DHCP_IP_CHANGED
Change IP address by new ip from DHCP (if cbfunc == null, act as default default_ip_update)
Definition: dhcpv6.h:72
DHCP_stop
void DHCP_stop(void)
Definition: dhcpv6.c:1165
InitDhcpOption
void InitDhcpOption(unsigned asize, unsigned agrowby)
Definition: dhcpv6.c:188
DHCP_IP_LEASED
@ DHCP_IP_LEASED
Stand by.
Definition: dhcpv6.h:73
DHCP_Option_Select
void DHCP_Option_Select(uint8_t Option)
Definition: dhcpv6.c:235
DHCP_init
void DHCP_init(uint8_t s, uint8_t *buf)
Definition: dhcpv6.c:1228
AppendDhcpOption
void AppendDhcpOption(uint8_t value)
Definition: dhcpv6.c:200
DHCP_run2
uint8_t DHCP_run2(void)
Definition: dhcpv6.c:1036
DHCP_run
uint8_t DHCP_run(wiz_NetInfo *netinfo)
Definition: dhcpv6.c:1074
DHCP_STOPPED
@ DHCP_STOPPED
Stop procssing DHCP protocol.
Definition: dhcpv6.h:74
DHCP_IP_ASSIGN
@ DHCP_IP_ASSIGN
First Occupy IP from DHPC server (if cbfunc == null, act as default default_ip_assign)
Definition: dhcpv6.h:71
DumpDhcpOption
void DumpDhcpOption(char *sMark)
Definition: dhcpv6.c:218
socket.h
SOCKET APIs Header File.
wiz_NetInfo_t
Network Information for _WIZCHIP_.
Definition: wizchip_conf.h:442
DHCP_time_handler
void DHCP_time_handler(void)
Definition: dhcpv6.c:1272
DHCP_RUNNING
@ DHCP_RUNNING
Procssing DHCP proctocol.
Definition: dhcpv6.h:70
DHCP_FAILED
@ DHCP_FAILED
Procssing Fail.
Definition: dhcpv6.h:69
w6100.h
W6100 HAL Header File.