Add DHCP server to the Webserver demo for automatic network configuration. Correct...
[pub/lufa.git] / Projects / Webserver / Lib / uip / conf / apps-conf.h
index 22bab81..fc9727d 100644 (file)
@@ -1,20 +1,29 @@
 #ifndef __APPS_CONF_H__\r
 #define __APPS_CONF_H__\r
 \r
-       enum Webserver_States_t\r
-       {\r
-               WEBSERVER_STATE_SendHeaders,\r
-               WEBSERVER_STATE_SendData,\r
-               WEBSERVER_STATE_Closed,\r
-       };\r
-\r
        typedef struct\r
        {\r
                uint8_t CurrentState;\r
                char*   SendPos;\r
        } uip_tcp_appstate_t;\r
 \r
+       typedef struct\r
+       {\r
+               uint8_t CurrentState;\r
+               struct  uip_udp_conn* Connection;\r
+               \r
+               struct\r
+               {\r
+                       uint8_t AllocatedIP[4];\r
+                       uint8_t Netmask[4];\r
+                       uint8_t GatewayIP[4];\r
+                       uint8_t ServerIP[4];\r
+               } DHCPOffer_Data;\r
+       } uip_udp_appstate_t;\r
+\r
        #define UIP_APPCALL     WebserverApp_Callback\r
+       #define UIP_UDP_APPCALL DHCPApp_Callback\r
        void UIP_APPCALL(void);\r
+       void UIP_UDP_APPCALL(void);\r
 \r
 #endif /*__APPS_CONF_H__*/\r