]> git.proxmox.com Git - mirror_edk2.git/blobdiff - StdLib/BsdSocketLib/SocketInternals.h
Update the sockets library code
[mirror_edk2.git] / StdLib / BsdSocketLib / SocketInternals.h
index 8fbd8420dc537f6d0848a6dd2f820538230bf57b..1b19869c0d4f727e986a2220a6629b5ee6ae038e 100644 (file)
@@ -57,7 +57,7 @@
                             address for the file\r
   @param [in] pErrno        Address of the errno variable\r
 \r
-  @return   A pointer to the socket protocol structure or NULL if\r
+  @return   A pointer to the EFI_SOCKET_PROTOCOL structure or NULL if\r
             an invalid file descriptor was passed in.\r
 \r
  **/\r
@@ -71,13 +71,17 @@ BslFdToSocketProtocol (
 /**\r
   Close the socket\r
 \r
-  @param [in] pDescriptor Descriptor address for the file\r
+  The BslSocketClose routine is called indirectly from the close file\r
+  system routine.  This routine closes the socket and returns the\r
+  status to the caller.\r
+\r
+  @param[in] pDescriptor Descriptor address for the file\r
 \r
   @return   This routine returns 0 upon success and -1 upon failure.\r
-            In the case of failure, errno contains more information.\r
+            In the case of failure, ::errno contains more information.\r
 \r
 **/\r
-INT32\r
+int\r
 BslSocketClose (\r
   struct __filedes * pDescriptor\r
   );\r
@@ -85,9 +89,9 @@ BslSocketClose (
 /**\r
   Worker routine to close the socket.\r
 \r
-  @param [in] pSocketProtocol   Socket protocol structure address\r
+  @param[in] pSocketProtocol   Socket protocol structure address\r
 \r
-  @param [in] pErrno            Address of the errno variable\r
+  @param[in] pErrno            Address of the ::errno variable\r
 \r
   @retval EFI_SUCCESS   Successfully closed the socket\r
 \r
@@ -133,12 +137,18 @@ BslSocketProtocolToFd (
 /**\r
   Read support routine for sockets\r
 \r
+  The BslSocketRead routine is called indirectly by the read file\r
+  system routine.  This routine is typically used for SOCK_STREAM\r
+  because it waits for receive data from the target system specified\r
+  in the ::connect call.\r
+\r
   @param [in] pDescriptor   Descriptor address for the file\r
   @param [in] pOffset       File offset\r
   @param [in] LengthInBytes Number of bytes to read\r
   @param [in] pBuffer       Address of the buffer to receive the data\r
 \r
   @return   The number of bytes read or -1 if an error occurs.\r
+            In the case of an error, ::errno contains more details.\r
 \r
 **/\r
 ssize_t\r
@@ -158,6 +168,7 @@ BslSocketRead (
   @param [in] pBuffer       Address of the data\r
 \r
   @return   The number of bytes written or -1 if an error occurs.\r
+            In the case of an error, ::errno contains more details.\r
 \r
 **/\r
 ssize_t\r
@@ -175,7 +186,7 @@ BslSocketWrite (
 \r
   @param [in] pErrno      Address of the errno variable\r
 \r
-  @return   A pointer to the socket protocol structure or NULL if\r
+  @return   A pointer to the EFI_SOCKET_PROTOCOL structure or NULL if\r
             an invalid file descriptor was passed in.\r
 \r
  **/\r