- //\r
- // Set the protocol guid and driver binding handle\r
- // in the light of Sock->SockType\r
- //\r
- ProtocolGuid = &gEfiTcp4ProtocolGuid;\r
-\r
- //\r
- // Retrieve the protocol installed on this sock\r
- //\r
- Status = gBS->OpenProtocol (\r
- Sock->SockHandle,\r
- ProtocolGuid,\r
- &SockProtocol,\r
- Sock->DriverBinding,\r
- Sock->SockHandle,\r
- EFI_OPEN_PROTOCOL_GET_PROTOCOL\r
- );\r
-\r
- if (EFI_ERROR (Status)) {\r
-\r
- DEBUG ((EFI_D_ERROR, "SockDestroy: Open protocol installed "\r
- "on socket failed with %r\n", Status));\r
-\r
- goto FreeSock;\r
- }\r
-\r
- //\r
- // Uninstall the protocol installed on this sock\r
- // in the light of Sock->SockType\r
- //\r
- gBS->UninstallMultipleProtocolInterfaces (\r
- Sock->SockHandle,\r
- ProtocolGuid,\r
- SockProtocol,\r
- NULL\r
- );\r
-\r
-FreeSock:\r