]> git.proxmox.com Git - mirror_edk2.git/blobdiff - AppPkg/Applications/Sockets/WebServer/WebServer.h
Fix some errors detected by the GCC 4.4 compiler.
[mirror_edk2.git] / AppPkg / Applications / Sockets / WebServer / WebServer.h
index 0eee114832b0318a7d9c1021c6312a0c87c5f8ca..48839f345613ecacc227f2dbc225b71c0b61e923 100644 (file)
 #include <sys/poll.h>\r
 #include <sys/socket.h>\r
 \r
+#if defined(_MSC_VER)   //  Handle Microsoft VC++ compiler specifics.\r
 #pragma warning ( disable : 4054 )\r
 #pragma warning ( disable : 4152 )\r
+#endif  //  defined(_MSC_VER)\r
 \r
 //------------------------------------------------------------------------------\r
 //  Pages\r
@@ -86,7 +88,7 @@
 \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
@@ -173,9 +175,10 @@ typedef struct {
   //\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
@@ -377,6 +380,23 @@ DxeServicesTablePage (
   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
@@ -445,6 +465,23 @@ IndexPage (
   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
@@ -723,7 +760,7 @@ EFI_STATUS
 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