X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=StdLib%2FBsdSocketLib%2FSocketInternals.h;h=c30f7fb6612bed437ec9f7deb4c57ee5250b8ef4;hb=f2509d6d3efbed3cf90c44ace94a331b912b0017;hp=4f5c584a4e2977942040e91f42366cc33beb6f3d;hpb=39f4382a972d5916a43aa588baee2635dbda4089;p=mirror_edk2.git diff --git a/StdLib/BsdSocketLib/SocketInternals.h b/StdLib/BsdSocketLib/SocketInternals.h index 4f5c584a4e..c30f7fb661 100644 --- a/StdLib/BsdSocketLib/SocketInternals.h +++ b/StdLib/BsdSocketLib/SocketInternals.h @@ -57,7 +57,7 @@ address for the file @param [in] pErrno Address of the errno variable - @returns A pointer to the socket protocol structure or NULL if + @return A pointer to the EFI_SOCKET_PROTOCOL structure or NULL if an invalid file descriptor was passed in. **/ @@ -71,13 +71,18 @@ BslFdToSocketProtocol ( /** Close the socket - @param [in] pDescriptor Descriptor address for the file + The BslSocketClose routine is called indirectly from the close file + system routine. This routine closes the socket and returns the + status to the caller. + + @param[in] pDescriptor Descriptor address for the file - @returns This routine returns 0 upon success and -1 upon failure. - In the case of failure, errno contains more information. + @return This routine returns 0 upon success and -1 upon failure. + In the case of failure, ::errno contains more information. **/ -INT32 +int +EFIAPI BslSocketClose ( struct __filedes * pDescriptor ); @@ -85,9 +90,9 @@ BslSocketClose ( /** Worker routine to close the socket. - @param [in] pSocketProtocol Socket protocol structure address + @param[in] pSocketProtocol Socket protocol structure address - @param [in] pErrno Address of the errno variable + @param[in] pErrno Address of the ::errno variable @retval EFI_SUCCESS Successfully closed the socket @@ -105,10 +110,11 @@ BslSocketCloseWork ( @param [in] Events Mask of events to detect - @returns Detected events for the socket + @return Detected events for the socket **/ short +EFIAPI BslSocketPoll ( IN struct __filedes * pDescriptor, IN short Events @@ -121,7 +127,7 @@ BslSocketPoll ( @param [in] pErrno Address of the errno variable - @returns The file descriptor for the socket or -1 if an error occurs. + @return The file descriptor for the socket or -1 if an error occurs. **/ int @@ -133,15 +139,22 @@ BslSocketProtocolToFd ( /** Read support routine for sockets + The BslSocketRead routine is called indirectly by the read file + system routine. This routine is typically used for SOCK_STREAM + because it waits for receive data from the target system specified + in the ::connect call. + @param [in] pDescriptor Descriptor address for the file @param [in] pOffset File offset @param [in] LengthInBytes Number of bytes to read @param [in] pBuffer Address of the buffer to receive the data - @returns The number of bytes read or -1 if an error occurs. + @return The number of bytes read or -1 if an error occurs. + In the case of an error, ::errno contains more details. **/ ssize_t +EFIAPI BslSocketRead ( struct __filedes *pDescriptor, off_t * pOffset, @@ -157,10 +170,12 @@ BslSocketRead ( @param [in] LengthInBytes Number of bytes to write @param [in] pBuffer Address of the data - @returns The number of bytes written or -1 if an error occurs. + @return The number of bytes written or -1 if an error occurs. + In the case of an error, ::errno contains more details. **/ ssize_t +EFIAPI BslSocketWrite ( struct __filedes *pDescriptor, off_t * pOffset, @@ -175,7 +190,7 @@ BslSocketWrite ( @param [in] pErrno Address of the errno variable - @returns A pointer to the socket protocol structure or NULL if + @return A pointer to the EFI_SOCKET_PROTOCOL structure or NULL if an invalid file descriptor was passed in. **/