It also pass ICC+IPF and MYTOOLS+EBC build.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3711
6f19259b-4bc3-4df7-8a09-
765794883524
28 files changed:
@return EFI_DEVICE_ERROR : Fail to disable periodic schedule\r
\r
**/\r
@return EFI_DEVICE_ERROR : Fail to disable periodic schedule\r
\r
**/\r
EFI_STATUS\r
EhcDisablePeriodSchd (\r
IN USB2_HC_DEV *Ehc,\r
EFI_STATUS\r
EhcDisablePeriodSchd (\r
IN USB2_HC_DEV *Ehc,\r
@return Others : Failed to disable the asynchronous schedule\r
\r
**/\r
@return Others : Failed to disable the asynchronous schedule\r
\r
**/\r
EFI_STATUS\r
EhcDisableAsyncSchd (\r
IN USB2_HC_DEV *Ehc,\r
EFI_STATUS\r
EhcDisableAsyncSchd (\r
IN USB2_HC_DEV *Ehc,\r
gBS->OpenProtocol (\r
Controller,\r
&gEfiExtScsiPassThruProtocolGuid,\r
gBS->OpenProtocol (\r
Controller,\r
&gEfiExtScsiPassThruProtocolGuid,\r
- (VOID **) &(EFI_EXT_SCSI_PASS_THRU_PROTOCOL*)ScsiPassThru,\r
This->DriverBindingHandle,\r
ChildHandleBuffer[Index],\r
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER\r
This->DriverBindingHandle,\r
ChildHandleBuffer[Index],\r
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER\r
gBS->OpenProtocol (\r
Controller,\r
&gEfiScsiPassThruProtocolGuid,\r
gBS->OpenProtocol (\r
Controller,\r
&gEfiScsiPassThruProtocolGuid,\r
- (VOID **) &(EFI_SCSI_PASS_THRU_PROTOCOL*)ScsiPassThru,\r
This->DriverBindingHandle,\r
ChildHandleBuffer[Index],\r
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER\r
This->DriverBindingHandle,\r
ChildHandleBuffer[Index],\r
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER\r
//\r
#define EFI_SCSI_BUS_PROTOCOL_GUID \\r
{ \\r
//\r
#define EFI_SCSI_BUS_PROTOCOL_GUID \\r
{ \\r
- 0x5261213D, 0x3A3D, 0x441E, 0xB3, 0xAF, 0x21, 0xD3, 0xF7, 0xA4, 0xCA, 0x17 \\r
+ 0x5261213D, 0x3A3D, 0x441E, {0xB3, 0xAF, 0x21, 0xD3, 0xF7, 0xA4, 0xCA, 0x17} \\r
}\r
\r
typedef struct _EFI_SCSI_BUS_PROTOCOL {\r
}\r
\r
typedef struct _EFI_SCSI_BUS_PROTOCOL {\r
@retval Others Failed to reset the port\r
\r
**/\r
@retval Others Failed to reset the port\r
\r
**/\r
EFI_STATUS\r
UsbHubCtrlResetTT (\r
IN USB_DEVICE *HubDev,\r
EFI_STATUS\r
UsbHubCtrlResetTT (\r
IN USB_DEVICE *HubDev,\r
@retval Others Failed to set the feature\r
\r
**/\r
@retval Others Failed to set the feature\r
\r
**/\r
EFI_STATUS\r
UsbHubCtrlSetHubFeature (\r
IN USB_DEVICE *HubDev,\r
EFI_STATUS\r
UsbHubCtrlSetHubFeature (\r
IN USB_DEVICE *HubDev,\r
#define USB_BIT_IS_SET(Data, Bit) ((BOOLEAN)(((Data) & (Bit)) == (Bit)))\r
\r
#define EFI_USB_BUS_PROTOCOL_GUID \\r
#define USB_BIT_IS_SET(Data, Bit) ((BOOLEAN)(((Data) & (Bit)) == (Bit)))\r
\r
#define EFI_USB_BUS_PROTOCOL_GUID \\r
- {0x2B2F68CC, 0x0CD2, 0x44cf, 0x8E, 0x8B, 0xBB, 0xA2, 0x0B, 0x1B, 0x5B, 0x75}\r
+ {0x2B2F68CC, 0x0CD2, 0x44cf, {0x8E, 0x8B, 0xBB, 0xA2, 0x0B, 0x1B, 0x5B, 0x75}}\r
\r
#define USB_INTERFACE_FROM_USBIO(a) \\r
CR(a, USB_INTERFACE, UsbIo, USB_INTERFACE_SIGNATURE)\r
\r
#define USB_INTERFACE_FROM_USBIO(a) \\r
CR(a, USB_INTERFACE, UsbIo, USB_INTERFACE_SIGNATURE)\r
);\r
\r
EFI_GUID gEfiUsbKeyboardDriverGuid = {\r
);\r
\r
EFI_GUID gEfiUsbKeyboardDriverGuid = {\r
- 0xa05f5f78, 0xfb3, 0x4d10, 0x90, 0x90, 0xac, 0x4, 0x6e, 0xeb, 0x7c, 0x3c\r
+ 0xa05f5f78, 0xfb3, 0x4d10, {0x90, 0x90, 0xac, 0x4, 0x6e, 0xeb, 0x7c, 0x3c}\r
//\r
// We only care interrupt endpoint here\r
//\r
//\r
// We only care interrupt endpoint here\r
//\r
- UsbKeyboardDevice->IntEndpointDescriptor = EndpointDescriptor;\r
+ CopyMem(&UsbKeyboardDevice->IntEndpointDescriptor, &EndpointDescriptor, sizeof(EndpointDescriptor));\r
(UsbBot->BulkInEndpoint == NULL)) {\r
\r
UsbBot->BulkInEndpoint = (EFI_USB_ENDPOINT_DESCRIPTOR *) (UsbBot + 1);\r
(UsbBot->BulkInEndpoint == NULL)) {\r
\r
UsbBot->BulkInEndpoint = (EFI_USB_ENDPOINT_DESCRIPTOR *) (UsbBot + 1);\r
- *UsbBot->BulkInEndpoint = EndPoint;\r
+ CopyMem(UsbBot->BulkInEndpoint, &EndPoint, sizeof (EndPoint));\r
}\r
\r
if (USB_IS_OUT_ENDPOINT (EndPoint.EndpointAddress) &&\r
(UsbBot->BulkOutEndpoint == NULL)) {\r
\r
UsbBot->BulkOutEndpoint = (EFI_USB_ENDPOINT_DESCRIPTOR *) (UsbBot + 1) + 1;\r
}\r
\r
if (USB_IS_OUT_ENDPOINT (EndPoint.EndpointAddress) &&\r
(UsbBot->BulkOutEndpoint == NULL)) {\r
\r
UsbBot->BulkOutEndpoint = (EFI_USB_ENDPOINT_DESCRIPTOR *) (UsbBot + 1) + 1;\r
- *UsbBot->BulkOutEndpoint = EndPoint;\r
+ CopyMem(UsbBot->BulkOutEndpoint, &EndPoint, sizeof(EndPoint));\r
(UsbCbi->BulkInEndpoint == NULL)) {\r
\r
UsbCbi->BulkInEndpoint = (EFI_USB_ENDPOINT_DESCRIPTOR *) (UsbCbi + 1);\r
(UsbCbi->BulkInEndpoint == NULL)) {\r
\r
UsbCbi->BulkInEndpoint = (EFI_USB_ENDPOINT_DESCRIPTOR *) (UsbCbi + 1);\r
- *UsbCbi->BulkInEndpoint = EndPoint;\r
+ CopyMem(UsbCbi->BulkInEndpoint, &EndPoint, sizeof (EndPoint));;\r
}\r
\r
if (USB_IS_OUT_ENDPOINT (EndPoint.EndpointAddress) &&\r
(UsbCbi->BulkOutEndpoint == NULL)) {\r
\r
UsbCbi->BulkOutEndpoint = (EFI_USB_ENDPOINT_DESCRIPTOR *) (UsbCbi + 1) + 1;\r
}\r
\r
if (USB_IS_OUT_ENDPOINT (EndPoint.EndpointAddress) &&\r
(UsbCbi->BulkOutEndpoint == NULL)) {\r
\r
UsbCbi->BulkOutEndpoint = (EFI_USB_ENDPOINT_DESCRIPTOR *) (UsbCbi + 1) + 1;\r
- *UsbCbi->BulkOutEndpoint = EndPoint;\r
+ CopyMem(UsbCbi->BulkOutEndpoint, &EndPoint, sizeof (EndPoint));\r
}\r
\r
} else if (USB_IS_INTERRUPT_ENDPOINT (EndPoint.Attributes)) {\r
}\r
\r
} else if (USB_IS_INTERRUPT_ENDPOINT (EndPoint.Attributes)) {\r
(UsbCbi->InterruptEndpoint == NULL)) {\r
\r
UsbCbi->InterruptEndpoint = (EFI_USB_ENDPOINT_DESCRIPTOR *) (UsbCbi + 1) + 2;\r
(UsbCbi->InterruptEndpoint == NULL)) {\r
\r
UsbCbi->InterruptEndpoint = (EFI_USB_ENDPOINT_DESCRIPTOR *) (UsbCbi + 1) + 2;\r
- *UsbCbi->InterruptEndpoint = EndPoint;\r
+ CopyMem(UsbCbi->InterruptEndpoint, &EndPoint, sizeof (EndPoint));\r
);\r
\r
EFI_GUID gEfiUsbMouseDriverGuid = {\r
);\r
\r
EFI_GUID gEfiUsbMouseDriverGuid = {\r
- 0x290156b5, 0x6a05, 0x4ac0, 0xb8, 0x0, 0x51, 0x27, 0x55, 0xad, 0x14, 0x29\r
+ 0x290156b5, 0x6a05, 0x4ac0, {0xb8, 0x0, 0x51, 0x27, 0x55, 0xad, 0x14, 0x29}\r
};\r
\r
EFI_DRIVER_BINDING_PROTOCOL gUsbMouseDriverBinding = {\r
};\r
\r
EFI_DRIVER_BINDING_PROTOCOL gUsbMouseDriverBinding = {\r
//\r
#define EFI_IP4(EfiIpAddr) (*(IP4_ADDR *) ((EfiIpAddr).Addr))\r
#define EFI_NTOHL(EfiIp) (NTOHL (EFI_IP4 ((EfiIp))))\r
//\r
#define EFI_IP4(EfiIpAddr) (*(IP4_ADDR *) ((EfiIpAddr).Addr))\r
#define EFI_NTOHL(EfiIp) (NTOHL (EFI_IP4 ((EfiIp))))\r
-#define EFI_IP4_EQUAL(Ip1, Ip2) (NetCompareMem (&(Ip1), &(Ip2), sizeof (EFI_IPv4_ADDRESS)) == 0)\r
+#define EFI_IP4_EQUAL(Ip1, Ip2) (NetCompareMem ((Ip1), (Ip2), sizeof (EFI_IPv4_ADDRESS)) == 0)\r
\r
INTN\r
NetGetMaskLength (\r
\r
INTN\r
NetGetMaskLength (\r
#define NET_MIN(a, b) ((a) < (b) ? (a) : (b))
#define NET_MAX(a, b) ((a) > (b) ? (a) : (b))
#define NET_MIN(a, b) ((a) < (b) ? (a) : (b))
#define NET_MAX(a, b) ((a) > (b) ? (a) : (b))
-#define NET_RANDOM(Seed) (((Seed) * 1103515245L + 12345) % 4294967295L)
+#define NET_RANDOM(Seed) ((UINT32) ((UINT32) (Seed) * 1103515245UL + 12345) % 4294967295UL)
EFI_UDP4_TRANSMIT_DATA UdpTxData;
} UDP_TX_TOKEN;
EFI_UDP4_TRANSMIT_DATA UdpTxData;
} UDP_TX_TOKEN;
-typedef struct _UDP_IO_PORT {
UINT32 Signature;
NET_LIST_ENTRY Link;
INTN RefCnt;
UINT32 Signature;
NET_LIST_ENTRY Link;
INTN RefCnt;
\r
typedef struct _EFI_NIC_IP4_CONFIG_PROTOCOL EFI_NIC_IP4_CONFIG_PROTOCOL;\r
\r
\r
typedef struct _EFI_NIC_IP4_CONFIG_PROTOCOL EFI_NIC_IP4_CONFIG_PROTOCOL;\r
\r
//\r
// Config source: dhcp or static\r
//\r
//\r
// Config source: dhcp or static\r
//\r
IN NIC_ADDR *NicAddr OPTIONAL\r
);\r
\r
IN NIC_ADDR *NicAddr OPTIONAL\r
);\r
\r
struct _EFI_NIC_IP4_CONFIG_PROTOCOL {\r
EFI_NIC_IP4_CONFIG_GET_NAME GetName;\r
EFI_NIC_IP4_CONFIG_GET_INFO GetInfo;\r
struct _EFI_NIC_IP4_CONFIG_PROTOCOL {\r
EFI_NIC_IP4_CONFIG_GET_NAME GetName;\r
EFI_NIC_IP4_CONFIG_GET_INFO GetInfo;\r
FALSE,\r
FALSE,\r
FALSE,\r
FALSE,\r
FALSE,\r
FALSE,\r
- {0, 0, 0, 0},\r
- {0, 0, 0, 0},\r
+ {{0, 0, 0, 0}},\r
+ {{0, 0, 0, 0}},\r
-EFI_IPv4_ADDRESS mZeroIp4Addr = {0, 0, 0, 0};
+EFI_IPv4_ADDRESS mZeroIp4Addr = {{0, 0, 0, 0}};
/**\r
Converts the low nibble of a byte to hex unicode character.\r
/**\r
Converts the low nibble of a byte to hex unicode character.\r
},\r
NULL, // ControllerNameTable\r
NULL, \r
},\r
NULL, // ControllerNameTable\r
NULL, \r
//\r
Message = NULL;\r
\r
//\r
Message = NULL;\r
\r
- if (!EFI_IP4_EQUAL (Head->YourAddr, Selected->YourAddr)) {\r
+ if (!EFI_IP4_EQUAL (&Head->YourAddr, &Selected->YourAddr)) {\r
Message = "Lease confirmed isn't the same as that in the offer";\r
goto REJECT;\r
}\r
Message = "Lease confirmed isn't the same as that in the offer";\r
goto REJECT;\r
}\r
// The lease is different from the selected. Don't send a DECLINE\r
// since it isn't existed in the client's FSM.\r
//\r
// The lease is different from the selected. Don't send a DECLINE\r
// since it isn't existed in the client's FSM.\r
//\r
- if (!EFI_IP4_EQUAL (Head->YourAddr, Selected->YourAddr)) {\r
+ if (!EFI_IP4_EQUAL (&Head->YourAddr, &Selected->YourAddr)) {\r
//\r
// Create a route if there is a default router.\r
//\r
//\r
// Create a route if there is a default router.\r
//\r
- if (!EFI_IP4_EQUAL (Dhcp4Mode.RouterAddress, mZeroIp4Addr)) {\r
+ if (!EFI_IP4_EQUAL (&Dhcp4Mode.RouterAddress, &mZeroIp4Addr)) {\r
Ip4Config->RouteTableSize = 2;\r
\r
NetZeroMem (&Ip4Config->RouteTable[1].SubnetAddress, sizeof (EFI_IPv4_ADDRESS));\r
Ip4Config->RouteTableSize = 2;\r
\r
NetZeroMem (&Ip4Config->RouteTable[1].SubnetAddress, sizeof (EFI_IPv4_ADDRESS));\r
}\r
\r
if (!Current->UseDefaultAddress &&\r
}\r
\r
if (!Current->UseDefaultAddress &&\r
- (!EFI_IP4_EQUAL (Current->StationAddress, IpConfigData->StationAddress) ||\r
- !EFI_IP4_EQUAL (Current->SubnetMask, IpConfigData->SubnetMask))) {\r
+ (!EFI_IP4_EQUAL (&Current->StationAddress, &IpConfigData->StationAddress) ||\r
+ !EFI_IP4_EQUAL (&Current->SubnetMask, &IpConfigData->SubnetMask))) {\r
Status = EFI_ALREADY_STARTED;\r
goto ON_EXIT;\r
}\r
Status = EFI_ALREADY_STARTED;\r
goto ON_EXIT;\r
}\r
for (Index = IpInstance->GroupCount; Index > 0 ; Index--) {\r
Group = IpInstance->Groups[Index - 1];\r
\r
for (Index = IpInstance->GroupCount; Index > 0 ; Index--) {\r
Group = IpInstance->Groups[Index - 1];\r
\r
- if ((GroupAddress == NULL) || EFI_IP4_EQUAL (Group, *GroupAddress)) {\r
+ if ((GroupAddress == NULL) || EFI_IP4_EQUAL (&Group, GroupAddress)) {\r
if (EFI_ERROR (Ip4LeaveGroup (IpInstance, NTOHL (Group)))) {\r
return EFI_DEVICE_ERROR;\r
}\r
if (EFI_ERROR (Ip4LeaveGroup (IpInstance, NTOHL (Group)))) {\r
return EFI_DEVICE_ERROR;\r
}\r
// them. Tag each fragment other than the first one as spawn from it.\r
//\r
Mtu = IpSb->SnpMode.MaxPacketSize;\r
// them. Tag each fragment other than the first one as spawn from it.\r
//\r
Mtu = IpSb->SnpMode.MaxPacketSize;\r
- HeadLen = sizeof (IP4_HEAD) + (OptLen + 3) &~0x03;\r
+ HeadLen = sizeof (IP4_HEAD) + ((OptLen + 3) & (~0x03));\r
Head->Id = mIp4Id++;\r
\r
if (Packet->TotalSize + HeadLen > Mtu) {\r
Head->Id = mIp4Id++;\r
\r
if (Packet->TotalSize + HeadLen > Mtu) {\r
OldTpl = NET_RAISE_TPL (NET_TPL_LOCK);\r
\r
Instance = MTFTP4_PROTOCOL_FROM_THIS (This);\r
OldTpl = NET_RAISE_TPL (NET_TPL_LOCK);\r
\r
Instance = MTFTP4_PROTOCOL_FROM_THIS (This);\r
- ModeData->ConfigData = Instance->Config;\r
+ CopyMem(&ModeData->ConfigData, &Instance->Config, sizeof (Instance->Config));\r
ModeData->SupportedOptionCount = MTFTP4_SUPPORTED_OPTIONS;\r
ModeData->SupportedOptoins = mMtftp4SupportedOptions;\r
ModeData->UnsupportedOptionCount = 0;\r
ModeData->SupportedOptionCount = MTFTP4_SUPPORTED_OPTIONS;\r
ModeData->SupportedOptoins = mMtftp4SupportedOptions;\r
ModeData->UnsupportedOptionCount = 0;\r
return EFI_ACCESS_DENIED;\r
}\r
\r
return EFI_ACCESS_DENIED;\r
}\r
\r
- Instance->Config = *ConfigData;\r
+ CopyMem(&Instance->Config, ConfigData, sizeof (*ConfigData));;\r
Instance->State = MTFTP4_STATE_CONFIGED;\r
\r
NET_RESTORE_TPL (OldTpl);\r
Instance->State = MTFTP4_STATE_CONFIGED;\r
\r
NET_RESTORE_TPL (OldTpl);\r
-static VOID *BCNotifyReg;\r
-\r
-\r
/**\r
Start and initialize the BaseCode protocol, Simple Network protocol and UNDI.\r
\r
/**\r
Start and initialize the BaseCode protocol, Simple Network protocol and UNDI.\r
\r
return StatCode;\r
}\r
\r
return StatCode;\r
}\r
\r
-const IPV4_ADDR AllSystemsGroup = { 224, 0, 0, 1 };\r
+const IPV4_ADDR AllSystemsGroup = {{224, 0, 0, 1}};\r
-#define PXE_BASECODE_DEVICE_SIGNATURE 'pxed'
+#define PXE_BASECODE_DEVICE_SIGNATURE EFI_SIGNATURE_32 ('p', 'x', 'e', 'd')
//
// Determine the classes of IPv4 address
//
// Determine the classes of IPv4 address
-#define LOADFILE_DEVICE_SIGNATURE 'pxel'
+#define LOADFILE_DEVICE_SIGNATURE EFI_SIGNATURE_32 ('p', 'x', 'e', 'l')
typedef struct {
UINTN Signature;
typedef struct {
UINTN Signature;
STATIC EFI_PXE_BASE_CODE_UDP_PORT DHCPClientPort = DHCP_CLIENT_PORT;\r
STATIC EFI_PXE_BASE_CODE_UDP_PORT PseudoDhcpServerPort = PXE_DISCOVERY_PORT;\r
#define PSEUDO_DHCP_CLIENT_PORT PseudoDhcpServerPort\r
STATIC EFI_PXE_BASE_CODE_UDP_PORT DHCPClientPort = DHCP_CLIENT_PORT;\r
STATIC EFI_PXE_BASE_CODE_UDP_PORT PseudoDhcpServerPort = PXE_DISCOVERY_PORT;\r
#define PSEUDO_DHCP_CLIENT_PORT PseudoDhcpServerPort\r
-STATIC EFI_IP_ADDRESS BroadcastIP = { 0xffffffff };\r
-STATIC EFI_IP_ADDRESS DefaultSubnetMask = { 0xffffff00 };\r
+STATIC EFI_IP_ADDRESS BroadcastIP = {{0xffffffff}};\r
+STATIC EFI_IP_ADDRESS DefaultSubnetMask = {{0xffffff00}};\r
\r
typedef union {\r
DHCPV4_OP_STRUCT *OpPtr;\r
\r
typedef union {\r
DHCPV4_OP_STRUCT *OpPtr;\r
\r
CopyMem (\r
&DHCPRELEASEoptions.DhcServerIpPtr,\r
\r
CopyMem (\r
&DHCPRELEASEoptions.DhcServerIpPtr,\r
- &(DHCPV4_OP_SERVER_IP *) DHCPV4_ACK_BUFFER.OpAdds.PktOptAdds[OP_DHCP_SERVER_IP_IX - 1],\r
+ (DHCPV4_OP_SERVER_IP *) DHCPV4_ACK_BUFFER.OpAdds.PktOptAdds[OP_DHCP_SERVER_IP_IX - 1],\r
sizeof DHCPRELEASEoptions.DhcServerIpPtr\r
);\r
\r
sizeof DHCPRELEASEoptions.DhcServerIpPtr\r
);\r
\r
\r
return Tcp4Route (Tcb, (TCP4_ROUTE_INFO *) Data);\r
\r
\r
return Tcp4Route (Tcb, (TCP4_ROUTE_INFO *) Data);\r
\r
+ default:\r
+ return EFI_UNSUPPORTED;\r
}\r
\r
return EFI_SUCCESS;\r
}\r
\r
return EFI_SUCCESS;\r
\r
TCP_SEQNO mTcpGlobalIss = 0x4d7e980b;\r
\r
\r
TCP_SEQNO mTcpGlobalIss = 0x4d7e980b;\r
\r
-STATIC CHAR16 *mTcpStateName[] = {\r
+CHAR16 *mTcpStateName[] = {\r
L"TCP_CLOSED",\r
L"TCP_LISTEN",\r
L"TCP_SYN_SENT",\r
L"TCP_CLOSED",\r
L"TCP_LISTEN",\r
L"TCP_SYN_SENT",\r
NET_LIST_FOR_EACH (Entry, &mTcpListenQue) {\r
Tcb = NET_LIST_USER_STRUCT (Entry, TCP_CB, List);\r
\r
NET_LIST_FOR_EACH (Entry, &mTcpListenQue) {\r
Tcb = NET_LIST_USER_STRUCT (Entry, TCP_CB, List);\r
\r
- if (EFI_IP4_EQUAL (*Addr, Tcb->LocalEnd.Ip) &&\r
+ if (EFI_IP4_EQUAL (Addr, &Tcb->LocalEnd.Ip) &&\r
(LocalPort == Tcb->LocalEnd.Port)) {\r
\r
return TRUE;\r
(LocalPort == Tcb->LocalEnd.Port)) {\r
\r
return TRUE;\r
NET_LIST_FOR_EACH (Entry, &mTcpRunQue) {\r
Tcb = NET_LIST_USER_STRUCT (Entry, TCP_CB, List);\r
\r
NET_LIST_FOR_EACH (Entry, &mTcpRunQue) {\r
Tcb = NET_LIST_USER_STRUCT (Entry, TCP_CB, List);\r
\r
- if (EFI_IP4_EQUAL (*Addr, Tcb->LocalEnd.Ip) &&\r
+ if (EFI_IP4_EQUAL (Addr, &Tcb->LocalEnd.Ip) &&\r
(LocalPort == Tcb->LocalEnd.Port)) {\r
\r
return TRUE;\r
(LocalPort == Tcb->LocalEnd.Port)) {\r
\r
return TRUE;\r
return NTOHS (Value);\r
}\r
\r
return NTOHS (Value);\r
}\r
\r
VOID\r
TcpPutUint16 (\r
IN UINT8 *Buf,\r
VOID\r
TcpPutUint16 (\r
IN UINT8 *Buf,\r
- if (EFI_IP4_EQUAL (ConfigData->StationAddress, *Address) &&\r
+ if (EFI_IP4_EQUAL (&ConfigData->StationAddress, Address) &&\r
(ConfigData->StationPort == Port)) {\r
//\r
// if both the address and the port are the same, return TRUE.\r
(ConfigData->StationPort == Port)) {\r
//\r
// if both the address and the port are the same, return TRUE.\r
}\r
\r
if (!NewConfigData->UseDefaultAddress &&\r
}\r
\r
if (!NewConfigData->UseDefaultAddress &&\r
- (!EFI_IP4_EQUAL (NewConfigData->StationAddress, OldConfigData->StationAddress) ||\r
- !EFI_IP4_EQUAL (NewConfigData->SubnetMask, OldConfigData->SubnetMask))) {\r
+ (!EFI_IP4_EQUAL (&NewConfigData->StationAddress, &OldConfigData->StationAddress) ||\r
+ !EFI_IP4_EQUAL (&NewConfigData->SubnetMask, &OldConfigData->SubnetMask))) {\r
//\r
// If the instance doesn't use the default address, and the new address or\r
// new subnet mask is different from the old values.\r
//\r
// If the instance doesn't use the default address, and the new address or\r
// new subnet mask is different from the old values.\r
- if (!EFI_IP4_EQUAL (NewConfigData->RemoteAddress, OldConfigData->RemoteAddress)) {\r
+ if (!EFI_IP4_EQUAL (&NewConfigData->RemoteAddress, &OldConfigData->RemoteAddress)) {\r
//\r
// The remoteaddress is not the same.\r
//\r
return FALSE;\r
}\r
\r
//\r
// The remoteaddress is not the same.\r
//\r
return FALSE;\r
}\r
\r
- if (!EFI_IP4_EQUAL (NewConfigData->RemoteAddress, mZeroIp4Addr) && (NewConfigData->RemotePort != OldConfigData->RemotePort)) {\r
+ if (!EFI_IP4_EQUAL (&NewConfigData->RemoteAddress, &mZeroIp4Addr) && (NewConfigData->RemotePort != OldConfigData->RemotePort)) {\r
//\r
// The RemotePort differs if it's designated in the configdata.\r
//\r
//\r
// The RemotePort differs if it's designated in the configdata.\r
//\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
- if (EFI_IP4_EQUAL (UdpSessionData->DestinationAddress, mZeroIp4Addr)) {\r
+ if (EFI_IP4_EQUAL (&UdpSessionData->DestinationAddress, &mZeroIp4Addr)) {\r
//\r
// The DestinationAddress specified in the UdpSessionData is 0.\r
//\r
return EFI_INVALID_PARAMETER;\r
}\r
//\r
// The DestinationAddress specified in the UdpSessionData is 0.\r
//\r
return EFI_INVALID_PARAMETER;\r
}\r
- } else if (EFI_IP4_EQUAL (ConfigData->RemoteAddress, mZeroIp4Addr)) {\r
+ } else if (EFI_IP4_EQUAL (&ConfigData->RemoteAddress, &mZeroIp4Addr)) {\r
//\r
// the configured RemoteAddress is all zero, and the user doens't override the\r
// destination address.\r
//\r
// the configured RemoteAddress is all zero, and the user doens't override the\r
// destination address.\r
- if ((McastIp != NULL) && (!EFI_IP4_EQUAL (*McastIp, (UINTN) Item->Key))) {\r
+ if ((McastIp != NULL) && (!EFI_IP4_EQUAL (McastIp, &(Item->Key)))) {\r
//\r
// McastIp is not NULL and the multicast address contained in the Item\r
// is not the same as McastIp.\r
//\r
// McastIp is not NULL and the multicast address contained in the Item\r
// is not the same as McastIp.\r
- if (!EFI_IP4_EQUAL (ConfigData->RemoteAddress, mZeroIp4Addr) &&\r
- !EFI_IP4_EQUAL (ConfigData->RemoteAddress, Udp4Session->SourceAddress)) {\r
+ if (!EFI_IP4_EQUAL (&ConfigData->RemoteAddress, &mZeroIp4Addr) &&\r
+ !EFI_IP4_EQUAL (&ConfigData->RemoteAddress, &Udp4Session->SourceAddress)) {\r
//\r
// This datagram doesn't come from the instance's specified sender.\r
//\r
return FALSE;\r
}\r
\r
//\r
// This datagram doesn't come from the instance's specified sender.\r
//\r
return FALSE;\r
}\r
\r
- if (EFI_IP4_EQUAL (ConfigData->StationAddress, mZeroIp4Addr) ||\r
- EFI_IP4_EQUAL (Udp4Session->DestinationAddress, ConfigData->StationAddress)) {\r
+ if (EFI_IP4_EQUAL (&ConfigData->StationAddress, &mZeroIp4Addr) ||\r
+ EFI_IP4_EQUAL (&Udp4Session->DestinationAddress, &ConfigData->StationAddress)) {\r
//\r
// The instance is configured to receive datagrams destinated to any station IP or\r
// the destination address of this datagram matches the configured station IP.\r
//\r
// The instance is configured to receive datagrams destinated to any station IP or\r
// the destination address of this datagram matches the configured station IP.\r
if (!Instance->Configured ||\r
Instance->ConfigData.AcceptPromiscuous ||\r
Instance->ConfigData.AcceptAnyPort ||\r
if (!Instance->Configured ||\r
Instance->ConfigData.AcceptPromiscuous ||\r
Instance->ConfigData.AcceptAnyPort ||\r
- EFI_IP4_EQUAL (Instance->ConfigData.StationAddress, mZeroIp4Addr)) {\r
+ EFI_IP4_EQUAL (&Instance->ConfigData.StationAddress, &mZeroIp4Addr)) {\r
//\r
// Don't try to deliver the ICMP error to this instance if it is not configured,\r
// or it's configured to be promiscuous or accept any port or accept all the\r
//\r
// Don't try to deliver the ICMP error to this instance if it is not configured,\r
// or it's configured to be promiscuous or accept any port or accept all the\r
// Set the SourceAddress, SrcPort and Destination according to the specified\r
// UdpSessionData.\r
//\r
// Set the SourceAddress, SrcPort and Destination according to the specified\r
// UdpSessionData.\r
//\r
- if (!EFI_IP4_EQUAL (UdpSessionData->SourceAddress, mZeroIp4Addr)) {\r
+ if (!EFI_IP4_EQUAL (&UdpSessionData->SourceAddress, &mZeroIp4Addr)) {\r
NetCopyMem (&Override.SourceAddress, &UdpSessionData->SourceAddress, sizeof (EFI_IPv4_ADDRESS));\r
}\r
\r
NetCopyMem (&Override.SourceAddress, &UdpSessionData->SourceAddress, sizeof (EFI_IPv4_ADDRESS));\r
}\r
\r