mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-27 15:44:04 +02:00
NetworkPkg: Change the macro name to fit coding style
Change several macro names to fit name EDK2 naming conventions: Use all capital letters for #define. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: fanwang2 <fan.wang@intel.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Qiu Shumin <shumin.qiu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18199 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
5c02fc49ae
commit
5ae7578af6
@ -1400,7 +1400,7 @@ IScsiGetTcpConnDevicePath (
|
|||||||
|
|
||||||
PathLen = DevicePathNodeLength (&DPathNode->Ipv4);
|
PathLen = DevicePathNodeLength (&DPathNode->Ipv4);
|
||||||
|
|
||||||
if (PathLen == IPv4_NODE_LEN_NEW_VERSIONS) {
|
if (PathLen == IP4_NODE_LEN_NEW_VERSIONS) {
|
||||||
|
|
||||||
IP4_COPY_ADDRESS (
|
IP4_COPY_ADDRESS (
|
||||||
&DPathNode->Ipv4.GatewayIpAddress,
|
&DPathNode->Ipv4.GatewayIpAddress,
|
||||||
@ -1427,19 +1427,19 @@ IScsiGetTcpConnDevicePath (
|
|||||||
|
|
||||||
PathLen = DevicePathNodeLength (&DPathNode->Ipv6);
|
PathLen = DevicePathNodeLength (&DPathNode->Ipv6);
|
||||||
|
|
||||||
if (PathLen == IPv6_NODE_LEN_NEW_VERSIONS ) {
|
if (PathLen == IP6_NODE_LEN_NEW_VERSIONS ) {
|
||||||
|
|
||||||
DPathNode->Ipv6.IpAddressOrigin = 0;
|
DPathNode->Ipv6.IpAddressOrigin = 0;
|
||||||
DPathNode->Ipv6.PrefixLength = IP6_PREFIX_LENGTH;
|
DPathNode->Ipv6.PrefixLength = IP6_PREFIX_LENGTH;
|
||||||
ZeroMem (&DPathNode->Ipv6.GatewayIpAddress, sizeof (EFI_IPv6_ADDRESS));
|
ZeroMem (&DPathNode->Ipv6.GatewayIpAddress, sizeof (EFI_IPv6_ADDRESS));
|
||||||
}
|
}
|
||||||
else if (PathLen == IPv6_NODE_LEN_OLD_VERSIONS) {
|
else if (PathLen == IP6_NODE_LEN_OLD_VERSIONS) {
|
||||||
|
|
||||||
//
|
//
|
||||||
// StaticIPAddress is a field in old versions of IPv6_DEVICE_PATH, while ignored in new
|
// StaticIPAddress is a field in old versions of IPv6_DEVICE_PATH, while ignored in new
|
||||||
// version. Set StaticIPAddress through its' offset in old IPv6_DEVICE_PATH.
|
// version. Set StaticIPAddress through its' offset in old IPv6_DEVICE_PATH.
|
||||||
//
|
//
|
||||||
*((UINT8 *)(&DPathNode->Ipv6) + IPv6_OLD_IPADDRESS_OFFSET) =
|
*((UINT8 *)(&DPathNode->Ipv6) + IP6_OLD_IPADDRESS_OFFSET) =
|
||||||
(BOOLEAN) (!Session->ConfigData->SessionConfigData.InitiatorInfoFromDhcp);
|
(BOOLEAN) (!Session->ConfigData->SessionConfigData.InitiatorInfoFromDhcp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,18 +20,18 @@ typedef struct _ISCSI_DRIVER_DATA ISCSI_DRIVER_DATA;
|
|||||||
///
|
///
|
||||||
/// IPv4 Device Path Node Length
|
/// IPv4 Device Path Node Length
|
||||||
///
|
///
|
||||||
#define IPv4_NODE_LEN_NEW_VERSIONS 27
|
#define IP4_NODE_LEN_NEW_VERSIONS 27
|
||||||
|
|
||||||
///
|
///
|
||||||
/// IPv6 Device Path Node Length
|
/// IPv6 Device Path Node Length
|
||||||
///
|
///
|
||||||
#define IPv6_NODE_LEN_OLD_VERSIONS 43
|
#define IP6_NODE_LEN_OLD_VERSIONS 43
|
||||||
#define IPv6_NODE_LEN_NEW_VERSIONS 60
|
#define IP6_NODE_LEN_NEW_VERSIONS 60
|
||||||
|
|
||||||
///
|
///
|
||||||
/// The ignored field StaticIpAddress's offset in old IPv6 Device Path
|
/// The ignored field StaticIpAddress's offset in old IPv6 Device Path
|
||||||
///
|
///
|
||||||
#define IPv6_OLD_IPADDRESS_OFFSET 42
|
#define IP6_OLD_IPADDRESS_OFFSET 42
|
||||||
|
|
||||||
#pragma pack(1)
|
#pragma pack(1)
|
||||||
typedef struct _ISCSI_SESSION_CONFIG_NVDATA {
|
typedef struct _ISCSI_SESSION_CONFIG_NVDATA {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user