]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Tcp4Dxe/Socket.h
Fix coding style issues for Tcp4Dxe driver.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Tcp4Dxe / Socket.h
index 0e987109d0f231e2a9992a15da181689a4cf1c76..4ee8e6c39e9027cbb9fafe13da0e3dd9e31b5dd0 100644 (file)
@@ -344,6 +344,14 @@ typedef struct _SOCK_INIT_DATA {
 \r
   EFI_HANDLE   DriverBinding; // the driver binding handle\r
 } SOCK_INIT_DATA;\r
+\r
+//\r
+//the union type of TCP and UDP protocol\r
+//\r
+typedef union {\r
+  EFI_TCP4_PROTOCOL TcpProtocol;\r
+  EFI_UDP4_PROTOCOL UdpProtocol;\r
+} NET_PROTOCOL;\r
 //\r
 // the socket structure representing a network service access point\r
 //\r
@@ -391,10 +399,7 @@ struct _SOCKET {
   //\r
   SOCK_PROTO_HANDLER    ProtoHandler; // the request handler of protocol\r
   UINT8 ProtoReserved[PROTO_RESERVED_LEN];  // Data fields reserved for protocol\r
-  union {\r
-    EFI_TCP4_PROTOCOL TcpProtocol;\r
-    EFI_UDP4_PROTOCOL UdpProtocol;\r
-  } NetProtocol;\r
+  NET_PROTOCOL          NetProtocol;\r
 \r
   //\r
   // Callbacks.\r