EDK2 doxygen online documents - Firmware Encoding Index 1
EDK2 doxygen online documents - Firmware Encoding Index

StdLib/BsdSocketLib/getsockopt.c

Go to the documentation of this file.
00001 
00015 #include <SocketInternals.h>
00016 
00017 
00036 int
00037 getsockopt (
00038   IN int s,
00039   IN int level,
00040   IN int option_name,
00041   OUT void * __restrict option_value,
00042   IN OUT socklen_t * __restrict option_len
00043   )
00044 {
00045   int OptionStatus;
00046   EFI_SOCKET_PROTOCOL * pSocketProtocol;
00047   EFI_STATUS Status;
00048   
00049   //
00050   //  Locate the context for this socket
00051   //
00052   pSocketProtocol = BslFdToSocketProtocol ( s, NULL, &errno );
00053   if ( NULL != pSocketProtocol ) {
00054     //
00055     //  Get the socket option
00056     //
00057     Status = pSocketProtocol->pfnOptionGet ( pSocketProtocol,
00058                                              level,
00059                                              option_name,
00060                                              option_value,
00061                                              option_len,
00062                                              &errno );
00063   }
00064   
00065   //
00066   //  Return the operation stauts
00067   //
00068   OptionStatus = ( 0 == errno ) ? 0 : -1;
00069   return OptionStatus;
00070 }
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Defines