]> git.proxmox.com Git - mirror_edk2.git/blobdiff - StdLib/EfiSocketLib/Socket.h
Fix a bug about the iSCSI DHCP dependency issue.
[mirror_edk2.git] / StdLib / EfiSocketLib / Socket.h
index 30b642000e6e6b9d1bad9301785aad37f34c83c6..b38bec6bde4e77ca20c6add3dc80c533b7d48349 100644 (file)
@@ -33,9 +33,9 @@
 #define DEBUG_OPTION        0x00080000  ///<  Display option messages\r
 \r
 #define MAX_PENDING_CONNECTIONS     1   ///<  Maximum connection FIFO depth\r
-#define MAX_RX_DATA         65536       ///<  Maximum receive data size\r
+#define MAX_RX_DATA         0x01000000  ///<  Maximum receive data size\r
 #define MAX_TX_DATA         ( MAX_RX_DATA * 2 ) ///<  Maximum buffered transmit data in bytes\r
-#define RX_PACKET_DATA      16384       ///<  Maximum number of bytes in a RX packet\r
+#define RX_PACKET_DATA      0x00100000  ///<  Maximum number of bytes in a RX packet\r
 #define MAX_UDP_RETRANSMIT  16          ///<  UDP retransmit attempts to handle address not mapped\r
 \r
 #define ESL_STRUCTURE_ALIGNMENT_BYTES   15  ///<  Number of bytes for structure alignment\r
@@ -362,7 +362,7 @@ typedef struct {
 **/\r
 typedef\r
 EFI_STATUS\r
-(* PFN_NET_CONFIGURE) (\r
+(EFIAPI * PFN_NET_CONFIGURE) (\r
   IN VOID * pProtocol,\r
   IN VOID * pConfigData\r
   );\r
@@ -378,7 +378,7 @@ EFI_STATUS
 **/\r
 typedef\r
 EFI_STATUS\r
-(* PFN_NET_IO_START) (\r
+(EFIAPI * PFN_NET_IO_START) (\r
   IN VOID * pProtocol,\r
   IN VOID * pToken\r
   );\r
@@ -394,7 +394,7 @@ EFI_STATUS
 **/\r
 typedef\r
 EFI_STATUS\r
-(* PFN_NET_POLL) (\r
+(EFIAPI * PFN_NET_POLL) (\r
   IN VOID * pProtocol\r
   );\r
 \r
@@ -989,9 +989,10 @@ typedef struct _ESL_SOCKET {
   //\r
   //  Socket options\r
   //\r
+  BOOLEAN bIncludeHeader;       ///<  TRUE if including the IP header\r
   BOOLEAN bListenCalled;        ///<  TRUE if listen was successfully called\r
   BOOLEAN bOobInLine;           ///<  TRUE if out-of-band messages are to be received inline with normal data\r
-  BOOLEAN bIncludeHeader;       ///<  TRUE if including the IP header\r
+  BOOLEAN bReUseAddr;           ///<  TRUE if using same address is allowed\r
 \r
   //\r
   //  Socket data\r
@@ -999,6 +1000,7 @@ typedef struct _ESL_SOCKET {
   int Domain;                   ///<  Specifies family of protocols\r
   int Type;                     ///<  Specifies how to make network connection\r
   int Protocol;                 ///<  Specifies lower layer protocol to use\r
+  BOOLEAN bAddressSet;          ///<  Set when the address is specified\r
   BOOLEAN bConfigured;          ///<  Set after the socket is configured\r
 \r
   BOOLEAN bRxDisable;           ///<  Receive disabled via shutdown\r
@@ -1185,6 +1187,28 @@ EslSocketCopyFragmentedBuffer (
   OUT size_t * pDataLength\r
   );\r
 \r
+/**\r
+  Free the socket.\r
+\r
+  This routine frees the socket structure and handle resources.\r
+\r
+  The ::close routine calls EslServiceFreeProtocol which then calls\r
+  this routine to free the socket context structure and close the\r
+  handle.\r
+\r
+  @param [in] pSocketProtocol Address of an ::EFI_SOCKET_PROTOCOL structure.\r
+  \r
+  @param [out] pErrno         Address to receive the errno value upon completion.\r
+\r
+  @retval EFI_SUCCESS   The socket resources were returned successfully.\r
+\r
+ **/\r
+EFI_STATUS\r
+EslSocketFree (\r
+  IN EFI_SOCKET_PROTOCOL * pSocketProtocol,\r
+  IN int * pErrno\r
+  );\r
+\r
 /**\r
   Free the ESL_IO_MGMT event and structure\r
 \r