]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Tcp4Dxe/Socket.h
Fixing function headers.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Tcp4Dxe / Socket.h
index 11406ed6d020c4fd600a16592d39ccb041882ae0..e0f9540930d4f3540d90a755bef9fec5de477ed4 100644 (file)
@@ -114,7 +114,7 @@ typedef enum {
 \r
 #define SOCK_IS_NO_MORE_DATA(Sock)    (0 != ((Sock)->Flag & SO_NO_MORE_DATA))\r
 \r
-#define SOCK_SIGNATURE                SIGNATURE_32 ('S', 'O', 'C', 'K')\r
+#define SOCK_SIGNATURE                EFI_SIGNATURE_32 ('S', 'O', 'C', 'K')\r
 \r
 #define SOCK_FROM_THIS(a)             CR ((a), SOCKET, NetProtocol, SOCK_SIGNATURE)\r
 \r
@@ -197,17 +197,6 @@ typedef enum {
   SOCK_STREAM ///< This socket providing stream service\r
 } SOCK_TYPE;\r
 \r
-///\r
-///  The handler of protocol for request from socket.\r
-///\r
-typedef\r
-EFI_STATUS\r
-(*SOCK_PROTO_HANDLER) (\r
-  IN SOCKET       *Socket,      ///< The socket issuing the request to protocol\r
-  IN SOCK_REQUEST Request,      ///< The request issued by socket\r
-  IN VOID         *RequestData  ///< The request related data\r
-  );\r
-\r
 ///\r
 ///  The buffer structure of rcvd data and send data used by socket.\r
 ///\r
@@ -217,7 +206,27 @@ typedef struct _SOCK_BUFFER {
   NET_BUF_QUEUE *DataQueue; ///< The queue to buffer data\r
 } SOCK_BUFFER;\r
 \r
-\r
+/**\r
+  The handler of protocol for request from socket.\r
+  \r
+  @param Socket              The socket issuing the request to protocol\r
+  @param Request             The request issued by socket\r
+  @param RequestData         The request related data\r
+  \r
+  @retval EFI_SUCCESS        The socket request is completed successfully.\r
+  @retval other              The error status returned by the corresponding TCP\r
+                             layer function.\r
+                             \r
+**/\r
+typedef\r
+EFI_STATUS\r
+(*SOCK_PROTO_HANDLER) (\r
+  IN SOCKET       *Socket,\r
+  IN SOCK_REQUEST Request,\r
+  IN VOID         *RequestData\r
+  );\r
+  \r
+  \r
 //\r
 // Socket provided oprerations for low layer protocol\r
 //\r
@@ -241,7 +250,9 @@ SockSetState (
 \r
 /**\r
   Called by the low layer protocol to indicate the socket a connection is \r
-  established. This function just changes the socket's state to SO_CONNECTED \r
+  established. \r
+  \r
+  This function just changes the socket's state to SO_CONNECTED \r
   and signals the token used for connection establishment.\r
 \r
   @param  Sock                  Pointer to the socket associated with the\r
@@ -254,9 +265,10 @@ SockConnEstablished (
   );\r
 \r
 /**\r
-  Called by the low layer protocol to indicate the connection is closed; This \r
-  function flushes the socket, sets the state to SO_CLOSED and signals the close \r
-  token.\r
+  Called by the low layer protocol to indicate the connection is closed.\r
+  \r
+  This function flushes the socket, sets the state to SO_CLOSED and signals \r
+  the close token.\r
 \r
   @param  Sock                  Pointer to the socket associated with the closed\r
                                 connection.\r
@@ -268,7 +280,8 @@ SockConnClosed (
   );\r
 \r
 /**\r
-  Called by low layer protocol to indicate that some data is sent or processed; \r
+  Called by low layer protocol to indicate that some data is sent or processed.\r
+   \r
   This function trims the sent data in the socket send buffer, signals the data \r
   token if proper.\r
 \r
@@ -305,10 +318,10 @@ SockGetDataToSend (
 \r
 /**\r
   Called by the low layer protocol to indicate that there\r
-  will be no more data from the communication peer; This\r
-  function set the socket's state to SO_NO_MORE_DATA and\r
-  signal all queued IO tokens with the error status\r
-  EFI_CONNECTION_FIN.\r
+  will be no more data from the communication peer.\r
+  \r
+  This function set the socket's state to SO_NO_MORE_DATA and\r
+  signal all queued IO tokens with the error status EFI_CONNECTION_FIN.\r
 \r
   @param  Sock                  Pointer to the socket.\r
 \r
@@ -319,7 +332,8 @@ SockNoMoreData (
   );\r
 \r
 /**\r
-  Called by the low layer protocol to deliver received data to socket layer; \r
+  Called by the low layer protocol to deliver received data to socket layer.\r
+  \r
   This function will append the data to the socket receive buffer, set ther \r
   urgent data length and then check if any receive token can be signaled.\r
 \r
@@ -720,8 +734,8 @@ SockClose (
 **/\r
 EFI_STATUS\r
 SockGetMode (\r
-  IN SOCKET *Sock,\r
-  IN VOID   *Mode\r
+  IN     SOCKET *Sock,\r
+  IN OUT VOID   *Mode\r
   );\r
 \r
 /**\r