2011-03-25 21:47:02 +01:00
|
|
|
/** @file
|
|
|
|
header file for NULL named library for network1 shell command functions.
|
|
|
|
|
2016-10-18 08:30:42 +02:00
|
|
|
Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved. <BR>
|
2011-03-25 21:47:02 +01:00
|
|
|
|
2019-04-04 01:07:06 +02:00
|
|
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
2011-03-25 21:47:02 +01:00
|
|
|
|
|
|
|
**/
|
|
|
|
|
2011-04-05 22:55:45 +02:00
|
|
|
#ifndef _UEFI_SHELL_NETWORK1_COMMANDS_LIB_H_
|
2011-03-25 21:47:02 +01:00
|
|
|
#define _UEFI_SHELL_NETWORK1_COMMANDS_LIB_H_
|
|
|
|
|
|
|
|
#include <Uefi.h>
|
|
|
|
|
2011-09-21 03:56:00 +02:00
|
|
|
#include <Guid/ShellLibHiiGuid.h>
|
|
|
|
|
2011-03-25 21:47:02 +01:00
|
|
|
#include <Protocol/Cpu.h>
|
|
|
|
#include <Protocol/ServiceBinding.h>
|
|
|
|
#include <Protocol/Ip6.h>
|
|
|
|
#include <Protocol/Ip6Config.h>
|
|
|
|
#include <Protocol/Ip4.h>
|
2015-07-08 04:53:41 +02:00
|
|
|
#include <Protocol/Ip4Config2.h>
|
2011-03-25 21:47:02 +01:00
|
|
|
#include <Protocol/Arp.h>
|
|
|
|
|
|
|
|
#include <Library/BaseLib.h>
|
|
|
|
#include <Library/BaseMemoryLib.h>
|
|
|
|
#include <Library/DebugLib.h>
|
|
|
|
#include <Library/MemoryAllocationLib.h>
|
|
|
|
#include <Library/PcdLib.h>
|
|
|
|
#include <Library/ShellCommandLib.h>
|
|
|
|
#include <Library/ShellLib.h>
|
|
|
|
#include <Library/SortLib.h>
|
|
|
|
#include <Library/UefiLib.h>
|
|
|
|
#include <Library/UefiRuntimeServicesTableLib.h>
|
|
|
|
#include <Library/UefiBootServicesTableLib.h>
|
|
|
|
#include <Library/HiiLib.h>
|
|
|
|
#include <Library/NetLib.h>
|
|
|
|
#include <Library/DevicePathLib.h>
|
|
|
|
#include <Library/PrintLib.h>
|
|
|
|
|
ShellPkg: stop using EFI_HANDLE in place of EFI_HII_HANDLE
The UefiShell*CommandsLib instances have constructor functions that do
something like:
gHiiHandle = HiiAddPackages (...);
...
ShellCommandRegisterCommandName (..., gHiiHandle, ...);
and destructor functions that implement the following pattern:
HiiRemovePackages (gHiiHandle);
The -- semantic, not functional -- problem is that "gHiiHandle" is
declared with type EFI_HANDLE, and not EFI_HII_HANDLE, in all of these
library instances, even though HiiAddPackages() correctly returns
EFI_HII_HANDLE, and HiiRemovePackages() takes EFI_HII_HANDLE.
Once we fix the type of "gHiiHandle", it causes sort of a butterfly
effect, because it is passed around widely. Track down and update all of
those locations.
The DynamicCommand lib instances use a similar pattern, so they are
affected too.
NOTE: in practice, this patch is a no-op, as both EFI_HII_HANDLE and
EFI_HANDLE are typedefs to (VOID*). However, we shouldn't use EFI_HANDLE
where semantically EFI_HII_HANDLE is passed around.
Cc: Jaben Carsey <jaben.carsey@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Zhichao Gao <zhichao.gao@intel.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
2019-09-06 23:15:42 +02:00
|
|
|
extern EFI_HII_HANDLE gShellNetwork1HiiHandle;
|
2011-03-25 21:47:02 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
Function for 'ping' command.
|
|
|
|
|
|
|
|
@param[in] ImageHandle Handle to the Image (NULL if Internal).
|
|
|
|
@param[in] SystemTable Pointer to the System Table (NULL if Internal).
|
|
|
|
**/
|
|
|
|
SHELL_STATUS
|
|
|
|
EFIAPI
|
|
|
|
ShellCommandRunPing (
|
|
|
|
IN EFI_HANDLE ImageHandle,
|
|
|
|
IN EFI_SYSTEM_TABLE *SystemTable
|
|
|
|
);
|
|
|
|
|
|
|
|
/**
|
|
|
|
Function for 'ifconfig' command.
|
|
|
|
|
|
|
|
@param[in] ImageHandle Handle to the Image (NULL if Internal).
|
|
|
|
@param[in] SystemTable Pointer to the System Table (NULL if Internal).
|
|
|
|
**/
|
|
|
|
SHELL_STATUS
|
|
|
|
EFIAPI
|
|
|
|
ShellCommandRunIfconfig (
|
|
|
|
IN EFI_HANDLE ImageHandle,
|
|
|
|
IN EFI_SYSTEM_TABLE *SystemTable
|
|
|
|
);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|