]> git.proxmox.com Git - mirror_edk2.git/blobdiff - StdLib/SocketDxe/EntryUnload.c
Update the sockets library code
[mirror_edk2.git] / StdLib / SocketDxe / EntryUnload.c
index 6afd8e6b48f8841c38b1ad8a7e91e730380f9ede..1f550c95b358ff2c6ec56f35761c495de89b6f22 100644 (file)
 #include "Socket.h"\r
 \r
 \r
-CONST EFI_GUID mEslRawServiceGuid = {\r
-    0xf9f5d280, 0x8a4b, 0x48e2, { 0x96, 0x28, 0xda, 0xfa, 0xa7, 0x70, 0x54, 0x5d }\r
+/**\r
+  The following GUID values are only used by the SocketDxe driver.  An\r
+  alternative set of values exists in EfiSocketLib\UseEfiSocketLib.c\r
+  which an application uses when it links against EfiSocketLib.  These\r
+  two sets of values allow the SocketDxe driver to coexist with socket\r
+  applications.\r
+\r
+  Tag GUID - IPv4 in use by SocketDxe\r
+**/\r
+CONST EFI_GUID mEslIp4ServiceGuid = {\r
+  0x4e3a82e6, 0xe43f, 0x460a, { 0x86, 0x6e, 0x9b, 0x5a, 0xab, 0x80, 0x44, 0x48 }\r
 };\r
 \r
+\r
+/**\r
+  Tag GUID - TCPv4 in use by SocketDxe\r
+**/\r
 CONST EFI_GUID mEslTcp4ServiceGuid = {\r
     0x4dcaab0a, 0x1990, 0x4352, { 0x8d, 0x2f, 0x2d, 0x8f, 0x13, 0x55, 0x98, 0xa5 }\r
 };\r
 \r
+\r
+/**\r
+  Tag GUID - UDPv4 in use by SocketDxe\r
+**/\r
 CONST EFI_GUID mEslUdp4ServiceGuid = {\r
     0x43a110ce, 0x9ccd, 0x402b, { 0x8c, 0x29, 0x4a, 0x6d, 0x8a, 0xf7, 0x79, 0x90 }\r
 };\r
@@ -98,7 +115,7 @@ DriverUnload (
       //\r
       Max = BufferSize / sizeof ( pHandle[ 0 ]);\r
       for ( Index = 0; Max > Index; Index++ ) {\r
-        Status = DriverStop ( &gDriverBinding,\r
+        Status = DriverStop ( &mDriverBinding,\r
                               pHandle[ Index ],\r
                               0,\r
                               NULL );\r
@@ -131,7 +148,7 @@ DriverUnload (
   //  Done with the socket layer\r
   //\r
   if ( !EFI_ERROR ( Status )) {\r
-    Status = EslServiceUninstall ( ImageHandle );\r
+    Status = EslDxeUninstall ( ImageHandle );\r
     if ( !EFI_ERROR ( Status )) {\r
       //\r
       //  Remove the protocols installed by the EntryPoint routine.\r
@@ -139,11 +156,11 @@ DriverUnload (
       Status = gBS->UninstallMultipleProtocolInterfaces (\r
                   ImageHandle,\r
                   &gEfiDriverBindingProtocolGuid,\r
-                  &gDriverBinding,\r
+                  &mDriverBinding,\r
                   &gEfiComponentNameProtocolGuid,\r
-                  &gComponentName,\r
+                  &mComponentName,\r
                   &gEfiComponentName2ProtocolGuid,\r
-                  &gComponentName2,\r
+                  &mComponentName2,\r
                   NULL\r
                   );\r
       if ( !EFI_ERROR ( Status )) {\r
@@ -225,10 +242,10 @@ EntryPoint (
     Status = EfiLibInstallDriverBindingComponentName2 (\r
                ImageHandle,\r
                pSystemTable,\r
-               &gDriverBinding,\r
+               &mDriverBinding,\r
                ImageHandle,\r
-               &gComponentName,\r
-               &gComponentName2\r
+               &mComponentName,\r
+               &mComponentName2\r
                );\r
     if ( !EFI_ERROR ( Status )) {\r
       DEBUG (( DEBUG_POOL | DEBUG_INIT | DEBUG_INFO,\r
@@ -250,7 +267,7 @@ EntryPoint (
       //  Make the socket serivces available to other drivers\r
       //  and applications\r
       //\r
-      Status = EslServiceInstall ( &ImageHandle );\r
+      Status = EslDxeInstall ( &ImageHandle );\r
       if ( EFI_ERROR ( Status )) {\r
         //\r
         //  Disconnect from the network\r
@@ -263,11 +280,11 @@ EntryPoint (
         gBS->UninstallMultipleProtocolInterfaces (\r
                 ImageHandle,\r
                 &gEfiDriverBindingProtocolGuid,\r
-                &gDriverBinding,\r
+                &mDriverBinding,\r
                 &gEfiComponentNameProtocolGuid,\r
-                &gComponentName,\r
+                &mComponentName,\r
                 &gEfiComponentName2ProtocolGuid,\r
-                &gComponentName2,\r
+                &mComponentName2,\r
                 NULL\r
                 );\r
         DEBUG (( DEBUG_POOL | DEBUG_INIT | DEBUG_INFO,\r
@@ -292,5 +309,19 @@ EntryPoint (
 }\r
 \r
 \r
-PFN_ESL_xSTRUCTOR mpfnEslConstructor = NULL;\r
-PFN_ESL_xSTRUCTOR mpfnEslDestructor = NULL;\r
+/**\r
+  Socket layer's service binding protocol delcaration.\r
+**/\r
+CONST EFI_SERVICE_BINDING_PROTOCOL mEfiServiceBinding = {\r
+  EslDxeCreateChild,\r
+  EslDxeDestroyChild\r
+};\r
+\r
+\r
+/**\r
+  The following entries disable the constructor and destructor\r
+  for the SocketDxe driver.  Note that socket applications linking\r
+  against EfiSocketLib use different redirection.\r
+**/\r
+PFN_ESL_xSTRUCTOR mpfnEslConstructor = NULL;  ///<  No EfiSocketLib constructor needed for SocketDxe\r
+PFN_ESL_xSTRUCTOR mpfnEslDestructor = NULL;   ///<  No EfiSocketLib destructor needed for SocketDxe\r