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:
Michael Kubacki
2021-12-05 14:54:07 -08:00
committed by mergify[bot]
parent 2f88bd3a12
commit d1050b9dff
294 changed files with 29888 additions and 30440 deletions

View File

@@ -60,8 +60,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
// successfully configured, it goes to CONFIGED. if configure NULL
// is called, it becomes UNCONFIGED again.
//
#define IP4_STATE_UNCONFIGED 0
#define IP4_STATE_CONFIGED 1
#define IP4_STATE_UNCONFIGED 0
#define IP4_STATE_CONFIGED 1
//
// The state of IP4 service. It starts from UNSTARTED. It transits
@@ -69,11 +69,10 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
// configured, it becomes CONFIGED. and if partly destroyed, it goes
// to DESTROY.
//
#define IP4_SERVICE_UNSTARTED 0
#define IP4_SERVICE_STARTED 1
#define IP4_SERVICE_CONFIGED 2
#define IP4_SERVICE_DESTROY 3
#define IP4_SERVICE_UNSTARTED 0
#define IP4_SERVICE_STARTED 1
#define IP4_SERVICE_CONFIGED 2
#define IP4_SERVICE_DESTROY 3
///
/// IP4_TXTOKEN_WRAP wraps the upper layer's transmit token.
@@ -85,12 +84,12 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
/// user's event signalled.
///
typedef struct {
IP4_PROTOCOL *IpInstance;
EFI_IP4_COMPLETION_TOKEN *Token;
EFI_EVENT IpSecRecycleSignal;
NET_BUF *Packet;
BOOLEAN Sent;
INTN Life;
IP4_PROTOCOL *IpInstance;
EFI_IP4_COMPLETION_TOKEN *Token;
EFI_EVENT IpSecRecycleSignal;
NET_BUF *Packet;
BOOLEAN Sent;
INTN Life;
} IP4_TXTOKEN_WRAP;
///
@@ -100,8 +99,8 @@ typedef struct {
/// to notice IPsec to free the resources.
///
typedef struct {
EFI_EVENT IpSecRecycleSignal;
NET_BUF *Packet;
EFI_EVENT IpSecRecycleSignal;
NET_BUF *Packet;
} IP4_IPSEC_WRAP;
///
@@ -114,111 +113,109 @@ typedef struct {
/// fragments will be freed at last.
///
typedef struct {
LIST_ENTRY Link;
IP4_PROTOCOL *IpInstance;
NET_BUF *Packet;
EFI_IP4_RECEIVE_DATA RxData;
LIST_ENTRY Link;
IP4_PROTOCOL *IpInstance;
NET_BUF *Packet;
EFI_IP4_RECEIVE_DATA RxData;
} IP4_RXDATA_WRAP;
struct _IP4_PROTOCOL {
UINT32 Signature;
UINT32 Signature;
EFI_IP4_PROTOCOL Ip4Proto;
EFI_HANDLE Handle;
INTN State;
EFI_IP4_PROTOCOL Ip4Proto;
EFI_HANDLE Handle;
INTN State;
BOOLEAN InDestroy;
BOOLEAN InDestroy;
IP4_SERVICE *Service;
LIST_ENTRY Link; // Link to all the IP protocol from the service
IP4_SERVICE *Service;
LIST_ENTRY Link; // Link to all the IP protocol from the service
//
// User's transmit/receive tokens, and received/delivered packets
//
NET_MAP RxTokens;
NET_MAP TxTokens; // map between (User's Token, IP4_TXTOKE_WRAP)
LIST_ENTRY Received; // Received but not delivered packet
LIST_ENTRY Delivered; // Delivered and to be recycled packets
EFI_LOCK RecycleLock;
NET_MAP RxTokens;
NET_MAP TxTokens; // map between (User's Token, IP4_TXTOKE_WRAP)
LIST_ENTRY Received; // Received but not delivered packet
LIST_ENTRY Delivered; // Delivered and to be recycled packets
EFI_LOCK RecycleLock;
//
// Instance's address and route tables. There are two route tables.
// RouteTable is used by the IP4 driver to route packet. EfiRouteTable
// is used to communicate the current route info to the upper layer.
//
IP4_INTERFACE *Interface;
LIST_ENTRY AddrLink; // Ip instances with the same IP address.
IP4_ROUTE_TABLE *RouteTable;
IP4_INTERFACE *Interface;
LIST_ENTRY AddrLink; // Ip instances with the same IP address.
IP4_ROUTE_TABLE *RouteTable;
EFI_IP4_ROUTE_TABLE *EfiRouteTable;
UINT32 EfiRouteCount;
EFI_IP4_ROUTE_TABLE *EfiRouteTable;
UINT32 EfiRouteCount;
//
// IGMP data for this instance
//
IP4_ADDR *Groups; // stored in network byte order
UINT32 GroupCount;
EFI_IP4_CONFIG_DATA ConfigData;
IP4_ADDR *Groups; // stored in network byte order
UINT32 GroupCount;
EFI_IP4_CONFIG_DATA ConfigData;
};
struct _IP4_SERVICE {
UINT32 Signature;
EFI_SERVICE_BINDING_PROTOCOL ServiceBinding;
INTN State;
UINT32 Signature;
EFI_SERVICE_BINDING_PROTOCOL ServiceBinding;
INTN State;
//
// List of all the IP instances and interfaces, and default
// interface and route table and caches.
//
UINTN NumChildren;
LIST_ENTRY Children;
UINTN NumChildren;
LIST_ENTRY Children;
LIST_ENTRY Interfaces;
LIST_ENTRY Interfaces;
IP4_INTERFACE *DefaultInterface;
IP4_ROUTE_TABLE *DefaultRouteTable;
IP4_INTERFACE *DefaultInterface;
IP4_ROUTE_TABLE *DefaultRouteTable;
//
// Ip reassemble utilities, and IGMP data
//
IP4_ASSEMBLE_TABLE Assemble;
IGMP_SERVICE_DATA IgmpCtrl;
IP4_ASSEMBLE_TABLE Assemble;
IGMP_SERVICE_DATA IgmpCtrl;
//
// Low level protocol used by this service instance
//
EFI_HANDLE Image;
EFI_HANDLE Controller;
EFI_HANDLE Image;
EFI_HANDLE Controller;
EFI_HANDLE MnpChildHandle;
EFI_MANAGED_NETWORK_PROTOCOL *Mnp;
EFI_HANDLE MnpChildHandle;
EFI_MANAGED_NETWORK_PROTOCOL *Mnp;
EFI_MANAGED_NETWORK_CONFIG_DATA MnpConfigData;
EFI_SIMPLE_NETWORK_MODE SnpMode;
EFI_MANAGED_NETWORK_CONFIG_DATA MnpConfigData;
EFI_SIMPLE_NETWORK_MODE SnpMode;
EFI_EVENT Timer;
EFI_EVENT ReconfigCheckTimer;
EFI_EVENT ReconfigEvent;
EFI_EVENT Timer;
EFI_EVENT ReconfigCheckTimer;
EFI_EVENT ReconfigEvent;
BOOLEAN Reconfig;
BOOLEAN Reconfig;
//
// Underlying media present status.
//
BOOLEAN MediaPresent;
BOOLEAN MediaPresent;
//
// IPv4 Configuration II Protocol instance
//
IP4_CONFIG2_INSTANCE Ip4Config2Instance;
IP4_CONFIG2_INSTANCE Ip4Config2Instance;
CHAR16 *MacString;
CHAR16 *MacString;
UINT32 MaxPacketSize;
UINT32 OldMaxPacketSize; ///< The MTU before IPsec enable.
UINT32 MaxPacketSize;
UINT32 OldMaxPacketSize; ///< The MTU before IPsec enable.
};
#define IP4_INSTANCE_FROM_PROTOCOL(Ip4) \
@@ -230,10 +227,9 @@ struct _IP4_SERVICE {
#define IP4_SERVICE_FROM_CONFIG2_INSTANCE(This) \
CR (This, IP4_SERVICE, Ip4Config2Instance, IP4_SERVICE_SIGNATURE)
#define IP4_NO_MAPPING(IpInstance) (!(IpInstance)->Interface->Configured)
#define IP4_NO_MAPPING(IpInstance) (!(IpInstance)->Interface->Configured)
extern EFI_IP4_PROTOCOL mEfiIp4ProtocolTemplete;
extern EFI_IP4_PROTOCOL mEfiIp4ProtocolTemplete;
/**
Config the MNP parameter used by IP. The IP driver use one MNP
@@ -255,8 +251,8 @@ extern EFI_IP4_PROTOCOL mEfiIp4ProtocolTemplete;
**/
EFI_STATUS
Ip4ServiceConfigMnp (
IN IP4_SERVICE *IpSb,
IN BOOLEAN Force
IN IP4_SERVICE *IpSb,
IN BOOLEAN Force
);
/**
@@ -268,8 +264,8 @@ Ip4ServiceConfigMnp (
**/
VOID
Ip4InitProtocol (
IN IP4_SERVICE *IpSb,
IN OUT IP4_PROTOCOL *IpInstance
IN IP4_SERVICE *IpSb,
IN OUT IP4_PROTOCOL *IpInstance
);
/**
@@ -283,7 +279,7 @@ Ip4InitProtocol (
**/
EFI_STATUS
Ip4CleanProtocol (
IN IP4_PROTOCOL *IpInstance
IN IP4_PROTOCOL *IpInstance
);
/**
@@ -301,8 +297,8 @@ Ip4CleanProtocol (
**/
EFI_STATUS
Ip4Cancel (
IN IP4_PROTOCOL *IpInstance,
IN EFI_IP4_COMPLETION_TOKEN *Token OPTIONAL
IN IP4_PROTOCOL *IpInstance,
IN EFI_IP4_COMPLETION_TOKEN *Token OPTIONAL
);
/**
@@ -322,9 +318,9 @@ Ip4Cancel (
**/
EFI_STATUS
Ip4Groups (
IN IP4_PROTOCOL *IpInstance,
IN BOOLEAN JoinFlag,
IN EFI_IPv4_ADDRESS *GroupAddress OPTIONAL
IN IP4_PROTOCOL *IpInstance,
IN BOOLEAN JoinFlag,
IN EFI_IPv4_ADDRESS *GroupAddress OPTIONAL
);
/**
@@ -339,8 +335,8 @@ Ip4Groups (
VOID
EFIAPI
Ip4TimerTicking (
IN EFI_EVENT Event,
IN VOID *Context
IN EFI_EVENT Event,
IN VOID *Context
);
/**
@@ -358,8 +354,8 @@ Ip4TimerTicking (
VOID
EFIAPI
Ip4TimerReconfigChecking (
IN EFI_EVENT Event,
IN VOID *Context
IN EFI_EVENT Event,
IN VOID *Context
);
/**
@@ -379,9 +375,9 @@ Ip4TimerReconfigChecking (
EFI_STATUS
EFIAPI
Ip4SentPacketTicking (
IN NET_MAP *Map,
IN NET_MAP_ITEM *Item,
IN VOID *Context
IN NET_MAP *Map,
IN NET_MAP_ITEM *Item,
IN VOID *Context
);
/**
@@ -408,10 +404,10 @@ Ip4SentPacketTicking (
VOID
EFIAPI
Ip4FreeTxToken (
IN VOID *Context
IN VOID *Context
);
extern EFI_IPSEC2_PROTOCOL *mIpSec;
extern BOOLEAN mIpSec2Installed;
extern EFI_IPSEC2_PROTOCOL *mIpSec;
extern BOOLEAN mIpSec2Installed;
#endif