-/*\r
- LUFA Library\r
- Copyright (C) Dean Camera, 2010.\r
- \r
- dean [at] fourwalledcubicle [dot] com\r
- www.fourwalledcubicle.com\r
-*/\r
-\r
-/*\r
- Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
-\r
- Permission to use, copy, modify, distribute, and sell this \r
- software and its documentation for any purpose is hereby granted\r
- without fee, provided that the above copyright notice appear in \r
- all copies and that both that the copyright notice and this\r
- permission notice and warranty disclaimer appear in supporting \r
- documentation, and that the name of the author not be used in \r
- advertising or publicity pertaining to distribution of the \r
- software without specific, written prior permission.\r
-\r
- The author disclaim all warranties with regard to this\r
- software, including all implied warranties of merchantability\r
- and fitness. In no event shall the author be liable for any\r
- special, indirect or consequential damages or any damages\r
- whatsoever resulting from loss of use, data or profits, whether\r
- in an action of contract, negligence or other tortious action,\r
- arising out of or in connection with the use or performance of\r
- this software.\r
-*/\r
-\r
-/** \file\r
- *\r
- * Header file for uIPManagement.c.\r
- */\r
-\r
-#ifndef _UIP_MANAGEMENT_H_\r
-#define _UIP_MANAGEMENT_H_\r
-\r
- /* Includes: */\r
- #include <LUFA/Drivers/USB/Class/RNDIS.h>\r
-\r
- #include <uip.h>\r
- #include <uip_arp.h>\r
- #include <uip-split.h>\r
- #include <timer.h>\r
- \r
- #include "Lib/DHCPClientApp.h"\r
- #include "Lib/HTTPServerApp.h"\r
- #include "Lib/TELNETServerApp.h"\r
- \r
- /* Macros: */\r
- /** IP address that the webserver should use once connected to a RNDIS device (when DHCP is disabled). */\r
- #define DEVICE_IP_ADDRESS (uint8_t[]){192, 168, 1, 10}\r
- \r
- /** Netmask that the webserver should once connected to a RNDIS device (when DHCP is disabled). */\r
- #define DEVICE_NETMASK (uint8_t[]){255, 255, 255, 0}\r
- \r
- /** IP address of the default gateway the webserver should use when routing outside the local subnet\r
- * (when DHCP is disabled).\r
- */\r
- #define DEVICE_GATEWAY (uint8_t[]){192, 168, 1, 1}\r
-\r
- /* External Variables: */\r
- extern struct uip_eth_addr MACAddress;\r
- \r
- /* Function Prototypes: */\r
- void uIPManagement_Init(void);\r
- void uIPManagement_ManageNetwork(void);\r
- void uIPManagement_TCPCallback(void);\r
- void uIPManagement_UDPCallback(void);\r
- \r
- #if defined(INCLUDE_FROM_UIPMANAGEMENT_C)\r
- static void uIPManagement_ProcessIncomingPacket(void);\r
- static void uIPManagement_ManageConnections(void);\r
- #endif\r
- \r
-#endif\r
+/*
+ LUFA Library
+ Copyright (C) Dean Camera, 2011.
+
+ dean [at] fourwalledcubicle [dot] com
+ www.lufa-lib.org
+*/
+
+/*
+ Copyright 2011 Dean Camera (dean [at] fourwalledcubicle [dot] com)
+
+ Permission to use, copy, modify, distribute, and sell this
+ software and its documentation for any purpose is hereby granted
+ without fee, provided that the above copyright notice appear in
+ all copies and that both that the copyright notice and this
+ permission notice and warranty disclaimer appear in supporting
+ documentation, and that the name of the author not be used in
+ advertising or publicity pertaining to distribution of the
+ software without specific, written prior permission.
+
+ The author disclaim all warranties with regard to this
+ software, including all implied warranties of merchantability
+ and fitness. In no event shall the author be liable for any
+ special, indirect or consequential damages or any damages
+ whatsoever resulting from loss of use, data or profits, whether
+ in an action of contract, negligence or other tortious action,
+ arising out of or in connection with the use or performance of
+ this software.
+*/
+
+/** \file
+ *
+ * Header file for uIPManagement.c.
+ */
+
+#ifndef _UIP_MANAGEMENT_H_
+#define _UIP_MANAGEMENT_H_
+
+ /* Includes: */
+ #include <LUFA/Drivers/USB/USB.h>
+
+ #include <uip.h>
+ #include <uip_arp.h>
+ #include <uip-split.h>
+ #include <timer.h>
+
+ #include "Lib/DHCPClientApp.h"
+ #include "Lib/DHCPServerApp.h"
+ #include "Lib/HTTPServerApp.h"
+ #include "Lib/TELNETServerApp.h"
+
+ /* Macros: */
+ /** IP address that the webserver should use once connected to a RNDIS device (when DHCP is disabled). */
+ #define DEVICE_IP_ADDRESS (uint8_t[]){10, 0, 0, 2}
+
+ /** Netmask that the webserver should once connected to a RNDIS device (when DHCP is disabled). */
+ #define DEVICE_NETMASK (uint8_t[]){255, 255, 255, 0}
+
+ /** IP address of the default gateway the webserver should use when routing outside the local subnet
+ * (when DHCP is disabled).
+ */
+ #define DEVICE_GATEWAY (uint8_t[]){10, 0, 0, 1}
+
+ /** Ethernet MAC address of the virtual webserver. When in device RNDIS mode, the virtual webserver requires
+ * a unique MAC address that it can use when sending packets to the RNDIS adapter, which contains a seperate
+ * MAC address as set in the RNDIS class driver configuration structure.
+ */
+ #define SERVER_MAC_ADDRESS (uint8_t[]){1, 0, 1, 0, 1, 0}
+
+ /* External Variables: */
+ extern struct uip_eth_addr MACAddress;
+
+ /* Function Prototypes: */
+ void uIPManagement_Init(void);
+ void uIPManagement_ManageNetwork(void);
+ void uIPManagement_TCPCallback(void);
+ void uIPManagement_UDPCallback(void);
+
+ #if defined(INCLUDE_FROM_UIPMANAGEMENT_C)
+ static void uIPManagement_ProcessIncomingPacket(void);
+ static void uIPManagement_ManageConnections(void);
+ #endif
+
+#endif
+