NetworkPkg: Apply uncrustify changes
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the NetworkPkg package Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com>
This commit is contained in:
committed by
mergify[bot]
parent
2f88bd3a12
commit
d1050b9dff
@@ -10,17 +10,17 @@
|
||||
#ifndef __EFI_PXEBC_DHCP4_H__
|
||||
#define __EFI_PXEBC_DHCP4_H__
|
||||
|
||||
#define PXEBC_DHCP4_OPTION_MAX_NUM 16
|
||||
#define PXEBC_DHCP4_OPTION_MAX_SIZE 312
|
||||
#define PXEBC_DHCP4_PACKET_MAX_SIZE (sizeof (EFI_PXE_BASE_CODE_PACKET))
|
||||
#define PXEBC_DHCP4_S_PORT 67
|
||||
#define PXEBC_DHCP4_C_PORT 68
|
||||
#define PXEBC_BS_DOWNLOAD_PORT 69
|
||||
#define PXEBC_BS_DISCOVER_PORT 4011
|
||||
#define PXEBC_DHCP4_OPCODE_REQUEST 1
|
||||
#define PXEBC_DHCP4_OPCODE_REPLY 2
|
||||
#define PXEBC_DHCP4_MSG_TYPE_REQUEST 3
|
||||
#define PXEBC_DHCP4_MAGIC 0x63538263 // network byte order
|
||||
#define PXEBC_DHCP4_OPTION_MAX_NUM 16
|
||||
#define PXEBC_DHCP4_OPTION_MAX_SIZE 312
|
||||
#define PXEBC_DHCP4_PACKET_MAX_SIZE (sizeof (EFI_PXE_BASE_CODE_PACKET))
|
||||
#define PXEBC_DHCP4_S_PORT 67
|
||||
#define PXEBC_DHCP4_C_PORT 68
|
||||
#define PXEBC_BS_DOWNLOAD_PORT 69
|
||||
#define PXEBC_BS_DISCOVER_PORT 4011
|
||||
#define PXEBC_DHCP4_OPCODE_REQUEST 1
|
||||
#define PXEBC_DHCP4_OPCODE_REPLY 2
|
||||
#define PXEBC_DHCP4_MSG_TYPE_REQUEST 3
|
||||
#define PXEBC_DHCP4_MAGIC 0x63538263 // network byte order
|
||||
|
||||
//
|
||||
// Sub-Options in Dhcp Vendor Option
|
||||
@@ -39,24 +39,23 @@
|
||||
#define PXEBC_VENDOR_TAG_CREDENTIAL_TYPES 12
|
||||
#define PXEBC_VENDOR_TAG_BOOT_ITEM 71
|
||||
|
||||
#define PXEBC_BOOT_REQUEST_TIMEOUT 1
|
||||
#define PXEBC_BOOT_REQUEST_RETRIES 4
|
||||
|
||||
#define PXEBC_DHCP4_OVERLOAD_FILE 1
|
||||
#define PXEBC_DHCP4_OVERLOAD_SERVER_NAME 2
|
||||
#define PXEBC_BOOT_REQUEST_TIMEOUT 1
|
||||
#define PXEBC_BOOT_REQUEST_RETRIES 4
|
||||
|
||||
#define PXEBC_DHCP4_OVERLOAD_FILE 1
|
||||
#define PXEBC_DHCP4_OVERLOAD_SERVER_NAME 2
|
||||
|
||||
//
|
||||
// The array index of the DHCP4 option tag interested
|
||||
//
|
||||
#define PXEBC_DHCP4_TAG_INDEX_BOOTFILE_LEN 0
|
||||
#define PXEBC_DHCP4_TAG_INDEX_VENDOR 1
|
||||
#define PXEBC_DHCP4_TAG_INDEX_OVERLOAD 2
|
||||
#define PXEBC_DHCP4_TAG_INDEX_MSG_TYPE 3
|
||||
#define PXEBC_DHCP4_TAG_INDEX_SERVER_ID 4
|
||||
#define PXEBC_DHCP4_TAG_INDEX_CLASS_ID 5
|
||||
#define PXEBC_DHCP4_TAG_INDEX_BOOTFILE 6
|
||||
#define PXEBC_DHCP4_TAG_INDEX_MAX 7
|
||||
#define PXEBC_DHCP4_TAG_INDEX_BOOTFILE_LEN 0
|
||||
#define PXEBC_DHCP4_TAG_INDEX_VENDOR 1
|
||||
#define PXEBC_DHCP4_TAG_INDEX_OVERLOAD 2
|
||||
#define PXEBC_DHCP4_TAG_INDEX_MSG_TYPE 3
|
||||
#define PXEBC_DHCP4_TAG_INDEX_SERVER_ID 4
|
||||
#define PXEBC_DHCP4_TAG_INDEX_CLASS_ID 5
|
||||
#define PXEBC_DHCP4_TAG_INDEX_BOOTFILE 6
|
||||
#define PXEBC_DHCP4_TAG_INDEX_MAX 7
|
||||
|
||||
//
|
||||
// Dhcp4 and Dhcp6 share this definition, and corresponding
|
||||
@@ -79,12 +78,12 @@ typedef enum {
|
||||
PxeOfferTypeMax
|
||||
} PXEBC_OFFER_TYPE;
|
||||
|
||||
#define BIT(x) (1 << x)
|
||||
#define CTRL(x) (0x1F & (x))
|
||||
#define DEFAULT_CLASS_ID_DATA "PXEClient:Arch:xxxxx:UNDI:003000"
|
||||
#define DEFAULT_UNDI_TYPE 1
|
||||
#define DEFAULT_UNDI_MAJOR 3
|
||||
#define DEFAULT_UNDI_MINOR 0
|
||||
#define BIT(x) (1 << x)
|
||||
#define CTRL(x) (0x1F & (x))
|
||||
#define DEFAULT_CLASS_ID_DATA "PXEClient:Arch:xxxxx:UNDI:003000"
|
||||
#define DEFAULT_UNDI_TYPE 1
|
||||
#define DEFAULT_UNDI_MAJOR 3
|
||||
#define DEFAULT_UNDI_MINOR 0
|
||||
|
||||
#define MTFTP_VENDOR_OPTION_BIT_MAP \
|
||||
(BIT (PXEBC_VENDOR_TAG_MTFTP_IP) | \
|
||||
@@ -157,122 +156,120 @@ typedef enum {
|
||||
#define IS_DISABLE_PROMPT_MENU(x) \
|
||||
(((x) & BIT (3)) == BIT (3))
|
||||
|
||||
|
||||
#pragma pack(1)
|
||||
typedef struct {
|
||||
UINT8 ParaList[135];
|
||||
UINT8 ParaList[135];
|
||||
} PXEBC_DHCP4_OPTION_PARA;
|
||||
|
||||
typedef struct {
|
||||
UINT16 Size;
|
||||
UINT16 Size;
|
||||
} PXEBC_DHCP4_OPTION_MAX_MESG_SIZE;
|
||||
|
||||
typedef struct {
|
||||
UINT8 Type;
|
||||
UINT8 MajorVer;
|
||||
UINT8 MinorVer;
|
||||
UINT8 Type;
|
||||
UINT8 MajorVer;
|
||||
UINT8 MinorVer;
|
||||
} PXEBC_DHCP4_OPTION_UNDI;
|
||||
|
||||
typedef struct {
|
||||
UINT8 Type;
|
||||
UINT8 Type;
|
||||
} PXEBC_DHCP4_OPTION_MESG;
|
||||
|
||||
typedef struct {
|
||||
UINT16 Type;
|
||||
UINT16 Type;
|
||||
} PXEBC_DHCP4_OPTION_ARCH;
|
||||
|
||||
typedef struct {
|
||||
UINT8 ClassIdentifier[10];
|
||||
UINT8 ArchitecturePrefix[5];
|
||||
UINT8 ArchitectureType[5];
|
||||
UINT8 Lit3[1];
|
||||
UINT8 InterfaceName[4];
|
||||
UINT8 Lit4[1];
|
||||
UINT8 UndiMajor[3];
|
||||
UINT8 UndiMinor[3];
|
||||
UINT8 ClassIdentifier[10];
|
||||
UINT8 ArchitecturePrefix[5];
|
||||
UINT8 ArchitectureType[5];
|
||||
UINT8 Lit3[1];
|
||||
UINT8 InterfaceName[4];
|
||||
UINT8 Lit4[1];
|
||||
UINT8 UndiMajor[3];
|
||||
UINT8 UndiMinor[3];
|
||||
} PXEBC_DHCP4_OPTION_CLID;
|
||||
|
||||
typedef struct {
|
||||
UINT8 Type;
|
||||
UINT8 Guid[16];
|
||||
UINT8 Type;
|
||||
UINT8 Guid[16];
|
||||
} PXEBC_DHCP4_OPTION_UUID;
|
||||
|
||||
typedef struct {
|
||||
UINT16 Type;
|
||||
UINT16 Layer;
|
||||
UINT16 Type;
|
||||
UINT16 Layer;
|
||||
} PXEBC_OPTION_BOOT_ITEM;
|
||||
|
||||
#pragma pack()
|
||||
|
||||
typedef union {
|
||||
PXEBC_DHCP4_OPTION_PARA *Para;
|
||||
PXEBC_DHCP4_OPTION_UNDI *Undi;
|
||||
PXEBC_DHCP4_OPTION_ARCH *Arch;
|
||||
PXEBC_DHCP4_OPTION_CLID *Clid;
|
||||
PXEBC_DHCP4_OPTION_UUID *Uuid;
|
||||
PXEBC_DHCP4_OPTION_MESG *Mesg;
|
||||
PXEBC_DHCP4_OPTION_MAX_MESG_SIZE *MaxMesgSize;
|
||||
PXEBC_DHCP4_OPTION_PARA *Para;
|
||||
PXEBC_DHCP4_OPTION_UNDI *Undi;
|
||||
PXEBC_DHCP4_OPTION_ARCH *Arch;
|
||||
PXEBC_DHCP4_OPTION_CLID *Clid;
|
||||
PXEBC_DHCP4_OPTION_UUID *Uuid;
|
||||
PXEBC_DHCP4_OPTION_MESG *Mesg;
|
||||
PXEBC_DHCP4_OPTION_MAX_MESG_SIZE *MaxMesgSize;
|
||||
} PXEBC_DHCP4_OPTION_ENTRY;
|
||||
|
||||
#pragma pack(1)
|
||||
typedef struct {
|
||||
UINT16 Type;
|
||||
UINT8 IpCnt;
|
||||
EFI_IPv4_ADDRESS IpAddr[1];
|
||||
UINT16 Type;
|
||||
UINT8 IpCnt;
|
||||
EFI_IPv4_ADDRESS IpAddr[1];
|
||||
} PXEBC_BOOT_SVR_ENTRY;
|
||||
|
||||
typedef struct {
|
||||
UINT16 Type;
|
||||
UINT8 DescLen;
|
||||
UINT8 DescStr[1];
|
||||
UINT16 Type;
|
||||
UINT8 DescLen;
|
||||
UINT8 DescStr[1];
|
||||
} PXEBC_BOOT_MENU_ENTRY;
|
||||
|
||||
typedef struct {
|
||||
UINT8 Timeout;
|
||||
UINT8 Prompt[1];
|
||||
UINT8 Timeout;
|
||||
UINT8 Prompt[1];
|
||||
} PXEBC_MENU_PROMPT;
|
||||
#pragma pack()
|
||||
|
||||
typedef struct {
|
||||
UINT32 BitMap[8];
|
||||
EFI_IPv4_ADDRESS MtftpIp;
|
||||
UINT16 MtftpCPort;
|
||||
UINT16 MtftpSPort;
|
||||
UINT8 MtftpTimeout;
|
||||
UINT8 MtftpDelay;
|
||||
UINT8 DiscoverCtrl;
|
||||
EFI_IPv4_ADDRESS DiscoverMcastIp;
|
||||
EFI_IPv4_ADDRESS McastIpBase;
|
||||
UINT16 McastIpBlock;
|
||||
UINT16 McastIpRange;
|
||||
UINT16 BootSrvType;
|
||||
UINT16 BootSrvLayer;
|
||||
PXEBC_BOOT_SVR_ENTRY *BootSvr;
|
||||
UINT8 BootSvrLen;
|
||||
PXEBC_BOOT_MENU_ENTRY *BootMenu;
|
||||
UINT8 BootMenuLen;
|
||||
PXEBC_MENU_PROMPT *MenuPrompt;
|
||||
UINT8 MenuPromptLen;
|
||||
UINT32 *CredType;
|
||||
UINT8 CredTypeLen;
|
||||
UINT32 BitMap[8];
|
||||
EFI_IPv4_ADDRESS MtftpIp;
|
||||
UINT16 MtftpCPort;
|
||||
UINT16 MtftpSPort;
|
||||
UINT8 MtftpTimeout;
|
||||
UINT8 MtftpDelay;
|
||||
UINT8 DiscoverCtrl;
|
||||
EFI_IPv4_ADDRESS DiscoverMcastIp;
|
||||
EFI_IPv4_ADDRESS McastIpBase;
|
||||
UINT16 McastIpBlock;
|
||||
UINT16 McastIpRange;
|
||||
UINT16 BootSrvType;
|
||||
UINT16 BootSrvLayer;
|
||||
PXEBC_BOOT_SVR_ENTRY *BootSvr;
|
||||
UINT8 BootSvrLen;
|
||||
PXEBC_BOOT_MENU_ENTRY *BootMenu;
|
||||
UINT8 BootMenuLen;
|
||||
PXEBC_MENU_PROMPT *MenuPrompt;
|
||||
UINT8 MenuPromptLen;
|
||||
UINT32 *CredType;
|
||||
UINT8 CredTypeLen;
|
||||
} PXEBC_VENDOR_OPTION;
|
||||
|
||||
#define PXEBC_CACHED_DHCP4_PACKET_MAX_SIZE (OFFSET_OF (EFI_DHCP4_PACKET, Dhcp4) + PXEBC_DHCP4_PACKET_MAX_SIZE)
|
||||
|
||||
typedef union {
|
||||
EFI_DHCP4_PACKET Offer;
|
||||
EFI_DHCP4_PACKET Ack;
|
||||
UINT8 Buffer[PXEBC_CACHED_DHCP4_PACKET_MAX_SIZE];
|
||||
EFI_DHCP4_PACKET Offer;
|
||||
EFI_DHCP4_PACKET Ack;
|
||||
UINT8 Buffer[PXEBC_CACHED_DHCP4_PACKET_MAX_SIZE];
|
||||
} PXEBC_DHCP4_PACKET;
|
||||
|
||||
typedef struct {
|
||||
PXEBC_DHCP4_PACKET Packet;
|
||||
PXEBC_OFFER_TYPE OfferType;
|
||||
EFI_DHCP4_PACKET_OPTION *OptList[PXEBC_DHCP4_TAG_INDEX_MAX];
|
||||
PXEBC_VENDOR_OPTION VendorOpt;
|
||||
PXEBC_DHCP4_PACKET Packet;
|
||||
PXEBC_OFFER_TYPE OfferType;
|
||||
EFI_DHCP4_PACKET_OPTION *OptList[PXEBC_DHCP4_TAG_INDEX_MAX];
|
||||
PXEBC_VENDOR_OPTION VendorOpt;
|
||||
} PXEBC_DHCP4_PACKET_CACHE;
|
||||
|
||||
|
||||
/**
|
||||
Create a template DHCPv4 packet as a seed.
|
||||
|
||||
@@ -282,11 +279,10 @@ typedef struct {
|
||||
**/
|
||||
VOID
|
||||
PxeBcSeedDhcp4Packet (
|
||||
OUT EFI_DHCP4_PACKET *Seed,
|
||||
IN EFI_UDP4_PROTOCOL *Udp4
|
||||
OUT EFI_DHCP4_PACKET *Seed,
|
||||
IN EFI_UDP4_PROTOCOL *Udp4
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
Parse the cached DHCPv4 packet, including all the options.
|
||||
|
||||
@@ -298,10 +294,9 @@ PxeBcSeedDhcp4Packet (
|
||||
**/
|
||||
EFI_STATUS
|
||||
PxeBcParseDhcp4Packet (
|
||||
IN PXEBC_DHCP4_PACKET_CACHE *Cache4
|
||||
IN PXEBC_DHCP4_PACKET_CACHE *Cache4
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
Build and send out the request packet for the bootfile, and parse the reply.
|
||||
|
||||
@@ -321,13 +316,13 @@ PxeBcParseDhcp4Packet (
|
||||
**/
|
||||
EFI_STATUS
|
||||
PxeBcDhcp4Discover (
|
||||
IN PXEBC_PRIVATE_DATA *Private,
|
||||
IN UINT16 Type,
|
||||
IN UINT16 *Layer,
|
||||
IN BOOLEAN UseBis,
|
||||
IN EFI_IP_ADDRESS *DestIp,
|
||||
IN UINT16 IpCount,
|
||||
IN EFI_PXE_BASE_CODE_SRVLIST *SrvList
|
||||
IN PXEBC_PRIVATE_DATA *Private,
|
||||
IN UINT16 Type,
|
||||
IN UINT16 *Layer,
|
||||
IN BOOLEAN UseBis,
|
||||
IN EFI_IP_ADDRESS *DestIp,
|
||||
IN UINT16 IpCount,
|
||||
IN EFI_PXE_BASE_CODE_SRVLIST *SrvList
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -341,10 +336,9 @@ PxeBcDhcp4Discover (
|
||||
**/
|
||||
EFI_STATUS
|
||||
PxeBcSetIp4Policy (
|
||||
IN PXEBC_PRIVATE_DATA *Private
|
||||
IN PXEBC_PRIVATE_DATA *Private
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
Start the D.O.R.A DHCPv4 process to acquire the IPv4 address and other PXE boot information.
|
||||
|
||||
@@ -357,9 +351,8 @@ PxeBcSetIp4Policy (
|
||||
**/
|
||||
EFI_STATUS
|
||||
PxeBcDhcp4Dora (
|
||||
IN PXEBC_PRIVATE_DATA *Private,
|
||||
IN EFI_DHCP4_PROTOCOL *Dhcp4
|
||||
IN PXEBC_PRIVATE_DATA *Private,
|
||||
IN EFI_DHCP4_PROTOCOL *Dhcp4
|
||||
);
|
||||
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user