summaryrefslogtreecommitdiff
path: root/NetworkPkg/Dhcp4Dxe/Dhcp4Option.h
diff options
context:
space:
mode:
authorMichael Kubacki <michael.kubacki@microsoft.com>2021-12-05 14:54:07 -0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-12-07 17:24:28 +0000
commitd1050b9dff1cace252aff86630bfdb59dff5f507 (patch)
tree77f796143980742d97a883f62ce339a270474801 /NetworkPkg/Dhcp4Dxe/Dhcp4Option.h
parent2f88bd3a1296c522317f1c21377876de63de5be7 (diff)
downloadedk2-d1050b9dff1cace252aff86630bfdb59dff5f507.zip
edk2-d1050b9dff1cace252aff86630bfdb59dff5f507.tar.gz
edk2-d1050b9dff1cace252aff86630bfdb59dff5f507.tar.bz2
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>
Diffstat (limited to 'NetworkPkg/Dhcp4Dxe/Dhcp4Option.h')
-rw-r--r--NetworkPkg/Dhcp4Dxe/Dhcp4Option.h109
1 files changed, 54 insertions, 55 deletions
diff --git a/NetworkPkg/Dhcp4Dxe/Dhcp4Option.h b/NetworkPkg/Dhcp4Dxe/Dhcp4Option.h
index a58bb1b..3234d14 100644
--- a/NetworkPkg/Dhcp4Dxe/Dhcp4Option.h
+++ b/NetworkPkg/Dhcp4Dxe/Dhcp4Option.h
@@ -13,49 +13,48 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
/// DHCP option tags (types)
///
-#define DHCP_OPTION_MAGIC 0x63538263 // Network byte order
-#define DHCP_MAX_OPTIONS 256
-
+#define DHCP_OPTION_MAGIC 0x63538263 // Network byte order
+#define DHCP_MAX_OPTIONS 256
//
// DHCP option types, this is used to validate the DHCP options.
//
-#define DHCP_OPTION_SWITCH 1
-#define DHCP_OPTION_INT8 2
-#define DHCP_OPTION_INT16 3
-#define DHCP_OPTION_INT32 4
-#define DHCP_OPTION_IP 5
-#define DHCP_OPTION_IPPAIR 6
+#define DHCP_OPTION_SWITCH 1
+#define DHCP_OPTION_INT8 2
+#define DHCP_OPTION_INT16 3
+#define DHCP_OPTION_INT32 4
+#define DHCP_OPTION_IP 5
+#define DHCP_OPTION_IPPAIR 6
//
// Value of DHCP overload option
//
-#define DHCP_OVERLOAD_FILENAME 1
-#define DHCP_OVERLOAD_SVRNAME 2
-#define DHCP_OVERLOAD_BOTH 3
+#define DHCP_OVERLOAD_FILENAME 1
+#define DHCP_OVERLOAD_SVRNAME 2
+#define DHCP_OVERLOAD_BOTH 3
///
/// The DHCP option structure. This structure extends the EFI_DHCP_OPTION
/// structure to support options longer than 255 bytes, such as classless route.
///
typedef struct {
- UINT8 Tag;
- UINT16 Len;
- UINT8 *Data;
+ UINT8 Tag;
+ UINT16 Len;
+ UINT8 *Data;
} DHCP_OPTION;
///
/// Structures used to parse the DHCP options with RFC3396 support.
///
typedef struct {
- UINT8 Index;
- UINT16 Offset;
+ UINT8 Index;
+ UINT16 Offset;
} DHCP_OPTION_COUNT;
typedef struct {
- DHCP_OPTION_COUNT *OpCount;
- DHCP_OPTION *Options;
- UINT8 *Buf;
+ DHCP_OPTION_COUNT *OpCount;
+ DHCP_OPTION *Options;
+ UINT8 *Buf;
} DHCP_OPTION_CONTEXT;
///
@@ -64,18 +63,18 @@ typedef struct {
/// classless route, who can parse the DHCP offer to get them.
///
typedef struct {
- IP4_ADDR NetMask; // DHCP4_TAG_NETMASK
- IP4_ADDR Router; // DHCP4_TAG_ROUTER, only the first router is used
+ IP4_ADDR NetMask; // DHCP4_TAG_NETMASK
+ IP4_ADDR Router; // DHCP4_TAG_ROUTER, only the first router is used
//
// DHCP specific options
//
- UINT8 DhcpType; // DHCP4_TAG_MSG_TYPE
- UINT8 Overload; // DHCP4_TAG_OVERLOAD
- IP4_ADDR ServerId; // DHCP4_TAG_SERVER_ID
- UINT32 Lease; // DHCP4_TAG_LEASE
- UINT32 T1; // DHCP4_TAG_T1
- UINT32 T2; // DHCP4_TAG_T2
+ UINT8 DhcpType; // DHCP4_TAG_MSG_TYPE
+ UINT8 Overload; // DHCP4_TAG_OVERLOAD
+ IP4_ADDR ServerId; // DHCP4_TAG_SERVER_ID
+ UINT32 Lease; // DHCP4_TAG_LEASE
+ UINT32 T1; // DHCP4_TAG_T1
+ UINT32 T2; // DHCP4_TAG_T2
} DHCP_PARAMETER;
///
@@ -87,20 +86,20 @@ typedef struct {
/// inspect the option to parse DHCP_PARAMETER.
///
typedef struct {
- UINT8 Tag;
- INTN Type;
- INTN MinOccur;
- INTN MaxOccur;
- BOOLEAN Alert;
+ UINT8 Tag;
+ INTN Type;
+ INTN MinOccur;
+ INTN MaxOccur;
+ BOOLEAN Alert;
} DHCP_OPTION_FORMAT;
typedef
EFI_STATUS
(*DHCP_CHECK_OPTION) (
- IN UINT8 Tag,
- IN UINT8 Len,
- IN UINT8 *Data,
- IN VOID *Context
+ IN UINT8 Tag,
+ IN UINT8 Len,
+ IN UINT8 *Data,
+ IN VOID *Context
);
/**
@@ -120,9 +119,9 @@ EFI_STATUS
**/
EFI_STATUS
DhcpIterateOptions (
- IN EFI_DHCP4_PACKET *Packet,
- IN DHCP_CHECK_OPTION Check OPTIONAL,
- IN VOID *Context
+ IN EFI_DHCP4_PACKET *Packet,
+ IN DHCP_CHECK_OPTION Check OPTIONAL,
+ IN VOID *Context
);
/**
@@ -139,8 +138,8 @@ DhcpIterateOptions (
**/
EFI_STATUS
DhcpValidateOptions (
- IN EFI_DHCP4_PACKET *Packet,
- OUT DHCP_PARAMETER **Para OPTIONAL
+ IN EFI_DHCP4_PACKET *Packet,
+ OUT DHCP_PARAMETER **Para OPTIONAL
);
/**
@@ -173,9 +172,9 @@ DhcpValidateOptions (
**/
EFI_STATUS
DhcpParseOption (
- IN EFI_DHCP4_PACKET *Packet,
- OUT INTN *Count,
- OUT DHCP_OPTION **OptionPoint
+ IN EFI_DHCP4_PACKET *Packet,
+ OUT INTN *Count,
+ OUT DHCP_OPTION **OptionPoint
);
/**
@@ -192,10 +191,10 @@ DhcpParseOption (
**/
UINT8 *
DhcpAppendOption (
- OUT UINT8 *Buf,
- IN UINT8 Tag,
- IN UINT16 DataLen,
- IN UINT8 *Data
+ OUT UINT8 *Buf,
+ IN UINT8 Tag,
+ IN UINT16 DataLen,
+ IN UINT8 *Data
);
/**
@@ -217,12 +216,12 @@ DhcpAppendOption (
**/
EFI_STATUS
DhcpBuild (
- IN EFI_DHCP4_PACKET *SeedPacket,
- IN UINT32 DeleteCount,
- IN UINT8 *DeleteList OPTIONAL,
- IN UINT32 AppendCount,
- IN EFI_DHCP4_PACKET_OPTION *AppendList[] OPTIONAL,
- OUT EFI_DHCP4_PACKET **NewPacket
+ IN EFI_DHCP4_PACKET *SeedPacket,
+ IN UINT32 DeleteCount,
+ IN UINT8 *DeleteList OPTIONAL,
+ IN UINT32 AppendCount,
+ IN EFI_DHCP4_PACKET_OPTION *AppendList[] OPTIONAL,
+ OUT EFI_DHCP4_PACKET **NewPacket
);
#endif