diff options
author | qhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-12-16 15:34:21 +0000 |
---|---|---|
committer | qhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-12-16 15:34:21 +0000 |
commit | f3f2e05db8c89628498ec4efdb16184747824c63 (patch) | |
tree | 423b7863b34f491beb5022983c4c086dfd8b6cf9 /MdeModulePkg/Universal/Network | |
parent | 0763673064e9e12a4e073c0770c6f30b4ed4b697 (diff) | |
download | edk2-f3f2e05db8c89628498ec4efdb16184747824c63.tar.gz edk2-f3f2e05db8c89628498ec4efdb16184747824c63.tar.bz2 edk2-f3f2e05db8c89628498ec4efdb16184747824c63.zip |
Clean up to update the reference of the these macros:
EFI_SIGNATURE_16 -> SIGNATURE_16
EFI_SIGNATURE_32 -> SIGNATURE_32
EFI_SIGNATURE_64 -> SIGNATURE_64
EFI_FIELD_OFFSET -> OFFSET_OF
EFI_MAX_BIT -> MAX_BIT
EFI_MAX_ADDRESS -> MAX_ADDRESS
These macros are not defined in UEFI spec. It makes more sense to use the equivalent macros in Base.h to avoid alias.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7056 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Network')
19 files changed, 30 insertions, 30 deletions
diff --git a/MdeModulePkg/Universal/Network/ArpDxe/ArpImpl.h b/MdeModulePkg/Universal/Network/ArpDxe/ArpImpl.h index db889d4672..7fd5e1bf31 100644 --- a/MdeModulePkg/Universal/Network/ArpDxe/ArpImpl.h +++ b/MdeModulePkg/Universal/Network/ArpDxe/ArpImpl.h @@ -71,7 +71,7 @@ typedef enum { ByBoth = MATCH_SW_ADDRESS | MATCH_HW_ADDRESS
} FIND_OPTYPE;
-#define ARP_INSTANCE_DATA_SIGNATURE EFI_SIGNATURE_32('A', 'R', 'P', 'I')
+#define ARP_INSTANCE_DATA_SIGNATURE SIGNATURE_32('A', 'R', 'P', 'I')
//
//comment for macro
@@ -97,7 +97,7 @@ typedef struct { BOOLEAN Destroyed;
} ARP_INSTANCE_DATA;
-#define ARP_SERVICE_DATA_SIGNATURE EFI_SIGNATURE_32('A', 'R', 'P', 'S')
+#define ARP_SERVICE_DATA_SIGNATURE SIGNATURE_32('A', 'R', 'P', 'S')
//
//comment for macro
diff --git a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Impl.h b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Impl.h index db75addae8..4832ecd747 100644 --- a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Impl.h +++ b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Impl.h @@ -48,8 +48,8 @@ typedef struct _DHCP_PROTOCOL DHCP_PROTOCOL; #include "Dhcp4Option.h"
#include "Dhcp4Io.h"
-#define DHCP_SERVICE_SIGNATURE EFI_SIGNATURE_32 ('D', 'H', 'C', 'P')
-#define DHCP_PROTOCOL_SIGNATURE EFI_SIGNATURE_32 ('d', 'h', 'c', 'p')
+#define DHCP_SERVICE_SIGNATURE SIGNATURE_32 ('D', 'H', 'C', 'P')
+#define DHCP_PROTOCOL_SIGNATURE SIGNATURE_32 ('d', 'h', 'c', 'p')
typedef enum {
//
diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.h b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.h index eb6e0e3853..8b2951216e 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.h +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.h @@ -30,7 +30,7 @@ extern UINT8 IScsiDxeStrings[]; #define ISCSI_CONFIG_VAR_ATTR (EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE)
-#define ISCSI_FORM_CALLBACK_INFO_SIGNATURE EFI_SIGNATURE_32 ('I', 'f', 'c', 'i')
+#define ISCSI_FORM_CALLBACK_INFO_SIGNATURE SIGNATURE_32 ('I', 'f', 'c', 'i')
diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiImpl.h b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiImpl.h index 34847f52b8..50ed03af75 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiImpl.h +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiImpl.h @@ -35,7 +35,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include "IScsiIbft.h"
-#define ISCSI_SESSION_SIGNATURE EFI_SIGNATURE_32 ('I', 'S', 'S', 'N')
+#define ISCSI_SESSION_SIGNATURE SIGNATURE_32 ('I', 'S', 'S', 'N')
struct _ISCSI_SESSION {
UINT32 Signature;
@@ -79,7 +79,7 @@ struct _ISCSI_SESSION { UINT8 ErrorRecoveryLevel;
};
-#define ISCSI_CONNECTION_SIGNATURE EFI_SIGNATURE_32 ('I', 'S', 'C', 'N')
+#define ISCSI_CONNECTION_SIGNATURE SIGNATURE_32 ('I', 'S', 'C', 'N')
struct _ISCSI_CONNECTION {
UINT32 Signature;
@@ -118,7 +118,7 @@ struct _ISCSI_CONNECTION { ISCSI_DIGEST_TYPE DataDigest;
};
-#define ISCSI_DRIVER_DATA_SIGNATURE EFI_SIGNATURE_32 ('I', 'S', 'D', 'A')
+#define ISCSI_DRIVER_DATA_SIGNATURE SIGNATURE_32 ('I', 'S', 'D', 'A')
#define ISCSI_DRIVER_DATA_FROM_EXT_SCSI_PASS_THRU(PassThru) \
CR ( \
diff --git a/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4Config.h b/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4Config.h index 46e9f890d5..0213aa2dcc 100644 --- a/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4Config.h +++ b/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4Config.h @@ -49,7 +49,7 @@ typedef enum { } IP4_CONFIG_STATE;
#define IP4_PROTO_ICMP 0x01
-#define IP4_CONFIG_INSTANCE_SIGNATURE EFI_SIGNATURE_32 ('I', 'P', '4', 'C')
+#define IP4_CONFIG_INSTANCE_SIGNATURE SIGNATURE_32 ('I', 'P', '4', 'C')
typedef enum {
DHCP_TAG_PARA_LIST = 55,
diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.h b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.h index 8c06cfc55b..e32764d80b 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.h +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.h @@ -25,10 +25,10 @@ Abstract: #define __EFI_IP4_IF_H__
typedef enum {
- IP4_FRAME_RX_SIGNATURE = EFI_SIGNATURE_32 ('I', 'P', 'F', 'R'),
- IP4_FRAME_TX_SIGNATURE = EFI_SIGNATURE_32 ('I', 'P', 'F', 'T'),
- IP4_FRAME_ARP_SIGNATURE = EFI_SIGNATURE_32 ('I', 'P', 'F', 'A'),
- IP4_INTERFACE_SIGNATURE = EFI_SIGNATURE_32 ('I', 'P', 'I', 'F')
+ IP4_FRAME_RX_SIGNATURE = SIGNATURE_32 ('I', 'P', 'F', 'R'),
+ IP4_FRAME_TX_SIGNATURE = SIGNATURE_32 ('I', 'P', 'F', 'T'),
+ IP4_FRAME_ARP_SIGNATURE = SIGNATURE_32 ('I', 'P', 'F', 'A'),
+ IP4_INTERFACE_SIGNATURE = SIGNATURE_32 ('I', 'P', 'I', 'F')
} IP4_IF_ENUM_TYPES;
/**
diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.h b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.h index 08ca3708dd..c72e27ad55 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.h +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.h @@ -53,8 +53,8 @@ Abstract: typedef enum {
- IP4_PROTOCOL_SIGNATURE = EFI_SIGNATURE_32 ('I', 'P', '4', 'P'),
- IP4_SERVICE_SIGNATURE = EFI_SIGNATURE_32 ('I', 'P', '4', 'S'),
+ IP4_PROTOCOL_SIGNATURE = SIGNATURE_32 ('I', 'P', '4', 'P'),
+ IP4_SERVICE_SIGNATURE = SIGNATURE_32 ('I', 'P', '4', 'S'),
//
// The state of IP4 protocol. It starts from UNCONFIGED. if it is
diff --git a/MdeModulePkg/Universal/Network/MnpDxe/MnpDriver.h b/MdeModulePkg/Universal/Network/MnpDxe/MnpDriver.h index 198c914051..3be0e8751e 100644 --- a/MdeModulePkg/Universal/Network/MnpDxe/MnpDriver.h +++ b/MdeModulePkg/Universal/Network/MnpDxe/MnpDriver.h @@ -42,7 +42,7 @@ extern EFI_DRIVER_BINDING_PROTOCOL gMnpDriverBinding; extern EFI_COMPONENT_NAME_PROTOCOL gMnpComponentName;
extern EFI_COMPONENT_NAME2_PROTOCOL gMnpComponentName2;
-#define MNP_SERVICE_DATA_SIGNATURE EFI_SIGNATURE_32 ('M', 'n', 'p', 'S')
+#define MNP_SERVICE_DATA_SIGNATURE SIGNATURE_32 ('M', 'n', 'p', 'S')
typedef struct _MNP_SERVICE_DATA {
UINT32 Signature;
diff --git a/MdeModulePkg/Universal/Network/MnpDxe/MnpImpl.h b/MdeModulePkg/Universal/Network/MnpDxe/MnpImpl.h index 371b7b5469..7fa8bc8f74 100644 --- a/MdeModulePkg/Universal/Network/MnpDxe/MnpImpl.h +++ b/MdeModulePkg/Universal/Network/MnpDxe/MnpImpl.h @@ -40,7 +40,7 @@ Abstract: #define UNICAST_PACKET MNP_RECEIVE_UNICAST
#define BROADCAST_PACKET MNP_RECEIVE_BROADCAST
-#define MNP_INSTANCE_DATA_SIGNATURE EFI_SIGNATURE_32 ('M', 'n', 'p', 'I')
+#define MNP_INSTANCE_DATA_SIGNATURE SIGNATURE_32 ('M', 'n', 'p', 'I')
#define MNP_INSTANCE_DATA_FROM_THIS(a) \
CR ( \
diff --git a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.h b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.h index 04ca1a1eb3..780a86a001 100644 --- a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.h +++ b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.h @@ -50,8 +50,8 @@ typedef struct _MTFTP4_PROTOCOL MTFTP4_PROTOCOL; #include "Mtftp4Support.h"
enum {
- MTFTP4_SERVICE_SIGNATURE = EFI_SIGNATURE_32 ('T', 'F', 'T', 'P'),
- MTFTP4_PROTOCOL_SIGNATURE = EFI_SIGNATURE_32 ('t', 'f', 't', 'p'),
+ MTFTP4_SERVICE_SIGNATURE = SIGNATURE_32 ('T', 'F', 'T', 'P'),
+ MTFTP4_PROTOCOL_SIGNATURE = SIGNATURE_32 ('t', 'f', 't', 'p'),
MTFTP4_DEFAULT_SERVER_PORT = 69,
MTFTP4_DEFAULT_TIMEOUT = 3,
diff --git a/MdeModulePkg/Universal/Network/PxeBcDxe/Bc.h b/MdeModulePkg/Universal/Network/PxeBcDxe/Bc.h index 56c139371f..1d6b74be54 100644 --- a/MdeModulePkg/Universal/Network/PxeBcDxe/Bc.h +++ b/MdeModulePkg/Universal/Network/PxeBcDxe/Bc.h @@ -53,7 +53,7 @@ Abstract: #define SUPPORT_IPV6 0
-#define PXE_BASECODE_DEVICE_SIGNATURE EFI_SIGNATURE_32 ('p', 'x', 'e', 'd')
+#define PXE_BASECODE_DEVICE_SIGNATURE SIGNATURE_32 ('p', 'x', 'e', 'd')
//
// Determine the classes of IPv4 address
@@ -168,7 +168,7 @@ typedef struct { //
//
//
-#define LOADFILE_DEVICE_SIGNATURE EFI_SIGNATURE_32 ('p', 'x', 'e', 'l')
+#define LOADFILE_DEVICE_SIGNATURE SIGNATURE_32 ('p', 'x', 'e', 'l')
typedef struct {
UINTN Signature;
diff --git a/MdeModulePkg/Universal/Network/PxeDhcp4Dxe/PxeDhcp4.h b/MdeModulePkg/Universal/Network/PxeDhcp4Dxe/PxeDhcp4.h index cefe52d08c..691a990d14 100644 --- a/MdeModulePkg/Universal/Network/PxeDhcp4Dxe/PxeDhcp4.h +++ b/MdeModulePkg/Universal/Network/PxeDhcp4Dxe/PxeDhcp4.h @@ -46,7 +46,7 @@ typedef struct { //
UINTN Signature;
-#define PXE_DHCP4_PRIVATE_DATA_SIGNATURE EFI_SIGNATURE_32 ('p', 'x', 'D', '4')
+#define PXE_DHCP4_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('p', 'x', 'D', '4')
//
// Device handle the protocol is bound to.
//
diff --git a/MdeModulePkg/Universal/Network/SnpDxe/Snp.h b/MdeModulePkg/Universal/Network/SnpDxe/Snp.h index 8ef5f97a80..675057577c 100644 --- a/MdeModulePkg/Universal/Network/SnpDxe/Snp.h +++ b/MdeModulePkg/Universal/Network/SnpDxe/Snp.h @@ -35,7 +35,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #define FOUR_GIGABYTES (UINT64) 0x100000000ULL
-#define SNP_DRIVER_SIGNATURE EFI_SIGNATURE_32 ('s', 'n', 'd', 's')
+#define SNP_DRIVER_SIGNATURE SIGNATURE_32 ('s', 'n', 'd', 's')
#define MAX_MAP_LENGTH 100
#define PCI_BAR_IO_MASK 0x00000003
diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/Socket.h b/MdeModulePkg/Universal/Network/Tcp4Dxe/Socket.h index 3c687063c2..11406ed6d0 100644 --- a/MdeModulePkg/Universal/Network/Tcp4Dxe/Socket.h +++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/Socket.h @@ -114,7 +114,7 @@ typedef enum { #define SOCK_IS_NO_MORE_DATA(Sock) (0 != ((Sock)->Flag & SO_NO_MORE_DATA))
-#define SOCK_SIGNATURE EFI_SIGNATURE_32 ('S', 'O', 'C', 'K')
+#define SOCK_SIGNATURE SIGNATURE_32 ('S', 'O', 'C', 'K')
#define SOCK_FROM_THIS(a) CR ((a), SOCKET, NetProtocol, SOCK_SIGNATURE)
diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Driver.h b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Driver.h index 42303f3cf1..44ff26575b 100644 --- a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Driver.h +++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Driver.h @@ -17,7 +17,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include <Protocol/ServiceBinding.h>
#include <Library/IpIoLib.h>
-#define TCP4_DRIVER_SIGNATURE EFI_SIGNATURE_32 ('T', 'C', 'P', '4')
+#define TCP4_DRIVER_SIGNATURE SIGNATURE_32 ('T', 'C', 'P', '4')
#define TCP4_PORT_KNOWN 1024
#define TCP4_PORT_USER_RESERVED 65535
diff --git a/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Impl.h b/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Impl.h index 368538ee58..23b07a6d35 100644 --- a/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Impl.h +++ b/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Impl.h @@ -57,7 +57,7 @@ extern UINT16 mUdp4RandomPort; #define UDP4_PORT_KNOWN 1024
-#define UDP4_SERVICE_DATA_SIGNATURE EFI_SIGNATURE_32('U', 'd', 'p', '4')
+#define UDP4_SERVICE_DATA_SIGNATURE SIGNATURE_32('U', 'd', 'p', '4')
#define UDP4_SERVICE_DATA_FROM_THIS(a) \
CR ( \
@@ -81,7 +81,7 @@ typedef struct _UDP4_SERVICE_DATA_ { CHAR16 *MacString;
} UDP4_SERVICE_DATA;
-#define UDP4_INSTANCE_DATA_SIGNATURE EFI_SIGNATURE_32('U', 'd', 'p', 'I')
+#define UDP4_INSTANCE_DATA_SIGNATURE SIGNATURE_32('U', 'd', 'p', 'I')
#define UDP4_INSTANCE_DATA_FROM_THIS(a) \
CR ( \
diff --git a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDhcp.c b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDhcp.c index eb91307944..b5ba22f491 100644 --- a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDhcp.c +++ b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDhcp.c @@ -206,7 +206,7 @@ PxeBcParseCachedDhcpPacket ( // And do not count dhcp option header, or else will destory the serverhostname.
//
Options[PXEBC_DHCP4_TAG_INDEX_BOOTFILE] = (EFI_DHCP4_PACKET_OPTION *) (&Offer->Dhcp4.Header.BootFileName[0] -
- EFI_FIELD_OFFSET (EFI_DHCP4_PACKET_OPTION, Data[0]));
+ OFFSET_OF (EFI_DHCP4_PACKET_OPTION, Data[0]));
}
diff --git a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDhcp.h b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDhcp.h index fcc227272e..b3438d0e14 100644 --- a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDhcp.h +++ b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDhcp.h @@ -277,7 +277,7 @@ typedef struct { UINT8 CredTypeLen;
} PXEBC_VENDOR_OPTION;
-#define PXEBC_CACHED_DHCP4_PACKET_MAX_SIZE (EFI_FIELD_OFFSET (EFI_DHCP4_PACKET, Dhcp4) + PXEBC_DHCP4_MAX_PACKET_SIZE)
+#define PXEBC_CACHED_DHCP4_PACKET_MAX_SIZE (OFFSET_OF (EFI_DHCP4_PACKET, Dhcp4) + PXEBC_DHCP4_MAX_PACKET_SIZE)
typedef struct {
union {
diff --git a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.h b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.h index 17bd863e5f..075a19617a 100644 --- a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.h +++ b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.h @@ -52,7 +52,7 @@ typedef struct _PXEBC_PRIVATE_DATA PXEBC_PRIVATE_DATA; #include "PxeBcMtftp.h"
#include "PxeBcSupport.h"
-#define PXEBC_PRIVATE_DATA_SIGNATURE EFI_SIGNATURE_32 ('P', 'X', 'E', 'P')
+#define PXEBC_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('P', 'X', 'E', 'P')
#define PXEBC_MTFTP_TIMEOUT 4
#define PXEBC_MTFTP_RETRIES 6
|