# against the file with absolute path, so to exclude all test directories\r
# for example use the pattern */test/*\r
\r
-EXCLUDE_PATTERNS = */uip/*\r
+EXCLUDE_PATTERNS = */uip/* */FATFs/* \r
\r
# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names\r
# (namespaces, classes, functions, etc.) that should be excluded from the\r
\r
\r
/** Initialization function for the simple HTTP webserver. */\r
-void WebserverApp_Init(void)\r
+void HTTPServerApp_Init(void)\r
{\r
/* Listen on port 80 for HTTP connections from hosts */\r
uip_listen(HTONS(HTTP_SERVER_PORT));\r
/** uIP stack application callback for the simple HTTP webserver. This function must be called each time the\r
* TCP/IP stack needs a TCP packet to be processed.\r
*/\r
-void WebserverApp_Callback(void)\r
+void HTTPServerApp_Callback(void)\r
{\r
uip_tcp_appstate_t* const AppState = &uip_conn->appstate;\r
\r
switch (AppState->CurrentState)\r
{\r
case WEBSERVER_STATE_OpenRequestedFile:\r
- Webserver_OpenRequestedFile();\r
+ HTTPServerApp_OpenRequestedFile();\r
break;\r
case WEBSERVER_STATE_SendResponseHeader:\r
- Webserver_SendResponseHeader();\r
+ HTTPServerApp_SendResponseHeader();\r
break;\r
case WEBSERVER_STATE_SendMIMETypeHeader:\r
- Webserver_SendMIMETypeHeader(); \r
+ HTTPServerApp_SendMIMETypeHeader(); \r
break;\r
case WEBSERVER_STATE_SendData:\r
- Webserver_SendData();\r
+ HTTPServerApp_SendData();\r
break;\r
case WEBSERVER_STATE_Closing:\r
uip_close();\r
/** HTTP Server State handler for the Request Process state. This state manages the processing of incomming HTTP\r
* GET requests to the server from the receiving HTTP client.\r
*/\r
-static void Webserver_OpenRequestedFile(void)\r
+static void HTTPServerApp_OpenRequestedFile(void)\r
{\r
uip_tcp_appstate_t* const AppState = &uip_conn->appstate;\r
char* const AppData = (char*)uip_appdata;\r
/** HTTP Server State handler for the HTTP Response Header Send state. This state manages the transmission of\r
* the HTTP response header to the receiving HTTP client.\r
*/\r
-static void Webserver_SendResponseHeader(void)\r
+static void HTTPServerApp_SendResponseHeader(void)\r
{\r
uip_tcp_appstate_t* const AppState = &uip_conn->appstate;\r
char* const AppData = (char*)uip_appdata;\r
/** HTTP Server State handler for the MIME Header Send state. This state manages the transmission of the file\r
* MIME type header for the requested file to the receiving HTTP client.\r
*/\r
-static void Webserver_SendMIMETypeHeader(void)\r
+static void HTTPServerApp_SendMIMETypeHeader(void)\r
{\r
uip_tcp_appstate_t* const AppState = &uip_conn->appstate;\r
char* const AppData = (char*)uip_appdata;\r
/** HTTP Server State handler for the Data Send state. This state manages the transmission of file chunks\r
* to the receiving HTTP client.\r
*/\r
-static void Webserver_SendData(void)\r
+static void HTTPServerApp_SendData(void)\r
{\r
uip_tcp_appstate_t* const AppState = &uip_conn->appstate;\r
char* const AppData = (char*)uip_appdata;\r
#define HTTP_SERVER_PORT 80\r
\r
/* Function Prototypes: */\r
- void WebserverApp_Init(void);\r
- void WebserverApp_Callback(void);\r
+ void HTTPServerApp_Init(void);\r
+ void HTTPServerApp_Callback(void);\r
\r
#if defined(INCLUDE_FROM_HTTPSERVERAPP_C)\r
- static void Webserver_OpenRequestedFile(void);\r
- static void Webserver_SendResponseHeader(void);\r
- static void Webserver_SendMIMETypeHeader(void);\r
- static void Webserver_SendData(void);\r
+ static void HTTPServerApp_OpenRequestedFile(void);\r
+ static void HTTPServerApp_SendResponseHeader(void);\r
+ static void HTTPServerApp_SendMIMETypeHeader(void);\r
+ static void HTTPServerApp_SendData(void);\r
#endif\r
\r
#endif\r
uip_setethaddr(MACAddress);\r
\r
/* HTTP Webserver Initialization */\r
- WebserverApp_Init();\r
+ HTTPServerApp_Init();\r
}\r
\r
/** uIP Management function. This function manages the uIP stack when called while an RNDIS device has been\r
void
uip_arp_timer(void)
{
- struct arp_entry *tabptr;
+ struct arp_entry *tabptr = NULL;
++arptime;
for(i = 0; i < UIP_ARPTAB_SIZE; ++i) {
static void
uip_arp_update(uip_ipaddr_t *ipaddr, struct uip_eth_addr *ethaddr)
{
- register struct arp_entry *tabptr;
+ register struct arp_entry *tabptr = NULL;
/* Walk through the ARP mapping table and try to find an entry to
update. If none is found, the IP -> MAC address mapping is
inserted in the ARP table. */
void
uip_arp_arpin(void)
{
-
if(uip_len < sizeof(struct arp_hdr)) {
uip_len = 0;
return;
void
uip_arp_out(void)
{
- struct arp_entry *tabptr;
+ struct arp_entry *tabptr = NULL;
/* Find the destination IP address in the ARP table and construct
the Ethernet header. If the destination IP addres isn't on the
* should be tweaked to match each specific project. The uIP
* distribution contains a documented example "uipopt.h" that can be
* copied and modified for each project.
- *
- * \note Contiki does not use the uipopt.h file to configure uIP, but
- * uses a per-port uip-conf.h file that should be edited instead.
*/
/**
typedef struct httpd_state uip_tcp_appstate_t
\endcode
*/
- #define UIP_UDP_APPCALL DHCPApp_Callback
- void UIP_UDP_APPCALL(void);
+#define UIP_UDP_APPCALL DHCPApp_Callback
+void UIP_UDP_APPCALL(void);
/**
* \var #define UIP_APPCALL
* response to TCP/IP events.
*
*/
- #define UIP_APPCALL WebserverApp_Callback
- void UIP_APPCALL(void);
+#define UIP_APPCALL HTTPServerApp_Callback
+void UIP_APPCALL(void);
/**
* \var typedef uip_tcp_appstate_t
* uip_conn structure. This usually is typedef:ed to a struct holding
* application state information.
*/
- typedef struct
- {
- uint8_t CurrentState;
- uint8_t NextState;
-
- char FileName[30];
- FIL FileHandle;
- bool FileOpen;
- uint32_t ACKedFilePos;
- uint16_t SentChunkSize;
- } uip_tcp_appstate_t;
+typedef struct
+{
+ uint8_t CurrentState;
+ uint8_t NextState;
+
+ char FileName[30];
+ FIL FileHandle;
+ bool FileOpen;
+ uint32_t ACKedFilePos;
+ uint16_t SentChunkSize;
+} uip_tcp_appstate_t;
/**
* \var typedef uip_udp_appstate_t
* uip_conn structure. This usually is typedef:ed to a struct holding
* application state information.
*/
- typedef struct
+typedef struct
+{
+ uint8_t CurrentState;
+ struct uip_udp_conn* Connection;
+
+ struct
{
- uint8_t CurrentState;
- struct uip_udp_conn* Connection;
-
- struct
- {
- uint8_t AllocatedIP[4];
- uint8_t Netmask[4];
- uint8_t GatewayIP[4];
- uint8_t ServerIP[4];
- } DHCPOffer_Data;
- } uip_udp_appstate_t;
+ uint8_t AllocatedIP[4];
+ uint8_t Netmask[4];
+ uint8_t GatewayIP[4];
+ uint8_t ServerIP[4];
+ } DHCPOffer_Data;
+} uip_udp_appstate_t;
/** @} */
#endif /* __UIPOPT_H__ */