\r
#define DEBUG_SOCKET_POLL 0x00080000 ///< Display the socket poll messages\r
#define DEBUG_PORT_WORK 0x00040000 ///< Display the port work messages\r
-#define DEBUG_SERVER_TIMER 0x00020000 ///< Display the socket poll messages\r
+#define DEBUG_SERVER_LISTEN 0x00020000 ///< Display the socket poll messages\r
#define DEBUG_HTTP_PORT 0x00010000 ///< Display HTTP port related messages\r
#define DEBUG_REQUEST 0x00008000 ///< Display the HTTP request messages\r
\r
\r
#endif // MDEPKG_NDEBUG\r
\r
-#define WEB_SERVER_SIGNATURE SIGNATURE_32('W','e','b','S') ///< DT_WEB_SERVER memory signature\r
+#define WEB_SERVER_SIGNATURE SIGNATURE_32 ('W','e','b','S') ///< DT_WEB_SERVER memory signature\r
\r
#define SPACES_ADDRESS_TO_DATA 2\r
#define BYTES_ON_A_LINE 16\r
//\r
size_t RequestLength; ///< Request length in bytes\r
size_t TxBytes; ///< Bytes in the TX buffer\r
- UINT8 Request [ 65536 ]; ///< Page request\r
- UINT8 RxBuffer [ 65536 ]; ///< Receive buffer\r
- UINT8 TxBuffer [ 65536 ]; ///< Transmit buffer\r
+ UINT8 Request[ 65536 ]; ///< Page request\r
+ UINT8 RxBuffer[ 65536 ]; ///< Receive buffer\r
+ UINT8 TxBuffer[ 65536 ]; ///< Transmit buffer\r
} WSDT_PORT;\r
\r
/**\r
//\r
// HTTP port management\r
//\r
- BOOLEAN bTimerRunning; ///< Port creation timer status\r
+ BOOLEAN bRunning; ///< Web server running\r
EFI_EVENT TimerEvent; ///< Timer to open HTTP port\r
- int HttpListenPort; ///< File descriptor for the HTTP listen port\r
+ int HttpListenPort; ///< File descriptor for the HTTP listen port over TCP4\r
+ int HttpListenPort6; ///< File descriptor for the HTTP listen port over TCP6\r
\r
//\r
// Client port management\r
WSDT_PORT ** ppPortList; ///< List of port management structures\r
} DT_WEB_SERVER;\r
\r
-//#define SERVER_FROM_SERVICE(a) CR(a, DT_WEB_SERVER, ServiceBinding, WEB_SERVER_SIGNATURE) ///< Locate DT_LAYER from service binding\r
+//#define SERVER_FROM_SERVICE(a) CR (a, DT_WEB_SERVER, ServiceBinding, WEB_SERVER_SIGNATURE) ///< Locate DT_LAYER from service binding\r
\r
extern DT_WEB_SERVER mWebServer;\r
\r
UINT16 * pDescription; ///< Description of the page\r
} DT_PAGE;\r
\r
-extern CONST DT_PAGE mPageList []; ///< List of pages\r
+extern CONST DT_PAGE mPageList[]; ///< List of pages\r
extern CONST UINTN mPageCount; ///< Number of pages\r
\r
//------------------------------------------------------------------------------\r
OUT BOOLEAN * pbDone\r
);\r
\r
+/**\r
+ Respond with the Exit page\r
+\r
+ @param [in] SocketFD The socket's file descriptor to add to the list.\r
+ @param [in] pPort The WSDT_PORT structure address\r
+ @param [out] pbDone Address to receive the request completion status\r
+\r
+ @retval EFI_SUCCESS The request was successfully processed\r
+\r
+**/\r
+EFI_STATUS\r
+ExitPage (\r
+ IN int SocketFD,\r
+ IN WSDT_PORT * pPort,\r
+ OUT BOOLEAN * pbDone\r
+ );\r
+\r
/**\r
Respond with the firmware status\r
\r
OUT BOOLEAN * pbDone\r
);\r
\r
+/**\r
+ Respond with the Ports page\r
+\r
+ @param [in] SocketFD The socket's file descriptor to add to the list.\r
+ @param [in] pPort The WSDT_PORT structure address\r
+ @param [out] pbDone Address to receive the request completion status\r
+\r
+ @retval EFI_SUCCESS The request was successfully processed\r
+\r
+**/\r
+EFI_STATUS\r
+PortsPage (\r
+ IN int SocketFD,\r
+ IN WSDT_PORT * pPort,\r
+ OUT BOOLEAN * pbDone\r
+ );\r
+\r
/**\r
Page to reboot the system\r
\r
HttpSendIpAddress (\r
IN int SocketFD,\r
IN WSDT_PORT * pPort,\r
- IN struct sockaddr_in * pAddress\r
+ IN struct sockaddr_in6 * pAddress\r
);\r
\r
/**\r