diff options
author | Dean Camera <[email protected]> | 2010-02-07 10:46:02 +0000 |
---|---|---|
committer | Dean Camera <[email protected]> | 2010-02-07 10:46:02 +0000 |
commit | 1fdc0e664e74b7f89c199e3c2852c24dd33b8bd3 (patch) | |
tree | 2daee1c900e84cd41e014732c15766323342ded9 /Projects/Webserver | |
parent | 196724c62d8c09b30dabb9a8ff3246033d95315f (diff) | |
download | qmk_firmware-1fdc0e664e74b7f89c199e3c2852c24dd33b8bd3.tar.gz qmk_firmware-1fdc0e664e74b7f89c199e3c2852c24dd33b8bd3.zip |
Make Webserver allow HTTP requests for files with up to 50 characters in the path instead of 30, to be in synch with the project documentation.
Change Webserver project's ENABLE_DHCP compile time option to ENABLE_DHCP_CLIENT to more accurately indicate its function.
Diffstat (limited to 'Projects/Webserver')
-rw-r--r-- | Projects/Webserver/Lib/DHCPClientApp.c | 2 | ||||
-rw-r--r-- | Projects/Webserver/Lib/uIPManagement.c | 2 | ||||
-rw-r--r-- | Projects/Webserver/Lib/uip/uipopt.h | 2 | ||||
-rw-r--r-- | Projects/Webserver/Webserver.txt | 24 | ||||
-rw-r--r-- | Projects/Webserver/makefile | 4 |
5 files changed, 18 insertions, 16 deletions
diff --git a/Projects/Webserver/Lib/DHCPClientApp.c b/Projects/Webserver/Lib/DHCPClientApp.c index 64cd70709b..2097062f8f 100644 --- a/Projects/Webserver/Lib/DHCPClientApp.c +++ b/Projects/Webserver/Lib/DHCPClientApp.c @@ -36,7 +36,7 @@ #include "DHCPClientApp.h"
-#if defined(ENABLE_DHCP) || defined(__DOXYGEN__)
+#if defined(ENABLE_DHCP_CLIENT) || defined(__DOXYGEN__)
/** Timer for managing the timeout period for a DHCP server to respond */
struct timer DHCPTimer;
diff --git a/Projects/Webserver/Lib/uIPManagement.c b/Projects/Webserver/Lib/uIPManagement.c index c7773c4559..ba2a505e95 100644 --- a/Projects/Webserver/Lib/uIPManagement.c +++ b/Projects/Webserver/Lib/uIPManagement.c @@ -212,7 +212,7 @@ static void uIPManagement_ManageConnections(void) }
}
- #if defined(ENABLE_DHCP)
+ #if defined(ENABLE_DHCP_CLIENT)
for (uint8_t i = 0; i < UIP_UDP_CONNS; i++)
{
/* Run periodic connection management for each UDP connection */
diff --git a/Projects/Webserver/Lib/uip/uipopt.h b/Projects/Webserver/Lib/uip/uipopt.h index c8b3ad59e3..c8d0cd2028 100644 --- a/Projects/Webserver/Lib/uip/uipopt.h +++ b/Projects/Webserver/Lib/uip/uipopt.h @@ -689,7 +689,7 @@ typedef union uint8_t CurrentState; uint8_t NextState; - char FileName[30]; + char FileName[50]; FIL FileHandle; bool FileOpen; uint32_t ACKedFilePos; diff --git a/Projects/Webserver/Webserver.txt b/Projects/Webserver/Webserver.txt index 59b5302489..9cee32e8a7 100644 --- a/Projects/Webserver/Webserver.txt +++ b/Projects/Webserver/Webserver.txt @@ -55,15 +55,17 @@ * To use this project, plug the USB AVR into a computer, so that it enumerates as a standard Mass Storage device. Load
* HTML files onto the disk, so that they can be served out to clients -- the default file to serve should be called
* <i>index.htm</i>. Filenames must be in 8.3 format for them to be retrieved correctly by the webserver, and the total
- * requested file path must be equal to or less than 50 characters.
+ * requested file path must be equal to or less than 50 characters (set in uipopt.h).
*
* When attached to a RNDIS class device, such as a USB (desktop) modem, the system will enumerate the device, set the
- * appropriate parameters needed for connectivity and begin listening for new HTTP connections on port 80. The device IP,
- * netmask and default gateway IP must be set to values appropriate for the RNDIS device being used for this project to
- * work, if the DHCP client is disabled (see \ref SSec_Options).
+ * appropriate parameters needed for connectivity and begin listening for new HTTP connections on port 80 and TELNET
+ * connections on port 23. The device IP, netmask and default gateway IP must be set to values appropriate for the RNDIS
+ * device being used for this project to work if the DHCP client is disabled (see \ref SSec_Options) - otherwise, the device
+ * will query the network's DHCP server for these parameters automatically.
*
- * When properly configured, the webserver can be accessed from any HTTP webrowser by typing in the device's static or
- * dynamically allocated IP address.
+ * When properly configured, the webserver can be accessed from any HTTP webrowser by typing in the device's statically or
+ * dynamically allocated IP address. The TELNET client can be accessed via any network socket app by connecting to the device
+ * on port 23 on the device's statically or dynamically allocated IP address.
*
* \section SSec_Options Project Options
*
@@ -76,7 +78,7 @@ * <td><b>Description:</b></td>
* </tr>
* <tr>
- * <td>ENABLE_DHCP=<i>x</i></td>
+ * <td>ENABLE_DHCP_CLIENT=<i>x</i></td>
* <td>Makefile CDEFS</td>
* <td>When set to 1, this enables the DHCP client for dynamic IP allocation of the network settings from a DHCP server.
* To disable DHCP and use the fixed address settings set elsewhere, set this to zero (do not undefine it).</td>
@@ -84,18 +86,18 @@ * <tr>
* <td>DEVICE_IP_ADDRESS</td>
* <td>Lib/uIPManagement.h</td>
- * <td>IP address that the webserver should use when connected to a RNDIS device (when ENABLE_DHCP is not defined).</td>
+ * <td>IP address that the webserver should use when connected to a RNDIS device (when ENABLE_DHCP_CLIENT is zero).</td>
* </tr>
* <tr>
* <td>DEVICE_NETMASK</td>
* <td>Lib/uIPManagement.h</td>
- * <td>Netmask that the webserver should use when connected to a RNDIS device (when ENABLE_DHCP is not defined).</td>
+ * <td>Netmask that the webserver should use when connected to a RNDIS device (when ENABLE_DHCP_CLIENT is zero).</td>
* </tr>
* <tr>
* <td>DEVICE_GATEWAY</td>
* <td>Lib/uIPManagement.h</td>
- * <td>Default routing gateway that the webserver should use when connected to a RNDIS device (when ENABLE_DHCP
- * is not defined).</td>
+ * <td>Default routing gateway that the webserver should use when connected to a RNDIS device (when ENABLE_DHCP_CLIENT
+ * is zero).</td>
* </tr>
* </table>
*/
\ No newline at end of file diff --git a/Projects/Webserver/makefile b/Projects/Webserver/makefile index 98ee03ca4f..2097988b3f 100644 --- a/Projects/Webserver/makefile +++ b/Projects/Webserver/makefile @@ -198,9 +198,9 @@ CSTANDARD = -std=gnu99 # Place -D or -U options here for C sources
CDEFS = -DF_CPU=$(F_CPU)UL -DF_CLOCK=$(F_CLOCK)UL -DBOARD=BOARD_$(BOARD) $(LUFA_OPTS)
-CDEFS += -DENABLE_DHCP=1
+CDEFS += -DENABLE_DHCP_CLIENT=1
-CDEFS += -DUIP_CONF_UDP=ENABLE_DHCP -DUIP_CONF_TCP=1 -DUIP_CONF_UDP_CONNS=1 -DUIP_CONF_MAX_CONNECTIONS=5
+CDEFS += -DUIP_CONF_UDP=ENABLE_DHCP_CLIENT -DUIP_CONF_TCP=1 -DUIP_CONF_UDP_CONNS=1 -DUIP_CONF_MAX_CONNECTIONS=5
CDEFS += -DUIP_CONF_MAX_LISTENPORTS=5 -DUIP_URGDATA=0 -DUIP_CONF_BUFFER_SIZE=1514 -DUIP_ARCH_CHKSUM=0
CDEFS += -DUIP_CONF_LL_802154=0 -DUIP_CONF_LL_80211=0 -DUIP_CONF_ROUTER=0 -DUIP_CONF_ICMP6=0
CDEFS += -DUIP_ARCH_ADD32=0 -DUIP_CONF_ICMP_DEST_UNREACH=1 -DUIP_NEIGHBOR_CONF_ADDRTYPE=0
|