MdeModulePkg: Clean up source files
1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
ARP driver functions.
|
||||
|
||||
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at<BR>
|
||||
@@ -35,7 +35,7 @@ EFI_DRIVER_BINDING_PROTOCOL gArpDriverBinding = {
|
||||
context data.
|
||||
|
||||
@retval EFI_SUCCESS The arp service context is initialized.
|
||||
|
||||
|
||||
@retval EFI_UNSUPPORTED The underlayer Snp mode type is not ethernet.
|
||||
Failed to initialize the service context.
|
||||
@retval other Failed to initialize the arp service context.
|
||||
@@ -243,7 +243,7 @@ ArpCleanService (
|
||||
|
||||
/**
|
||||
Callback function which provided by user to remove one node in NetDestroyLinkList process.
|
||||
|
||||
|
||||
@param[in] Entry The entry to be removed.
|
||||
@param[in] Context Pointer to the callback context corresponds to the Context in NetDestroyLinkList.
|
||||
|
||||
@@ -260,7 +260,7 @@ ArpDestroyChildEntryInHandleBuffer (
|
||||
{
|
||||
ARP_INSTANCE_DATA *Instance;
|
||||
EFI_SERVICE_BINDING_PROTOCOL *ServiceBinding;
|
||||
|
||||
|
||||
if (Entry == NULL || Context == NULL) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
@@ -272,31 +272,31 @@ ArpDestroyChildEntryInHandleBuffer (
|
||||
}
|
||||
|
||||
/**
|
||||
Tests to see if this driver supports a given controller.
|
||||
|
||||
If a child device is provided, it further tests to see if this driver supports
|
||||
Tests to see if this driver supports a given controller.
|
||||
|
||||
If a child device is provided, it further tests to see if this driver supports
|
||||
creating a handle for the specified child device.
|
||||
|
||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||
@param[in] ControllerHandle The handle of the controller to test. This handle
|
||||
must support a protocol interface that supplies
|
||||
@param[in] ControllerHandle The handle of the controller to test. This handle
|
||||
must support a protocol interface that supplies
|
||||
an I/O abstraction to the driver.
|
||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path.
|
||||
This parameter is ignored by device drivers,
|
||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path.
|
||||
This parameter is ignored by device drivers,
|
||||
and is optional for bus drivers.
|
||||
|
||||
@retval EFI_SUCCESS The device specified by ControllerHandle and
|
||||
RemainingDevicePath is supported by the driver
|
||||
RemainingDevicePath is supported by the driver
|
||||
specified by This.
|
||||
@retval EFI_ALREADY_STARTED The device specified by ControllerHandle and
|
||||
RemainingDevicePath is already being managed
|
||||
RemainingDevicePath is already being managed
|
||||
by the driver specified by This.
|
||||
@retval EFI_ACCESS_DENIED The device specified by ControllerHandle and
|
||||
RemainingDevicePath is already being managed by
|
||||
a different driver or an application that
|
||||
RemainingDevicePath is already being managed by
|
||||
a different driver or an application that
|
||||
requires exclusive acces. Currently not implemented.
|
||||
@retval EFI_UNSUPPORTED The device specified by ControllerHandle and
|
||||
RemainingDevicePath is not supported by the
|
||||
RemainingDevicePath is not supported by the
|
||||
driver specified by This.
|
||||
|
||||
**/
|
||||
@@ -342,32 +342,32 @@ ArpDriverBindingSupported (
|
||||
|
||||
|
||||
/**
|
||||
Start this driver on ControllerHandle.
|
||||
|
||||
The Start() function is designed to be invoked from the EFI boot service ConnectController().
|
||||
As a result, much of the error checking on the parameters to Start() has been
|
||||
moved into this common boot service. It is legal to call Start() from other locations,
|
||||
but the following calling restrictions must be followed or the system behavior
|
||||
Start this driver on ControllerHandle.
|
||||
|
||||
The Start() function is designed to be invoked from the EFI boot service ConnectController().
|
||||
As a result, much of the error checking on the parameters to Start() has been
|
||||
moved into this common boot service. It is legal to call Start() from other locations,
|
||||
but the following calling restrictions must be followed or the system behavior
|
||||
will not be deterministic.
|
||||
1. ControllerHandle must be a valid EFI_HANDLE.
|
||||
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally
|
||||
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally
|
||||
aligned EFI_DEVICE_PATH_PROTOCOL.
|
||||
3. Prior to calling Start(), the Supported() function for the driver specified
|
||||
by This must have been called with the same calling parameters, and Supported()
|
||||
must have returned EFI_SUCCESS.
|
||||
3. Prior to calling Start(), the Supported() function for the driver specified
|
||||
by This must have been called with the same calling parameters, and Supported()
|
||||
must have returned EFI_SUCCESS.
|
||||
|
||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||
@param[in] ControllerHandle The handle of the controller to start. This handle
|
||||
must support a protocol interface that supplies
|
||||
@param[in] ControllerHandle The handle of the controller to start. This handle
|
||||
must support a protocol interface that supplies
|
||||
an I/O abstraction to the driver.
|
||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path.
|
||||
This parameter is ignored by device drivers,
|
||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path.
|
||||
This parameter is ignored by device drivers,
|
||||
and is optional for bus drivers.
|
||||
|
||||
@retval EFI_SUCCESS The device was started.
|
||||
@retval EFI_DEVICE_ERROR The device could not be started due to a device error.
|
||||
Currently not implemented.
|
||||
@retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of
|
||||
@retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of
|
||||
resources.
|
||||
@retval Others The driver failded to start the device.
|
||||
|
||||
@@ -435,13 +435,13 @@ ERROR:
|
||||
|
||||
|
||||
/**
|
||||
Stop this driver on ControllerHandle.
|
||||
|
||||
Stop this driver on ControllerHandle.
|
||||
|
||||
Release the control of this controller and remove the IScsi functions. The Stop()
|
||||
function is designed to be invoked from the EFI boot service DisconnectController().
|
||||
As a result, much of the error checking on the parameters to Stop() has been moved
|
||||
into this common boot service. It is legal to call Stop() from other locations,
|
||||
but the following calling restrictions must be followed or the system behavior
|
||||
function is designed to be invoked from the EFI boot service DisconnectController().
|
||||
As a result, much of the error checking on the parameters to Stop() has been moved
|
||||
into this common boot service. It is legal to call Stop() from other locations,
|
||||
but the following calling restrictions must be followed or the system behavior
|
||||
will not be deterministic.
|
||||
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
|
||||
same driver's Start() function.
|
||||
@@ -449,14 +449,14 @@ ERROR:
|
||||
EFI_HANDLE. In addition, all of these handles must have been created in this driver's
|
||||
Start() function, and the Start() function must have called OpenProtocol() on
|
||||
ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
|
||||
|
||||
|
||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
||||
support a bus specific I/O protocol for the driver
|
||||
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
||||
support a bus specific I/O protocol for the driver
|
||||
to use to stop the device.
|
||||
@param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
|
||||
Not used.
|
||||
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
||||
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
||||
if NumberOfChildren is 0.Not used.
|
||||
|
||||
@retval EFI_SUCCESS The device was stopped.
|
||||
@@ -542,15 +542,15 @@ ArpDriverBindingStop (
|
||||
|
||||
/**
|
||||
Creates a child handle and installs a protocol.
|
||||
|
||||
The CreateChild() function installs a protocol on ChildHandle.
|
||||
If ChildHandle is a pointer to NULL, then a new handle is created and returned
|
||||
in ChildHandle. If ChildHandle is not a pointer to NULL, then the protocol
|
||||
|
||||
The CreateChild() function installs a protocol on ChildHandle.
|
||||
If ChildHandle is a pointer to NULL, then a new handle is created and returned
|
||||
in ChildHandle. If ChildHandle is not a pointer to NULL, then the protocol
|
||||
installs on the existing ChildHandle.
|
||||
|
||||
@param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
|
||||
@param ChildHandle Pointer to the handle of the child to create. If it is NULL,
|
||||
then a new handle is created. If it is a pointer to an existing
|
||||
then a new handle is created. If it is a pointer to an existing
|
||||
UEFI handle, then the protocol is added to the existing UEFI handle.
|
||||
|
||||
@retval EFI_SUCCES The protocol was added to ChildHandle.
|
||||
@@ -670,16 +670,16 @@ ERROR:
|
||||
|
||||
/**
|
||||
Destroys a child handle with a protocol installed on it.
|
||||
|
||||
The DestroyChild() function does the opposite of CreateChild(). It removes a protocol
|
||||
that was installed by CreateChild() from ChildHandle. If the removed protocol is the
|
||||
|
||||
The DestroyChild() function does the opposite of CreateChild(). It removes a protocol
|
||||
that was installed by CreateChild() from ChildHandle. If the removed protocol is the
|
||||
last protocol on ChildHandle, then ChildHandle is destroyed.
|
||||
|
||||
@param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
|
||||
@param ChildHandle Handle of the child to destroy
|
||||
|
||||
@retval EFI_SUCCES The protocol was removed from ChildHandle.
|
||||
@retval EFI_UNSUPPORTED ChildHandle does not support the protocol that is
|
||||
@retval EFI_UNSUPPORTED ChildHandle does not support the protocol that is
|
||||
being removed.
|
||||
@retval EFI_INVALID_PARAMETER Child handle is NULL.
|
||||
@retval EFI_ACCESS_DENIED The protocol could not be removed from the ChildHandle
|
||||
@@ -793,7 +793,7 @@ ArpServiceBindingDestroyChild (
|
||||
@param[in] ImageHandle The image handle of the driver.
|
||||
@param[in] SystemTable The system table.
|
||||
|
||||
@retval EFI_SUCCESS if the driver binding and component name protocols
|
||||
@retval EFI_SUCCESS if the driver binding and component name protocols
|
||||
are successfully
|
||||
@retval Others Failed to install the protocols.
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
ARP driver header file.
|
||||
|
||||
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at<BR>
|
||||
@@ -39,31 +39,31 @@ extern EFI_COMPONENT_NAME2_PROTOCOL gArpComponentName2;
|
||||
// Function prototypes for the Drivr Binding Protocol
|
||||
//
|
||||
/**
|
||||
Tests to see if this driver supports a given controller.
|
||||
|
||||
If a child device is provided, it further tests to see if this driver supports
|
||||
Tests to see if this driver supports a given controller.
|
||||
|
||||
If a child device is provided, it further tests to see if this driver supports
|
||||
creating a handle for the specified child device.
|
||||
|
||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||
@param[in] ControllerHandle The handle of the controller to test. This handle
|
||||
must support a protocol interface that supplies
|
||||
@param[in] ControllerHandle The handle of the controller to test. This handle
|
||||
must support a protocol interface that supplies
|
||||
an I/O abstraction to the driver.
|
||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path.
|
||||
This parameter is ignored by device drivers,
|
||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path.
|
||||
This parameter is ignored by device drivers,
|
||||
and is optional for bus drivers.
|
||||
|
||||
@retval EFI_SUCCESS The device specified by ControllerHandle and
|
||||
RemainingDevicePath is supported by the driver
|
||||
RemainingDevicePath is supported by the driver
|
||||
specified by This.
|
||||
@retval EFI_ALREADY_STARTED The device specified by ControllerHandle and
|
||||
RemainingDevicePath is already being managed
|
||||
RemainingDevicePath is already being managed
|
||||
by the driver specified by This.
|
||||
@retval EFI_ACCESS_DENIED The device specified by ControllerHandle and
|
||||
RemainingDevicePath is already being managed by
|
||||
a different driver or an application that
|
||||
RemainingDevicePath is already being managed by
|
||||
a different driver or an application that
|
||||
requires exclusive acces. Currently not implemented.
|
||||
@retval EFI_UNSUPPORTED The device specified by ControllerHandle and
|
||||
RemainingDevicePath is not supported by the
|
||||
RemainingDevicePath is not supported by the
|
||||
driver specified by This.
|
||||
|
||||
**/
|
||||
@@ -76,32 +76,32 @@ ArpDriverBindingSupported (
|
||||
);
|
||||
|
||||
/**
|
||||
Start this driver on ControllerHandle.
|
||||
|
||||
The Start() function is designed to be invoked from the EFI boot service ConnectController().
|
||||
As a result, much of the error checking on the parameters to Start() has been
|
||||
moved into this common boot service. It is legal to call Start() from other locations,
|
||||
but the following calling restrictions must be followed or the system behavior
|
||||
Start this driver on ControllerHandle.
|
||||
|
||||
The Start() function is designed to be invoked from the EFI boot service ConnectController().
|
||||
As a result, much of the error checking on the parameters to Start() has been
|
||||
moved into this common boot service. It is legal to call Start() from other locations,
|
||||
but the following calling restrictions must be followed or the system behavior
|
||||
will not be deterministic.
|
||||
1. ControllerHandle must be a valid EFI_HANDLE.
|
||||
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally
|
||||
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally
|
||||
aligned EFI_DEVICE_PATH_PROTOCOL.
|
||||
3. Prior to calling Start(), the Supported() function for the driver specified
|
||||
by This must have been called with the same calling parameters, and Supported()
|
||||
must have returned EFI_SUCCESS.
|
||||
3. Prior to calling Start(), the Supported() function for the driver specified
|
||||
by This must have been called with the same calling parameters, and Supported()
|
||||
must have returned EFI_SUCCESS.
|
||||
|
||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||
@param[in] ControllerHandle The handle of the controller to start. This handle
|
||||
must support a protocol interface that supplies
|
||||
@param[in] ControllerHandle The handle of the controller to start. This handle
|
||||
must support a protocol interface that supplies
|
||||
an I/O abstraction to the driver.
|
||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path.
|
||||
This parameter is ignored by device drivers,
|
||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path.
|
||||
This parameter is ignored by device drivers,
|
||||
and is optional for bus drivers.
|
||||
|
||||
@retval EFI_SUCCESS The device was started.
|
||||
@retval EFI_DEVICE_ERROR The device could not be started due to a device error.
|
||||
Currently not implemented.
|
||||
@retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of
|
||||
@retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of
|
||||
resources.
|
||||
@retval Others The driver failded to start the device.
|
||||
|
||||
@@ -115,13 +115,13 @@ ArpDriverBindingStart (
|
||||
);
|
||||
|
||||
/**
|
||||
Stop this driver on ControllerHandle.
|
||||
|
||||
Stop this driver on ControllerHandle.
|
||||
|
||||
Release the control of this controller and remove the IScsi functions. The Stop()
|
||||
function is designed to be invoked from the EFI boot service DisconnectController().
|
||||
As a result, much of the error checking on the parameters to Stop() has been moved
|
||||
into this common boot service. It is legal to call Stop() from other locations,
|
||||
but the following calling restrictions must be followed or the system behavior
|
||||
function is designed to be invoked from the EFI boot service DisconnectController().
|
||||
As a result, much of the error checking on the parameters to Stop() has been moved
|
||||
into this common boot service. It is legal to call Stop() from other locations,
|
||||
but the following calling restrictions must be followed or the system behavior
|
||||
will not be deterministic.
|
||||
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
|
||||
same driver's Start() function.
|
||||
@@ -129,14 +129,14 @@ ArpDriverBindingStart (
|
||||
EFI_HANDLE. In addition, all of these handles must have been created in this driver's
|
||||
Start() function, and the Start() function must have called OpenProtocol() on
|
||||
ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
|
||||
|
||||
|
||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
||||
support a bus specific I/O protocol for the driver
|
||||
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
||||
support a bus specific I/O protocol for the driver
|
||||
to use to stop the device.
|
||||
@param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.
|
||||
Not used.
|
||||
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
||||
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
||||
if NumberOfChildren is 0.Not used.
|
||||
|
||||
@retval EFI_SUCCESS The device was stopped.
|
||||
@@ -154,15 +154,15 @@ ArpDriverBindingStop (
|
||||
|
||||
/**
|
||||
Creates a child handle and installs a protocol.
|
||||
|
||||
The CreateChild() function installs a protocol on ChildHandle.
|
||||
If ChildHandle is a pointer to NULL, then a new handle is created and returned
|
||||
in ChildHandle. If ChildHandle is not a pointer to NULL, then the protocol
|
||||
|
||||
The CreateChild() function installs a protocol on ChildHandle.
|
||||
If ChildHandle is a pointer to NULL, then a new handle is created and returned
|
||||
in ChildHandle. If ChildHandle is not a pointer to NULL, then the protocol
|
||||
installs on the existing ChildHandle.
|
||||
|
||||
@param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
|
||||
@param ChildHandle Pointer to the handle of the child to create. If it is NULL,
|
||||
then a new handle is created. If it is a pointer to an existing
|
||||
then a new handle is created. If it is a pointer to an existing
|
||||
UEFI handle, then the protocol is added to the existing UEFI handle.
|
||||
|
||||
@retval EFI_SUCCES The protocol was added to ChildHandle.
|
||||
@@ -181,16 +181,16 @@ ArpServiceBindingCreateChild (
|
||||
|
||||
/**
|
||||
Destroys a child handle with a protocol installed on it.
|
||||
|
||||
The DestroyChild() function does the opposite of CreateChild(). It removes a protocol
|
||||
that was installed by CreateChild() from ChildHandle. If the removed protocol is the
|
||||
|
||||
The DestroyChild() function does the opposite of CreateChild(). It removes a protocol
|
||||
that was installed by CreateChild() from ChildHandle. If the removed protocol is the
|
||||
last protocol on ChildHandle, then ChildHandle is destroyed.
|
||||
|
||||
@param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
|
||||
@param ChildHandle Handle of the child to destroy
|
||||
|
||||
@retval EFI_SUCCES The protocol was removed from ChildHandle.
|
||||
@retval EFI_UNSUPPORTED ChildHandle does not support the protocol that is
|
||||
@retval EFI_UNSUPPORTED ChildHandle does not support the protocol that is
|
||||
being removed.
|
||||
@retval EFI_INVALID_PARAMETER Child handle is NULL.
|
||||
@retval EFI_ACCESS_DENIED The protocol could not be removed from the ChildHandle
|
||||
|
@@ -5,7 +5,7 @@
|
||||
# implementation of the Address Resolution Protocol that is described in RFCs 826
|
||||
# and 1122.
|
||||
#
|
||||
# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -31,7 +31,7 @@
|
||||
#
|
||||
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
|
||||
#
|
||||
# DRIVER_BINDING = gArpDriverBinding
|
||||
# DRIVER_BINDING = gArpDriverBinding
|
||||
# COMPONENT_NAME = gArpComponentName
|
||||
# COMPONENT_NAME2 = gArpComponentName2
|
||||
#
|
||||
|
@@ -5,13 +5,13 @@
|
||||
// implementation of the Address Resolution Protocol that is described in RFCs 826
|
||||
// and 1122.
|
||||
//
|
||||
// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
// which accompanies this distribution. The full text of the license may be found at
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// /** @file
|
||||
// ArpDxe Localized Strings and Content
|
||||
//
|
||||
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -13,8 +13,8 @@
|
||||
//
|
||||
// **/
|
||||
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
"ARP DXE Driver"
|
||||
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
The implementation of the ARP protocol.
|
||||
|
||||
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at<BR>
|
||||
@@ -343,7 +343,7 @@ ArpOnFrameRcvd (
|
||||
|
||||
/**
|
||||
Process the already sent arp packets.
|
||||
|
||||
|
||||
@param[in] Context Pointer to the context data registerd to the
|
||||
Event.
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
EFI Address Resolution Protocol (ARP) Protocol interface header file.
|
||||
|
||||
Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at<BR>
|
||||
@@ -94,13 +94,13 @@ typedef enum {
|
||||
|
||||
/**
|
||||
Returns a pointer to the ARP_INSTANCE_DATA structure from the input a.
|
||||
|
||||
If the signatures matches, then a pointer to the data structure that contains
|
||||
|
||||
If the signatures matches, then a pointer to the data structure that contains
|
||||
a specified field of that data structure is returned.
|
||||
|
||||
@param a Pointer to the field specified by ArpProto within a data
|
||||
|
||||
@param a Pointer to the field specified by ArpProto within a data
|
||||
structure of type ARP_INSTANCE_DATA.
|
||||
|
||||
|
||||
**/
|
||||
#define ARP_INSTANCE_DATA_FROM_THIS(a) \
|
||||
CR ( \
|
||||
@@ -130,13 +130,13 @@ typedef struct {
|
||||
|
||||
/**
|
||||
Returns a pointer to the ARP_SERVICE_DATA structure from the input a.
|
||||
|
||||
If the signatures matches, then a pointer to the data structure that contains
|
||||
|
||||
If the signatures matches, then a pointer to the data structure that contains
|
||||
a specified field of that data structure is returned.
|
||||
|
||||
@param a Pointer to the field specified by ServiceBinding within
|
||||
|
||||
@param a Pointer to the field specified by ServiceBinding within
|
||||
a data structure of type ARP_SERVICE_DATA.
|
||||
|
||||
|
||||
**/
|
||||
#define ARP_SERVICE_DATA_FROM_THIS(a) \
|
||||
CR ( \
|
||||
@@ -228,13 +228,13 @@ typedef struct {
|
||||
/**
|
||||
This function is used to assign a station address to the ARP cache for this instance
|
||||
of the ARP driver.
|
||||
|
||||
Each ARP instance has one station address. The EFI_ARP_PROTOCOL driver will
|
||||
respond to ARP requests that match this registered station address. A call to
|
||||
|
||||
Each ARP instance has one station address. The EFI_ARP_PROTOCOL driver will
|
||||
respond to ARP requests that match this registered station address. A call to
|
||||
this function with the ConfigData field set to NULL will reset this ARP instance.
|
||||
|
||||
Once a protocol type and station address have been assigned to this ARP instance,
|
||||
all the following ARP functions will use this information. Attempting to change
|
||||
|
||||
Once a protocol type and station address have been assigned to this ARP instance,
|
||||
all the following ARP functions will use this information. Attempting to change
|
||||
the protocol type or station address to a configured ARP instance will result in errors.
|
||||
|
||||
@param This Pointer to the EFI_ARP_PROTOCOL instance.
|
||||
@@ -263,17 +263,17 @@ ArpConfigure (
|
||||
/**
|
||||
This function is used to insert entries into the ARP cache.
|
||||
|
||||
ARP cache entries are typically inserted and updated by network protocol drivers
|
||||
as network traffic is processed. Most ARP cache entries will time out and be
|
||||
deleted if the network traffic stops. ARP cache entries that were inserted
|
||||
ARP cache entries are typically inserted and updated by network protocol drivers
|
||||
as network traffic is processed. Most ARP cache entries will time out and be
|
||||
deleted if the network traffic stops. ARP cache entries that were inserted
|
||||
by the Add() function may be static (will not time out) or dynamic (will time out).
|
||||
Default ARP cache timeout values are not covered in most network protocol
|
||||
specifications (although RFC 1122 comes pretty close) and will only be
|
||||
discussed in general in this specification. The timeout values that are
|
||||
used in the EFI Sample Implementation should be used only as a guideline.
|
||||
Final product implementations of the EFI network stack should be tuned for
|
||||
Default ARP cache timeout values are not covered in most network protocol
|
||||
specifications (although RFC 1122 comes pretty close) and will only be
|
||||
discussed in general in this specification. The timeout values that are
|
||||
used in the EFI Sample Implementation should be used only as a guideline.
|
||||
Final product implementations of the EFI network stack should be tuned for
|
||||
their expected network environments.
|
||||
|
||||
|
||||
@param This Pointer to the EFI_ARP_PROTOCOL instance.
|
||||
@param DenyFlag Set to TRUE if this entry is a deny entry. Set to
|
||||
FALSE if this entry is a normal entry.
|
||||
@@ -319,14 +319,14 @@ ArpAdd (
|
||||
/**
|
||||
This function searches the ARP cache for matching entries and allocates a buffer into
|
||||
which those entries are copied.
|
||||
|
||||
The first part of the allocated buffer is EFI_ARP_FIND_DATA, following which
|
||||
|
||||
The first part of the allocated buffer is EFI_ARP_FIND_DATA, following which
|
||||
are protocol address pairs and hardware address pairs.
|
||||
When finding a specific protocol address (BySwAddress is TRUE and AddressBuffer
|
||||
is not NULL), the ARP cache timeout for the found entry is reset if Refresh is
|
||||
set to TRUE. If the found ARP cache entry is a permanent entry, it is not
|
||||
When finding a specific protocol address (BySwAddress is TRUE and AddressBuffer
|
||||
is not NULL), the ARP cache timeout for the found entry is reset if Refresh is
|
||||
set to TRUE. If the found ARP cache entry is a permanent entry, it is not
|
||||
affected by Refresh.
|
||||
|
||||
|
||||
@param This Pointer to the EFI_ARP_PROTOCOL instance.
|
||||
@param BySwAddress Set to TRUE to look for matching software protocol
|
||||
addresses. Set to FALSE to look for matching
|
||||
@@ -439,13 +439,13 @@ ArpRequest (
|
||||
/**
|
||||
This function aborts the previous ARP request (identified by This, TargetSwAddress
|
||||
and ResolvedEvent) that is issued by EFI_ARP_PROTOCOL.Request().
|
||||
|
||||
If the request is in the internal ARP request queue, the request is aborted
|
||||
immediately and its ResolvedEvent is signaled. Only an asynchronous address
|
||||
request needs to be canceled. If TargeSwAddress and ResolveEvent are both
|
||||
NULL, all the pending asynchronous requests that have been issued by This
|
||||
|
||||
If the request is in the internal ARP request queue, the request is aborted
|
||||
immediately and its ResolvedEvent is signaled. Only an asynchronous address
|
||||
request needs to be canceled. If TargeSwAddress and ResolveEvent are both
|
||||
NULL, all the pending asynchronous requests that have been issued by This
|
||||
instance will be cancelled and their corresponding events will be signaled.
|
||||
|
||||
|
||||
@param This Pointer to the EFI_ARP_PROTOCOL instance.
|
||||
@param TargetSwAddress Pointer to the protocol address in previous
|
||||
request session.
|
||||
@@ -673,7 +673,7 @@ ArpOnFrameRcvd (
|
||||
|
||||
/**
|
||||
Process the already sent arp packets.
|
||||
|
||||
|
||||
@param[in] Context Pointer to the context data registerd to the
|
||||
Event.
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Implementation of EFI Address Resolution Protocol (ARP) Protocol interface functions.
|
||||
|
||||
Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at<BR>
|
||||
@@ -18,13 +18,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
/**
|
||||
This function is used to assign a station address to the ARP cache for this instance
|
||||
of the ARP driver.
|
||||
|
||||
Each ARP instance has one station address. The EFI_ARP_PROTOCOL driver will
|
||||
respond to ARP requests that match this registered station address. A call to
|
||||
|
||||
Each ARP instance has one station address. The EFI_ARP_PROTOCOL driver will
|
||||
respond to ARP requests that match this registered station address. A call to
|
||||
this function with the ConfigData field set to NULL will reset this ARP instance.
|
||||
|
||||
Once a protocol type and station address have been assigned to this ARP instance,
|
||||
all the following ARP functions will use this information. Attempting to change
|
||||
|
||||
Once a protocol type and station address have been assigned to this ARP instance,
|
||||
all the following ARP functions will use this information. Attempting to change
|
||||
the protocol type or station address to a configured ARP instance will result in errors.
|
||||
|
||||
@param This Pointer to the EFI_ARP_PROTOCOL instance.
|
||||
@@ -83,17 +83,17 @@ ArpConfigure (
|
||||
/**
|
||||
This function is used to insert entries into the ARP cache.
|
||||
|
||||
ARP cache entries are typically inserted and updated by network protocol drivers
|
||||
as network traffic is processed. Most ARP cache entries will time out and be
|
||||
deleted if the network traffic stops. ARP cache entries that were inserted
|
||||
ARP cache entries are typically inserted and updated by network protocol drivers
|
||||
as network traffic is processed. Most ARP cache entries will time out and be
|
||||
deleted if the network traffic stops. ARP cache entries that were inserted
|
||||
by the Add() function may be static (will not time out) or dynamic (will time out).
|
||||
Default ARP cache timeout values are not covered in most network protocol
|
||||
specifications (although RFC 1122 comes pretty close) and will only be
|
||||
discussed in general in this specification. The timeout values that are
|
||||
used in the EFI Sample Implementation should be used only as a guideline.
|
||||
Final product implementations of the EFI network stack should be tuned for
|
||||
Default ARP cache timeout values are not covered in most network protocol
|
||||
specifications (although RFC 1122 comes pretty close) and will only be
|
||||
discussed in general in this specification. The timeout values that are
|
||||
used in the EFI Sample Implementation should be used only as a guideline.
|
||||
Final product implementations of the EFI network stack should be tuned for
|
||||
their expected network environments.
|
||||
|
||||
|
||||
@param This Pointer to the EFI_ARP_PROTOCOL instance.
|
||||
@param DenyFlag Set to TRUE if this entry is a deny entry. Set to
|
||||
FALSE if this entry is a normal entry.
|
||||
@@ -281,14 +281,14 @@ UNLOCK_EXIT:
|
||||
/**
|
||||
This function searches the ARP cache for matching entries and allocates a buffer into
|
||||
which those entries are copied.
|
||||
|
||||
The first part of the allocated buffer is EFI_ARP_FIND_DATA, following which
|
||||
|
||||
The first part of the allocated buffer is EFI_ARP_FIND_DATA, following which
|
||||
are protocol address pairs and hardware address pairs.
|
||||
When finding a specific protocol address (BySwAddress is TRUE and AddressBuffer
|
||||
is not NULL), the ARP cache timeout for the found entry is reset if Refresh is
|
||||
set to TRUE. If the found ARP cache entry is a permanent entry, it is not
|
||||
When finding a specific protocol address (BySwAddress is TRUE and AddressBuffer
|
||||
is not NULL), the ARP cache timeout for the found entry is reset if Refresh is
|
||||
set to TRUE. If the found ARP cache entry is a permanent entry, it is not
|
||||
affected by Refresh.
|
||||
|
||||
|
||||
@param This Pointer to the EFI_ARP_PROTOCOL instance.
|
||||
@param BySwAddress Set to TRUE to look for matching software protocol
|
||||
addresses. Set to FALSE to look for matching
|
||||
@@ -678,13 +678,13 @@ SIGNAL_USER:
|
||||
/**
|
||||
This function aborts the previous ARP request (identified by This, TargetSwAddress
|
||||
and ResolvedEvent) that is issued by EFI_ARP_PROTOCOL.Request().
|
||||
|
||||
If the request is in the internal ARP request queue, the request is aborted
|
||||
immediately and its ResolvedEvent is signaled. Only an asynchronous address
|
||||
request needs to be canceled. If TargeSwAddress and ResolveEvent are both
|
||||
NULL, all the pending asynchronous requests that have been issued by This
|
||||
|
||||
If the request is in the internal ARP request queue, the request is aborted
|
||||
immediately and its ResolvedEvent is signaled. Only an asynchronous address
|
||||
request needs to be canceled. If TargeSwAddress and ResolveEvent are both
|
||||
NULL, all the pending asynchronous requests that have been issued by This
|
||||
instance will be cancelled and their corresponding events will be signaled.
|
||||
|
||||
|
||||
@param This Pointer to the EFI_ARP_PROTOCOL instance.
|
||||
@param TargetSwAddress Pointer to the protocol address in previous
|
||||
request session.
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
UEFI Component Name(2) protocol implementation for ArpDxe driver.
|
||||
|
||||
Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at<BR>
|
||||
@@ -187,10 +187,10 @@ ArpComponentNameGetControllerName (
|
||||
if (ChildHandle == NULL) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
//
|
||||
// Make sure this driver produced ChildHandle
|
||||
//
|
||||
|
||||
//
|
||||
// Make sure this driver produced ChildHandle
|
||||
//
|
||||
Status = EfiTestChildHandle (
|
||||
ControllerHandle,
|
||||
ChildHandle,
|
||||
@@ -200,9 +200,9 @@ ArpComponentNameGetControllerName (
|
||||
return Status;
|
||||
}
|
||||
|
||||
//
|
||||
// Retrieve an instance of a produced protocol from ChildHandle
|
||||
//
|
||||
//
|
||||
// Retrieve an instance of a produced protocol from ChildHandle
|
||||
//
|
||||
Status = gBS->OpenProtocol (
|
||||
ChildHandle,
|
||||
&gEfiArpProtocolGuid,
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/** @file
|
||||
|
||||
Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -249,11 +249,11 @@ DhcpComponentNameGetDriverName (
|
||||
|
||||
@param Dhcp4[in] A pointer to the EFI_DHCP4_PROTOCOL.
|
||||
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Update the ControllerNameTable of this instance successfully.
|
||||
@retval EFI_INVALID_PARAMETER The input parameter is invalid.
|
||||
@retval EFI_DEVICE_ERROR DHCP is in unknown state.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
UpdateName (
|
||||
@@ -274,16 +274,16 @@ UpdateName (
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
if (gDhcpControllerNameTable != NULL) {
|
||||
FreeUnicodeStringTable (gDhcpControllerNameTable);
|
||||
gDhcpControllerNameTable = NULL;
|
||||
}
|
||||
|
||||
|
||||
if (Dhcp4ModeData.State > Dhcp4Rebooting) {
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
|
||||
Status = AddUnicodeString2 (
|
||||
"eng",
|
||||
gDhcp4ComponentName.SupportedLanguages,
|
||||
@@ -294,7 +294,7 @@ UpdateName (
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
return AddUnicodeString2 (
|
||||
"en",
|
||||
gDhcp4ComponentName2.SupportedLanguages,
|
||||
@@ -391,10 +391,10 @@ DhcpComponentNameGetControllerName (
|
||||
if (ChildHandle == NULL) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
//
|
||||
// Make sure this driver produced ChildHandle
|
||||
//
|
||||
|
||||
//
|
||||
// Make sure this driver produced ChildHandle
|
||||
//
|
||||
Status = EfiTestChildHandle (
|
||||
ControllerHandle,
|
||||
ChildHandle,
|
||||
@@ -404,9 +404,9 @@ DhcpComponentNameGetControllerName (
|
||||
return Status;
|
||||
}
|
||||
|
||||
//
|
||||
// Retrieve an instance of a produced protocol from ChildHandle
|
||||
//
|
||||
//
|
||||
// Retrieve an instance of a produced protocol from ChildHandle
|
||||
//
|
||||
Status = gBS->OpenProtocol (
|
||||
ChildHandle,
|
||||
&gEfiDhcp4ProtocolGuid,
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/** @file
|
||||
|
||||
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -355,7 +355,7 @@ ON_ERROR:
|
||||
|
||||
/**
|
||||
Callback function which provided by user to remove one node in NetDestroyLinkList process.
|
||||
|
||||
|
||||
@param[in] Entry The entry to be removed.
|
||||
@param[in] Context Pointer to the callback context corresponds to the Context in NetDestroyLinkList.
|
||||
|
||||
@@ -445,7 +445,7 @@ Dhcp4DriverBindingStop (
|
||||
if (!IsListEmpty (&DhcpSb->Children)) {
|
||||
//
|
||||
// Destroy all the children instances before destory the service.
|
||||
//
|
||||
//
|
||||
List = &DhcpSb->Children;
|
||||
Status = NetDestroyLinkList (
|
||||
List,
|
||||
@@ -481,7 +481,7 @@ Dhcp4DriverBindingStop (
|
||||
gDhcpControllerNameTable = NULL;
|
||||
}
|
||||
FreePool (DhcpSb);
|
||||
|
||||
|
||||
Status = EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Header for the DHCP4 driver.
|
||||
|
||||
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -78,7 +78,7 @@ Dhcp4DriverBindingStart (
|
||||
restrictions for this service. DisconnectController()
|
||||
must follow these calling restrictions. If any other agent wishes
|
||||
to call Stop() it must also follow these calling restrictions.
|
||||
|
||||
|
||||
@param[in] This Protocol instance pointer.
|
||||
@param[in] ControllerHandle Handle of device to stop driver on
|
||||
@param[in] NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
|
||||
@@ -100,14 +100,14 @@ Dhcp4DriverBindingStop (
|
||||
|
||||
/**
|
||||
Creates a child handle and installs a protocol.
|
||||
|
||||
The CreateChild() function installs a protocol on ChildHandle.
|
||||
If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle.
|
||||
|
||||
The CreateChild() function installs a protocol on ChildHandle.
|
||||
If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle.
|
||||
If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle.
|
||||
|
||||
@param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
|
||||
@param ChildHandle Pointer to the handle of the child to create. If it is NULL,
|
||||
then a new handle is created. If it is a pointer to an existing UEFI handle,
|
||||
then a new handle is created. If it is a pointer to an existing UEFI handle,
|
||||
then the protocol is added to the existing UEFI handle.
|
||||
|
||||
@retval EFI_SUCCES The protocol was added to ChildHandle.
|
||||
@@ -126,9 +126,9 @@ Dhcp4ServiceBindingCreateChild (
|
||||
|
||||
/**
|
||||
Destroys a child handle with a protocol installed on it.
|
||||
|
||||
The DestroyChild() function does the opposite of CreateChild(). It removes a protocol
|
||||
that was installed by CreateChild() from ChildHandle. If the removed protocol is the
|
||||
|
||||
The DestroyChild() function does the opposite of CreateChild(). It removes a protocol
|
||||
that was installed by CreateChild() from ChildHandle. If the removed protocol is the
|
||||
last protocol on ChildHandle, then ChildHandle is destroyed.
|
||||
|
||||
@param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
|
||||
|
@@ -5,7 +5,7 @@
|
||||
# capability to collect configuration information for the EFI IPv4 Protocol drivers
|
||||
# and to provide DHCPv4 server and PXE boot server discovery services.
|
||||
#
|
||||
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -31,7 +31,7 @@
|
||||
#
|
||||
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
|
||||
#
|
||||
# DRIVER_BINDING = gDhcp4DriverBinding
|
||||
# DRIVER_BINDING = gDhcp4DriverBinding
|
||||
# COMPONENT_NAME = gDhcp4ComponentName
|
||||
# COMPONENT_NAME2 = gDhcp4ComponentName2
|
||||
#
|
||||
|
@@ -5,13 +5,13 @@
|
||||
// capability to collect configuration information for the EFI IPv4 Protocol drivers
|
||||
// and to provide DHCPv4 server and PXE boot server discovery services.
|
||||
//
|
||||
// Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
// which accompanies this distribution. The full text of the license may be found at
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// /** @file
|
||||
// Dhcp4Dxe Localized Strings and Content
|
||||
//
|
||||
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -13,8 +13,8 @@
|
||||
//
|
||||
// **/
|
||||
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
"DHCP v4 DXE Driver"
|
||||
|
||||
|
||||
|
@@ -1203,9 +1203,9 @@ Dhcp4InstanceConfigUdpIo (
|
||||
EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN *Token;
|
||||
EFI_UDP4_CONFIG_DATA UdpConfigData;
|
||||
IP4_ADDR ClientAddr;
|
||||
IP4_ADDR Ip;
|
||||
INTN Class;
|
||||
IP4_ADDR SubnetMask;
|
||||
IP4_ADDR Ip;
|
||||
INTN Class;
|
||||
IP4_ADDR SubnetMask;
|
||||
|
||||
Instance = (DHCP_PROTOCOL *) Context;
|
||||
DhcpSb = Instance->Service;
|
||||
@@ -1238,7 +1238,7 @@ Dhcp4InstanceConfigUdpIo (
|
||||
if (Class >= IP4_ADDR_CLASSE) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
|
||||
SubnetMask = gIp4AllMasks[Class << 3];
|
||||
} else {
|
||||
SubnetMask = DhcpSb->Netmask;
|
||||
@@ -1548,7 +1548,7 @@ EfiDhcp4TransmitReceive (
|
||||
}
|
||||
|
||||
ClientAddr = EFI_NTOHL (Token->Packet->Dhcp4.Header.ClientAddr);
|
||||
|
||||
|
||||
if (ClientAddr == 0) {
|
||||
return EFI_NO_MAPPING;
|
||||
}
|
||||
|
@@ -5,7 +5,7 @@
|
||||
RFC 2132: DHCP Options and BOOTP Vendor Extensions
|
||||
RFC 1534: Interoperation Between DHCP and BOOTP
|
||||
RFC 3396: Encoding Long Options in DHCP.
|
||||
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/** @file
|
||||
EFI DHCP protocol implementation.
|
||||
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -41,7 +41,7 @@ DhcpInitRequest (
|
||||
// Clear initial time to make sure that elapsed-time is set to 0 for first Discover or REQUEST message.
|
||||
//
|
||||
DhcpSb->ActiveChild->ElaspedTime= 0;
|
||||
|
||||
|
||||
if (DhcpSb->DhcpState == Dhcp4Init) {
|
||||
DhcpSetState (DhcpSb, Dhcp4Selecting, FALSE);
|
||||
Status = DhcpSendMessage (DhcpSb, NULL, NULL, DHCP_MSG_DISCOVER, NULL);
|
||||
@@ -1381,13 +1381,13 @@ DhcpSendMessage (
|
||||
}
|
||||
|
||||
ASSERT (UdpIo != NULL);
|
||||
|
||||
|
||||
Status = UdpIoSendDatagram (
|
||||
UdpIo,
|
||||
Wrap,
|
||||
&EndPoint,
|
||||
NULL,
|
||||
DhcpOnPacketSent,
|
||||
UdpIo,
|
||||
Wrap,
|
||||
&EndPoint,
|
||||
NULL,
|
||||
DhcpOnPacketSent,
|
||||
DhcpSb
|
||||
);
|
||||
|
||||
@@ -1509,7 +1509,7 @@ DhcpOnTimerTick (
|
||||
if (Instance != NULL && Instance->ElaspedTime < 0xffff) {
|
||||
Instance->ElaspedTime++;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Check the retransmit timer
|
||||
//
|
||||
@@ -1531,7 +1531,7 @@ DhcpOnTimerTick (
|
||||
goto ON_EXIT;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (++DhcpSb->CurRetry < DhcpSb->MaxRetries) {
|
||||
//
|
||||
// Still has another try
|
||||
@@ -1570,7 +1570,7 @@ DhcpOnTimerTick (
|
||||
goto END_SESSION;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// If an address has been acquired, check whether need to
|
||||
// refresh or whether it has expired.
|
||||
@@ -1602,8 +1602,8 @@ DhcpOnTimerTick (
|
||||
|
||||
if (Instance != NULL) {
|
||||
Instance->ElaspedTime= 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Status = DhcpSendMessage (
|
||||
DhcpSb,
|
||||
DhcpSb->Selected,
|
||||
@@ -1626,7 +1626,7 @@ DhcpOnTimerTick (
|
||||
|
||||
if (Instance != NULL) {
|
||||
Instance->ElaspedTime= 0;
|
||||
}
|
||||
}
|
||||
|
||||
Status = DhcpSendMessage (
|
||||
DhcpSb,
|
||||
@@ -1648,7 +1648,7 @@ ON_EXIT:
|
||||
//
|
||||
NET_LIST_FOR_EACH_SAFE (Entry, Next, &DhcpSb->Children) {
|
||||
Instance = NET_LIST_USER_STRUCT (Entry, DHCP_PROTOCOL, Link);
|
||||
|
||||
|
||||
if ((Instance != NULL) && (Instance->Token != NULL)) {
|
||||
Instance->Timeout--;
|
||||
if (Instance->Timeout == 0) {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
The DHCP4 protocol implementation.
|
||||
|
||||
Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Function to validate, parse, process the DHCP options.
|
||||
|
||||
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
To validate, parse and process the DHCP options.
|
||||
|
||||
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -22,7 +22,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#define DHCP_OPTION_MAGIC 0x63538263 // Network byte order
|
||||
#define DHCP_MAX_OPTIONS 256
|
||||
|
||||
|
||||
|
||||
//
|
||||
// DHCP option types, this is used to validate the DHCP options.
|
||||
//
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/** @file
|
||||
|
||||
Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -337,7 +337,7 @@ DpcDriverEntryPoint (
|
||||
//
|
||||
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||
&mDpcHandle,
|
||||
&gEfiDpcProtocolGuid,
|
||||
&gEfiDpcProtocolGuid,
|
||||
&mDpc,
|
||||
NULL
|
||||
);
|
||||
|
@@ -3,13 +3,13 @@
|
||||
//
|
||||
// This module produces Deferred Procedure Call Protocol.
|
||||
//
|
||||
// Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
// which accompanies this distribution. The full text of the license may be found at
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// /** @file
|
||||
// DpcDxe Localized Strings and Content
|
||||
//
|
||||
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -13,8 +13,8 @@
|
||||
//
|
||||
// **/
|
||||
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
"Deferred Procedure Call DXE Driver"
|
||||
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
UEFI Component Name(2) protocol implementation for iSCSI.
|
||||
|
||||
Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -33,7 +33,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME2_PROTOCOL gIScsiComponentNam
|
||||
};
|
||||
|
||||
GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mIScsiDriverNameTable[] = {
|
||||
{"eng;en", L"iSCSI Driver"},
|
||||
{"eng;en", L"iSCSI Driver"},
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
@@ -48,7 +48,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE *mIScsiControllerNameTab
|
||||
returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
|
||||
by This does not support the language specified by Language,
|
||||
then EFI_UNSUPPORTED is returned.
|
||||
|
||||
|
||||
@param[in] This A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
|
||||
@param[in] Language A pointer to a three character ISO 639-2 language identifier.
|
||||
This is the language of the driver name that that the caller
|
||||
@@ -88,11 +88,11 @@ IScsiComponentNameGetDriverName (
|
||||
Update the component name for the iSCSI instance.
|
||||
|
||||
@param[in] IScsiExtScsiPassThru A pointer to the EFI_EXT_SCSI_PASS_THRU_PROTOCOL instance.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Update the ControllerNameTable of this instance successfully.
|
||||
@retval EFI_INVALID_PARAMETER The input parameter is invalid.
|
||||
@retval EFI_UNSUPPORTED Can't get the corresponding NIC info from the Controller handle.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
UpdateName (
|
||||
@@ -110,7 +110,7 @@ UpdateName (
|
||||
if (IScsiExtScsiPassThru == NULL) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
|
||||
Private = ISCSI_DRIVER_DATA_FROM_EXT_SCSI_PASS_THRU (IScsiExtScsiPassThru);
|
||||
|
||||
//
|
||||
@@ -122,7 +122,7 @@ UpdateName (
|
||||
}
|
||||
VlanId = NetLibGetVlanId (Private->Controller);
|
||||
IScsiMacAddrToStr (&MacAddress, (UINT32) HwAddressSize, VlanId, MacString);
|
||||
|
||||
|
||||
UnicodeSPrint (
|
||||
HandleName,
|
||||
sizeof (HandleName),
|
||||
@@ -183,7 +183,7 @@ UpdateName (
|
||||
|
||||
@retval EFI_SUCCESS The Unicode string for the user readable name in the
|
||||
language specified by Language for the driver
|
||||
specified by This was returned in DriverName.
|
||||
specified by This was returned in DriverName.
|
||||
@retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
|
||||
@retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.
|
||||
@retval EFI_INVALID_PARAMETER Language is NULL.
|
||||
@@ -271,7 +271,7 @@ IScsiComponentNameGetControllerName (
|
||||
return Status;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return LookupUnicodeString2 (
|
||||
Language,
|
||||
This->SupportedLanguages,
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
The header file of UEFI Component Name(2) protocol.
|
||||
|
||||
Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -34,7 +34,7 @@ extern EFI_COMPONENT_NAME_PROTOCOL gIScsiComponentName;
|
||||
returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
|
||||
by This does not support the language specified by Language,
|
||||
then EFI_UNSUPPORTED is returned.
|
||||
|
||||
|
||||
@param[in] This A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
|
||||
@param[in] Language A pointer to a three characters ISO 639-2 language identifier.
|
||||
This is the language of the driver name that that the caller
|
||||
@@ -89,7 +89,7 @@ IScsiComponentNameGetDriverName (
|
||||
|
||||
@retval EFI_SUCCESS The Unicode string for the user readable name in the
|
||||
language specified by Language for the driver
|
||||
specified by This was returned in DriverName.
|
||||
specified by This was returned in DriverName.
|
||||
@retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
|
||||
@retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE.
|
||||
@retval EFI_INVALID_PARAMETER Language is NULL.
|
||||
@@ -109,7 +109,7 @@ IScsiComponentNameGetControllerName (
|
||||
IN CHAR8 *Language,
|
||||
OUT CHAR16 **ControllerName
|
||||
);
|
||||
|
||||
|
||||
//
|
||||
// EFI iSCSI Initiator Name Protocol for IScsi driver.
|
||||
//
|
||||
|
@@ -6,13 +6,13 @@
|
||||
// data over TCP/IP. It installs EFI HII Configuration Access Protocol to provide
|
||||
// one way to configurate the iSCSI setting.
|
||||
//
|
||||
// Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
// which accompanies this distribution. The full text of the license may be found at
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// /** @file
|
||||
// IScsi4Dxe Localized Strings and Content
|
||||
//
|
||||
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -13,8 +13,8 @@
|
||||
//
|
||||
// **/
|
||||
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
"iSCSI DXE Driver"
|
||||
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
The header file of CHAP configuration.
|
||||
|
||||
Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -29,9 +29,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
///
|
||||
/// MD5_HASHSIZE
|
||||
///
|
||||
#define ISCSI_CHAP_RSP_LEN 16
|
||||
#define ISCSI_CHAP_RSP_LEN 16
|
||||
|
||||
#define ISCSI_CHAP_INITIAL 0
|
||||
#define ISCSI_CHAP_INITIAL 0
|
||||
#define ISCSI_CHAP_STEP_ONE 1
|
||||
#define ISCSI_CHAP_STEP_TWO 2
|
||||
#define ISCSI_CHAP_STEP_THREE 3
|
||||
@@ -73,7 +73,7 @@ typedef struct _ISCSI_CHAP_AUTH_DATA {
|
||||
/**
|
||||
This function checks the received iSCSI Login Response during the security
|
||||
negotiation stage.
|
||||
|
||||
|
||||
@param[in] Conn The iSCSI connection.
|
||||
|
||||
@retval EFI_SUCCESS The Login Response passed the CHAP validation.
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Helper functions for configuring or getting the parameters relating to iSCSI.
|
||||
|
||||
Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -39,7 +39,7 @@ HII_VENDOR_DEVICE_PATH mIScsiHiiVendorDevicePath = {
|
||||
{
|
||||
END_DEVICE_PATH_TYPE,
|
||||
END_ENTIRE_DEVICE_PATH_SUBTYPE,
|
||||
{
|
||||
{
|
||||
(UINT8) (END_DEVICE_PATH_LENGTH),
|
||||
(UINT8) ((END_DEVICE_PATH_LENGTH) >> 8)
|
||||
}
|
||||
@@ -180,7 +180,7 @@ IScsiConvertIsIdToString (
|
||||
Update the list of iSCSI devices the iSCSI driver is controlling.
|
||||
|
||||
@retval EFI_SUCCESS The callback successfully handled the action.
|
||||
@retval Others Other errors as indicated.
|
||||
@retval Others Other errors as indicated.
|
||||
**/
|
||||
EFI_STATUS
|
||||
IScsiUpdateDeviceList (
|
||||
@@ -445,7 +445,7 @@ IScsiConvertDeviceConfigDataToIfrNvData (
|
||||
would result in this type of
|
||||
error. In this case, the
|
||||
Progress parameter would be
|
||||
set to NULL.
|
||||
set to NULL.
|
||||
@retval EFI_NOT_FOUND Routing data doesn't match any
|
||||
known driver. Progress set to the
|
||||
first character in the routing header.
|
||||
@@ -579,7 +579,7 @@ IScsiFormExtractConfig (
|
||||
|
||||
@param[in] This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
|
||||
@param[in] Configuration A null-terminated Unicode string in
|
||||
<ConfigString> format.
|
||||
<ConfigString> format.
|
||||
@param[out] Progress A pointer to a string filled in with the
|
||||
offset of the most recent '&' before the
|
||||
first failing name / value pair (or the
|
||||
@@ -589,7 +589,7 @@ IScsiFormExtractConfig (
|
||||
successful.
|
||||
|
||||
@retval EFI_SUCCESS The results have been distributed or are
|
||||
awaiting distribution.
|
||||
awaiting distribution.
|
||||
@retval EFI_OUT_OF_RESOURCES Not enough memory to store the
|
||||
parts of the results that must be
|
||||
stored awaiting possible future
|
||||
@@ -634,7 +634,7 @@ IScsiFormRouteConfig (
|
||||
@param[in] Action Specifies the type of action taken by the browser.
|
||||
@param[in] QuestionId A unique value which is sent to the original
|
||||
exporting driver so that it can identify the type
|
||||
of data to expect. The format of the data tends to
|
||||
of data to expect. The format of the data tends to
|
||||
vary based on the opcode that enerated the callback.
|
||||
@param[in] Type The type of value for the question.
|
||||
@param[in] Value A pointer to the data being sent to the original
|
||||
@@ -648,8 +648,8 @@ IScsiFormRouteConfig (
|
||||
@retval EFI_DEVICE_ERROR The variable could not be saved.
|
||||
@retval EFI_UNSUPPORTED The specified Action is not supported by the
|
||||
callback.Currently not implemented.
|
||||
@retval EFI_INVALID_PARAMETERS Passing in wrong parameter.
|
||||
@retval Others Other errors as indicated.
|
||||
@retval EFI_INVALID_PARAMETERS Passing in wrong parameter.
|
||||
@retval Others Other errors as indicated.
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -711,7 +711,7 @@ IScsiFormCallback (
|
||||
Private->Current = ConfigFormEntry;
|
||||
}
|
||||
} else if (Action == EFI_BROWSER_ACTION_CHANGED) {
|
||||
switch (QuestionId) {
|
||||
switch (QuestionId) {
|
||||
case KEY_INITIATOR_NAME:
|
||||
IScsiUnicodeStrToAsciiStr (IfrNvData->InitiatorName, IScsiName);
|
||||
BufferSize = AsciiStrSize (IScsiName);
|
||||
@@ -727,8 +727,8 @@ IScsiFormCallback (
|
||||
case KEY_LOCAL_IP:
|
||||
IScsiUnicodeStrToAsciiStr (IfrNvData->LocalIp, Ip4String);
|
||||
Status = IScsiAsciiStrToIp (Ip4String, &HostIp.v4);
|
||||
if (EFI_ERROR (Status) ||
|
||||
((Private->Current->SessionConfigData.SubnetMask.Addr[0] != 0) &&
|
||||
if (EFI_ERROR (Status) ||
|
||||
((Private->Current->SessionConfigData.SubnetMask.Addr[0] != 0) &&
|
||||
!NetIp4IsUnicast (NTOHL (HostIp.Addr[0]), NTOHL(*(UINT32*)Private->Current->SessionConfigData.SubnetMask.Addr)))) {
|
||||
CreatePopUp (EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE, &Key, L"Invalid IP address!", NULL);
|
||||
Status = EFI_INVALID_PARAMETER;
|
||||
@@ -753,9 +753,9 @@ IScsiFormCallback (
|
||||
case KEY_GATE_WAY:
|
||||
IScsiUnicodeStrToAsciiStr (IfrNvData->Gateway, Ip4String);
|
||||
Status = IScsiAsciiStrToIp (Ip4String, &Gateway.v4);
|
||||
if (EFI_ERROR (Status) ||
|
||||
((Gateway.Addr[0] != 0) &&
|
||||
(Private->Current->SessionConfigData.SubnetMask.Addr[0] != 0) &&
|
||||
if (EFI_ERROR (Status) ||
|
||||
((Gateway.Addr[0] != 0) &&
|
||||
(Private->Current->SessionConfigData.SubnetMask.Addr[0] != 0) &&
|
||||
!NetIp4IsUnicast (NTOHL (Gateway.Addr[0]), NTOHL(*(UINT32*)Private->Current->SessionConfigData.SubnetMask.Addr)))) {
|
||||
CreatePopUp (EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE, &Key, L"Invalid Gateway!", NULL);
|
||||
Status = EFI_INVALID_PARAMETER;
|
||||
@@ -944,9 +944,9 @@ IScsiFormCallback (
|
||||
//
|
||||
HiiSetBrowserData (&gIp4IScsiConfigGuid, mVendorStorageName, sizeof (ISCSI_CONFIG_IFR_NVDATA), (UINT8 *) IfrNvData, NULL);
|
||||
}
|
||||
|
||||
|
||||
FreePool (IfrNvData);
|
||||
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
@@ -1033,12 +1033,12 @@ IScsiConfigUpdateForm (
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
ZeroMem (&ConfigFormEntry->SessionConfigData, sizeof (ConfigFormEntry->SessionConfigData));
|
||||
|
||||
|
||||
//
|
||||
// Generate OUI-format ISID based on MAC address.
|
||||
//
|
||||
CopyMem (ConfigFormEntry->SessionConfigData.IsId, &MacAddress, 6);
|
||||
ConfigFormEntry->SessionConfigData.IsId[0] =
|
||||
ConfigFormEntry->SessionConfigData.IsId[0] =
|
||||
(UINT8) (ConfigFormEntry->SessionConfigData.IsId[0] & 0x3F);
|
||||
}
|
||||
//
|
||||
@@ -1189,7 +1189,7 @@ IScsiConfigFormInit (
|
||||
NULL
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
|
||||
//
|
||||
// Publish our HII data
|
||||
//
|
||||
@@ -1216,7 +1216,7 @@ IScsiConfigFormInit (
|
||||
free the resources used.
|
||||
|
||||
@param[in] DriverBindingHandle The iSCSI driverbinding handle.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The iSCSI configuration form is unloaded.
|
||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
|
||||
**/
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
The header file of IScsiConfig.c.
|
||||
|
||||
Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -35,23 +35,23 @@ extern UINT8 IScsi4DxeStrings[];
|
||||
|
||||
|
||||
/**
|
||||
If the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of PcdDebugProperyMask is clear,
|
||||
If the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of PcdDebugProperyMask is clear,
|
||||
then this macro return a pointer to a data structure ISCSI_FORM_CALLBACK_INFO.
|
||||
|
||||
If the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of PcdDebugProperyMask is set,
|
||||
The Signature field of the data structure ISCSI_FORM_CALLBACK_INFO
|
||||
is compared to TestSignature. If the signatures match, then a pointer
|
||||
to the pointer to a data structure ISCSI_FORM_CALLBACK_INFO is returned.
|
||||
If the signatures do not match, then DebugAssert() is called with a description
|
||||
of "CR has a bad signature" and Callback is returned.
|
||||
If the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of PcdDebugProperyMask is set,
|
||||
The Signature field of the data structure ISCSI_FORM_CALLBACK_INFO
|
||||
is compared to TestSignature. If the signatures match, then a pointer
|
||||
to the pointer to a data structure ISCSI_FORM_CALLBACK_INFO is returned.
|
||||
If the signatures do not match, then DebugAssert() is called with a description
|
||||
of "CR has a bad signature" and Callback is returned.
|
||||
|
||||
If the data type ISCSI_FORM_CALLBACK_INFO_SIGNATURE does not contain the field
|
||||
specified by Callback, then the module will not compile.
|
||||
|
||||
If ISCSI_FORM_CALLBACK_INFO_SIGNATURE does not contain a field called Signature,
|
||||
If ISCSI_FORM_CALLBACK_INFO_SIGNATURE does not contain a field called Signature,
|
||||
then the module will not compile.
|
||||
|
||||
@param Callback Pointer to the specified field within the data
|
||||
@param Callback Pointer to the specified field within the data
|
||||
structure ISCSI_FORM_CALLBACK_INFO.
|
||||
@return A pointer to the pointer to a data structure ISCSI_FORM_CALLBACK_INFO.
|
||||
@retval Others Some unexpected error happened.
|
||||
@@ -154,7 +154,7 @@ IScsiConfigFormInit (
|
||||
free the resources used.
|
||||
|
||||
@param[in] DriverBindingHandle The iSCSI driverbinding handle.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The iSCSI configuration form is unloaded.
|
||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
|
||||
**/
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Vfr file for iSCSI config.
|
||||
|
||||
Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -16,7 +16,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#include "IScsiConfigNVDataStruc.h"
|
||||
#define EFI_NETWORK_DEVICE_CLASS 0x04
|
||||
|
||||
formset
|
||||
formset
|
||||
guid = IP4_ISCSI_CONFIG_GUID,
|
||||
title = STRING_TOKEN(STR_ISCSI_CONFIG_FORM_TITLE),
|
||||
help = STRING_TOKEN(STR_ISCSI_CONFIG_FORM_HELP),
|
||||
@@ -27,7 +27,7 @@ formset
|
||||
form formid = FORMID_MAIN_FORM,
|
||||
title = STRING_TOKEN(STR_ISCSI_MAIN_FORM_TITLE);
|
||||
|
||||
string varid = ISCSI_CONFIG_IFR_NVDATA.InitiatorName,
|
||||
string varid = ISCSI_CONFIG_IFR_NVDATA.InitiatorName,
|
||||
prompt = STRING_TOKEN(STR_ISCSI_CONFIG_INIT_NAME),
|
||||
help = STRING_TOKEN(STR_ISCSI_CONFIG_INIT_NAME_HELP),
|
||||
flags = INTERACTIVE,
|
||||
@@ -57,8 +57,8 @@ formset
|
||||
key = KEY_DHCP_ENABLE,
|
||||
endcheckbox;
|
||||
|
||||
suppressif ideqval ISCSI_CONFIG_IFR_NVDATA.InitiatorInfoFromDhcp == 0x01;
|
||||
string varid = ISCSI_CONFIG_IFR_NVDATA.LocalIp,
|
||||
suppressif ideqval ISCSI_CONFIG_IFR_NVDATA.InitiatorInfoFromDhcp == 0x01;
|
||||
string varid = ISCSI_CONFIG_IFR_NVDATA.LocalIp,
|
||||
prompt = STRING_TOKEN(STR_ISCSI_LOCAL_IP_ADDRESS),
|
||||
help = STRING_TOKEN(STR_ISCSI_IP_ADDRESS_HELP),
|
||||
flags = INTERACTIVE,
|
||||
@@ -67,7 +67,7 @@ formset
|
||||
maxsize = IP_MAX_SIZE,
|
||||
endstring;
|
||||
|
||||
string varid = ISCSI_CONFIG_IFR_NVDATA.SubnetMask,
|
||||
string varid = ISCSI_CONFIG_IFR_NVDATA.SubnetMask,
|
||||
prompt = STRING_TOKEN(STR_ISCSI_LOCAL_MASK),
|
||||
help = STRING_TOKEN(STR_ISCSI_IP_ADDRESS_HELP),
|
||||
flags = INTERACTIVE,
|
||||
@@ -76,7 +76,7 @@ formset
|
||||
maxsize = IP_MAX_SIZE,
|
||||
endstring;
|
||||
|
||||
string varid = ISCSI_CONFIG_IFR_NVDATA.Gateway,
|
||||
string varid = ISCSI_CONFIG_IFR_NVDATA.Gateway,
|
||||
prompt = STRING_TOKEN(STR_ISCSI_LOCAL_GATEWAY),
|
||||
help = STRING_TOKEN(STR_ISCSI_IP_ADDRESS_HELP),
|
||||
flags = INTERACTIVE,
|
||||
@@ -86,19 +86,19 @@ formset
|
||||
endstring;
|
||||
endif;
|
||||
|
||||
subtitle text = STRING_TOKEN(STR_NULL);
|
||||
subtitle text = STRING_TOKEN(STR_NULL);
|
||||
|
||||
suppressif ideqval ISCSI_CONFIG_IFR_NVDATA.InitiatorInfoFromDhcp == 0x00;
|
||||
suppressif ideqval ISCSI_CONFIG_IFR_NVDATA.InitiatorInfoFromDhcp == 0x00;
|
||||
checkbox varid = ISCSI_CONFIG_IFR_NVDATA.TargetInfoFromDhcp,
|
||||
prompt = STRING_TOKEN(STR_ISCSI_ENABLE_DHCP_ON_TARGET),
|
||||
help = STRING_TOKEN(STR_ISCSI_ENABLE_DHCP_ON_TARGET),
|
||||
flags = 0,
|
||||
endcheckbox;
|
||||
endif;
|
||||
|
||||
suppressif ideqval ISCSI_CONFIG_IFR_NVDATA.TargetInfoFromDhcp == 0x01;
|
||||
|
||||
string varid = ISCSI_CONFIG_IFR_NVDATA.TargetName,
|
||||
suppressif ideqval ISCSI_CONFIG_IFR_NVDATA.TargetInfoFromDhcp == 0x01;
|
||||
|
||||
string varid = ISCSI_CONFIG_IFR_NVDATA.TargetName,
|
||||
prompt = STRING_TOKEN(STR_ISCSI_TARGET_NAME),
|
||||
help = STRING_TOKEN(STR_ISCSI_TARGET_NAME),
|
||||
flags = INTERACTIVE,
|
||||
@@ -107,7 +107,7 @@ formset
|
||||
maxsize = ISCSI_NAME_IFR_MAX_SIZE,
|
||||
endstring;
|
||||
|
||||
string varid = ISCSI_CONFIG_IFR_NVDATA.TargetIp,
|
||||
string varid = ISCSI_CONFIG_IFR_NVDATA.TargetIp,
|
||||
prompt = STRING_TOKEN(STR_ISCSI_TARGET_IP_ADDRESS),
|
||||
help = STRING_TOKEN(STR_ISCSI_IP_ADDRESS_HELP),
|
||||
flags = INTERACTIVE,
|
||||
@@ -115,17 +115,17 @@ formset
|
||||
minsize = IP_MIN_SIZE,
|
||||
maxsize = IP_MAX_SIZE,
|
||||
endstring;
|
||||
|
||||
numeric varid = ISCSI_CONFIG_IFR_NVDATA.TargetPort,
|
||||
|
||||
numeric varid = ISCSI_CONFIG_IFR_NVDATA.TargetPort,
|
||||
prompt = STRING_TOKEN(STR_ISCSI_TARGET_PORT),
|
||||
help = STRING_TOKEN(STR_ISCSI_TARGET_PORT),
|
||||
flags = 0,
|
||||
minimum = TARGET_PORT_MIN_NUM,
|
||||
maximum = TARGET_PORT_MAX_NUM,
|
||||
maximum = TARGET_PORT_MAX_NUM,
|
||||
step = 0,
|
||||
endnumeric;
|
||||
|
||||
string varid = ISCSI_CONFIG_IFR_NVDATA.BootLun,
|
||||
|
||||
string varid = ISCSI_CONFIG_IFR_NVDATA.BootLun,
|
||||
prompt = STRING_TOKEN(STR_ISCSI_BOOT_LUN),
|
||||
help = STRING_TOKEN(STR_ISCSI_BOOT_LUN_HELP),
|
||||
flags = INTERACTIVE,
|
||||
@@ -135,19 +135,19 @@ formset
|
||||
endstring;
|
||||
endif;
|
||||
|
||||
subtitle text = STRING_TOKEN(STR_NULL);
|
||||
subtitle text = STRING_TOKEN(STR_NULL);
|
||||
|
||||
oneof varid = ISCSI_CONFIG_IFR_NVDATA.CHAPType,
|
||||
prompt = STRING_TOKEN(STR_CHAP_TYPE_PROMPT),
|
||||
help = STRING_TOKEN(STR_CHAP_TYPE_HELP),
|
||||
help = STRING_TOKEN(STR_CHAP_TYPE_HELP),
|
||||
option text = STRING_TOKEN(STR_CHAP_TYPE_NONE), value = ISCSI_CHAP_NONE, flags = DEFAULT;
|
||||
option text = STRING_TOKEN(STR_CHAP_TYPE_UNI), value = ISCSI_CHAP_UNI, flags = 0;
|
||||
option text = STRING_TOKEN(STR_CHAP_TYPE_MUTUAL), value = ISCSI_CHAP_MUTUAL, flags = 0;
|
||||
endoneof;
|
||||
|
||||
suppressif ideqval ISCSI_CONFIG_IFR_NVDATA.CHAPType == ISCSI_CHAP_NONE;
|
||||
suppressif ideqval ISCSI_CONFIG_IFR_NVDATA.CHAPType == ISCSI_CHAP_NONE;
|
||||
|
||||
string varid = ISCSI_CONFIG_IFR_NVDATA.CHAPName,
|
||||
string varid = ISCSI_CONFIG_IFR_NVDATA.CHAPName,
|
||||
prompt = STRING_TOKEN(STR_ISCSI_CHAP_NAME),
|
||||
help = STRING_TOKEN(STR_ISCSI_CHAP_NAME),
|
||||
flags = INTERACTIVE,
|
||||
@@ -156,7 +156,7 @@ formset
|
||||
maxsize = ISCSI_CHAP_NAME_MAX_LEN,
|
||||
endstring;
|
||||
|
||||
string varid = ISCSI_CONFIG_IFR_NVDATA.CHAPSecret,
|
||||
string varid = ISCSI_CONFIG_IFR_NVDATA.CHAPSecret,
|
||||
prompt = STRING_TOKEN(STR_ISCSI_CHAP_SECRET),
|
||||
help = STRING_TOKEN(STR_ISCSI_CHAP_SECRET_HELP),
|
||||
flags = INTERACTIVE,
|
||||
@@ -169,7 +169,7 @@ formset
|
||||
|
||||
suppressif NOT ideqval ISCSI_CONFIG_IFR_NVDATA.CHAPType == ISCSI_CHAP_MUTUAL;
|
||||
|
||||
string varid = ISCSI_CONFIG_IFR_NVDATA.ReverseCHAPName,
|
||||
string varid = ISCSI_CONFIG_IFR_NVDATA.ReverseCHAPName,
|
||||
prompt = STRING_TOKEN(STR_ISCSI_REVERSE_CHAP_NAME),
|
||||
help = STRING_TOKEN(STR_ISCSI_REVERSE_CHAP_NAME),
|
||||
flags = INTERACTIVE,
|
||||
@@ -178,7 +178,7 @@ formset
|
||||
maxsize = ISCSI_CHAP_NAME_MAX_LEN,
|
||||
endstring;
|
||||
|
||||
string varid = ISCSI_CONFIG_IFR_NVDATA.ReverseCHAPSecret,
|
||||
string varid = ISCSI_CONFIG_IFR_NVDATA.ReverseCHAPSecret,
|
||||
prompt = STRING_TOKEN(STR_ISCSI_REVERSE_CHAP_SECRET),
|
||||
help = STRING_TOKEN(STR_ISCSI_CHAP_SECRET_HELP),
|
||||
flags = INTERACTIVE,
|
||||
@@ -189,9 +189,9 @@ formset
|
||||
|
||||
endif;
|
||||
|
||||
subtitle text = STRING_TOKEN(STR_NULL);
|
||||
subtitle text = STRING_TOKEN(STR_NULL);
|
||||
|
||||
string varid = ISCSI_CONFIG_IFR_NVDATA.IsId,
|
||||
string varid = ISCSI_CONFIG_IFR_NVDATA.IsId,
|
||||
prompt = STRING_TOKEN(STR_ISCSI_CONFIG_ISID),
|
||||
help = STRING_TOKEN(STR_ISCSI_CONFIG_ISID_HELP),
|
||||
flags = INTERACTIVE,
|
||||
@@ -200,16 +200,16 @@ formset
|
||||
maxsize = ISID_CONFIGURABLE_MAX_LEN,
|
||||
endstring;
|
||||
|
||||
subtitle text = STRING_TOKEN(STR_NULL);
|
||||
subtitle text = STRING_TOKEN(STR_NULL);
|
||||
|
||||
text
|
||||
help = STRING_TOKEN (STR_SAVE_CHANGES),
|
||||
text = STRING_TOKEN (STR_SAVE_CHANGES),
|
||||
flags = INTERACTIVE,
|
||||
key = KEY_SAVE_CHANGES;
|
||||
|
||||
goto FORMID_MAIN_FORM,
|
||||
prompt = STRING_TOKEN (STR_RETURN_MAIN_FORM),
|
||||
|
||||
goto FORMID_MAIN_FORM,
|
||||
prompt = STRING_TOKEN (STR_RETURN_MAIN_FORM),
|
||||
help = STRING_TOKEN (STR_RETURN_MAIN_FORM),
|
||||
flags = 0;
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
// *++
|
||||
//
|
||||
// Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
// which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -12,13 +12,13 @@
|
||||
// Module Name:
|
||||
//
|
||||
// IScsiConfigStrings.uni
|
||||
//
|
||||
//
|
||||
// Abstract:
|
||||
//
|
||||
//
|
||||
// String definitions for iSCSI configuration.
|
||||
//
|
||||
//
|
||||
// Revision History:
|
||||
//
|
||||
//
|
||||
// --*/
|
||||
|
||||
|
||||
@@ -26,23 +26,23 @@
|
||||
|
||||
#langdef en-US "English"
|
||||
|
||||
#string STR_ISCSI_CONFIG_FORM_TITLE #language en-US "iSCSI Configuration"
|
||||
#string STR_ISCSI_CONFIG_FORM_HELP #language en-US "Configure the iSCSI parameters."
|
||||
#string STR_ISCSI_CONFIG_FORM_TITLE #language en-US "iSCSI Configuration"
|
||||
#string STR_ISCSI_CONFIG_FORM_HELP #language en-US "Configure the iSCSI parameters."
|
||||
#string STR_ISCSI_MAIN_FORM_TITLE #language en-US "iSCSI Configuration"
|
||||
#string STR_ISCSI_CONFIG_INIT_NAME #language en-US "iSCSI Initiator Name"
|
||||
#string STR_ISCSI_CONFIG_INIT_NAME_HELP #language en-US "The worldwide unique name of the initiator. Only iqn. format is accepted."
|
||||
#string STR_ISCSI_DEVICE_FORM_TITLE #language en-US ""
|
||||
#string STR_ISCSI_DEVICE_ENABLE #language en-US "Enable iSCSI"
|
||||
#string STR_ISCSI_LOCAL_IP_ADDRESS #language en-US " Initiator IP Address"
|
||||
#string STR_ISCSI_LOCAL_MASK #language en-US " Initiator Subnet Mask"
|
||||
#string STR_ISCSI_LOCAL_MASK #language en-US " Initiator Subnet Mask"
|
||||
#string STR_ISCSI_LOCAL_GATEWAY #language en-US " Gateway"
|
||||
#string STR_ISCSI_IP_ADDRESS_HELP #language en-US "Enter IP address in dotted-decimal notation."
|
||||
#string STR_ISCSI_TARGET_NAME #language en-US " Target Name"
|
||||
#string STR_ISCSI_TARGET_IP_ADDRESS #language en-US " Target IP Address"
|
||||
#string STR_ISCSI_TARGET_PORT #language en-US " Target Port"
|
||||
#string STR_ISCSI_IP_ADDRESS_HELP #language en-US "Enter IP address in dotted-decimal notation."
|
||||
#string STR_ISCSI_TARGET_NAME #language en-US " Target Name"
|
||||
#string STR_ISCSI_TARGET_IP_ADDRESS #language en-US " Target IP Address"
|
||||
#string STR_ISCSI_TARGET_PORT #language en-US " Target Port"
|
||||
#string STR_ISCSI_BOOT_LUN #language en-US " Boot LUN"
|
||||
#string STR_ISCSI_BOOT_LUN_HELP #language en-US "Hexadecimal representation of the LU number. Examples are: 4752-3A4F-6b7e-2F99, 6734-9-156f-127, 4186-9"
|
||||
#string STR_ISCSI_ENABLE_DHCP #language en-US "Enable DHCP"
|
||||
#string STR_ISCSI_ENABLE_DHCP #language en-US "Enable DHCP"
|
||||
#string STR_ISCSI_ENABLE_DHCP_ON_TARGET #language en-US "Get target info via DHCP"
|
||||
#string STR_CHAP_TYPE_PROMPT #language en-US "CHAP Type"
|
||||
#string STR_CHAP_TYPE_HELP #language en-US "None, One way CHAP or mutual CHAP"
|
||||
@@ -57,6 +57,6 @@
|
||||
#string STR_ISCSI_CONFIG_ISID #language en-US "ISID"
|
||||
#string STR_ISCSI_CONFIG_ISID_HELP #language en-US "OUI-format ISID in 6 bytes, default value are derived from MAC address. Only last 3 bytes are configurable. Example: update 0ABBCCDDEEFF to 0ABBCCF07901 by input F07901."
|
||||
#string STR_RETURN_MAIN_FORM #language en-US "Back to Previous Page"
|
||||
#string STR_SAVE_CHANGES #language en-US "Save Changes"
|
||||
#string STR_SAVE_CHANGES #language en-US "Save Changes"
|
||||
#string STR_NULL #language en-US ""
|
||||
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
iSCSI DHCP related configuration routines.
|
||||
|
||||
Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -95,7 +95,7 @@ IScsiDhcpExtractRootPath (
|
||||
Status = EFI_INVALID_PARAMETER;
|
||||
goto ON_EXIT;
|
||||
}
|
||||
|
||||
|
||||
if ((Fields[RP_FIELD_IDX_SERVERNAME].Str == NULL) ||
|
||||
(Fields[RP_FIELD_IDX_TARGETNAME].Str == NULL) ||
|
||||
(Fields[RP_FIELD_IDX_PROTOCOL].Len > 1)
|
||||
@@ -170,14 +170,14 @@ ON_EXIT:
|
||||
/**
|
||||
The callback function registerd to the DHCP4 instance which is used to select
|
||||
the qualified DHCP OFFER.
|
||||
|
||||
|
||||
@param[in] This The DHCP4 protocol.
|
||||
@param[in] Context The context set when configuring the DHCP4 protocol.
|
||||
@param[in] CurrentState The current state of the DHCP4 protocol.
|
||||
@param[in] Dhcp4Event The event occurs in the current state.
|
||||
@param[in] Packet The DHCP packet that is to be sent or already received.
|
||||
@param[in] Packet The DHCP packet that is to be sent or already received.
|
||||
@param[out] NewPacket The packet used to replace the above Packet.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Either the DHCP OFFER is qualified or we're not intereseted
|
||||
in the Dhcp4Event.
|
||||
@retval EFI_NOT_READY The DHCP OFFER packet doesn't match our requirements.
|
||||
@@ -337,7 +337,7 @@ IScsiParseDhcpAck (
|
||||
|
||||
/**
|
||||
Parse the DHCP ACK to get the address configuration and DNS information.
|
||||
|
||||
|
||||
@param[in] Image The handle of the driver image.
|
||||
@param[in] Controller The handle of the controller;
|
||||
@param[in, out] ConfigData The session configuration data.
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
The header file of IScsiDhcp.
|
||||
|
||||
Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -34,7 +34,7 @@ typedef struct _ISCSI_ROOT_PATH_FIELD {
|
||||
|
||||
/**
|
||||
Parse the DHCP ACK to get the address configuration and DNS information.
|
||||
|
||||
|
||||
@param[in] Image The handle of the driver image.
|
||||
@param[in] Controller The handle of the controller;
|
||||
@param[in, out] ConfigData The session configuration data.
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
The entry point of IScsi driver.
|
||||
|
||||
Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -24,14 +24,14 @@ EFI_DRIVER_BINDING_PROTOCOL gIScsiDriverBinding = {
|
||||
};
|
||||
|
||||
/**
|
||||
Tests to see if this driver supports the RemainingDevicePath.
|
||||
Tests to see if this driver supports the RemainingDevicePath.
|
||||
|
||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
||||
parameter is ignored by device drivers, and is optional for bus
|
||||
drivers. For bus drivers, if this parameter is not NULL, then
|
||||
the bus driver must determine if the bus controller specified
|
||||
by ControllerHandle and the child controller specified
|
||||
by RemainingDevicePath are both supported by this
|
||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This
|
||||
parameter is ignored by device drivers, and is optional for bus
|
||||
drivers. For bus drivers, if this parameter is not NULL, then
|
||||
the bus driver must determine if the bus controller specified
|
||||
by ControllerHandle and the child controller specified
|
||||
by RemainingDevicePath are both supported by this
|
||||
bus driver.
|
||||
|
||||
@retval EFI_SUCCESS The RemainingDevicePath is supported or NULL.
|
||||
@@ -62,14 +62,14 @@ IScsiIsDevicePathSupported (
|
||||
}
|
||||
|
||||
/**
|
||||
Tests to see if this driver supports a given controller. If a child device is provided,
|
||||
Tests to see if this driver supports a given controller. If a child device is provided,
|
||||
it further tests to see if this driver supports creating a handle for the specified child device.
|
||||
|
||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||
@param[in] ControllerHandle The handle of the controller to test. This handle
|
||||
must support a protocol interface that supplies
|
||||
@param[in] ControllerHandle The handle of the controller to test. This handle
|
||||
must support a protocol interface that supplies
|
||||
an I/O abstraction to the driver.
|
||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path.
|
||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path.
|
||||
This parameter is ignored by device drivers, and is optional for bus drivers.
|
||||
|
||||
|
||||
@@ -142,23 +142,23 @@ IScsiDriverBindingSupported (
|
||||
}
|
||||
|
||||
/**
|
||||
Start this driver on ControllerHandle.
|
||||
|
||||
The Start() function is designed to be invoked from the EFI boot service ConnectController().
|
||||
As a result, much of the error checking on the parameters to Start() has been moved into this
|
||||
common boot service. It is legal to call Start() from other locations, but the following calling
|
||||
Start this driver on ControllerHandle.
|
||||
|
||||
The Start() function is designed to be invoked from the EFI boot service ConnectController().
|
||||
As a result, much of the error checking on the parameters to Start() has been moved into this
|
||||
common boot service. It is legal to call Start() from other locations, but the following calling
|
||||
restrictions must be followed or the system behavior will not be deterministic.
|
||||
1. ControllerHandle must be a valid EFI_HANDLE.
|
||||
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
|
||||
EFI_DEVICE_PATH_PROTOCOL.
|
||||
3. Prior to calling Start(), the Supported() function for the driver specified by This must
|
||||
have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
|
||||
have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
|
||||
|
||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||
@param[in] ControllerHandle The handle of the controller to start. This handle
|
||||
must support a protocol interface that supplies
|
||||
@param[in] ControllerHandle The handle of the controller to start. This handle
|
||||
must support a protocol interface that supplies
|
||||
an I/O abstraction to the driver.
|
||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path.
|
||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path.
|
||||
This parameter is ignored by device drivers, and is optional for bus drivers.
|
||||
|
||||
@retval EFI_SUCCESS The device was started.
|
||||
@@ -214,7 +214,7 @@ IScsiDriverBindingStart (
|
||||
}
|
||||
|
||||
//
|
||||
// Always install private protocol no matter what happens later. We need to
|
||||
// Always install private protocol no matter what happens later. We need to
|
||||
// keep the relationship between ControllerHandle and ChildHandle.
|
||||
//
|
||||
Status = gBS->InstallProtocolInterface (
|
||||
@@ -286,7 +286,7 @@ IScsiDriverBindingStart (
|
||||
This->DriverBindingHandle,
|
||||
Private->ExtScsiPassThruHandle,
|
||||
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
|
||||
);
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
gBS->UninstallMultipleProtocolInterfaces (
|
||||
Private->ExtScsiPassThruHandle,
|
||||
@@ -296,7 +296,7 @@ IScsiDriverBindingStart (
|
||||
Private->DevicePath,
|
||||
NULL
|
||||
);
|
||||
|
||||
|
||||
goto ON_ERROR;
|
||||
}
|
||||
|
||||
@@ -315,12 +315,12 @@ ON_ERROR:
|
||||
}
|
||||
|
||||
/**
|
||||
Stop this driver on ControllerHandle.
|
||||
|
||||
Stop this driver on ControllerHandle.
|
||||
|
||||
Release the control of this controller and remove the IScsi functions. The Stop()
|
||||
function is designed to be invoked from the EFI boot service DisconnectController().
|
||||
As a result, much of the error checking on the parameters to Stop() has been moved
|
||||
into this common boot service. It is legal to call Stop() from other locations,
|
||||
function is designed to be invoked from the EFI boot service DisconnectController().
|
||||
As a result, much of the error checking on the parameters to Stop() has been moved
|
||||
into this common boot service. It is legal to call Stop() from other locations,
|
||||
but the following calling restrictions must be followed or the system behavior will not be deterministic.
|
||||
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
|
||||
same driver's Start() function.
|
||||
@@ -328,13 +328,13 @@ ON_ERROR:
|
||||
EFI_HANDLE. In addition, all of these handles must have been created in this driver's
|
||||
Start() function, and the Start() function must have called OpenProtocol() on
|
||||
ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
|
||||
|
||||
|
||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
||||
support a bus specific I/O protocol for the driver
|
||||
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
||||
support a bus specific I/O protocol for the driver
|
||||
to use to stop the device.
|
||||
@param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.Not used.
|
||||
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
||||
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
||||
if NumberOfChildren is 0.Not used.
|
||||
|
||||
@retval EFI_SUCCESS The device was stopped.
|
||||
@@ -390,7 +390,7 @@ IScsiDriverBindingStop (
|
||||
Private->Image,
|
||||
Private->ExtScsiPassThruHandle
|
||||
);
|
||||
|
||||
|
||||
gBS->CloseProtocol (
|
||||
Conn->Tcp4Io.Handle,
|
||||
&gEfiTcp4ProtocolGuid,
|
||||
@@ -515,7 +515,7 @@ EfiIScsiUnload (
|
||||
if (EFI_ERROR (Status)) {
|
||||
goto ON_EXIT;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Unload the iSCSI configuration form.
|
||||
@@ -545,7 +545,7 @@ EfiIScsiUnload (
|
||||
goto ON_EXIT;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Status = gBS->HandleProtocol (
|
||||
gIScsiDriverBinding.DriverBindingHandle,
|
||||
&gEfiComponentName2ProtocolGuid,
|
||||
@@ -576,14 +576,14 @@ ON_EXIT:
|
||||
if (DeviceHandleBuffer != NULL) {
|
||||
FreePool (DeviceHandleBuffer);
|
||||
}
|
||||
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
/**
|
||||
This is the declaration of an EFI image entry point. This entry point is
|
||||
the same for UEFI Applications, UEFI OS Loaders, and UEFI Drivers including
|
||||
both device drivers and bus drivers. It initialize the global variables and
|
||||
both device drivers and bus drivers. It initialize the global variables and
|
||||
publish the driver binding protocol.
|
||||
|
||||
@param[in] ImageHandle The firmware allocated handle for the UEFI image.
|
||||
@@ -651,7 +651,7 @@ IScsiDriverEntryPoint (
|
||||
);
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Initialize the configuration form of iSCSI.
|
||||
//
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
The header file of IScsiDriver.c.
|
||||
|
||||
Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -38,14 +38,14 @@ typedef struct _ISCSI_PRIVATE_PROTOCOL {
|
||||
//
|
||||
|
||||
/**
|
||||
Tests to see if this driver supports a given controller. If a child device is provided,
|
||||
Tests to see if this driver supports a given controller. If a child device is provided,
|
||||
it further tests to see if this driver supports creating a handle for the specified child device.
|
||||
|
||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||
@param[in] ControllerHandle The handle of the controller to test. This handle
|
||||
must support a protocol interface that supplies
|
||||
@param[in] ControllerHandle The handle of the controller to test. This handle
|
||||
must support a protocol interface that supplies
|
||||
an I/O abstraction to the driver.
|
||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path.
|
||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path.
|
||||
This parameter is ignored by device drivers, and is optional for bus drivers.
|
||||
|
||||
|
||||
@@ -70,22 +70,22 @@ IScsiDriverBindingSupported (
|
||||
);
|
||||
|
||||
/**
|
||||
Start this driver on ControllerHandle. The Start() function is designed to be
|
||||
invoked from the EFI boot service ConnectController(). As a result, much of
|
||||
the error checking on the parameters to Start() has been moved into this
|
||||
common boot service. It is legal to call Start() from other locations,
|
||||
Start this driver on ControllerHandle. The Start() function is designed to be
|
||||
invoked from the EFI boot service ConnectController(). As a result, much of
|
||||
the error checking on the parameters to Start() has been moved into this
|
||||
common boot service. It is legal to call Start() from other locations,
|
||||
but the following calling restrictions must be followed or the system behavior will not be deterministic.
|
||||
1. ControllerHandle must be a valid EFI_HANDLE.
|
||||
2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned
|
||||
EFI_DEVICE_PATH_PROTOCOL.
|
||||
3. Prior to calling Start(), the Supported() function for the driver specified by This must
|
||||
have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
|
||||
have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS.
|
||||
|
||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||
@param[in] ControllerHandle The handle of the controller to start. This handle
|
||||
must support a protocol interface that supplies
|
||||
@param[in] ControllerHandle The handle of the controller to start. This handle
|
||||
must support a protocol interface that supplies
|
||||
an I/O abstraction to the driver.
|
||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path.
|
||||
@param[in] RemainingDevicePath A pointer to the remaining portion of a device path.
|
||||
This parameter is ignored by device drivers, and is optional for bus drivers.
|
||||
|
||||
@retval EFI_SUCCESS The device was started.
|
||||
@@ -103,12 +103,12 @@ IScsiDriverBindingStart (
|
||||
);
|
||||
|
||||
/**
|
||||
Stop this driver on ControllerHandle.
|
||||
|
||||
Stop this driver on ControllerHandle.
|
||||
|
||||
Release the control of this controller and remove the IScsi functions. The Stop()
|
||||
function is designed to be invoked from the EFI boot service DisconnectController().
|
||||
As a result, much of the error checking on the parameters to Stop() has been moved
|
||||
into this common boot service. It is legal to call Stop() from other locations,
|
||||
function is designed to be invoked from the EFI boot service DisconnectController().
|
||||
As a result, much of the error checking on the parameters to Stop() has been moved
|
||||
into this common boot service. It is legal to call Stop() from other locations,
|
||||
but the following calling restrictions must be followed or the system behavior will not be deterministic.
|
||||
1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this
|
||||
same driver's Start() function.
|
||||
@@ -116,13 +116,13 @@ IScsiDriverBindingStart (
|
||||
EFI_HANDLE. In addition, all of these handles must have been created in this driver's
|
||||
Start() function, and the Start() function must have called OpenProtocol() on
|
||||
ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.
|
||||
|
||||
|
||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
||||
support a bus specific I/O protocol for the driver
|
||||
@param[in] ControllerHandle A handle to the device being stopped. The handle must
|
||||
support a bus specific I/O protocol for the driver
|
||||
to use to stop the device.
|
||||
@param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.Not used.
|
||||
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
||||
@param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL
|
||||
if NumberOfChildren is 0.Not used.
|
||||
|
||||
@retval EFI_SUCCESS The device was stopped.
|
||||
|
@@ -6,7 +6,7 @@
|
||||
# data over TCP/IP. It installs EFI HII Configuration Access Protocol to provide
|
||||
# one way to configurate the iSCSI setting.
|
||||
#
|
||||
# Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -122,4 +122,4 @@
|
||||
gIScsiCHAPAuthInfoGuid
|
||||
|
||||
[UserExtensions.TianoCore."ExtraFiles"]
|
||||
IScsi4DxeExtra.uni
|
||||
IScsi4DxeExtra.uni
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
The IScsi's EFI_EXT_SCSI_PASS_THRU_PROTOCOL driver.
|
||||
|
||||
Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -15,9 +15,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#include "IScsiImpl.h"
|
||||
|
||||
/**
|
||||
Sends a SCSI Request Packet to a SCSI device that is attached to the SCSI channel. This function
|
||||
Sends a SCSI Request Packet to a SCSI device that is attached to the SCSI channel. This function
|
||||
supports both blocking I/O and nonblocking I/O. The blocking I/O functionality is required, and the
|
||||
nonblocking I/O functionality is optional.
|
||||
nonblocking I/O functionality is optional.
|
||||
|
||||
@param[in] This A pointer to the EFI_EXT_SCSI_PASS_THRU_PROTOCOL instance.
|
||||
@param[in] Target The Target is an array of size TARGET_MAX_BYTES and it represents
|
||||
@@ -42,18 +42,18 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
@retval EFI_BAD_BUFFER_SIZE The SCSI Request Packet was not executed. The number of bytes that
|
||||
could be transferred is returned in InTransferLength. For write
|
||||
and bi-directional commands, OutTransferLength bytes were
|
||||
transferred by OutDataBuffer. Currently not implemeted.
|
||||
transferred by OutDataBuffer. Currently not implemeted.
|
||||
@retval EFI_NOT_READY The SCSI Request Packet could not be sent because there are too many
|
||||
SCSI Request Packets already queued. The caller may retry again later.
|
||||
SCSI Request Packets already queued. The caller may retry again later.
|
||||
@retval EFI_DEVICE_ERROR A device error occurred while attempting to send the SCSI Request
|
||||
Packet.
|
||||
Packet.
|
||||
@retval EFI_INVALID_PARAMETER Target, Lun, or the contents of ScsiRequestPacket are invalid.
|
||||
@retval EFI_UNSUPPORTED The command described by the SCSI Request Packet is not supported
|
||||
by the host adapter. This includes the case of Bi-directional SCSI
|
||||
commands not supported by the implementation. The SCSI Request
|
||||
Packet was not sent, so no additional status information is available.
|
||||
Currently not implemeted.
|
||||
@retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI Request Packet to execute.
|
||||
@retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI Request Packet to execute.
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -67,7 +67,7 @@ IScsiExtScsiPassThruFunction (
|
||||
{
|
||||
ISCSI_DRIVER_DATA *Private;
|
||||
ISCSI_SESSION_CONFIG_NVDATA *ConfigNvData;
|
||||
EFI_STATUS Status;
|
||||
EFI_STATUS Status;
|
||||
|
||||
Private = ISCSI_DRIVER_DATA_FROM_EXT_SCSI_PASS_THRU (This);
|
||||
ConfigNvData = &Private->Session.ConfigData.NvData;
|
||||
@@ -96,11 +96,11 @@ IScsiExtScsiPassThruFunction (
|
||||
}
|
||||
|
||||
/**
|
||||
Used to retrieve the list of legal Target IDs and LUNs for SCSI devices on a SCSI channel. These
|
||||
Used to retrieve the list of legal Target IDs and LUNs for SCSI devices on a SCSI channel. These
|
||||
can either be the list SCSI devices that are actually present on the SCSI channel, or the list of legal
|
||||
Target Ids and LUNs for the SCSI channel. Regardless, the caller of this function must probe the
|
||||
Target ID and LUN returned to see if a SCSI device is actually present at that location on the SCSI
|
||||
channel.
|
||||
Target Ids and LUNs for the SCSI channel. Regardless, the caller of this function must probe the
|
||||
Target ID and LUN returned to see if a SCSI device is actually present at that location on the SCSI
|
||||
channel.
|
||||
|
||||
@param[in] This A pointer to the EFI_EXT_SCSI_PASS_THRU_PROTOCOL instance.
|
||||
@param[in, out] Target On input, a pointer to the Target ID (an array of size
|
||||
@@ -310,7 +310,7 @@ IScsiExtScsiPassThruGetTargetLun (
|
||||
/**
|
||||
Resets a SCSI channel. This operation resets all the SCSI devices connected to the SCSI channel.
|
||||
Currently not implemented.
|
||||
|
||||
|
||||
@param[in] This A pointer to the EFI_EXT_SCSI_PASS_THRU_PROTOCOL instance.
|
||||
|
||||
@retval EFI_SUCCESS The SCSI channel was reset.
|
||||
@@ -358,10 +358,10 @@ IScsiExtScsiPassThruResetTargetLun (
|
||||
}
|
||||
|
||||
/**
|
||||
Used to retrieve the list of legal Target IDs for SCSI devices on a SCSI channel. These can either
|
||||
Used to retrieve the list of legal Target IDs for SCSI devices on a SCSI channel. These can either
|
||||
be the list SCSI devices that are actually present on the SCSI channel, or the list of legal Target IDs
|
||||
for the SCSI channel. Regardless, the caller of this function must probe the Target ID returned to
|
||||
see if a SCSI device is actually present at that location on the SCSI channel.
|
||||
for the SCSI channel. Regardless, the caller of this function must probe the Target ID returned to
|
||||
see if a SCSI device is actually present at that location on the SCSI channel.
|
||||
|
||||
@param[in] This A pointer to the EFI_EXT_SCSI_PASS_THRU_PROTOCOL instance.
|
||||
@param[in, out] Target (TARGET_MAX_BYTES) of a SCSI device present on the SCSI channel.
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Implementation for iSCSI Boot Firmware Table publication.
|
||||
|
||||
Copyright (c) 2004 - 2013, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -19,7 +19,7 @@ UINTN mTableKey;
|
||||
|
||||
/**
|
||||
Initialize the header of the iSCSI Boot Firmware Table.
|
||||
|
||||
|
||||
@param[out] Header The header of the iSCSI Boot Firmware Table.
|
||||
@param[in] OemId The OEM ID.
|
||||
@param[in] OemTableId The OEM table ID for the iBFT.
|
||||
@@ -37,14 +37,14 @@ IScsiInitIbfTableHeader (
|
||||
Header->Length = IBFT_HEAP_OFFSET;
|
||||
Header->Revision = EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_REVISION;
|
||||
Header->Checksum = 0;
|
||||
|
||||
|
||||
CopyMem (Header->OemId, OemId, sizeof (Header->OemId));
|
||||
CopyMem (&Header->OemTableId, OemTableId, sizeof (UINT64));
|
||||
}
|
||||
|
||||
/**
|
||||
Initialize the control section of the iSCSI Boot Firmware Table.
|
||||
|
||||
|
||||
@param[in] Table The ACPI table.
|
||||
@param[in] HandleCount The number of the handles associated with iSCSI sessions, it's
|
||||
equal to the number of iSCSI sessions.
|
||||
|
@@ -19,8 +19,8 @@ GLOBAL_REMOVE_IF_UNREFERENCED CONST CHAR8 IScsiHexString[] = "0123456789ABCDEFa
|
||||
/**
|
||||
Removes (trims) specified leading and trailing characters from a string.
|
||||
|
||||
@param[in, out] Str Pointer to the null-terminated string to be trimmed. On return,
|
||||
Str will hold the trimmed string.
|
||||
@param[in, out] Str Pointer to the null-terminated string to be trimmed. On return,
|
||||
Str will hold the trimmed string.
|
||||
|
||||
@param[in] CharC Character will be trimmed from str.
|
||||
**/
|
||||
@@ -32,18 +32,18 @@ StrTrim (
|
||||
{
|
||||
CHAR16 *Pointer1;
|
||||
CHAR16 *Pointer2;
|
||||
|
||||
|
||||
if (*Str == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Trim off the leading and trailing characters c
|
||||
//
|
||||
for (Pointer1 = Str; (*Pointer1 != 0) && (*Pointer1 == CharC); Pointer1++) {
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
Pointer2 = Str;
|
||||
if (Pointer2 == Pointer1) {
|
||||
while (*Pointer1 != 0) {
|
||||
@@ -51,19 +51,19 @@ StrTrim (
|
||||
Pointer1++;
|
||||
}
|
||||
} else {
|
||||
while (*Pointer1 != 0) {
|
||||
*Pointer2 = *Pointer1;
|
||||
while (*Pointer1 != 0) {
|
||||
*Pointer2 = *Pointer1;
|
||||
Pointer1++;
|
||||
Pointer2++;
|
||||
}
|
||||
*Pointer2 = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
for (Pointer1 = Str + StrLen(Str) - 1; Pointer1 >= Str && *Pointer1 == CharC; Pointer1--) {
|
||||
;
|
||||
}
|
||||
if (Pointer1 != Str + StrLen(Str) - 1) {
|
||||
if (Pointer1 != Str + StrLen(Str) - 1) {
|
||||
*(Pointer1 + 1) = 0;
|
||||
}
|
||||
}
|
||||
@@ -109,7 +109,7 @@ IScsiGetSubnetMaskPrefixLength (
|
||||
}
|
||||
|
||||
/**
|
||||
Convert the hexadecimal encoded LUN string into the 64-bit LUN.
|
||||
Convert the hexadecimal encoded LUN string into the 64-bit LUN.
|
||||
|
||||
@param[in] Str The hexadecimal encoded LUN string.
|
||||
@param[out] Lun Storage to return the 64-bit LUN.
|
||||
@@ -127,11 +127,11 @@ IScsiAsciiStrToLun (
|
||||
CHAR8 TemStr[2];
|
||||
UINT8 TemValue;
|
||||
UINT16 Value[4];
|
||||
|
||||
|
||||
ZeroMem (Lun, 8);
|
||||
ZeroMem (TemStr, 2);
|
||||
ZeroMem ((UINT8 *) Value, sizeof (Value));
|
||||
SizeStr = AsciiStrLen (Str);
|
||||
SizeStr = AsciiStrLen (Str);
|
||||
IndexValue = 0;
|
||||
IndexNum = 0;
|
||||
|
||||
@@ -146,7 +146,7 @@ IScsiAsciiStrToLun (
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ((TemValue == 0) && (TemStr[0] == '-')) {
|
||||
//
|
||||
// Next Lun value
|
||||
@@ -163,24 +163,24 @@ IScsiAsciiStrToLun (
|
||||
IndexNum = 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (++IndexNum > 4) {
|
||||
//
|
||||
//
|
||||
// Each Lun Str can't exceed size 4, because it will be as UINT16 value
|
||||
//
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Combine UINT16 value
|
||||
//
|
||||
Value[IndexValue] = (UINT16) ((Value[IndexValue] << 4) + TemValue);
|
||||
}
|
||||
|
||||
|
||||
for (Index = 0; Index <= IndexValue; Index ++) {
|
||||
*((UINT16 *) &Lun[Index * 2]) = HTONS (Value[Index]);
|
||||
}
|
||||
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -392,7 +392,7 @@ IScsiMacAddrToStr (
|
||||
@param[in, out] HexStr Pointer to the string.
|
||||
@param[in, out] HexLength The length of the string.
|
||||
|
||||
@retval EFI_SUCCESS The binary data is converted to the hexadecimal string
|
||||
@retval EFI_SUCCESS The binary data is converted to the hexadecimal string
|
||||
and the length of the string is updated.
|
||||
@retval EFI_BUFFER_TOO_SMALL The string is too small.
|
||||
@retval EFI_INVALID_PARAMETER The IP string is malformatted.
|
||||
@@ -455,7 +455,7 @@ IScsiHexToBin (
|
||||
UINTN Length;
|
||||
UINT8 Digit;
|
||||
CHAR8 TemStr[2];
|
||||
|
||||
|
||||
ZeroMem (TemStr, sizeof (TemStr));
|
||||
|
||||
//
|
||||
@@ -464,7 +464,7 @@ IScsiHexToBin (
|
||||
if ((HexStr[0] == '0') && ((HexStr[1] == 'x') || (HexStr[1] == 'X'))) {
|
||||
HexStr += 2;
|
||||
}
|
||||
|
||||
|
||||
Length = AsciiStrLen (HexStr);
|
||||
|
||||
for (Index = 0; Index < Length; Index ++) {
|
||||
@@ -482,7 +482,7 @@ IScsiHexToBin (
|
||||
BinBuffer [Index/2] = (UINT8) ((BinBuffer [Index/2] << 4) + Digit);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
*BinLength = (UINT32) ((Index + 1)/2);
|
||||
|
||||
return EFI_SUCCESS;
|
||||
@@ -601,7 +601,7 @@ IScsiCleanDriverData (
|
||||
EFI_STATUS Status;
|
||||
|
||||
Status = EFI_SUCCESS;
|
||||
|
||||
|
||||
if (Private->DevicePath != NULL) {
|
||||
Status = gBS->UninstallProtocolInterface (
|
||||
Private->ExtScsiPassThruHandle,
|
||||
@@ -627,7 +627,7 @@ EXIT:
|
||||
if (Private->ExitBootServiceEvent != NULL) {
|
||||
gBS->CloseEvent (Private->ExitBootServiceEvent);
|
||||
}
|
||||
|
||||
|
||||
FreePool (Private);
|
||||
return Status;
|
||||
}
|
||||
@@ -636,10 +636,10 @@ EXIT:
|
||||
Check wheather the Controller is configured to use DHCP protocol.
|
||||
|
||||
@param[in] Controller The handle of the controller.
|
||||
|
||||
|
||||
@retval TRUE The handle of the controller need the Dhcp protocol.
|
||||
@retval FALSE The handle of the controller does not need the Dhcp protocol.
|
||||
|
||||
|
||||
**/
|
||||
BOOLEAN
|
||||
IScsiDhcpIsConfigured (
|
||||
@@ -826,7 +826,7 @@ IScsiGetTcpConnDevicePath (
|
||||
) {
|
||||
|
||||
DPathNode->Ipv4.LocalPort = 0;
|
||||
DPathNode->Ipv4.StaticIpAddress =
|
||||
DPathNode->Ipv4.StaticIpAddress =
|
||||
(BOOLEAN) (!Session->ConfigData.NvData.InitiatorInfoFromDhcp);
|
||||
|
||||
//
|
||||
@@ -835,7 +835,7 @@ IScsiGetTcpConnDevicePath (
|
||||
// do not exist.
|
||||
// In new version of IPv4_DEVICE_PATH, structcure length is 27.
|
||||
//
|
||||
if (DevicePathNodeLength (&DPathNode->Ipv4) == IP4_NODE_LEN_NEW_VERSIONS) {
|
||||
if (DevicePathNodeLength (&DPathNode->Ipv4) == IP4_NODE_LEN_NEW_VERSIONS) {
|
||||
|
||||
IP4_COPY_ADDRESS (
|
||||
&DPathNode->Ipv4.GatewayIpAddress,
|
||||
@@ -873,7 +873,7 @@ IScsiOnExitBootService (
|
||||
ISCSI_DRIVER_DATA *Private;
|
||||
|
||||
Private = (ISCSI_DRIVER_DATA *) Context;
|
||||
|
||||
|
||||
gBS->CloseEvent (Private->ExitBootServiceEvent);
|
||||
Private->ExitBootServiceEvent = NULL;
|
||||
|
||||
@@ -887,7 +887,7 @@ IScsiOnExitBootService (
|
||||
currently managing the controller specified by ControllerHandle. This test
|
||||
is performed by evaluating if the the protocol specified by ProtocolGuid is
|
||||
present on ControllerHandle and is was opened by DriverBindingHandle and Nic
|
||||
Device handle with an attribute of EFI_OPEN_PROTOCOL_BY_DRIVER.
|
||||
Device handle with an attribute of EFI_OPEN_PROTOCOL_BY_DRIVER.
|
||||
If ProtocolGuid is NULL, then ASSERT().
|
||||
|
||||
@param ControllerHandle A handle for a controller to test.
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Miscellaneous definitions for iSCSI driver.
|
||||
|
||||
Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -65,7 +65,7 @@ IScsiGetSubnetMaskPrefixLength (
|
||||
);
|
||||
|
||||
/**
|
||||
Convert the hexadecimal encoded LUN string into the 64-bit LUN.
|
||||
Convert the hexadecimal encoded LUN string into the 64-bit LUN.
|
||||
|
||||
@param[in] Str The hexadecimal encoded LUN string.
|
||||
@param[out] Lun Storage to return the 64-bit LUN.
|
||||
@@ -158,7 +158,7 @@ IScsiAsciiStrToIp (
|
||||
@param[in, out] HexStr Pointer to the string.
|
||||
@param[in, out] HexLength The length of the string.
|
||||
|
||||
@retval EFI_SUCCESS The binary data is converted to the hexadecimal string
|
||||
@retval EFI_SUCCESS The binary data is converted to the hexadecimal string
|
||||
and the length of the string is updated.
|
||||
@retval EFI_BUFFER_TOO_SMALL The string is too small.
|
||||
@retval EFI_INVALID_PARAMETER The IP string is malformatted.
|
||||
@@ -233,10 +233,10 @@ IScsiCleanDriverData (
|
||||
Check wheather the Controller is configured to use DHCP protocol.
|
||||
|
||||
@param[in] Controller The handle of the controller.
|
||||
|
||||
|
||||
@retval TRUE The handle of the controller need the Dhcp protocol.
|
||||
@retval FALSE The handle of the controller does not need the Dhcp protocol.
|
||||
|
||||
|
||||
**/
|
||||
BOOLEAN
|
||||
IScsiDhcpIsConfigured (
|
||||
@@ -290,7 +290,7 @@ IScsiOnExitBootService (
|
||||
currently managing the controller specified by ControllerHandle. This test
|
||||
is performed by evaluating if the the protocol specified by ProtocolGuid is
|
||||
present on ControllerHandle and is was opened by DriverBindingHandle and Nic
|
||||
Device handle with an attribute of EFI_OPEN_PROTOCOL_BY_DRIVER.
|
||||
Device handle with an attribute of EFI_OPEN_PROTOCOL_BY_DRIVER.
|
||||
If ProtocolGuid is NULL, then ASSERT().
|
||||
|
||||
@param ControllerHandle A handle for a controller to test.
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
The implementation of iSCSI protocol based on RFC3720.
|
||||
|
||||
Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -17,7 +17,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
UINT32 mDataSegPad = 0;
|
||||
|
||||
/**
|
||||
Attach the iSCSI connection to the iSCSI session.
|
||||
Attach the iSCSI connection to the iSCSI session.
|
||||
|
||||
@param[in, out] Session The iSCSI session.
|
||||
@param[in, out] Conn The iSCSI connection.
|
||||
@@ -34,7 +34,7 @@ IScsiAttatchConnection (
|
||||
}
|
||||
|
||||
/**
|
||||
Detach the iSCSI connection from the session it belongs to.
|
||||
Detach the iSCSI connection from the session it belongs to.
|
||||
|
||||
@param[in, out] Conn The iSCSI connection.
|
||||
**/
|
||||
@@ -49,7 +49,7 @@ IScsiDetatchConnection (
|
||||
}
|
||||
|
||||
/**
|
||||
Check the sequence number according to RFC3720.
|
||||
Check the sequence number according to RFC3720.
|
||||
|
||||
@param[in, out] ExpSN The currently expected sequence number.
|
||||
@param[in] NewSN The sequence number to check.
|
||||
@@ -116,7 +116,7 @@ IScsiUpdateCmdSN (
|
||||
|
||||
@retval EFI_SUCCESS The iSCSI connection is logged into the iSCSI target.
|
||||
@retval EFI_TIMEOUT Timeout happened during the login procedure.
|
||||
@retval Others Other errors as indicated.
|
||||
@retval Others Other errors as indicated.
|
||||
**/
|
||||
EFI_STATUS
|
||||
IScsiConnLogin (
|
||||
@@ -381,7 +381,7 @@ IScsiSendLoginReq (
|
||||
Receive and process the iSCSI login response.
|
||||
|
||||
@param[in] Conn The connection in the iSCSI login phase.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The iSCSI login response PDU is received and processed.
|
||||
@retval Others Other errors as indicated.
|
||||
**/
|
||||
@@ -807,7 +807,7 @@ IScsiProcessLoginRsp (
|
||||
@param[in] Data The data segment which should contain the
|
||||
TargetAddress key-value list.
|
||||
@param[in] Len Length of the data.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The target address is updated.
|
||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
|
||||
@retval EFI_NOT_FOUND The TargetAddress key is not found.
|
||||
@@ -1866,7 +1866,7 @@ IScsiNewScsiCmdPdu (
|
||||
if (ScsiCmd == NULL) {
|
||||
NetbufFree (PduHeader);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
Header = (ISCSI_ADDITIONAL_HEADER *) (ScsiCmd + 1);
|
||||
|
||||
ZeroMem (ScsiCmd, Length);
|
||||
@@ -2522,8 +2522,8 @@ IScsiOnNopInRcvd (
|
||||
@param[in] Lun The LUN.
|
||||
@param[in, out] Packet The request packet containing IO request, SCSI command
|
||||
buffer and buffers to read/write.
|
||||
|
||||
@retval EFI_SUCCES The SCSI command is executed and the result is updated to
|
||||
|
||||
@retval EFI_SUCCES The SCSI command is executed and the result is updated to
|
||||
the Packet.
|
||||
@retval EFI_DEVICE_ERROR Session state was not as required.
|
||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
|
||||
@@ -2640,7 +2640,7 @@ IScsiExecuteScsiCommand (
|
||||
if (EFI_ERROR (Status)) {
|
||||
goto ON_EXIT;
|
||||
}
|
||||
TimeoutEvent = Conn->TimeoutEvent;
|
||||
TimeoutEvent = Conn->TimeoutEvent;
|
||||
}
|
||||
//
|
||||
// try to receive PDU from target.
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
The header file of iSCSI Protocol that defines many specific data structures.
|
||||
|
||||
Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -624,7 +624,7 @@ typedef struct _ISCSI_KEY_VALUE_PAIR {
|
||||
} ISCSI_KEY_VALUE_PAIR;
|
||||
|
||||
/**
|
||||
Attach the iSCSI connection to the iSCSI session.
|
||||
Attach the iSCSI connection to the iSCSI session.
|
||||
|
||||
@param[in, out] Session The iSCSI session.
|
||||
@param[in, out] Conn The iSCSI connection.
|
||||
@@ -636,7 +636,7 @@ IScsiAttatchConnection (
|
||||
);
|
||||
|
||||
/**
|
||||
Detach the iSCSI connection from the session it belongs to.
|
||||
Detach the iSCSI connection from the session it belongs to.
|
||||
|
||||
@param[in, out] Conn The iSCSI connection.
|
||||
**/
|
||||
@@ -652,7 +652,7 @@ IScsiDetatchConnection (
|
||||
|
||||
@retval EFI_SUCCESS The iSCSI connection is logged into the iSCSI target.
|
||||
@retval EFI_TIMEOUT Timeout happened during the login procedure.
|
||||
@retval Others Other errors as indicated.
|
||||
@retval Others Other errors as indicated.
|
||||
**/
|
||||
EFI_STATUS
|
||||
IScsiConnLogin (
|
||||
@@ -719,7 +719,7 @@ IScsiSendLoginReq (
|
||||
Receive and process the iSCSI login response.
|
||||
|
||||
@param[in] Conn The connection in the iSCSI login phase.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The iSCSI login response PDU is received and processed.
|
||||
@retval Others Other errors as indicated.
|
||||
**/
|
||||
@@ -788,7 +788,7 @@ IScsiProcessLoginRsp (
|
||||
@param[in] Data The data segment which should contain the
|
||||
TargetAddress key-value list.
|
||||
@param[in] Len Length of the data.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The target address is updated.
|
||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
|
||||
@retval EFI_NOT_FOUND The TargetAddress key is not found.
|
||||
@@ -948,8 +948,8 @@ IScsiNormalizeName (
|
||||
@param[in] Lun The LUN.
|
||||
@param[in, out] Packet The request packet containing IO request, SCSI command
|
||||
buffer and buffers to read/write.
|
||||
|
||||
@retval EFI_SUCCES The SCSI command is executed and the result is updated to
|
||||
|
||||
@retval EFI_SUCCES The SCSI command is executed and the result is updated to
|
||||
the Packet.
|
||||
@retval EFI_DEVICE_ERROR Session state was not as required.
|
||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
|
||||
@@ -988,7 +988,7 @@ IScsiSessionInit (
|
||||
IN OUT ISCSI_SESSION *Session,
|
||||
IN BOOLEAN Recovery
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
Abort the iSCSI session, that is, reset all the connection and free the
|
||||
resources.
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
The wrap of TCP/IP Socket interface.
|
||||
|
||||
Copyright (c) 2004 - 2009, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -15,7 +15,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#include "IScsiImpl.h"
|
||||
|
||||
/**
|
||||
The common notify function associated with various Tcp4Io events.
|
||||
The common notify function associated with various Tcp4Io events.
|
||||
|
||||
@param[in] Event The event signaled.
|
||||
@param[in] Context The context.
|
||||
@@ -31,13 +31,13 @@ Tcp4IoCommonNotify (
|
||||
}
|
||||
|
||||
/**
|
||||
Create a TCP socket with the specified configuration data.
|
||||
Create a TCP socket with the specified configuration data.
|
||||
|
||||
@param[in] Image The handle of the driver image.
|
||||
@param[in] Controller The handle of the controller.
|
||||
@param[in] ConfigData The Tcp4 configuration data.
|
||||
@param[in] Tcp4Io The Tcp4Io.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The TCP socket is created and configured.
|
||||
@retval Others Failed to create the TCP socket or configure it.
|
||||
**/
|
||||
@@ -230,7 +230,7 @@ ON_ERROR:
|
||||
}
|
||||
|
||||
/**
|
||||
Destroy the socket.
|
||||
Destroy the socket.
|
||||
|
||||
@param[in] Tcp4Io The Tcp4Io which wraps the socket to be destroyeds.
|
||||
**/
|
||||
@@ -269,7 +269,7 @@ Tcp4IoDestroySocket (
|
||||
|
||||
@param[in, out] Tcp4Io The Tcp4Io wrapping the TCP socket.
|
||||
@param[in] Timeout The time to wait for connection done.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Connect to the other endpoint of the TCP socket successfully.
|
||||
@retval EFI_TIMEOUT Failed to connect to the other endpoint of the TCP socket in the specified time period.
|
||||
@retval Others Other errors as indicated.
|
||||
@@ -335,7 +335,7 @@ Tcp4IoReset (
|
||||
|
||||
@param[in] Tcp4Io The Tcp4Io wrapping the TCP socket.
|
||||
@param[in] Packet The packet to transmit.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The packet is trasmitted.
|
||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
|
||||
@retval Others Other errors as indicated.
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
iSCSI Tcp4 IO related definitions.
|
||||
|
||||
Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -46,13 +46,13 @@ typedef struct _TCP4_IO {
|
||||
} TCP4_IO;
|
||||
|
||||
/**
|
||||
Create a TCP socket with the specified configuration data.
|
||||
Create a TCP socket with the specified configuration data.
|
||||
|
||||
@param[in] Image The handle of the driver image.
|
||||
@param[in] Controller The handle of the controller.
|
||||
@param[in] ConfigData The Tcp4 configuration data.
|
||||
@param[in] Tcp4Io The Tcp4Io.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The TCP socket is created and configured.
|
||||
@retval Others Failed to create the TCP socket or configure it.
|
||||
**/
|
||||
@@ -65,7 +65,7 @@ Tcp4IoCreateSocket (
|
||||
);
|
||||
|
||||
/**
|
||||
Destroy the socket.
|
||||
Destroy the socket.
|
||||
|
||||
@param[in] Tcp4Io The Tcp4Io which wraps the socket to be destroyeds.
|
||||
**/
|
||||
@@ -79,7 +79,7 @@ Tcp4IoDestroySocket (
|
||||
|
||||
@param[in, out] Tcp4Io The Tcp4Io wrapping the TCP socket.
|
||||
@param[in] Timeout The time to wait for connection done.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Connect to the other endpoint of the TCP socket successfully.
|
||||
@retval EFI_TIMEOUT Failed to connect to the other endpoint of the TCP socket in the specified time period.
|
||||
@retval Others Other errors as indicated.
|
||||
@@ -105,7 +105,7 @@ Tcp4IoReset (
|
||||
|
||||
@param[in] Tcp4Io The Tcp4Io wrapping the TCP socket.
|
||||
@param[in] Packet The packet to transmit.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The packet is trasmitted.
|
||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
|
||||
@retval Others Other errors as indicated.
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Implementation of MD5 algorithm.
|
||||
|
||||
Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -57,14 +57,14 @@ CONST UINT8 Md5HashPadding[] =
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
|
||||
//
|
||||
@@ -79,18 +79,18 @@ CONST UINT8 Md5HashPadding[] =
|
||||
|
||||
/**
|
||||
Tf1 is one basic MD5 transform function.
|
||||
|
||||
|
||||
@param[in] A A 32-bit quantity.
|
||||
@param[in] B A 32-bit quantity.
|
||||
@param[in] B A 32-bit quantity.
|
||||
@param[in] C A 32-bit quantity.
|
||||
|
||||
@return Output was produced as a 32-bit quantity based on the
|
||||
three 32-bit input quantity.
|
||||
three 32-bit input quantity.
|
||||
**/
|
||||
UINT32
|
||||
UINT32
|
||||
Tf1 (
|
||||
IN UINT32 A,
|
||||
IN UINT32 B,
|
||||
IN UINT32 A,
|
||||
IN UINT32 B,
|
||||
IN UINT32 C
|
||||
)
|
||||
{
|
||||
@@ -99,18 +99,18 @@ Tf1 (
|
||||
|
||||
/**
|
||||
Tf2 is one basic MD5 transform function.
|
||||
|
||||
|
||||
@param[in] A A 32-bit quantity.
|
||||
@param[in] B A 32-bit quantity.
|
||||
@param[in] B A 32-bit quantity.
|
||||
@param[in] C A 32-bit quantity.
|
||||
|
||||
@return Output was produced as a 32-bit quantity based on the
|
||||
three 32-bit input quantity.
|
||||
three 32-bit input quantity.
|
||||
**/
|
||||
UINT32
|
||||
UINT32
|
||||
Tf2 (
|
||||
IN UINT32 A,
|
||||
IN UINT32 B,
|
||||
IN UINT32 A,
|
||||
IN UINT32 B,
|
||||
IN UINT32 C
|
||||
)
|
||||
{
|
||||
@@ -119,18 +119,18 @@ Tf2 (
|
||||
|
||||
/**
|
||||
Tf3 is one basic MD5 transform function.
|
||||
|
||||
|
||||
@param[in] A A 32-bit quantity.
|
||||
@param[in] B A 32-bit quantity.
|
||||
@param[in] B A 32-bit quantity.
|
||||
@param[in] C A 32-bit quantity.
|
||||
|
||||
@return Output was produced as a 32-bit quantity based on the
|
||||
three 32-bit input quantity.
|
||||
three 32-bit input quantity.
|
||||
**/
|
||||
UINT32
|
||||
UINT32
|
||||
Tf3 (
|
||||
IN UINT32 A,
|
||||
IN UINT32 B,
|
||||
IN UINT32 A,
|
||||
IN UINT32 B,
|
||||
IN UINT32 C
|
||||
)
|
||||
{
|
||||
@@ -139,18 +139,18 @@ Tf3 (
|
||||
|
||||
/**
|
||||
Tf4 is one basic MD5 transform function.
|
||||
|
||||
|
||||
@param[in] A A 32-bit quantity.
|
||||
@param[in] B A 32-bit quantity.
|
||||
@param[in] B A 32-bit quantity.
|
||||
@param[in] C A 32-bit quantity.
|
||||
|
||||
@return Output was produced as a 32-bit quantity based on the
|
||||
three 32-bit input quantity.
|
||||
three 32-bit input quantity.
|
||||
**/
|
||||
UINT32
|
||||
UINT32
|
||||
Tf4 (
|
||||
IN UINT32 A,
|
||||
IN UINT32 B,
|
||||
IN UINT32 A,
|
||||
IN UINT32 B,
|
||||
IN UINT32 C
|
||||
)
|
||||
{
|
||||
@@ -220,7 +220,7 @@ MD5Transform (
|
||||
Copy data segment into the M field of MD5_CTX structure for later transform.
|
||||
If the length of data segment is larger than 64 bytes, then does the transform
|
||||
immediately and the generated Md5 code is stored in the States field of MD5_CTX
|
||||
data struct for later accumulation.
|
||||
data struct for later accumulation.
|
||||
All of Md5 code generated for the sequential 64-bytes data segaments are be
|
||||
accumulated in MD5Final() function.
|
||||
|
||||
@@ -241,7 +241,7 @@ MD5UpdateBlock (
|
||||
for (Limit = 64 - Md5Ctx->Count; DataLen >= 64 - Md5Ctx->Count; Limit = 64) {
|
||||
CopyMem (Md5Ctx->M + Md5Ctx->Count, (VOID *)Data, Limit);
|
||||
MD5Transform (Md5Ctx);
|
||||
|
||||
|
||||
Md5Ctx->Count = 0;
|
||||
Data += Limit;
|
||||
DataLen -= Limit;
|
||||
@@ -271,7 +271,7 @@ MD5Init (
|
||||
Md5Ctx->States[0] = 0x67452301;
|
||||
Md5Ctx->States[1] = 0xefcdab89;
|
||||
Md5Ctx->States[2] = 0x98badcfe;
|
||||
Md5Ctx->States[3] = 0x10325476;
|
||||
Md5Ctx->States[3] = 0x10325476;
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
@@ -328,7 +328,7 @@ MD5Final (
|
||||
//
|
||||
CopyMem (HashVal, (UINT8 *) Md5Ctx->States, MD5_HASHSIZE);
|
||||
ZeroMem ((UINT8 *)Md5Ctx, sizeof (*Md5Ctx));
|
||||
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Header file for Md5.
|
||||
|
||||
Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -19,7 +19,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#include <Library/BaseLib.h>
|
||||
#include <Library/BaseMemoryLib.h>
|
||||
#include <Library/NetLib.h>
|
||||
|
||||
|
||||
#define MD5_HASHSIZE 16
|
||||
|
||||
typedef struct _MD5_CTX {
|
||||
@@ -77,4 +77,4 @@ MD5Final (
|
||||
OUT UINT8 *HashVal
|
||||
);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/** @file
|
||||
|
||||
Copyright (c) 2005 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at<BR>
|
||||
@@ -237,10 +237,10 @@ Ip4ComponentNameGetDriverName (
|
||||
|
||||
@param Ip4[in] A pointer to the EFI_IP4_PROTOCOL.
|
||||
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Update the ControllerNameTable of this instance successfully.
|
||||
@retval EFI_INVALID_PARAMETER The input parameter is invalid.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
UpdateName (
|
||||
@@ -290,7 +290,7 @@ UpdateName (
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
return AddUnicodeString2 (
|
||||
"en",
|
||||
gIp4ComponentName2.SupportedLanguages,
|
||||
@@ -378,9 +378,9 @@ Ip4ComponentNameGetControllerName (
|
||||
OUT CHAR16 **ControllerName
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_STATUS Status;
|
||||
EFI_IP4_PROTOCOL *Ip4;
|
||||
|
||||
|
||||
//
|
||||
// Only provide names for child handles.
|
||||
//
|
||||
@@ -388,9 +388,9 @@ Ip4ComponentNameGetControllerName (
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
//
|
||||
// Make sure this driver produced ChildHandle
|
||||
//
|
||||
//
|
||||
// Make sure this driver produced ChildHandle
|
||||
//
|
||||
Status = EfiTestChildHandle (
|
||||
ControllerHandle,
|
||||
ChildHandle,
|
||||
@@ -400,9 +400,9 @@ Ip4ComponentNameGetControllerName (
|
||||
return Status;
|
||||
}
|
||||
|
||||
//
|
||||
// Retrieve an instance of a produced protocol from ChildHandle
|
||||
//
|
||||
//
|
||||
// Retrieve an instance of a produced protocol from ChildHandle
|
||||
//
|
||||
Status = gBS->OpenProtocol (
|
||||
ChildHandle,
|
||||
&gEfiIp4ProtocolGuid,
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Common definition for IP4.
|
||||
|
||||
Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Vfr file for IP4Dxe.
|
||||
|
||||
Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -87,13 +87,13 @@ formset
|
||||
endif;
|
||||
|
||||
subtitle text = STRING_TOKEN(STR_NULL);
|
||||
|
||||
|
||||
text
|
||||
help = STRING_TOKEN(STR_SAVE_CHANGES),
|
||||
text = STRING_TOKEN(STR_SAVE_CHANGES),
|
||||
flags = INTERACTIVE,
|
||||
key = KEY_SAVE_CHANGES;
|
||||
|
||||
|
||||
endform;
|
||||
|
||||
endformset;
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
The implementation of EFI IPv4 Configuration II Protocol.
|
||||
|
||||
Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
(C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP<BR>
|
||||
|
||||
This program and the accompanying materials
|
||||
@@ -82,7 +82,7 @@ Ip4Config2DestroyDhcp4 (
|
||||
|
||||
Instance->Dhcp4Handle = NULL;
|
||||
|
||||
return Status;
|
||||
return Status;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -112,7 +112,7 @@ Ip4Config2OnPolicyChanged (
|
||||
if (IpSb->DefaultInterface != NULL) {
|
||||
if (IpSb->DefaultRouteTable != NULL) {
|
||||
Ip4FreeRouteTable (IpSb->DefaultRouteTable);
|
||||
IpSb->DefaultRouteTable = NULL;
|
||||
IpSb->DefaultRouteTable = NULL;
|
||||
}
|
||||
|
||||
Ip4CancelReceive (IpSb->DefaultInterface);
|
||||
@@ -125,7 +125,7 @@ Ip4Config2OnPolicyChanged (
|
||||
|
||||
//
|
||||
// Create new default interface and route table.
|
||||
//
|
||||
//
|
||||
IpIf = Ip4CreateInterface (IpSb->Mnp, IpSb->Controller, IpSb->Image);
|
||||
if (IpIf == NULL) {
|
||||
return ;
|
||||
@@ -136,7 +136,7 @@ Ip4Config2OnPolicyChanged (
|
||||
Ip4FreeInterface (IpIf, NULL);
|
||||
return ;
|
||||
}
|
||||
|
||||
|
||||
IpSb->DefaultInterface = IpIf;
|
||||
InsertHeadList (&IpSb->Interfaces, &IpIf->Link);
|
||||
IpSb->DefaultRouteTable = RouteTable;
|
||||
@@ -255,7 +255,7 @@ Ip4Config2ReadConfigData (
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
|
||||
|
||||
for (Index = 0; Index < Variable->DataRecordCount; Index++) {
|
||||
|
||||
CopyMem (&DataRecord, &Variable->DataRecord[Index], sizeof (DataRecord));
|
||||
@@ -375,8 +375,8 @@ Ip4Config2WriteConfigData (
|
||||
|
||||
|
||||
/**
|
||||
Build a EFI_IP4_ROUTE_TABLE to be returned to the caller of GetModeData.
|
||||
The EFI_IP4_ROUTE_TABLE is clumsy to use in the internal operation of the
|
||||
Build a EFI_IP4_ROUTE_TABLE to be returned to the caller of GetModeData.
|
||||
The EFI_IP4_ROUTE_TABLE is clumsy to use in the internal operation of the
|
||||
IP4 driver.
|
||||
|
||||
@param[in] IpSb The IP4 service binding instance.
|
||||
@@ -392,7 +392,7 @@ Ip4Config2BuildDefaultRouteTable (
|
||||
OUT EFI_IP4_ROUTE_TABLE *Table
|
||||
)
|
||||
{
|
||||
LIST_ENTRY *Entry;
|
||||
LIST_ENTRY *Entry;
|
||||
IP4_ROUTE_ENTRY *RtEntry;
|
||||
UINT32 Count;
|
||||
INT32 Index;
|
||||
@@ -468,8 +468,8 @@ Ip4Config2OnDhcp4SbInstalled (
|
||||
@param[in] StationAddress Ip address to be set.
|
||||
@param[in] SubnetMask Subnet to be set.
|
||||
|
||||
@retval EFI_SUCCESS Set default address successful.
|
||||
@retval Others Some errors occur in setting.
|
||||
@retval EFI_SUCCESS Set default address successful.
|
||||
@retval Others Some errors occur in setting.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -501,7 +501,7 @@ Ip4Config2SetDefaultAddr (
|
||||
//
|
||||
if (IpSb->DefaultRouteTable != NULL) {
|
||||
Ip4FreeRouteTable (IpSb->DefaultRouteTable);
|
||||
IpSb->DefaultRouteTable = NULL;
|
||||
IpSb->DefaultRouteTable = NULL;
|
||||
}
|
||||
|
||||
Ip4CancelReceive (IpSb->DefaultInterface);
|
||||
@@ -509,7 +509,7 @@ Ip4Config2SetDefaultAddr (
|
||||
IpSb->DefaultInterface = NULL;
|
||||
//
|
||||
// Create new default interface and route table.
|
||||
//
|
||||
//
|
||||
IpIf = Ip4CreateInterface (IpSb->Mnp, IpSb->Controller, IpSb->Image);
|
||||
if (IpIf == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
@@ -520,7 +520,7 @@ Ip4Config2SetDefaultAddr (
|
||||
Ip4FreeInterface (IpIf, NULL);
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
|
||||
IpSb->DefaultInterface = IpIf;
|
||||
InsertHeadList (&IpSb->Interfaces, &IpIf->Link);
|
||||
IpSb->DefaultRouteTable = RouteTable;
|
||||
@@ -537,8 +537,8 @@ Ip4Config2SetDefaultAddr (
|
||||
}
|
||||
|
||||
if (IpIf->Arp != NULL) {
|
||||
//
|
||||
// A non-NULL IpIf->Arp here means a new ARP child is created when setting default address,
|
||||
//
|
||||
// A non-NULL IpIf->Arp here means a new ARP child is created when setting default address,
|
||||
// but some IP children may have referenced the default interface before it is configured,
|
||||
// these IP instances also consume this ARP protocol so they need to open it BY_CHILD_CONTROLLER.
|
||||
//
|
||||
@@ -580,20 +580,20 @@ Ip4Config2SetDefaultAddr (
|
||||
|
||||
IpSb->State = IP4_SERVICE_CONFIGED;
|
||||
IpSb->Reconfig = FALSE;
|
||||
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
Set the station address, subnetmask and gateway address for the default interface.
|
||||
|
||||
@param[in] Instance The pointer to the IP4 config2 instance data.
|
||||
@param[in] Instance The pointer to the IP4 config2 instance data.
|
||||
@param[in] StationAddress Ip address to be set.
|
||||
@param[in] SubnetMask Subnet to be set.
|
||||
@param[in] GatewayAddress Gateway to be set.
|
||||
|
||||
@retval EFI_SUCCESS Set default If successful.
|
||||
@retval Others Errors occur as indicated.
|
||||
@retval EFI_SUCCESS Set default If successful.
|
||||
@retval Others Errors occur as indicated.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -630,7 +630,7 @@ Ip4Config2SetDefaultIf (
|
||||
IP4_ALLZERO_ADDRESS,
|
||||
IP4_ALLZERO_ADDRESS,
|
||||
GatewayAddress
|
||||
);
|
||||
);
|
||||
}
|
||||
|
||||
return EFI_SUCCESS;
|
||||
@@ -687,7 +687,7 @@ Ip4Config2CleanDhcp4 (
|
||||
/**
|
||||
This worker function sets the DNS server list for the EFI IPv4 network
|
||||
stack running on the communication device that this EFI_IP4_CONFIG2_PROTOCOL
|
||||
manages. The DNS server addresses must be unicast IPv4 addresses.
|
||||
manages. The DNS server addresses must be unicast IPv4 addresses.
|
||||
|
||||
@param[in] Instance The pointer to the IP4 config2 instance data.
|
||||
@param[in] DataSize The size of the buffer pointed to by Data in bytes.
|
||||
@@ -728,7 +728,7 @@ Ip4Config2SetDnsServerWorker (
|
||||
Item = &Instance->DataItem[Ip4Config2DataTypeDnsServer];
|
||||
NewDns = (EFI_IPv4_ADDRESS *) Data;
|
||||
OldDns = Item->Data.DnsServers;
|
||||
NewDnsCount = DataSize / sizeof (EFI_IPv4_ADDRESS);
|
||||
NewDnsCount = DataSize / sizeof (EFI_IPv4_ADDRESS);
|
||||
OldDnsCount = Item->DataSize / sizeof (EFI_IPv4_ADDRESS);
|
||||
OneAdded = FALSE;
|
||||
|
||||
@@ -785,7 +785,7 @@ Ip4Config2SetDnsServerWorker (
|
||||
if (Tmp != NULL) {
|
||||
if (Item->Data.Ptr != NULL) {
|
||||
FreePool (Item->Data.Ptr);
|
||||
}
|
||||
}
|
||||
Item->Data.Ptr = Tmp;
|
||||
}
|
||||
|
||||
@@ -846,7 +846,7 @@ Ip4Config2OnDhcp4Complete (
|
||||
if (EFI_ERROR (Status)) {
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Parse the ACK to get required DNS server information.
|
||||
//
|
||||
@@ -916,7 +916,7 @@ Ip4StartAutoConfig (
|
||||
EFI_DHCP4_PACKET_OPTION *OptionList[1];
|
||||
IP4_CONFIG2_DHCP4_OPTION ParaList;
|
||||
EFI_STATUS Status;
|
||||
|
||||
|
||||
IpSb = IP4_SERVICE_FROM_IP4_CONFIG2_INSTANCE (Instance);
|
||||
|
||||
if (IpSb->State > IP4_SERVICE_UNSTARTED) {
|
||||
@@ -978,7 +978,7 @@ Ip4StartAutoConfig (
|
||||
);
|
||||
|
||||
Instance->Dhcp4Handle = NULL;
|
||||
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
@@ -990,7 +990,7 @@ Ip4StartAutoConfig (
|
||||
Status = Dhcp4->GetModeData (Dhcp4, &Dhcp4Mode);
|
||||
if (Dhcp4Mode.State == Dhcp4Bound) {
|
||||
Ip4Config2OnDhcp4Complete (NULL, Instance);
|
||||
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -1023,14 +1023,14 @@ Ip4StartAutoConfig (
|
||||
&gEfiDhcp4ServiceBindingProtocolGuid,
|
||||
Instance->Dhcp4Handle
|
||||
);
|
||||
|
||||
|
||||
Instance->Dhcp4 = NULL;
|
||||
|
||||
|
||||
Instance->Dhcp4Handle = NULL;
|
||||
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Start the DHCP process
|
||||
//
|
||||
@@ -1051,20 +1051,20 @@ Ip4StartAutoConfig (
|
||||
Ip4Config2DestroyDhcp4 (Instance);
|
||||
gBS->CloseEvent (Instance->Dhcp4Event);
|
||||
Instance->Dhcp4Event = NULL;
|
||||
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
IpSb->State = IP4_SERVICE_STARTED;
|
||||
DispatchDpc ();
|
||||
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
The work function is to get the interface information of the communication
|
||||
The work function is to get the interface information of the communication
|
||||
device this IP4_CONFIG2_INSTANCE manages.
|
||||
|
||||
@param[in] Instance Pointer to the IP4 config2 instance data.
|
||||
@@ -1099,7 +1099,7 @@ Ip4Config2GetIfInfo (
|
||||
if (IpSb->DefaultRouteTable != NULL) {
|
||||
Length += IpSb->DefaultRouteTable->TotalNum * sizeof (EFI_IP4_ROUTE_TABLE);
|
||||
}
|
||||
|
||||
|
||||
if (*DataSize < Length) {
|
||||
*DataSize = Length;
|
||||
return EFI_BUFFER_TOO_SMALL;
|
||||
@@ -1126,14 +1126,14 @@ Ip4Config2GetIfInfo (
|
||||
IfInfo->RouteTableSize = IpSb->DefaultRouteTable->TotalNum;
|
||||
IfInfo->RouteTable = (EFI_IP4_ROUTE_TABLE *) ((UINT8 *) Data + sizeof (EFI_IP4_CONFIG2_INTERFACE_INFO));
|
||||
|
||||
Ip4Config2BuildDefaultRouteTable (IpSb, IfInfo->RouteTable);
|
||||
Ip4Config2BuildDefaultRouteTable (IpSb, IfInfo->RouteTable);
|
||||
}
|
||||
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
The work function is to set the general configuration policy for the EFI IPv4 network
|
||||
The work function is to set the general configuration policy for the EFI IPv4 network
|
||||
stack that is running on the communication device managed by this IP4_CONFIG2_INSTANCE.
|
||||
The policy will affect other configuration settings.
|
||||
|
||||
@@ -1175,7 +1175,7 @@ Ip4Config2SetPolicy (
|
||||
}
|
||||
} else {
|
||||
//
|
||||
// The policy is changed. Clean the ManualAddress, Gateway and DnsServers,
|
||||
// The policy is changed. Clean the ManualAddress, Gateway and DnsServers,
|
||||
// shrink the variable data size, and fire up all the related events.
|
||||
//
|
||||
DataItem = &Instance->DataItem[Ip4Config2DataTypeManualAddress];
|
||||
@@ -1204,7 +1204,7 @@ Ip4Config2SetPolicy (
|
||||
DataItem->DataSize = 0;
|
||||
DataItem->Status = EFI_NOT_FOUND;
|
||||
NetMapIterate (&DataItem->EventMap, Ip4Config2SignalEvent, NULL);
|
||||
|
||||
|
||||
if (NewPolicy == Ip4Config2PolicyDhcp) {
|
||||
SET_DATA_ATTRIB (DataItem->Attribute, DATA_ATTRIB_VOLATILE);
|
||||
} else {
|
||||
@@ -1215,7 +1215,7 @@ Ip4Config2SetPolicy (
|
||||
if (Instance->Dhcp4Handle != NULL) {
|
||||
Ip4Config2DestroyDhcp4 (Instance);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Close the event.
|
||||
//
|
||||
@@ -1235,7 +1235,7 @@ Ip4Config2SetPolicy (
|
||||
}
|
||||
|
||||
/**
|
||||
The work function is to set the station addresses manually for the EFI IPv4
|
||||
The work function is to set the station addresses manually for the EFI IPv4
|
||||
network stack. It is only configurable when the policy is Ip4Config2PolicyStatic.
|
||||
|
||||
@param[in] Instance Pointer to the IP4 config2 instance data.
|
||||
@@ -1317,7 +1317,7 @@ Ip4Config2SetManualAddress (
|
||||
if (DataItem->Data.Ptr != NULL) {
|
||||
FreePool (DataItem->Data.Ptr);
|
||||
}
|
||||
|
||||
|
||||
DataItem->Data.Ptr = Ptr;
|
||||
DataItem->DataSize = DataSize;
|
||||
DataItem->Status = EFI_NOT_READY;
|
||||
@@ -1331,7 +1331,7 @@ Ip4Config2SetManualAddress (
|
||||
if (Ptr != NULL) {
|
||||
FreePool (Ptr);
|
||||
}
|
||||
DataItem->Data.Ptr = NULL;
|
||||
DataItem->Data.Ptr = NULL;
|
||||
}
|
||||
} else {
|
||||
//
|
||||
@@ -1350,7 +1350,7 @@ Ip4Config2SetManualAddress (
|
||||
if (IpSb->DefaultInterface != NULL) {
|
||||
if (IpSb->DefaultRouteTable != NULL) {
|
||||
Ip4FreeRouteTable (IpSb->DefaultRouteTable);
|
||||
IpSb->DefaultRouteTable = NULL;
|
||||
IpSb->DefaultRouteTable = NULL;
|
||||
}
|
||||
|
||||
Ip4CancelReceive (IpSb->DefaultInterface);
|
||||
@@ -1363,7 +1363,7 @@ Ip4Config2SetManualAddress (
|
||||
|
||||
//
|
||||
// Create new default interface and route table.
|
||||
//
|
||||
//
|
||||
IpIf = Ip4CreateInterface (IpSb->Mnp, IpSb->Controller, IpSb->Image);
|
||||
if (IpIf == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
@@ -1374,14 +1374,14 @@ Ip4Config2SetManualAddress (
|
||||
Ip4FreeInterface (IpIf, NULL);
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
|
||||
IpSb->DefaultInterface = IpIf;
|
||||
InsertHeadList (&IpSb->Interfaces, &IpIf->Link);
|
||||
IpSb->DefaultRouteTable = RouteTable;
|
||||
Ip4ReceiveFrame (IpIf, NULL, Ip4AccpetFrame, IpSb);
|
||||
|
||||
//
|
||||
// Reset the State to unstarted.
|
||||
// Reset the State to unstarted.
|
||||
//
|
||||
if (IpSb->State == IP4_SERVICE_CONFIGED || IpSb->State == IP4_SERVICE_STARTED) {
|
||||
IpSb->State = IP4_SERVICE_UNSTARTED;
|
||||
@@ -1392,8 +1392,8 @@ Ip4Config2SetManualAddress (
|
||||
}
|
||||
|
||||
/**
|
||||
The work function is to set the gateway addresses manually for the EFI IPv4
|
||||
network stack that is running on the communication device that this EFI IPv4
|
||||
The work function is to set the gateway addresses manually for the EFI IPv4
|
||||
network stack that is running on the communication device that this EFI IPv4
|
||||
Configuration Protocol manages. It is not configurable when the policy is
|
||||
Ip4Config2PolicyDhcp. The gateway addresses must be unicast IPv4 addresses.
|
||||
|
||||
@@ -1474,7 +1474,7 @@ Ip4Config2SetGateway (
|
||||
for (Index1 = 0; Index1 < NewGatewayCount; Index1++) {
|
||||
CopyMem (&Gateway, NewGateway + Index1, sizeof (IP4_ADDR));
|
||||
|
||||
if ((IpSb->DefaultInterface->SubnetMask != 0) &&
|
||||
if ((IpSb->DefaultInterface->SubnetMask != 0) &&
|
||||
!NetIp4IsUnicast (NTOHL (Gateway), IpSb->DefaultInterface->SubnetMask)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
@@ -1505,7 +1505,7 @@ Ip4Config2SetGateway (
|
||||
IP4_ALLZERO_ADDRESS,
|
||||
IP4_ALLZERO_ADDRESS,
|
||||
NTOHL (Gateway)
|
||||
);
|
||||
);
|
||||
|
||||
OneAdded = TRUE;
|
||||
}
|
||||
@@ -1541,9 +1541,9 @@ Ip4Config2SetGateway (
|
||||
}
|
||||
|
||||
/**
|
||||
The work function is to set the DNS server list for the EFI IPv4 network
|
||||
stack running on the communication device that this EFI_IP4_CONFIG2_PROTOCOL
|
||||
manages. It is not configurable when the policy is Ip4Config2PolicyDhcp.
|
||||
The work function is to set the DNS server list for the EFI IPv4 network
|
||||
stack running on the communication device that this EFI_IP4_CONFIG2_PROTOCOL
|
||||
manages. It is not configurable when the policy is Ip4Config2PolicyDhcp.
|
||||
The DNS server addresses must be unicast IPv4 addresses.
|
||||
|
||||
@param[in] Instance The pointer to the IP4 config2 instance data.
|
||||
@@ -1589,7 +1589,7 @@ Ip4Config2SetDnsServer (
|
||||
Status = Ip4Config2SetDnsServerWorker (Instance, DataSize, Data);
|
||||
} else {
|
||||
//
|
||||
// DataSize is 0 and Data is NULL, clean up the DnsServer address.
|
||||
// DataSize is 0 and Data is NULL, clean up the DnsServer address.
|
||||
//
|
||||
if (Item->Data.Ptr != NULL) {
|
||||
FreePool (Item->Data.Ptr);
|
||||
@@ -1598,7 +1598,7 @@ Ip4Config2SetDnsServer (
|
||||
Item->DataSize = 0;
|
||||
Item->Status = EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
@@ -1678,7 +1678,7 @@ Ip4Config2OnDhcp4Event (
|
||||
network stack was set successfully.
|
||||
@retval EFI_INVALID_PARAMETER One or more of the following are TRUE:
|
||||
- This is NULL.
|
||||
- One or more fields in Data and DataSize do not match the
|
||||
- One or more fields in Data and DataSize do not match the
|
||||
requirement of the data type indicated by DataType.
|
||||
@retval EFI_WRITE_PROTECTED The specified configuration data is read-only or the specified
|
||||
configuration data cannot be set under the current policy.
|
||||
@@ -2031,7 +2031,7 @@ Ip4Config2InitInstance (
|
||||
NetMapInit (&Instance->DataItem[Index].EventMap);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Initialize each data type: associate storage and set data size for the
|
||||
// fixed size data types, hook the SetData function, set the data attribute.
|
||||
@@ -2066,7 +2066,7 @@ Ip4Config2InitInstance (
|
||||
|
||||
//
|
||||
// Try to read the config data from NV variable.
|
||||
// If not found, write initialized config data into NV variable
|
||||
// If not found, write initialized config data into NV variable
|
||||
// as a default config data.
|
||||
//
|
||||
Status = Ip4Config2ReadConfigData (IpSb->MacString, Instance);
|
||||
@@ -2077,7 +2077,7 @@ Ip4Config2InitInstance (
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
Instance->Ip4Config2.SetData = EfiIp4Config2SetData;
|
||||
Instance->Ip4Config2.GetData = EfiIp4Config2GetData;
|
||||
Instance->Ip4Config2.RegisterDataNotify = EfiIp4Config2RegisterDataNotify;
|
||||
@@ -2166,7 +2166,7 @@ Ip4AutoReconfigCallBackDpc (
|
||||
if (IpSb->State > IP4_SERVICE_UNSTARTED) {
|
||||
IpSb->State = IP4_SERVICE_UNSTARTED;
|
||||
}
|
||||
|
||||
|
||||
IpSb->Reconfig = TRUE;
|
||||
|
||||
Ip4StartAutoConfig (&IpSb->Ip4Config2Instance);
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Definitions for EFI IPv4 Configuration II Protocol implementation.
|
||||
|
||||
Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
(C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>
|
||||
|
||||
This program and the accompanying materials
|
||||
@@ -70,7 +70,7 @@ typedef struct _IP4_CONFIG2_INSTANCE IP4_CONFIG2_INSTANCE;
|
||||
8 bytes.
|
||||
@retval EFI_SUCCESS The specified configuration data for the EFI IPv4
|
||||
network stack was set successfully.
|
||||
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
@@ -87,14 +87,14 @@ EFI_STATUS
|
||||
@param[in, out] DataSize On input, in bytes, the size of Data. On output, in
|
||||
bytes, the size of buffer required to store the specified
|
||||
configuration data.
|
||||
@param[in] Data The data buffer in which the configuration data is returned.
|
||||
@param[in] Data The data buffer in which the configuration data is returned.
|
||||
Ignored if DataSize is ZERO.
|
||||
|
||||
@retval EFI_BUFFER_TOO_SMALL The size of Data is too small for the specified
|
||||
configuration data, and the required size is
|
||||
configuration data, and the required size is
|
||||
returned in DataSize.
|
||||
@retval EFI_SUCCESS The specified configuration data was obtained successfully.
|
||||
|
||||
@retval EFI_SUCCESS The specified configuration data was obtained successfully.
|
||||
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
@@ -151,7 +151,7 @@ typedef struct {
|
||||
#pragma pack()
|
||||
|
||||
typedef struct {
|
||||
EFI_IP4_CONFIG2_POLICY Policy; ///< manual or automatic
|
||||
EFI_IP4_CONFIG2_POLICY Policy; ///< manual or automatic
|
||||
EFI_IP4_CONFIG2_MANUAL_ADDRESS *ManualAddress; ///< IP addresses
|
||||
UINT32 ManualAddressCount; ///< IP addresses count
|
||||
EFI_IPv4_ADDRESS *GatewayAddress; ///< Gateway address
|
||||
@@ -177,7 +177,7 @@ struct _IP4_CONFIG2_INSTANCE {
|
||||
EFI_IP4_CONFIG2_PROTOCOL Ip4Config2;
|
||||
|
||||
EFI_IP4_CONFIG2_INTERFACE_INFO InterfaceInfo;
|
||||
EFI_IP4_CONFIG2_POLICY Policy;
|
||||
EFI_IP4_CONFIG2_POLICY Policy;
|
||||
IP4_CONFIG2_DATA_ITEM DataItem[Ip4Config2DataTypeMaximum];
|
||||
|
||||
EFI_EVENT Dhcp4SbNotifyEvent;
|
||||
@@ -190,7 +190,7 @@ struct _IP4_CONFIG2_INSTANCE {
|
||||
UINT32 FailedIaAddressCount;
|
||||
EFI_IPv4_ADDRESS *DeclineAddress;
|
||||
UINT32 DeclineAddressCount;
|
||||
|
||||
|
||||
IP4_FORM_CALLBACK_INFO CallbackInfo;
|
||||
|
||||
IP4_CONFIG2_NVDATA Ip4NvData;
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Helper functions for configuring or getting the parameters relating to Ip4.
|
||||
|
||||
Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -23,7 +23,7 @@ CHAR16 mIp4Config2StorageName[] = L"IP4_CONFIG2_IFR_NVDATA";
|
||||
|
||||
@return The prefix length of the subnet mask.
|
||||
@retval 0 Other errors as indicated.
|
||||
|
||||
|
||||
**/
|
||||
UINT8
|
||||
GetSubnetMaskPrefixLength (
|
||||
@@ -65,7 +65,7 @@ GetSubnetMaskPrefixLength (
|
||||
|
||||
@retval EFI_SUCCESS The binary IP address is returned in Ip.
|
||||
@retval EFI_INVALID_PARAMETER The IP string is malformatted.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
Ip4Config2StrToIp (
|
||||
@@ -131,7 +131,7 @@ Ip4Config2StrToIp (
|
||||
@retval EFI_SUCCESS The binary IP address list is returned in PtrIpList.
|
||||
@retval EFI_OUT_OF_RESOURCES Error occurs in allocating memory.
|
||||
@retval EFI_INVALID_PARAMETER The IP string is malformatted.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
Ip4Config2StrToIpList (
|
||||
@@ -141,19 +141,19 @@ Ip4Config2StrToIpList (
|
||||
)
|
||||
{
|
||||
UINTN BeginIndex;
|
||||
UINTN EndIndex;
|
||||
UINTN EndIndex;
|
||||
UINTN Index;
|
||||
UINTN IpIndex;
|
||||
CHAR16 *StrTemp;
|
||||
BOOLEAN SpaceTag;
|
||||
|
||||
|
||||
BeginIndex = 0;
|
||||
EndIndex = BeginIndex;
|
||||
Index = 0;
|
||||
IpIndex = 0;
|
||||
StrTemp = NULL;
|
||||
SpaceTag = TRUE;
|
||||
|
||||
|
||||
*PtrIpList = NULL;
|
||||
*IpCount = 0;
|
||||
|
||||
@@ -173,14 +173,14 @@ Ip4Config2StrToIpList (
|
||||
SpaceTag = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Index++;
|
||||
}
|
||||
|
||||
if (*IpCount == 0) {
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Allocate buffer for IpList.
|
||||
//
|
||||
@@ -203,10 +203,10 @@ Ip4Config2StrToIpList (
|
||||
*IpCount = 0;
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
|
||||
CopyMem (StrTemp, Str + BeginIndex, (EndIndex - BeginIndex) * sizeof(CHAR16));
|
||||
*(StrTemp + (EndIndex - BeginIndex)) = L'\0';
|
||||
|
||||
|
||||
if (Ip4Config2StrToIp (StrTemp, &((*PtrIpList)[IpIndex])) != EFI_SUCCESS) {
|
||||
FreePool(StrTemp);
|
||||
FreePool(*PtrIpList);
|
||||
@@ -214,7 +214,7 @@ Ip4Config2StrToIpList (
|
||||
*IpCount = 0;
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
|
||||
BeginIndex = EndIndex;
|
||||
IpIndex++;
|
||||
|
||||
@@ -228,9 +228,9 @@ Ip4Config2StrToIpList (
|
||||
EndIndex++;
|
||||
SpaceTag = FALSE;
|
||||
}
|
||||
|
||||
|
||||
Index++;
|
||||
|
||||
|
||||
if (*(Str + Index) == L'\0') {
|
||||
if (!SpaceTag) {
|
||||
StrTemp = AllocateZeroPool((EndIndex - BeginIndex + 1) * sizeof(CHAR16));
|
||||
@@ -240,10 +240,10 @@ Ip4Config2StrToIpList (
|
||||
*IpCount = 0;
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
|
||||
CopyMem (StrTemp, Str + BeginIndex, (EndIndex - BeginIndex) * sizeof(CHAR16));
|
||||
*(StrTemp + (EndIndex - BeginIndex)) = L'\0';
|
||||
|
||||
|
||||
if (Ip4Config2StrToIp (StrTemp, &((*PtrIpList)[IpIndex])) != EFI_SUCCESS) {
|
||||
FreePool(StrTemp);
|
||||
FreePool(*PtrIpList);
|
||||
@@ -255,7 +255,7 @@ Ip4Config2StrToIpList (
|
||||
FreePool(StrTemp);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
@@ -265,7 +265,7 @@ Ip4Config2StrToIpList (
|
||||
|
||||
@param[in] Ip The IPv4 address.
|
||||
@param[out] Str The dotted IP string.
|
||||
|
||||
|
||||
**/
|
||||
VOID
|
||||
Ip4Config2IpToStr (
|
||||
@@ -275,8 +275,8 @@ Ip4Config2IpToStr (
|
||||
{
|
||||
UnicodeSPrint (
|
||||
Str,
|
||||
2 * IP4_STR_MAX_SIZE,
|
||||
L"%d.%d.%d.%d",
|
||||
2 * IP4_STR_MAX_SIZE,
|
||||
L"%d.%d.%d.%d",
|
||||
Ip->Addr[0],
|
||||
Ip->Addr[1],
|
||||
Ip->Addr[2],
|
||||
@@ -286,13 +286,13 @@ Ip4Config2IpToStr (
|
||||
|
||||
|
||||
/**
|
||||
Convert the IPv4 address list into string consists of several decimal
|
||||
Convert the IPv4 address list into string consists of several decimal
|
||||
dotted IPv4 addresses separated by space.
|
||||
|
||||
@param[in] Ip The IPv4 address list.
|
||||
@param[in] IpCount The size of IPv4 address list.
|
||||
@param[out] Str The string contains several decimal dotted
|
||||
IPv4 addresses separated by space.
|
||||
IPv4 addresses separated by space.
|
||||
|
||||
@retval EFI_SUCCESS Operation is success.
|
||||
@retval EFI_OUT_OF_RESOURCES Error occurs in allocating memory.
|
||||
@@ -310,7 +310,7 @@ Ip4Config2IpListToStr (
|
||||
UINTN StrIndex;
|
||||
CHAR16 *TempStr;
|
||||
EFI_IPv4_ADDRESS *TempIp;
|
||||
|
||||
|
||||
Index = 0;
|
||||
TemIndex = 0;
|
||||
StrIndex = 0;
|
||||
@@ -327,9 +327,9 @@ Ip4Config2IpListToStr (
|
||||
}
|
||||
|
||||
UnicodeSPrint (
|
||||
TempStr,
|
||||
2 * IP4_STR_MAX_SIZE,
|
||||
L"%d.%d.%d.%d",
|
||||
TempStr,
|
||||
2 * IP4_STR_MAX_SIZE,
|
||||
L"%d.%d.%d.%d",
|
||||
TempIp->Addr[0],
|
||||
TempIp->Addr[1],
|
||||
TempIp->Addr[2],
|
||||
@@ -342,7 +342,7 @@ Ip4Config2IpListToStr (
|
||||
Str[StrIndex++] = L'\0';
|
||||
} else {
|
||||
Str[StrIndex++] = L' ';
|
||||
}
|
||||
}
|
||||
break;
|
||||
} else {
|
||||
Str[StrIndex++] = *(TempStr + TemIndex);
|
||||
@@ -362,7 +362,7 @@ Ip4Config2IpListToStr (
|
||||
|
||||
@param[in] Event The pointer of Event.
|
||||
@param[in] Context The pointer of Context.
|
||||
|
||||
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
@@ -384,7 +384,7 @@ Ip4Config2ManualAddressNotify (
|
||||
set successfully.
|
||||
@retval EFI_INVALID_PARAMETER Source instance or target IFR data is not available.
|
||||
@retval Others Other errors as indicated.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
Ip4Config2ConvertConfigNvDataToIfrNvData (
|
||||
@@ -409,11 +409,11 @@ Ip4Config2ConvertConfigNvDataToIfrNvData (
|
||||
Ip4Info = NULL;
|
||||
DnsAddress = NULL;
|
||||
GatewaySize = sizeof (EFI_IPv4_ADDRESS);
|
||||
|
||||
|
||||
if ((IfrNvData == NULL) || (Instance == NULL)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
|
||||
NET_CHECK_SIGNATURE (Instance, IP4_CONFIG2_INSTANCE_SIGNATURE);
|
||||
|
||||
IpSb = IP4_SERVICE_FROM_IP4_CONFIG2_INSTANCE (Instance);
|
||||
@@ -427,7 +427,7 @@ Ip4Config2ConvertConfigNvDataToIfrNvData (
|
||||
|
||||
//
|
||||
// Get the Policy info.
|
||||
//
|
||||
//
|
||||
DataSize = sizeof (EFI_IP4_CONFIG2_POLICY);
|
||||
Status = Ip4Config2->GetData (
|
||||
Ip4Config2,
|
||||
@@ -438,14 +438,14 @@ Ip4Config2ConvertConfigNvDataToIfrNvData (
|
||||
if (EFI_ERROR (Status)) {
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
|
||||
if (Policy == Ip4Config2PolicyStatic) {
|
||||
IfrNvData->DhcpEnable = FALSE;
|
||||
} else if (Policy == Ip4Config2PolicyDhcp) {
|
||||
IfrNvData->DhcpEnable = TRUE;
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Get the interface info.
|
||||
//
|
||||
@@ -459,7 +459,7 @@ Ip4Config2ConvertConfigNvDataToIfrNvData (
|
||||
if (Status != EFI_BUFFER_TOO_SMALL) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
Ip4Info = AllocateZeroPool (DataSize);
|
||||
if (Ip4Info == NULL) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
@@ -475,7 +475,7 @@ Ip4Config2ConvertConfigNvDataToIfrNvData (
|
||||
if (EFI_ERROR (Status)) {
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Get the Gateway info.
|
||||
//
|
||||
@@ -502,7 +502,7 @@ Ip4Config2ConvertConfigNvDataToIfrNvData (
|
||||
if ((Status != EFI_BUFFER_TOO_SMALL) && (Status != EFI_NOT_FOUND)) {
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
|
||||
DnsCount = (UINT32) (DnsSize / sizeof (EFI_IPv4_ADDRESS));
|
||||
|
||||
if (DnsSize > 0) {
|
||||
@@ -511,7 +511,7 @@ Ip4Config2ConvertConfigNvDataToIfrNvData (
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
|
||||
Status = Ip4Config2->GetData (
|
||||
Ip4Config2,
|
||||
Ip4Config2DataTypeDnsServer,
|
||||
@@ -537,7 +537,7 @@ Exit:
|
||||
if (Ip4Info != NULL) {
|
||||
FreePool(Ip4Info);
|
||||
}
|
||||
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
@@ -552,7 +552,7 @@ Exit:
|
||||
set successfully.
|
||||
@retval EFI_INVALID_PARAMETER The address information for setting is invalid.
|
||||
@retval Others Other errors as indicated.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
Ip4Config2ConvertIfrNvDataToConfigNvData (
|
||||
@@ -560,9 +560,9 @@ Ip4Config2ConvertIfrNvDataToConfigNvData (
|
||||
IN OUT IP4_CONFIG2_INSTANCE *Instance
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_STATUS Status;
|
||||
EFI_IP4_CONFIG2_PROTOCOL *Ip4Cfg2;
|
||||
IP4_CONFIG2_NVDATA *Ip4NvData;
|
||||
IP4_CONFIG2_NVDATA *Ip4NvData;
|
||||
|
||||
EFI_IP_ADDRESS StationAddress;
|
||||
EFI_IP_ADDRESS SubnetMask;
|
||||
@@ -581,15 +581,15 @@ Ip4Config2ConvertIfrNvDataToConfigNvData (
|
||||
Status = EFI_SUCCESS;
|
||||
Ip4Cfg2 = &Instance->Ip4Config2;
|
||||
Ip4NvData = &Instance->Ip4NvData;
|
||||
|
||||
|
||||
DnsCount = 0;
|
||||
DnsAddress = NULL;
|
||||
|
||||
DnsAddress = NULL;
|
||||
|
||||
TimeoutEvent = NULL;
|
||||
SetAddressEvent = NULL;
|
||||
|
||||
|
||||
|
||||
|
||||
if (Instance == NULL || IfrFormNvData == NULL) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
@@ -597,10 +597,10 @@ Ip4Config2ConvertIfrNvDataToConfigNvData (
|
||||
if (IfrFormNvData->Configure != TRUE) {
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
if (IfrFormNvData->DhcpEnable == TRUE) {
|
||||
Ip4NvData->Policy = Ip4Config2PolicyDhcp;
|
||||
|
||||
|
||||
Status = Ip4Cfg2->SetData (
|
||||
Ip4Cfg2,
|
||||
Ip4Config2DataTypePolicy,
|
||||
@@ -623,15 +623,15 @@ Ip4Config2ConvertIfrNvDataToConfigNvData (
|
||||
}
|
||||
|
||||
Status = Ip4Config2StrToIp (IfrFormNvData->StationAddress, &StationAddress.v4);
|
||||
if (EFI_ERROR (Status) ||
|
||||
(SubnetMask.Addr[0] != 0 && !NetIp4IsUnicast (NTOHL (StationAddress.Addr[0]), NTOHL (SubnetMask.Addr[0]))) ||
|
||||
if (EFI_ERROR (Status) ||
|
||||
(SubnetMask.Addr[0] != 0 && !NetIp4IsUnicast (NTOHL (StationAddress.Addr[0]), NTOHL (SubnetMask.Addr[0]))) ||
|
||||
!Ip4StationAddressValid (NTOHL (StationAddress.Addr[0]), NTOHL (SubnetMask.Addr[0]))) {
|
||||
CreatePopUp (EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE, &Key, L"Invalid IP address!", NULL);
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
|
||||
Status = Ip4Config2StrToIp (IfrFormNvData->GatewayAddress, &Gateway.v4);
|
||||
if (EFI_ERROR (Status) ||
|
||||
if (EFI_ERROR (Status) ||
|
||||
(Gateway.Addr[0] != 0 && SubnetMask.Addr[0] != 0 && !NetIp4IsUnicast (NTOHL (Gateway.Addr[0]), NTOHL (SubnetMask.Addr[0])))) {
|
||||
CreatePopUp (EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE, &Key, L"Invalid Gateway!", NULL);
|
||||
return EFI_INVALID_PARAMETER;
|
||||
@@ -645,16 +645,16 @@ Ip4Config2ConvertIfrNvDataToConfigNvData (
|
||||
CreatePopUp (EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE, &Key, L"Invalid Dns Server!", NULL);
|
||||
FreePool(DnsAddress);
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (EFI_ERROR (Status)) {
|
||||
CreatePopUp (EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE, &Key, L"Invalid Dns Server!", NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (Ip4NvData->ManualAddress != NULL) {
|
||||
FreePool(Ip4NvData->ManualAddress);
|
||||
FreePool(Ip4NvData->ManualAddress);
|
||||
}
|
||||
Ip4NvData->ManualAddressCount = 1;
|
||||
Ip4NvData->ManualAddress = AllocateZeroPool(sizeof(EFI_IP4_CONFIG2_MANUAL_ADDRESS));
|
||||
@@ -662,14 +662,14 @@ Ip4Config2ConvertIfrNvDataToConfigNvData (
|
||||
if (DnsAddress != NULL) {
|
||||
FreePool(DnsAddress);
|
||||
}
|
||||
|
||||
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
CopyMem(&Ip4NvData->ManualAddress->Address, &StationAddress.v4, sizeof(EFI_IPv4_ADDRESS));
|
||||
CopyMem(&Ip4NvData->ManualAddress->SubnetMask, &SubnetMask.v4, sizeof(EFI_IPv4_ADDRESS));
|
||||
|
||||
|
||||
if (Ip4NvData->GatewayAddress != NULL) {
|
||||
FreePool(Ip4NvData->GatewayAddress);
|
||||
FreePool(Ip4NvData->GatewayAddress);
|
||||
}
|
||||
Ip4NvData->GatewayAddressCount = 1;
|
||||
Ip4NvData->GatewayAddress = AllocateZeroPool(sizeof(EFI_IPv4_ADDRESS));
|
||||
@@ -680,9 +680,9 @@ Ip4Config2ConvertIfrNvDataToConfigNvData (
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
CopyMem(Ip4NvData->GatewayAddress, &Gateway.v4, sizeof(EFI_IPv4_ADDRESS));
|
||||
|
||||
|
||||
if (Ip4NvData->DnsAddress != NULL) {
|
||||
FreePool(Ip4NvData->DnsAddress);
|
||||
FreePool(Ip4NvData->DnsAddress);
|
||||
}
|
||||
Ip4NvData->DnsAddressCount = (UINT32) DnsCount;
|
||||
Ip4NvData->DnsAddress = DnsAddress;
|
||||
@@ -726,7 +726,7 @@ Ip4Config2ConvertIfrNvDataToConfigNvData (
|
||||
}
|
||||
|
||||
IsAddressOk = FALSE;
|
||||
|
||||
|
||||
Status = Ip4Cfg2->RegisterDataNotify (
|
||||
Ip4Cfg2,
|
||||
Ip4Config2DataTypeManualAddress,
|
||||
@@ -791,12 +791,12 @@ Ip4Config2ConvertIfrNvDataToConfigNvData (
|
||||
DataSize,
|
||||
Ip4NvData->DnsAddress
|
||||
);
|
||||
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
goto Exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Exit:
|
||||
if (SetAddressEvent != NULL) {
|
||||
@@ -875,12 +875,12 @@ Ip4FormExtractConfig (
|
||||
OUT EFI_STRING *Results
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_STATUS Status;
|
||||
IP4_CONFIG2_INSTANCE *Ip4Config2Instance;
|
||||
IP4_FORM_CALLBACK_INFO *Private;
|
||||
IP4_FORM_CALLBACK_INFO *Private;
|
||||
IP4_CONFIG2_IFR_NVDATA *IfrFormNvData;
|
||||
EFI_STRING ConfigRequestHdr;
|
||||
EFI_STRING ConfigRequest;
|
||||
EFI_STRING ConfigRequest;
|
||||
BOOLEAN AllocatedRequest;
|
||||
EFI_STRING FormResult;
|
||||
UINTN Size;
|
||||
@@ -889,19 +889,19 @@ Ip4FormExtractConfig (
|
||||
if (Progress == NULL || Results == NULL) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
Status = EFI_SUCCESS;
|
||||
|
||||
Status = EFI_SUCCESS;
|
||||
IfrFormNvData = NULL;
|
||||
ConfigRequest = NULL;
|
||||
FormResult = NULL;
|
||||
FormResult = NULL;
|
||||
Size = 0;
|
||||
AllocatedRequest = FALSE;
|
||||
ConfigRequest = Request;
|
||||
AllocatedRequest = FALSE;
|
||||
ConfigRequest = Request;
|
||||
Private = IP4_FORM_CALLBACK_INFO_FROM_CONFIG_ACCESS(This);
|
||||
Ip4Config2Instance = IP4_CONFIG2_INSTANCE_FROM_FORM_CALLBACK(Private);
|
||||
BufferSize = sizeof (IP4_CONFIG2_IFR_NVDATA);
|
||||
*Progress = Request;
|
||||
|
||||
|
||||
//
|
||||
// Check Request data in <ConfigHdr>.
|
||||
//
|
||||
@@ -910,9 +910,9 @@ Ip4FormExtractConfig (
|
||||
if (IfrFormNvData == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
|
||||
Ip4Config2ConvertConfigNvDataToIfrNvData (Ip4Config2Instance, IfrFormNvData);
|
||||
|
||||
|
||||
if ((Request == NULL) || (StrStr (Request, L"OFFSET") == NULL)) {
|
||||
//
|
||||
// Request has no request element, construct full request string.
|
||||
@@ -927,7 +927,7 @@ Ip4FormExtractConfig (
|
||||
goto Failure;
|
||||
}
|
||||
AllocatedRequest = TRUE;
|
||||
|
||||
|
||||
UnicodeSPrint (ConfigRequest, Size, L"%s&OFFSET=0&WIDTH=%016LX", ConfigRequestHdr, (UINT64)BufferSize);
|
||||
FreePool (ConfigRequestHdr);
|
||||
}
|
||||
@@ -945,7 +945,7 @@ Ip4FormExtractConfig (
|
||||
);
|
||||
|
||||
FreePool (IfrFormNvData);
|
||||
|
||||
|
||||
//
|
||||
// Free the allocated config request string.
|
||||
//
|
||||
@@ -958,7 +958,7 @@ Ip4FormExtractConfig (
|
||||
goto Failure;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (Request == NULL || HiiIsConfigHdrMatch (Request, &gIp4Config2NvDataGuid, mIp4Config2StorageName)) {
|
||||
*Results = FormResult;
|
||||
} else {
|
||||
@@ -1107,7 +1107,7 @@ Ip4FormRouteConfig (
|
||||
callback.Currently not implemented.
|
||||
@retval EFI_INVALID_PARAMETERS Passing in wrong parameter.
|
||||
@retval Others Other errors as indicated.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -1124,7 +1124,7 @@ Ip4FormCallback (
|
||||
IP4_CONFIG2_INSTANCE *Instance;
|
||||
IP4_CONFIG2_IFR_NVDATA *IfrFormNvData;
|
||||
IP4_FORM_CALLBACK_INFO *Private;
|
||||
|
||||
|
||||
EFI_IP_ADDRESS StationAddress;
|
||||
EFI_IP_ADDRESS SubnetMask;
|
||||
EFI_IP_ADDRESS Gateway;
|
||||
@@ -1133,15 +1133,15 @@ Ip4FormCallback (
|
||||
UINTN DnsCount;
|
||||
UINTN Index;
|
||||
EFI_INPUT_KEY Key;
|
||||
|
||||
|
||||
IfrFormNvData = NULL;
|
||||
DnsCount = 0;
|
||||
DnsAddress = NULL;
|
||||
DnsAddress = NULL;
|
||||
|
||||
if (Action == EFI_BROWSER_ACTION_CHANGED) {
|
||||
Private = IP4_FORM_CALLBACK_INFO_FROM_CONFIG_ACCESS(This);
|
||||
Instance = IP4_CONFIG2_INSTANCE_FROM_FORM_CALLBACK(Private);
|
||||
|
||||
|
||||
IfrFormNvData = AllocateZeroPool (sizeof (IP4_CONFIG2_IFR_NVDATA));
|
||||
if (IfrFormNvData == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
@@ -1181,7 +1181,7 @@ Ip4FormCallback (
|
||||
Status = EFI_INVALID_PARAMETER;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case KEY_DNS:
|
||||
Status = Ip4Config2StrToIpList (IfrFormNvData->DnsAddress, &DnsAddress, &DnsCount);
|
||||
if (!EFI_ERROR (Status) && DnsCount > 0) {
|
||||
@@ -1191,19 +1191,19 @@ Ip4FormCallback (
|
||||
CreatePopUp (EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE, &Key, L"Invalid Dns Server!", NULL);
|
||||
Status = EFI_INVALID_PARAMETER;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (EFI_ERROR (Status)) {
|
||||
CreatePopUp (EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE, &Key, L"Invalid Dns Server!", NULL);
|
||||
}
|
||||
}
|
||||
|
||||
if(DnsAddress != NULL) {
|
||||
|
||||
if(DnsAddress != NULL) {
|
||||
FreePool(DnsAddress);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case KEY_SAVE_CHANGES:
|
||||
Status = Ip4Config2ConvertIfrNvDataToConfigNvData (IfrFormNvData, Instance);
|
||||
*ActionRequest = EFI_BROWSER_ACTION_REQUEST_SUBMIT;
|
||||
@@ -1232,7 +1232,7 @@ Ip4FormCallback (
|
||||
@retval EFI_SUCCESS The HII Config Access protocol is installed.
|
||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
|
||||
@retval Others Other errors as indicated.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
Ip4Config2FormInit (
|
||||
@@ -1253,9 +1253,9 @@ Ip4Config2FormInit (
|
||||
|
||||
IpSb = IP4_SERVICE_FROM_IP4_CONFIG2_INSTANCE (Instance);
|
||||
ASSERT (IpSb != NULL);
|
||||
|
||||
|
||||
CallbackInfo = &Instance->CallbackInfo;
|
||||
|
||||
|
||||
CallbackInfo->Signature = IP4_FORM_CALLBACK_INFO_SIGNATURE;
|
||||
|
||||
Status = gBS->HandleProtocol (
|
||||
@@ -1344,26 +1344,26 @@ Ip4Config2FormInit (
|
||||
Status = NetLibGetMacString (IpSb->Controller, IpSb->Image, &MacString);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
OldMenuString = HiiGetString (
|
||||
CallbackInfo->RegisteredHandle,
|
||||
STRING_TOKEN (STR_IP4_CONFIG2_FORM_HELP),
|
||||
CallbackInfo->RegisteredHandle,
|
||||
STRING_TOKEN (STR_IP4_CONFIG2_FORM_HELP),
|
||||
NULL
|
||||
);
|
||||
UnicodeSPrint (MenuString, 128, L"%s (MAC:%s)", OldMenuString, MacString);
|
||||
HiiSetString (
|
||||
CallbackInfo->RegisteredHandle,
|
||||
STRING_TOKEN (STR_IP4_CONFIG2_FORM_HELP),
|
||||
MenuString,
|
||||
CallbackInfo->RegisteredHandle,
|
||||
STRING_TOKEN (STR_IP4_CONFIG2_FORM_HELP),
|
||||
MenuString,
|
||||
NULL
|
||||
);
|
||||
|
||||
UnicodeSPrint (PortString, 128, L"MAC:%s", MacString);
|
||||
HiiSetString (
|
||||
CallbackInfo->RegisteredHandle,
|
||||
STRING_TOKEN (STR_IP4_DEVICE_FORM_HELP),
|
||||
PortString,
|
||||
CallbackInfo->RegisteredHandle,
|
||||
STRING_TOKEN (STR_IP4_DEVICE_FORM_HELP),
|
||||
PortString,
|
||||
NULL
|
||||
);
|
||||
|
||||
|
||||
FreePool (MacString);
|
||||
FreePool (OldMenuString);
|
||||
|
||||
@@ -1405,7 +1405,7 @@ Ip4Config2FormUnload (
|
||||
IpSb->Image,
|
||||
CallbackInfo->ChildHandle
|
||||
);
|
||||
|
||||
|
||||
//
|
||||
// Uninstall EFI_HII_CONFIG_ACCESS_PROTOCOL
|
||||
//
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
The header file of IP4Config2Nv.c
|
||||
|
||||
Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -30,7 +30,7 @@ extern UINT8 Ip4DxeStrings[];
|
||||
@retval EFI_SUCCESS The HII Config Access protocol is installed.
|
||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory.
|
||||
@retval Others Other errors as indicated.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
Ip4Config2FormInit (
|
||||
|
@@ -258,7 +258,7 @@ Ip4CreateService (
|
||||
IpSb->ReconfigEvent = NULL;
|
||||
|
||||
IpSb->Reconfig = FALSE;
|
||||
|
||||
|
||||
IpSb->MediaPresent = TRUE;
|
||||
|
||||
//
|
||||
@@ -352,7 +352,7 @@ Ip4CreateService (
|
||||
|
||||
IpSb->MacString = NULL;
|
||||
Status = NetLibGetMacString (IpSb->Controller, IpSb->Image, &IpSb->MacString);
|
||||
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
goto ON_ERROR;
|
||||
}
|
||||
@@ -367,7 +367,7 @@ Ip4CreateService (
|
||||
InsertHeadList (&IpSb->Interfaces, &IpSb->DefaultInterface->Link);
|
||||
|
||||
ZeroMem (&IpSb->Ip4Config2Instance, sizeof (IP4_CONFIG2_INSTANCE));
|
||||
|
||||
|
||||
Status = Ip4Config2InitInstance (&IpSb->Ip4Config2Instance);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
@@ -488,7 +488,7 @@ Ip4CleanService (
|
||||
|
||||
/**
|
||||
Callback function which provided by user to remove one node in NetDestroyLinkList process.
|
||||
|
||||
|
||||
@param[in] Entry The entry to be removed.
|
||||
@param[in] Context Pointer to the callback context corresponds to the Context in NetDestroyLinkList.
|
||||
|
||||
@@ -549,7 +549,7 @@ Ip4DriverBindingStart (
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL
|
||||
)
|
||||
{
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
IP4_SERVICE *IpSb;
|
||||
EFI_IP4_CONFIG2_PROTOCOL *Ip4Cfg2;
|
||||
@@ -575,13 +575,13 @@ Ip4DriverBindingStart (
|
||||
if (Status == EFI_SUCCESS) {
|
||||
return EFI_ALREADY_STARTED;
|
||||
}
|
||||
|
||||
|
||||
Status = Ip4CreateService (ControllerHandle, This->DriverBindingHandle, &IpSb);
|
||||
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
ASSERT (IpSb != NULL);
|
||||
|
||||
Ip4Cfg2 = &IpSb->Ip4Config2Instance.Ip4Config2;
|
||||
@@ -603,16 +603,16 @@ Ip4DriverBindingStart (
|
||||
}
|
||||
|
||||
//
|
||||
// Read the config data from NV variable again.
|
||||
// Read the config data from NV variable again.
|
||||
// The default data can be changed by other drivers.
|
||||
//
|
||||
Status = Ip4Config2ReadConfigData (IpSb->MacString, &IpSb->Ip4Config2Instance);
|
||||
if (EFI_ERROR (Status)) {
|
||||
goto UNINSTALL_PROTOCOL;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Consume the installed EFI_IP4_CONFIG2_PROTOCOL to set the default data items.
|
||||
// Consume the installed EFI_IP4_CONFIG2_PROTOCOL to set the default data items.
|
||||
//
|
||||
for (Index = Ip4Config2DataTypePolicy; Index < Ip4Config2DataTypeMaximum; Index++) {
|
||||
DataItem = &IpSb->Ip4Config2Instance.DataItem[Index];
|
||||
@@ -626,13 +626,13 @@ Ip4DriverBindingStart (
|
||||
if (EFI_ERROR(Status)) {
|
||||
goto UNINSTALL_PROTOCOL;
|
||||
}
|
||||
|
||||
|
||||
if (Index == Ip4Config2DataTypePolicy && (*(DataItem->Data.Policy) == Ip4Config2PolicyDhcp)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Ready to go: start the receiving and timer.
|
||||
// Ip4Config2SetPolicy maybe call Ip4ReceiveFrame() to set the default interface's RecvRequest first after
|
||||
@@ -705,9 +705,9 @@ Ip4DriverBindingStop (
|
||||
)
|
||||
{
|
||||
EFI_SERVICE_BINDING_PROTOCOL *ServiceBinding;
|
||||
IP4_SERVICE *IpSb;
|
||||
IP4_SERVICE *IpSb;
|
||||
EFI_HANDLE NicHandle;
|
||||
EFI_STATUS Status;
|
||||
EFI_STATUS Status;
|
||||
INTN State;
|
||||
LIST_ENTRY *List;
|
||||
IP4_DESTROY_CHILD_IN_HANDLE_BUF_CONTEXT Context;
|
||||
@@ -717,20 +717,20 @@ Ip4DriverBindingStop (
|
||||
BOOLEAN IsDhcp4;
|
||||
|
||||
IsDhcp4 = FALSE;
|
||||
|
||||
|
||||
NicHandle = NetLibGetNicHandle (ControllerHandle, &gEfiManagedNetworkProtocolGuid);
|
||||
if (NicHandle == NULL) {
|
||||
NicHandle = NetLibGetNicHandle (ControllerHandle, &gEfiArpProtocolGuid);
|
||||
if (NicHandle == NULL) {
|
||||
NicHandle = NetLibGetNicHandle (ControllerHandle, &gEfiDhcp4ProtocolGuid);
|
||||
if (NicHandle != NULL) {
|
||||
IsDhcp4 = TRUE;
|
||||
IsDhcp4 = TRUE;
|
||||
} else {
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Status = gBS->OpenProtocol (
|
||||
NicHandle,
|
||||
&gEfiIp4ServiceBindingProtocolGuid,
|
||||
@@ -742,7 +742,7 @@ Ip4DriverBindingStop (
|
||||
if (EFI_ERROR (Status)) {
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
|
||||
IpSb = IP4_SERVICE_FROM_PROTOCOL (ServiceBinding);
|
||||
|
||||
if (IsDhcp4) {
|
||||
@@ -761,7 +761,7 @@ Ip4DriverBindingStop (
|
||||
NULL
|
||||
);
|
||||
} else if (IpSb->DefaultInterface->ArpHandle == ControllerHandle) {
|
||||
|
||||
|
||||
//
|
||||
// The ARP protocol for the default interface is being uninstalled and all
|
||||
// its IP child handles should have been destroyed before. So, release the
|
||||
@@ -770,7 +770,7 @@ Ip4DriverBindingStop (
|
||||
Ip4CancelReceive (IpSb->DefaultInterface);
|
||||
Ip4FreeInterface (IpSb->DefaultInterface, NULL);
|
||||
Ip4FreeRouteTable (IpSb->DefaultRouteTable);
|
||||
|
||||
|
||||
IpIf = Ip4CreateInterface (IpSb->Mnp, IpSb->Controller, IpSb->Image);
|
||||
if (IpIf == NULL) {
|
||||
goto ON_ERROR;
|
||||
@@ -780,7 +780,7 @@ Ip4DriverBindingStop (
|
||||
Ip4FreeInterface (IpIf, NULL);
|
||||
goto ON_ERROR;;
|
||||
}
|
||||
|
||||
|
||||
IpSb->DefaultInterface = IpIf;
|
||||
InsertHeadList (&IpSb->Interfaces, &IpIf->Link);
|
||||
IpSb->DefaultRouteTable = RouteTable;
|
||||
@@ -807,7 +807,7 @@ Ip4DriverBindingStop (
|
||||
&IpSb->Ip4Config2Instance.Ip4Config2,
|
||||
NULL
|
||||
);
|
||||
|
||||
|
||||
if (gIp4ControllerNameTable != NULL) {
|
||||
FreeUnicodeStringTable (gIp4ControllerNameTable);
|
||||
gIp4ControllerNameTable = NULL;
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/** @file
|
||||
|
||||
Copyright (c) 2005 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -34,7 +34,7 @@ typedef struct {
|
||||
This is the declaration of an EFI image entry point. This entry point is
|
||||
the same for UEFI Applications, UEFI OS Loaders, and UEFI Drivers including
|
||||
both device drivers and bus drivers.
|
||||
|
||||
|
||||
The entry point for IP4 driver which install the driver
|
||||
binding and component name protocol on its image.
|
||||
|
||||
@@ -114,7 +114,7 @@ Ip4DriverBindingStart (
|
||||
restrictions for this service. DisconnectController()
|
||||
must follow these calling restrictions. If any other agent wishes
|
||||
to call Stop() it must also follow these calling restrictions.
|
||||
|
||||
|
||||
@param[in] This Protocol instance pointer.
|
||||
@param[in] ControllerHandle Handle of device to stop driver on
|
||||
@param[in] NumberOfChildren Number of Handles in ChildHandleBuffer. If number
|
||||
@@ -139,14 +139,14 @@ Ip4DriverBindingStop (
|
||||
//
|
||||
/**
|
||||
Creates a child handle and installs a protocol.
|
||||
|
||||
The CreateChild() function installs a protocol on ChildHandle.
|
||||
If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle.
|
||||
|
||||
The CreateChild() function installs a protocol on ChildHandle.
|
||||
If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle.
|
||||
If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle.
|
||||
|
||||
@param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
|
||||
@param ChildHandle Pointer to the handle of the child to create. If it is NULL,
|
||||
then a new handle is created. If it is a pointer to an existing UEFI handle,
|
||||
then a new handle is created. If it is a pointer to an existing UEFI handle,
|
||||
then the protocol is added to the existing UEFI handle.
|
||||
|
||||
@retval EFI_SUCCES The protocol was added to ChildHandle.
|
||||
@@ -165,9 +165,9 @@ Ip4ServiceBindingCreateChild (
|
||||
|
||||
/**
|
||||
Destroys a child handle with a protocol installed on it.
|
||||
|
||||
The DestroyChild() function does the opposite of CreateChild(). It removes a protocol
|
||||
that was installed by CreateChild() from ChildHandle. If the removed protocol is the
|
||||
|
||||
The DestroyChild() function does the opposite of CreateChild(). It removes a protocol
|
||||
that was installed by CreateChild() from ChildHandle. If the removed protocol is the
|
||||
last protocol on ChildHandle, then ChildHandle is destroyed.
|
||||
|
||||
@param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
|
||||
|
@@ -6,7 +6,7 @@
|
||||
# subset of the Internet Control Message Protocol (ICMP) and may include support for
|
||||
# the Internet Group Management Protocol (IGMP).
|
||||
#
|
||||
# Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -24,7 +24,7 @@
|
||||
MODULE_UNI_FILE = Ip4Dxe.uni
|
||||
FILE_GUID = 9FB1A1F3-3B71-4324-B39A-745CBB015FFF
|
||||
MODULE_TYPE = UEFI_DRIVER
|
||||
VERSION_STRING = 1.0
|
||||
VERSION_STRING = 1.0
|
||||
ENTRY_POINT = Ip4DriverEntryPoint
|
||||
UNLOAD_IMAGE = NetLibDefaultUnload
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#
|
||||
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
|
||||
#
|
||||
# DRIVER_BINDING = gIp4DriverBinding
|
||||
# DRIVER_BINDING = gIp4DriverBinding
|
||||
# COMPONENT_NAME = gIp4ComponentName
|
||||
# COMPONENT_NAME2 = gIp4ComponentName2
|
||||
#
|
||||
@@ -102,7 +102,7 @@
|
||||
gEfiIpSec2ProtocolGuid ## SOMETIMES_CONSUMES
|
||||
gEfiHiiConfigAccessProtocolGuid ## BY_START
|
||||
gEfiDevicePathProtocolGuid ## TO_START
|
||||
|
||||
|
||||
[Guids]
|
||||
## SOMETIMES_CONSUMES ## GUID # HiiIsConfigHdrMatch EFI_NIC_IP4_CONFIG_VARIABLE
|
||||
## SOMETIMES_PRODUCES ## GUID # HiiConstructConfigHdr EFI_NIC_IP4_CONFIG_VARIABLE
|
||||
|
@@ -6,13 +6,13 @@
|
||||
// subset of the Internet Control Message Protocol (ICMP) and may include support for
|
||||
// the Internet Group Management Protocol (IGMP).
|
||||
//
|
||||
// Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
// which accompanies this distribution. The full text of the license may be found at
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// /** @file
|
||||
// Ip4Dxe Localized Strings and Content
|
||||
//
|
||||
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -13,8 +13,8 @@
|
||||
//
|
||||
// **/
|
||||
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
"IP v4 DXE Driver"
|
||||
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// /** @file
|
||||
// String definitions for Ip4Config2 formset
|
||||
|
||||
// Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
// which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -30,7 +30,7 @@
|
||||
#string STR_IP4_MASK_HELP #language en-US "Enter NetMask in dotted-decimal notation. Example: 255.255.255.0\r\n"
|
||||
#string STR_IP4_LOCAL_GATEWAY #language en-US "Local Gateway"
|
||||
#string STR_IP4_GATEWAY_HELP #language en-US "Enter Gateway in dotted-decimal notation. Example: 192.168.10.1\r\n"
|
||||
#string STR_IP4_LOCAL_DNS #language en-US "Local DNS Servers"
|
||||
#string STR_IP4_LOCAL_DNS #language en-US "Local DNS Servers"
|
||||
#string STR_IP4_DNS_HELP #language en-US "Enter DNS Servers in dotted-decimal notation. Example: 192.168.10.8 192.168.10.9\r\n"
|
||||
#string STR_SAVE_CHANGES #language en-US "Save Changes and Exit"
|
||||
#string STR_NULL #language en-US ""
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/** @file
|
||||
|
||||
Copyright (c) 2005 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -72,7 +72,7 @@ mIp4SupportedIcmp[23] = {
|
||||
/**
|
||||
Process the ICMP redirect. Find the instance then update
|
||||
its route cache.
|
||||
|
||||
|
||||
All kinds of redirect is treated as host redirect as
|
||||
specified by RFC1122 3.3.1.2:
|
||||
"Since the subnet mask appropriate to the destination
|
||||
@@ -80,7 +80,7 @@ mIp4SupportedIcmp[23] = {
|
||||
message SHOULD be treated identically to a Host Redirect
|
||||
message;"
|
||||
|
||||
@param[in] IpSb The IP4 service binding instance that received
|
||||
@param[in] IpSb The IP4 service binding instance that received
|
||||
the packet.
|
||||
@param[in] Head The IP head of the received ICMPpacket.
|
||||
@param[in] Packet The content of the ICMP redirect packet with IP
|
||||
@@ -166,7 +166,7 @@ Ip4ProcessIcmpRedirect (
|
||||
@retval EFI_SUCCESS The ICMP error is processed successfully.
|
||||
@retval EFI_INVALID_PARAMETER The packet is invalid
|
||||
@retval Others Failed to process the packet.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
Ip4ProcessIcmpError (
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Header file for ICMP protocol.
|
||||
|
||||
Copyright (c) 2005 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Implement IP4 pesudo interface.
|
||||
|
||||
Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -68,7 +68,7 @@ Ip4OnArpResolvedDpc (
|
||||
@param Event The Arp request event.
|
||||
@param Context The context of the callback, a point to the ARP
|
||||
queue.
|
||||
|
||||
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
@@ -139,7 +139,7 @@ Ip4CancelFrameArp (
|
||||
finished.
|
||||
@param[in] Context Opaque parameter to the call back.
|
||||
|
||||
@retval Token The wrapped token if succeed
|
||||
@retval Token The wrapped token if succeed
|
||||
@retval NULL The wrapped token if NULL
|
||||
|
||||
**/
|
||||
@@ -587,10 +587,10 @@ Ip4SetAddress (
|
||||
Interface->Image,
|
||||
Interface->Controller
|
||||
);
|
||||
|
||||
|
||||
Interface->Arp = NULL;
|
||||
}
|
||||
|
||||
|
||||
NetLibDestroyServiceChild (
|
||||
Interface->Controller,
|
||||
Interface->Image,
|
||||
@@ -872,7 +872,7 @@ Ip4OnArpResolvedDpc (
|
||||
@param Event The Arp request event.
|
||||
@param Context The context of the callback, a point to the ARP
|
||||
queue.
|
||||
|
||||
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Definition for IP4 pesudo interface structure.
|
||||
|
||||
Copyright (c) 2005 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
This file implements the RFC2236: IGMP v2.
|
||||
|
||||
Copyright (c) 2005 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
|
@@ -682,7 +682,7 @@ Ip4ConfigProtocol (
|
||||
//
|
||||
if (IpSb->State == IP4_SERVICE_UNSTARTED) {
|
||||
//
|
||||
// Trigger the EFI_IP4_CONFIG2_PROTOCOL to retrieve the
|
||||
// Trigger the EFI_IP4_CONFIG2_PROTOCOL to retrieve the
|
||||
// default IPv4 address if it is not available yet.
|
||||
//
|
||||
Policy = IpSb->Ip4Config2Instance.Policy;
|
||||
@@ -1048,11 +1048,11 @@ Ip4Groups (
|
||||
// is decreamented each time an address is removed..
|
||||
//
|
||||
for (Index = IpInstance->GroupCount; Index > 0 ; Index--) {
|
||||
Group = 0;
|
||||
Group = 0;
|
||||
if(IpInstance->Groups != NULL) {
|
||||
Group = IpInstance->Groups[Index - 1];
|
||||
}
|
||||
|
||||
Group = IpInstance->Groups[Index - 1];
|
||||
}
|
||||
|
||||
if ((GroupAddress == NULL) || EFI_IP4_EQUAL (&Group, GroupAddress)) {
|
||||
if (EFI_ERROR (Ip4LeaveGroup (IpInstance, NTOHL (Group)))) {
|
||||
return EFI_DEVICE_ERROR;
|
||||
@@ -1663,7 +1663,7 @@ EfiIp4Transmit (
|
||||
}
|
||||
|
||||
RawHdrLen = (UINT8) (RawHdrLen << 2);
|
||||
|
||||
|
||||
CopyMem (&Head, FirstFragment, IP4_MIN_HEADLEN);
|
||||
|
||||
Ip4NtohHead (&Head);
|
||||
@@ -2253,8 +2253,8 @@ Ip4SentPacketTicking (
|
||||
}
|
||||
|
||||
/**
|
||||
This heart beat timer of IP4 service instance times out all of its IP4 children's
|
||||
received-but-not-delivered and transmitted-but-not-recycle packets, and provides
|
||||
This heart beat timer of IP4 service instance times out all of its IP4 children's
|
||||
received-but-not-delivered and transmitted-but-not-recycle packets, and provides
|
||||
time input for its IGMP protocol.
|
||||
|
||||
@param[in] Event The IP4 service instance's heart beat timer.
|
||||
@@ -2272,17 +2272,17 @@ Ip4TimerTicking (
|
||||
|
||||
IpSb = (IP4_SERVICE *) Context;
|
||||
NET_CHECK_SIGNATURE (IpSb, IP4_SERVICE_SIGNATURE);
|
||||
|
||||
|
||||
Ip4PacketTimerTicking (IpSb);
|
||||
Ip4IgmpTicking (IpSb);
|
||||
}
|
||||
|
||||
/**
|
||||
This dedicated timer is used to poll underlying network media status. In case
|
||||
of cable swap or wireless network switch, a new round auto configuration will
|
||||
be initiated. The timer will signal the IP4 to run DHCP configuration again.
|
||||
IP4 driver will free old IP address related resource, such as route table and
|
||||
Interface, then initiate a DHCP process to acquire new IP, eventually create
|
||||
This dedicated timer is used to poll underlying network media status. In case
|
||||
of cable swap or wireless network switch, a new round auto configuration will
|
||||
be initiated. The timer will signal the IP4 to run DHCP configuration again.
|
||||
IP4 driver will free old IP address related resource, such as route table and
|
||||
Interface, then initiate a DHCP process to acquire new IP, eventually create
|
||||
route table for new IP address.
|
||||
|
||||
@param[in] Event The IP4 service instance's heart beat timer.
|
||||
@@ -2303,12 +2303,12 @@ Ip4TimerReconfigChecking (
|
||||
|
||||
IpSb = (IP4_SERVICE *) Context;
|
||||
NET_CHECK_SIGNATURE (IpSb, IP4_SERVICE_SIGNATURE);
|
||||
|
||||
|
||||
OldMediaPresent = IpSb->MediaPresent;
|
||||
|
||||
//
|
||||
// Get fresh mode data from MNP, since underlying media status may change.
|
||||
// Here, it needs to mention that the MediaPresent can also be checked even if
|
||||
// Get fresh mode data from MNP, since underlying media status may change.
|
||||
// Here, it needs to mention that the MediaPresent can also be checked even if
|
||||
// EFI_NOT_STARTED returned while this MNP child driver instance isn't configured.
|
||||
//
|
||||
Status = IpSb->Mnp->GetModeData (IpSb->Mnp, NULL, &SnpModeData);
|
||||
@@ -2323,8 +2323,8 @@ Ip4TimerReconfigChecking (
|
||||
if (!OldMediaPresent && IpSb->MediaPresent && (IpSb->Ip4Config2Instance.Policy == Ip4Config2PolicyDhcp)) {
|
||||
//
|
||||
// Signal the IP4 to run the dhcp configuration again. IP4 driver will free
|
||||
// old IP address related resource, such as route table and Interface, then
|
||||
// initiate a DHCP round to acquire new IP, eventually
|
||||
// old IP address related resource, such as route table and Interface, then
|
||||
// initiate a DHCP round to acquire new IP, eventually
|
||||
// create route table for new IP address.
|
||||
//
|
||||
if (IpSb->ReconfigEvent != NULL) {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/** @file
|
||||
Ip4 internal functions and type defintions.
|
||||
|
||||
|
||||
Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
|
||||
@@ -134,7 +134,7 @@ struct _IP4_PROTOCOL {
|
||||
EFI_HANDLE Handle;
|
||||
INTN State;
|
||||
|
||||
BOOLEAN InDestroy;
|
||||
BOOLEAN InDestroy;
|
||||
|
||||
IP4_SERVICE *Service;
|
||||
LIST_ENTRY Link; // Link to all the IP protocol from the service
|
||||
@@ -212,7 +212,7 @@ struct _IP4_SERVICE {
|
||||
BOOLEAN Reconfig;
|
||||
|
||||
//
|
||||
// Underlying media present status.
|
||||
// Underlying media present status.
|
||||
//
|
||||
BOOLEAN MediaPresent;
|
||||
|
||||
@@ -334,8 +334,8 @@ Ip4Groups (
|
||||
);
|
||||
|
||||
/**
|
||||
This heart beat timer of IP4 service instance times out all of its IP4 children's
|
||||
received-but-not-delivered and transmitted-but-not-recycle packets, and provides
|
||||
This heart beat timer of IP4 service instance times out all of its IP4 children's
|
||||
received-but-not-delivered and transmitted-but-not-recycle packets, and provides
|
||||
time input for its IGMP protocol.
|
||||
|
||||
@param[in] Event The IP4 service instance's heart beat timer.
|
||||
@@ -350,11 +350,11 @@ Ip4TimerTicking (
|
||||
);
|
||||
|
||||
/**
|
||||
This dedicated timer is used to poll underlying network media status. In case
|
||||
of cable swap or wireless network switch, a new round auto configuration will
|
||||
be initiated. The timer will signal the IP4 to run DHCP configuration again.
|
||||
IP4 driver will free old IP address related resource, such as route table and
|
||||
Interface, then initiate a DHCP process to acquire new IP, eventually create
|
||||
This dedicated timer is used to poll underlying network media status. In case
|
||||
of cable swap or wireless network switch, a new round auto configuration will
|
||||
be initiated. The timer will signal the IP4 to run DHCP configuration again.
|
||||
IP4 driver will free old IP address related resource, such as route table and
|
||||
Interface, then initiate a DHCP process to acquire new IP, eventually create
|
||||
route table for new IP address.
|
||||
|
||||
@param[in] Event The IP4 service instance's heart beat timer.
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
IP4 input process.
|
||||
|
||||
Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
|
||||
This program and the accompanying materials
|
||||
@@ -441,8 +441,8 @@ DROP:
|
||||
}
|
||||
|
||||
/**
|
||||
The callback function for the net buffer which wraps the packet processed by
|
||||
IPsec. It releases the wrap packet and also signals IPsec to free the resources.
|
||||
The callback function for the net buffer which wraps the packet processed by
|
||||
IPsec. It releases the wrap packet and also signals IPsec to free the resources.
|
||||
|
||||
@param[in] Arg The wrap context
|
||||
|
||||
@@ -469,25 +469,25 @@ Ip4IpSecFree (
|
||||
}
|
||||
|
||||
/**
|
||||
The work function to locate IPsec protocol to process the inbound or
|
||||
The work function to locate IPsec protocol to process the inbound or
|
||||
outbound IP packets. The process routine handls the packet with following
|
||||
actions: bypass the packet, discard the packet, or protect the packet.
|
||||
actions: bypass the packet, discard the packet, or protect the packet.
|
||||
|
||||
@param[in] IpSb The IP4 service instance.
|
||||
@param[in, out] Head The The caller supplied IP4 header.
|
||||
@param[in, out] Netbuf The IP4 packet to be processed by IPsec.
|
||||
@param[in, out] Options The caller supplied options.
|
||||
@param[in, out] OptionsLen The length of the option.
|
||||
@param[in] Direction The directionality in an SPD entry,
|
||||
@param[in] Direction The directionality in an SPD entry,
|
||||
EfiIPsecInBound or EfiIPsecOutBound.
|
||||
@param[in] Context The token's wrap.
|
||||
|
||||
@retval EFI_SUCCESS The IPsec protocol is not available or disabled.
|
||||
@retval EFI_SUCCESS The packet was bypassed and all buffers remain the same.
|
||||
@retval EFI_SUCCESS The packet was protected.
|
||||
@retval EFI_ACCESS_DENIED The packet was discarded.
|
||||
@retval EFI_ACCESS_DENIED The packet was discarded.
|
||||
@retval EFI_OUT_OF_RESOURCES There is no suffcient resource to complete the operation.
|
||||
@retval EFI_BUFFER_TOO_SMALL The number of non-empty block is bigger than the
|
||||
@retval EFI_BUFFER_TOO_SMALL The number of non-empty block is bigger than the
|
||||
number of input data blocks when build a fragment table.
|
||||
|
||||
**/
|
||||
@@ -519,12 +519,12 @@ Ip4IpSecProcessPacket (
|
||||
goto ON_EXIT;
|
||||
}
|
||||
ASSERT (mIpSec != NULL);
|
||||
|
||||
|
||||
Packet = *Netbuf;
|
||||
RecycleEvent = NULL;
|
||||
IpSecWrap = NULL;
|
||||
FragmentTable = NULL;
|
||||
TxWrap = (IP4_TXTOKEN_WRAP *) Context;
|
||||
TxWrap = (IP4_TXTOKEN_WRAP *) Context;
|
||||
FragmentCount = Packet->BlockOpNum;
|
||||
|
||||
ZeroMem (&ZeroHead, sizeof (IP4_HEAD));
|
||||
@@ -535,14 +535,14 @@ Ip4IpSecProcessPacket (
|
||||
if (mIpSec->DisabledFlag) {
|
||||
//
|
||||
// If IPsec is disabled, restore the original MTU
|
||||
//
|
||||
//
|
||||
IpSb->MaxPacketSize = IpSb->OldMaxPacketSize;
|
||||
goto ON_EXIT;
|
||||
} else {
|
||||
//
|
||||
// If IPsec is enabled, use the MTU which reduce the IPsec header length.
|
||||
// If IPsec is enabled, use the MTU which reduce the IPsec header length.
|
||||
//
|
||||
IpSb->MaxPacketSize = IpSb->OldMaxPacketSize - IP4_MAX_IPSEC_HEADLEN;
|
||||
IpSb->MaxPacketSize = IpSb->OldMaxPacketSize - IP4_MAX_IPSEC_HEADLEN;
|
||||
}
|
||||
|
||||
//
|
||||
@@ -554,9 +554,9 @@ Ip4IpSecProcessPacket (
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
goto ON_EXIT;
|
||||
}
|
||||
|
||||
|
||||
Status = NetbufBuildExt (Packet, FragmentTable, &FragmentCount);
|
||||
|
||||
|
||||
//
|
||||
// Record the original FragmentTable and count.
|
||||
//
|
||||
@@ -572,7 +572,7 @@ Ip4IpSecProcessPacket (
|
||||
// Convert host byte order to network byte order
|
||||
//
|
||||
Ip4NtohHead (*Head);
|
||||
|
||||
|
||||
Status = mIpSec->ProcessExt (
|
||||
mIpSec,
|
||||
IpSb->Controller,
|
||||
@@ -590,7 +590,7 @@ Ip4IpSecProcessPacket (
|
||||
// Convert back to host byte order
|
||||
//
|
||||
Ip4NtohHead (*Head);
|
||||
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
FreePool (OriginalFragmentTable);
|
||||
goto ON_EXIT;
|
||||
@@ -610,7 +610,7 @@ Ip4IpSecProcessPacket (
|
||||
}
|
||||
|
||||
if (Direction == EfiIPsecOutBound && TxWrap != NULL) {
|
||||
|
||||
|
||||
TxWrap->IpSecRecycleSignal = RecycleEvent;
|
||||
TxWrap->Packet = NetbufFromExt (
|
||||
FragmentTable,
|
||||
@@ -635,28 +635,28 @@ Ip4IpSecProcessPacket (
|
||||
//
|
||||
NetIpSecNetbufFree (*Netbuf);
|
||||
*Netbuf = TxWrap->Packet;
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
IpSecWrap = AllocateZeroPool (sizeof (IP4_IPSEC_WRAP));
|
||||
|
||||
|
||||
if (IpSecWrap == NULL) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
gBS->SignalEvent (RecycleEvent);
|
||||
goto ON_EXIT;
|
||||
}
|
||||
|
||||
|
||||
IpSecWrap->IpSecRecycleSignal = RecycleEvent;
|
||||
IpSecWrap->Packet = Packet;
|
||||
Packet = NetbufFromExt (
|
||||
FragmentTable,
|
||||
FragmentCount,
|
||||
IP4_MAX_HEADLEN,
|
||||
0,
|
||||
Ip4IpSecFree,
|
||||
FragmentTable,
|
||||
FragmentCount,
|
||||
IP4_MAX_HEADLEN,
|
||||
0,
|
||||
Ip4IpSecFree,
|
||||
IpSecWrap
|
||||
);
|
||||
|
||||
|
||||
if (Packet == NULL) {
|
||||
Packet = IpSecWrap->Packet;
|
||||
gBS->SignalEvent (RecycleEvent);
|
||||
@@ -686,7 +686,7 @@ ON_EXIT:
|
||||
/**
|
||||
Pre-process the IPv4 packet. First validates the IPv4 packet, and
|
||||
then reassembles packet if it is necessary.
|
||||
|
||||
|
||||
@param[in] IpSb Pointer to IP4_SERVICE.
|
||||
@param[in, out] Packet Pointer to the Packet to be processed.
|
||||
@param[in] Head Pointer to the IP4_HEAD.
|
||||
@@ -696,7 +696,7 @@ ON_EXIT:
|
||||
as multicast.
|
||||
|
||||
@retval EFI_SEUCCESS The recieved packet is in well form.
|
||||
@retval EFI_INVAILD_PARAMETER The recieved packet is malformed.
|
||||
@retval EFI_INVAILD_PARAMETER The recieved packet is malformed.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -705,9 +705,9 @@ Ip4PreProcessPacket (
|
||||
IN OUT NET_BUF **Packet,
|
||||
IN IP4_HEAD *Head,
|
||||
IN UINT8 *Option,
|
||||
IN UINT32 OptionLen,
|
||||
IN UINT32 OptionLen,
|
||||
IN UINT32 Flag
|
||||
)
|
||||
)
|
||||
{
|
||||
IP4_CLIP_INFO *Info;
|
||||
UINT32 HeadLen;
|
||||
@@ -720,7 +720,7 @@ Ip4PreProcessPacket (
|
||||
if ((*Packet)->TotalSize < IP4_MIN_HEADLEN) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
|
||||
HeadLen = (Head->HeadLen << 2);
|
||||
TotalLen = NTOHS (Head->TotalLen);
|
||||
|
||||
@@ -769,7 +769,7 @@ Ip4PreProcessPacket (
|
||||
// Validate the options. Don't call the Ip4OptionIsValid if
|
||||
// there is no option to save some CPU process.
|
||||
//
|
||||
|
||||
|
||||
if ((OptionLen > 0) && !Ip4OptionIsValid (Option, OptionLen, TRUE)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
@@ -810,7 +810,7 @@ Ip4PreProcessPacket (
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -842,7 +842,7 @@ Ip4AccpetFrame (
|
||||
IP4_HEAD ZeroHead;
|
||||
UINT8 *Option;
|
||||
UINT32 OptionLen;
|
||||
|
||||
|
||||
IpSb = (IP4_SERVICE *) Context;
|
||||
Option = NULL;
|
||||
|
||||
@@ -861,11 +861,11 @@ Ip4AccpetFrame (
|
||||
// Validate packet format and reassemble packet if it is necessary.
|
||||
//
|
||||
Status = Ip4PreProcessPacket (
|
||||
IpSb,
|
||||
&Packet,
|
||||
Head,
|
||||
IpSb,
|
||||
&Packet,
|
||||
Head,
|
||||
Option,
|
||||
OptionLen,
|
||||
OptionLen,
|
||||
Flag
|
||||
);
|
||||
|
||||
@@ -890,7 +890,7 @@ Ip4AccpetFrame (
|
||||
if (EFI_ERROR (Status)) {
|
||||
goto RESTART;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// If the packet is protected by tunnel mode, parse the inner Ip Packet.
|
||||
//
|
||||
@@ -914,7 +914,7 @@ Ip4AccpetFrame (
|
||||
goto RESTART;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ASSERT (Packet != NULL);
|
||||
Head = Packet->Ip.Ip4;
|
||||
IP4_GET_CLIP_INFO (Packet)->Status = EFI_SUCCESS;
|
||||
@@ -1298,7 +1298,7 @@ Ip4InstanceDeliverPacket (
|
||||
//
|
||||
Head = NetbufAllocSpace (Dup, IP4_MAX_HEADLEN, NET_BUF_HEAD);
|
||||
ASSERT (Head != NULL);
|
||||
|
||||
|
||||
Dup->Ip.Ip4 = (IP4_HEAD *) Head;
|
||||
|
||||
CopyMem (Head, Packet->Ip.Ip4, Packet->Ip.Ip4->HeadLen << 2);
|
||||
@@ -1345,7 +1345,7 @@ Ip4InstanceDeliverPacket (
|
||||
@param[in] Head The header of the received packet.
|
||||
@param[in] Packet The data of the received packet.
|
||||
@param[in] Option Point to the IP4 packet header options.
|
||||
@param[in] OptionLen Length of the IP4 packet header options.
|
||||
@param[in] OptionLen Length of the IP4 packet header options.
|
||||
@param[in] IpIf The interface to enqueue the packet to.
|
||||
|
||||
@return The number of the IP4 children that accepts the packet
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/** @file
|
||||
|
||||
Copyright (c) 2005 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -17,7 +17,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#define IP4_MIN_HEADLEN 20
|
||||
#define IP4_MAX_HEADLEN 60
|
||||
///
|
||||
/// 8(ESP header) + 16(max IV) + 16(max padding) + 2(ESP tail) + 12(max ICV) = 54
|
||||
/// 8(ESP header) + 16(max IV) + 16(max padding) + 2(ESP tail) + 12(max ICV) = 54
|
||||
///
|
||||
#define IP4_MAX_IPSEC_HEADLEN 54
|
||||
|
||||
@@ -169,7 +169,7 @@ Ip4Demultiplex (
|
||||
@param[in] Head The header of the received packet.
|
||||
@param[in] Packet The data of the received packet.
|
||||
@param[in] Option Point to the IP4 packet header options.
|
||||
@param[in] OptionLen Length of the IP4 packet header options.
|
||||
@param[in] OptionLen Length of the IP4 packet header options.
|
||||
@param[in] IpIf The interface to enqueue the packet to.
|
||||
|
||||
@return The number of the IP4 children that accepts the packet
|
||||
@@ -216,25 +216,25 @@ Ip4PacketTimerTicking (
|
||||
);
|
||||
|
||||
/**
|
||||
The work function to locate IPsec protocol to process the inbound or
|
||||
The work function to locate IPsec protocol to process the inbound or
|
||||
outbound IP packets. The process routine handls the packet with following
|
||||
actions: bypass the packet, discard the packet, or protect the packet.
|
||||
actions: bypass the packet, discard the packet, or protect the packet.
|
||||
|
||||
@param[in] IpSb The IP4 service instance.
|
||||
@param[in, out] Head The The caller supplied IP4 header.
|
||||
@param[in, out] Netbuf The IP4 packet to be processed by IPsec.
|
||||
@param[in, out] Options The caller supplied options.
|
||||
@param[in, out] OptionsLen The length of the option.
|
||||
@param[in] Direction The directionality in an SPD entry,
|
||||
@param[in] Direction The directionality in an SPD entry,
|
||||
EfiIPsecInBound or EfiIPsecOutBound.
|
||||
@param[in] Context The token's wrap.
|
||||
|
||||
@retval EFI_SUCCESS The IPsec protocol is not available or disabled.
|
||||
@retval EFI_SUCCESS The packet was bypassed and all buffers remain the same.
|
||||
@retval EFI_SUCCESS The packet was protected.
|
||||
@retval EFI_ACCESS_DENIED The packet was discarded.
|
||||
@retval EFI_ACCESS_DENIED The packet was discarded.
|
||||
@retval EFI_OUT_OF_RESOURCES There is no suffcient resource to complete the operation.
|
||||
@retval EFI_BUFFER_TOO_SMALL The number of non-empty block is bigger than the
|
||||
@retval EFI_BUFFER_TOO_SMALL The number of non-empty block is bigger than the
|
||||
number of input data blocks when build a fragment table.
|
||||
|
||||
**/
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
IP4 option support functions.
|
||||
|
||||
Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -109,7 +109,7 @@ Ip4OptionIsValid (
|
||||
@param[in] Option The original option to copy from
|
||||
@param[in] OptionLen The length of the original option
|
||||
@param[in] FirstFragment Whether it is the first fragment
|
||||
@param[in, out] Buf The buffer to copy options to. NULL
|
||||
@param[in, out] Buf The buffer to copy options to. NULL
|
||||
@param[in, out] BufLen The length of the buffer
|
||||
|
||||
@retval EFI_SUCCESS The options are copied over
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
IP4 option support routines.
|
||||
|
||||
Copyright (c) 2005 - 2009, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -54,7 +54,7 @@ Ip4OptionIsValid (
|
||||
@param[in] Option The original option to copy from
|
||||
@param[in] OptionLen The length of the original option
|
||||
@param[in] FirstFragment Whether it is the first fragment
|
||||
@param[in, out] Buf The buffer to copy options to. NULL
|
||||
@param[in, out] Buf The buffer to copy options to. NULL
|
||||
@param[in, out] BufLen The length of the buffer
|
||||
|
||||
@retval EFI_SUCCESS The options are copied over
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Transmit the IP4 packet.
|
||||
|
||||
Copyright (c) 2005 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -269,16 +269,16 @@ Ip4Output (
|
||||
Head->Ver = 4;
|
||||
RawData = FALSE;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Call IPsec process.
|
||||
//
|
||||
Status = Ip4IpSecProcessPacket (
|
||||
IpSb,
|
||||
&Head,
|
||||
&Packet,
|
||||
&Option,
|
||||
&OptLen,
|
||||
IpSb,
|
||||
&Head,
|
||||
&Packet,
|
||||
&Option,
|
||||
&OptLen,
|
||||
EfiIPsecOutBound,
|
||||
Context
|
||||
);
|
||||
@@ -286,7 +286,7 @@ Ip4Output (
|
||||
if (EFI_ERROR(Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
Dest = Head->Dst;
|
||||
if (IP4_IS_BROADCAST (Ip4GetNetCast (Dest, IpIf)) || (Dest == IP4_ALLONE_ADDRESS)) {
|
||||
//
|
||||
@@ -333,7 +333,7 @@ Ip4Output (
|
||||
// OK, selected the source and route, fragment the packet then send
|
||||
// them. Tag each fragment other than the first one as spawn from it.
|
||||
//
|
||||
Mtu = IpSb->MaxPacketSize + sizeof (IP4_HEAD);
|
||||
Mtu = IpSb->MaxPacketSize + sizeof (IP4_HEAD);
|
||||
|
||||
if (Packet->TotalSize + HeadLen > Mtu) {
|
||||
//
|
||||
@@ -342,7 +342,7 @@ Ip4Output (
|
||||
if (RawData) {
|
||||
return EFI_BAD_BUFFER_SIZE;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Packet is fragmented from the tail to the head, that is, the
|
||||
// first frame sent is the last fragment of the packet. The first
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
EFI IP4 route table and route cache table defintions.
|
||||
|
||||
Copyright (c) 2005 - 2009, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
UEFI Component Name(2) protocol implementation for MnpDxe driver.
|
||||
|
||||
Copyright (c) 2005 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions
|
||||
of the BSD License which accompanies this distribution. The full
|
||||
@@ -107,10 +107,10 @@ MnpComponentNameGetDriverName (
|
||||
|
||||
@param Mnp[in] A pointer to the EFI_MANAGED_NETWORK_PROTOCOL.
|
||||
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Update the ControllerNameTable of this instance successfully.
|
||||
@retval EFI_INVALID_PARAMETER The input parameter is invalid.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
UpdateName (
|
||||
@@ -157,7 +157,7 @@ UpdateName (
|
||||
//
|
||||
// Remove the last '-'
|
||||
//
|
||||
OffSet--;
|
||||
OffSet--;
|
||||
//
|
||||
// Print the ProtocolType and VLAN ID for this instance.
|
||||
//
|
||||
@@ -177,12 +177,12 @@ UpdateName (
|
||||
} else {
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
if (gMnpControllerNameTable != NULL) {
|
||||
FreeUnicodeStringTable (gMnpControllerNameTable);
|
||||
gMnpControllerNameTable = NULL;
|
||||
}
|
||||
|
||||
|
||||
Status = AddUnicodeString2 (
|
||||
"eng",
|
||||
gMnpComponentName.SupportedLanguages,
|
||||
@@ -193,7 +193,7 @@ UpdateName (
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
return AddUnicodeString2 (
|
||||
"en",
|
||||
gMnpComponentName2.SupportedLanguages,
|
||||
@@ -290,22 +290,22 @@ MnpComponentNameGetControllerName (
|
||||
if (ChildHandle == NULL) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
//
|
||||
// Make sure this driver is currently managing ControllerHandle
|
||||
//
|
||||
|
||||
//
|
||||
// Make sure this driver is currently managing ControllerHandle
|
||||
//
|
||||
Status = EfiTestManagedDevice (
|
||||
ControllerHandle,
|
||||
gMnpDriverBinding.DriverBindingHandle,
|
||||
&gEfiSimpleNetworkProtocolGuid
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
//
|
||||
// Make sure this driver produced ChildHandle
|
||||
//
|
||||
|
||||
//
|
||||
// Make sure this driver produced ChildHandle
|
||||
//
|
||||
Status = EfiTestChildHandle (
|
||||
ControllerHandle,
|
||||
ChildHandle,
|
||||
@@ -315,9 +315,9 @@ MnpComponentNameGetControllerName (
|
||||
return Status;
|
||||
}
|
||||
|
||||
//
|
||||
// Retrieve an instance of a produced protocol from ChildHandle
|
||||
//
|
||||
//
|
||||
// Retrieve an instance of a produced protocol from ChildHandle
|
||||
//
|
||||
Status = gBS->OpenProtocol (
|
||||
ChildHandle,
|
||||
&gEfiManagedNetworkProtocolGuid,
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Implementation of Managed Network Protocol private services.
|
||||
|
||||
Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions
|
||||
of the BSD License which accompanies this distribution. The full
|
||||
@@ -255,7 +255,7 @@ MnpAddFreeTxBuf (
|
||||
|
||||
/**
|
||||
Allocate a free TX buffer from MnpDeviceData->FreeTxBufList. If there is none
|
||||
in the queue, first try to recycle some from SNP, then try to allocate some and add
|
||||
in the queue, first try to recycle some from SNP, then try to allocate some and add
|
||||
them into the queue, then fetch the NET_BUF from the updated FreeTxBufList.
|
||||
|
||||
@param[in, out] MnpDeviceData Pointer to the MNP_DEVICE_DATA.
|
||||
@@ -274,7 +274,7 @@ MnpAllocTxBuf (
|
||||
EFI_STATUS Status;
|
||||
LIST_ENTRY *Entry;
|
||||
MNP_TX_BUF_WRAP *TxBufWrap;
|
||||
|
||||
|
||||
NET_CHECK_SIGNATURE (MnpDeviceData, MNP_DEVICE_DATA_SIGNATURE);
|
||||
|
||||
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||
@@ -369,7 +369,7 @@ MnpFreeTxBuf (
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||
InsertTailList (&MnpDeviceData->FreeTxBufList, &TxBufWrap->WrapEntry);
|
||||
TxBufWrap->InUse = FALSE;
|
||||
@@ -877,7 +877,7 @@ MnpDestroyServiceData (
|
||||
|
||||
/**
|
||||
Callback function which provided by user to remove one node in NetDestroyLinkList process.
|
||||
|
||||
|
||||
@param[in] Entry The entry to be removed.
|
||||
@param[in] Context Pointer to the callback context corresponds to the Context in NetDestroyLinkList.
|
||||
|
||||
@@ -917,9 +917,9 @@ MnpDestroyServiceChild (
|
||||
LIST_ENTRY *List;
|
||||
EFI_STATUS Status;
|
||||
UINTN ListLength;
|
||||
|
||||
|
||||
List = &MnpServiceData->ChildrenList;
|
||||
|
||||
|
||||
Status = NetDestroyLinkList (
|
||||
List,
|
||||
MnpDestoryChildEntry,
|
||||
@@ -1160,7 +1160,7 @@ MnpStopSnp (
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_SIMPLE_NETWORK_PROTOCOL *Snp;
|
||||
|
||||
|
||||
Snp = MnpDeviceData->Snp;
|
||||
ASSERT (Snp != NULL);
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Implementation of driver entry point and driver binding protocol.
|
||||
|
||||
Copyright (c) 2005 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions
|
||||
of the BSD License which accompanies this distribution. The full
|
||||
@@ -28,7 +28,7 @@ EFI_DRIVER_BINDING_PROTOCOL gMnpDriverBinding = {
|
||||
|
||||
/**
|
||||
Callback function which provided by user to remove one node in NetDestroyLinkList process.
|
||||
|
||||
|
||||
@param[in] Entry The entry to be removed.
|
||||
@param[in] Context Pointer to the callback context corresponds to the Context in NetDestroyLinkList.
|
||||
|
||||
@@ -44,14 +44,14 @@ MnpDestroyServiceDataEntry (
|
||||
)
|
||||
{
|
||||
MNP_SERVICE_DATA *MnpServiceData;
|
||||
|
||||
|
||||
MnpServiceData = MNP_SERVICE_DATA_FROM_LINK (Entry);
|
||||
return MnpDestroyServiceData (MnpServiceData);
|
||||
}
|
||||
|
||||
/**
|
||||
Callback function which provided by user to remove one node in NetDestroyLinkList process.
|
||||
|
||||
|
||||
@param[in] Entry The entry to be removed.
|
||||
@param[in] Context Pointer to the callback context corresponds to the Context in NetDestroyLinkList.
|
||||
|
||||
|
@@ -3,9 +3,9 @@
|
||||
#
|
||||
# This module produces EFI Managed Network Protocol upon EFI Simple Network Protocol,
|
||||
# to provide raw asynchronous network I/O services. It also produces EFI VLAN Protocol
|
||||
# to provide manageability interface for VLAN configuration.
|
||||
# to provide manageability interface for VLAN configuration.
|
||||
#
|
||||
# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
|
@@ -5,13 +5,13 @@
|
||||
// to provide raw asynchronous network I/O services. It also produces EFI VLAN Protocol
|
||||
// to provide manageability interface for VLAN configuration.
|
||||
//
|
||||
// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
// which accompanies this distribution. The full text of the license may be found at
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// /** @file
|
||||
// MnpDxe Localized Strings and Content
|
||||
//
|
||||
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -14,7 +14,7 @@
|
||||
// **/
|
||||
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
#language en-US
|
||||
"MNP DXE Driver"
|
||||
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Declaration of structures and functions of MnpDxe driver.
|
||||
|
||||
Copyright (c) 2005 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions
|
||||
of the BSD License which accompanies this distribution. The full
|
||||
@@ -366,7 +366,7 @@ MnpBuildTxPacket (
|
||||
);
|
||||
|
||||
/**
|
||||
Synchronously send out the packet.
|
||||
Synchronously send out the packet.
|
||||
|
||||
This functon places the packet buffer to SNP driver's tansmit queue. The packet
|
||||
can be considered successfully sent out once SNP acccetp the packet, while the
|
||||
@@ -468,7 +468,7 @@ MnpFreeNbuf (
|
||||
|
||||
/**
|
||||
Allocate a free TX buffer from MnpDeviceData->FreeTxBufList. If there is none
|
||||
in the queue, first try to recycle some from SNP, then try to allocate some and add
|
||||
in the queue, first try to recycle some from SNP, then try to allocate some and add
|
||||
them into the queue, then fetch the NET_BUF from the updated FreeTxBufList.
|
||||
|
||||
@param[in, out] MnpDeviceData Pointer to the MNP_DEVICE_DATA.
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Implementation of Managed Network Protocol I/O functions.
|
||||
|
||||
Copyright (c) 2005 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions
|
||||
of the BSD License which accompanies this distribution. The full
|
||||
@@ -129,14 +129,14 @@ MnpBuildTxPacket (
|
||||
UINT16 Index;
|
||||
MNP_DEVICE_DATA *MnpDeviceData;
|
||||
UINT8 *TxBuf;
|
||||
|
||||
|
||||
MnpDeviceData = MnpServiceData->MnpDeviceData;
|
||||
|
||||
|
||||
TxBuf = MnpAllocTxBuf (MnpDeviceData);
|
||||
if (TxBuf == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Reserve space for vlan tag if needed.
|
||||
//
|
||||
@@ -145,14 +145,14 @@ MnpBuildTxPacket (
|
||||
} else {
|
||||
*PktBuf = TxBuf;
|
||||
}
|
||||
|
||||
|
||||
if ((TxData->DestinationAddress == NULL) && (TxData->FragmentCount == 1)) {
|
||||
CopyMem (
|
||||
*PktBuf,
|
||||
TxData->FragmentTable[0].FragmentBuffer,
|
||||
TxData->FragmentTable[0].FragmentLength
|
||||
);
|
||||
|
||||
|
||||
*PktLen = TxData->FragmentTable[0].FragmentLength;
|
||||
} else {
|
||||
//
|
||||
@@ -160,7 +160,7 @@ MnpBuildTxPacket (
|
||||
// one fragment, copy the data into the packet buffer. Reserve the
|
||||
// media header space if necessary.
|
||||
//
|
||||
SnpMode = MnpDeviceData->Snp->Mode;
|
||||
SnpMode = MnpDeviceData->Snp->Mode;
|
||||
DstPos = *PktBuf;
|
||||
*PktLen = 0;
|
||||
if (TxData->DestinationAddress != NULL) {
|
||||
@@ -195,7 +195,7 @@ MnpBuildTxPacket (
|
||||
|
||||
|
||||
/**
|
||||
Synchronously send out the packet.
|
||||
Synchronously send out the packet.
|
||||
|
||||
This functon places the packet buffer to SNP driver's tansmit queue. The packet
|
||||
can be considered successfully sent out once SNP acccetp the packet, while the
|
||||
@@ -245,7 +245,7 @@ MnpSyncSendPacket (
|
||||
goto SIGNAL_TOKEN;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (MnpServiceData->VlanId != 0) {
|
||||
//
|
||||
// Insert VLAN tag
|
||||
@@ -282,9 +282,9 @@ MnpSyncSendPacket (
|
||||
TxData->SourceAddress,
|
||||
TxData->DestinationAddress,
|
||||
&ProtocolType
|
||||
);
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
Token->Status = EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
VLAN Config Protocol implementation and VLAN packet process routine.
|
||||
|
||||
Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions
|
||||
of the BSD License which accompanies this distribution. The full
|
||||
@@ -237,7 +237,7 @@ MnpInsertVlanTag (
|
||||
@param[in] Buffer Pointer to the buffer contains the array of VLAN_TCI.
|
||||
@param[in] NumberOfVlan Pointer to number of VLAN.
|
||||
@param[out] NewNumberOfVlan Pointer to number of unique VLAN.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The VLAN variable is successfully checked.
|
||||
@retval EFI_OUT_OF_RESOURCES There is not enough resource to set the configuration.
|
||||
|
||||
@@ -259,7 +259,7 @@ MnpCheckVlanVariable (
|
||||
Count = 0;
|
||||
FoundDuplicateItem = FALSE;
|
||||
Status = EFI_SUCCESS;
|
||||
|
||||
|
||||
for (Index = 0; Index < NumberOfVlan; Index++) {
|
||||
for (Index2 = Index + 1; Index2 < NumberOfVlan; Index2++) {
|
||||
if (Buffer[Index].Bits.Vid == Buffer[Index2].Bits.Vid) {
|
||||
@@ -280,7 +280,7 @@ MnpCheckVlanVariable (
|
||||
if (Count != 0) {
|
||||
Status = MnpSetVlanVariable (MnpDeviceData, *NewNumberOfVlan, Buffer);
|
||||
}
|
||||
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
UEFI Component Name(2) protocol implementation for Mtftp4Dxe driver.
|
||||
|
||||
Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -237,10 +237,10 @@ Mtftp4ComponentNameGetDriverName (
|
||||
|
||||
@param Mtftp4[in] A pointer to the EFI_MTFTP4_PROTOCOL.
|
||||
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Update the ControllerNameTable of this instance successfully.
|
||||
@retval EFI_INVALID_PARAMETER The input parameter is invalid.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
UpdateName (
|
||||
@@ -277,7 +277,7 @@ UpdateName (
|
||||
FreeUnicodeStringTable (gMtftp4ControllerNameTable);
|
||||
gMtftp4ControllerNameTable = NULL;
|
||||
}
|
||||
|
||||
|
||||
Status = AddUnicodeString2 (
|
||||
"eng",
|
||||
gMtftp4ComponentName.SupportedLanguages,
|
||||
@@ -288,7 +288,7 @@ UpdateName (
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
return AddUnicodeString2 (
|
||||
"en",
|
||||
gMtftp4ComponentName2.SupportedLanguages,
|
||||
@@ -385,10 +385,10 @@ Mtftp4ComponentNameGetControllerName (
|
||||
if (ChildHandle == NULL) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
//
|
||||
// Make sure this driver produced ChildHandle
|
||||
//
|
||||
|
||||
//
|
||||
// Make sure this driver produced ChildHandle
|
||||
//
|
||||
Status = EfiTestChildHandle (
|
||||
ControllerHandle,
|
||||
ChildHandle,
|
||||
@@ -398,9 +398,9 @@ Mtftp4ComponentNameGetControllerName (
|
||||
return Status;
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
// Retrieve an instance of a produced protocol from ChildHandle
|
||||
//
|
||||
//
|
||||
Status = gBS->OpenProtocol (
|
||||
ChildHandle,
|
||||
&gEfiMtftp4ProtocolGuid,
|
||||
|
@@ -315,7 +315,7 @@ Mtftp4DriverBindingStart (
|
||||
if (EFI_ERROR (Status)) {
|
||||
goto ON_ERROR;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Install the Mtftp4ServiceBinding Protocol onto Controller
|
||||
//
|
||||
@@ -341,7 +341,7 @@ ON_ERROR:
|
||||
|
||||
/**
|
||||
Callback function which provided by user to remove one node in NetDestroyLinkList process.
|
||||
|
||||
|
||||
@param[in] Entry The entry to be removed.
|
||||
@param[in] Context Pointer to the callback context corresponds to the Context in NetDestroyLinkList.
|
||||
|
||||
@@ -713,7 +713,7 @@ Mtftp4ServiceBindingDestroyChild (
|
||||
&gEfiUdp4ProtocolGuid,
|
||||
gMtftp4DriverBinding.DriverBindingHandle,
|
||||
ChildHandle
|
||||
);
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Mtftp drivers function header.
|
||||
|
||||
Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -49,8 +49,8 @@ Mtftp4DriverBindingSupported (
|
||||
);
|
||||
|
||||
/**
|
||||
Start the MTFTP driver on this controller.
|
||||
|
||||
Start the MTFTP driver on this controller.
|
||||
|
||||
MTFTP driver will install a MTFTP SERVICE BINDING protocol on the supported
|
||||
controller, which can be used to create/destroy MTFTP children.
|
||||
|
||||
|
@@ -4,7 +4,7 @@
|
||||
# This module produces EFI MTFTPv4 Protocol upon EFI UDPv4 Protocol, to provide
|
||||
# basic services for client-side unicast and/or multicase TFTP operations.
|
||||
#
|
||||
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -30,7 +30,7 @@
|
||||
#
|
||||
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
|
||||
#
|
||||
# DRIVER_BINDING = gMtftp4DriverBinding
|
||||
# DRIVER_BINDING = gMtftp4DriverBinding
|
||||
# COMPONENT_NAME = gMtftp4ComponentName
|
||||
# COMPONENT_NAME2 = gMtftp4ComponentName2
|
||||
#
|
||||
|
@@ -4,13 +4,13 @@
|
||||
// This module produces EFI MTFTPv4 Protocol upon EFI UDPv4 Protocol, to provide
|
||||
// basic services for client-side unicast and/or multicase TFTP operations.
|
||||
//
|
||||
// Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
// which accompanies this distribution. The full text of the license may be found at
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// /** @file
|
||||
// Mtftp4Dxe Localized Strings and Content
|
||||
//
|
||||
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -13,8 +13,8 @@
|
||||
//
|
||||
// **/
|
||||
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
"MTFTP v4 DXE Driver"
|
||||
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/** @file
|
||||
Interface routine for Mtftp4.
|
||||
|
||||
|
||||
(C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
@@ -96,9 +96,9 @@ Mtftp4CleanOperation (
|
||||
|
||||
|
||||
/**
|
||||
Check packet for GetInfo.
|
||||
|
||||
GetInfo is implemented with EfiMtftp4ReadFile. It use Mtftp4GetInfoCheckPacket
|
||||
Check packet for GetInfo.
|
||||
|
||||
GetInfo is implemented with EfiMtftp4ReadFile. It use Mtftp4GetInfoCheckPacket
|
||||
to inspect the first packet from server, then abort the session.
|
||||
|
||||
@param This The MTFTP4 protocol instance
|
||||
@@ -167,10 +167,10 @@ Mtftp4GetInfoCheckPacket (
|
||||
|
||||
|
||||
/**
|
||||
Check whether the override data is valid.
|
||||
|
||||
Check whether the override data is valid.
|
||||
|
||||
It will first validate whether the server is a valid unicast. If a gateway
|
||||
is provided in the Override, it also check that it is a unicast on the
|
||||
is provided in the Override, it also check that it is a unicast on the
|
||||
connected network.
|
||||
|
||||
@param Instance The MTFTP instance
|
||||
@@ -178,7 +178,7 @@ Mtftp4GetInfoCheckPacket (
|
||||
|
||||
@retval TRUE The override data is valid
|
||||
@retval FALSE The override data is invalid
|
||||
|
||||
|
||||
**/
|
||||
BOOLEAN
|
||||
Mtftp4OverrideValid (
|
||||
@@ -219,9 +219,9 @@ Mtftp4OverrideValid (
|
||||
|
||||
/**
|
||||
Poll the UDP to get the IP4 default address, which may be retrieved
|
||||
by DHCP.
|
||||
|
||||
The default time out value is 5 seconds. If IP has retrieved the default address,
|
||||
by DHCP.
|
||||
|
||||
The default time out value is 5 seconds. If IP has retrieved the default address,
|
||||
the UDP is reconfigured.
|
||||
|
||||
@param Instance The Mtftp instance
|
||||
@@ -396,7 +396,7 @@ Mtftp4Start (
|
||||
|
||||
Status = EFI_SUCCESS;
|
||||
TokenStatus = EFI_SUCCESS;
|
||||
|
||||
|
||||
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||
|
||||
if (Instance->State != MTFTP4_STATE_CONFIGED) {
|
||||
@@ -536,17 +536,17 @@ ON_ERROR:
|
||||
/**
|
||||
Reads the current operational settings.
|
||||
|
||||
The GetModeData()function reads the current operational settings of this
|
||||
The GetModeData()function reads the current operational settings of this
|
||||
EFI MTFTPv4 Protocol driver instance.
|
||||
|
||||
@param This Pointer to the EFI_MTFTP4_PROTOCOL instance.
|
||||
@param ModeData Pointer to storage for the EFI MTFTPv4 Protocol
|
||||
driver mode data.
|
||||
driver mode data.
|
||||
|
||||
@retval EFI_SUCCESS The configuration data was successfully returned.
|
||||
@retval EFI_OUT_OF_RESOURCES The required mode data could not be allocated.
|
||||
@retval EFI_INVALID_PARAMETER This is NULL or ModeData is NULL.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -579,49 +579,49 @@ EfiMtftp4GetModeData (
|
||||
|
||||
|
||||
/**
|
||||
Initializes, changes, or resets the default operational setting for this
|
||||
Initializes, changes, or resets the default operational setting for this
|
||||
EFI MTFTPv4 Protocol driver instance.
|
||||
|
||||
The Configure() function is used to set and change the configuration data for
|
||||
this EFI MTFTPv4 Protocol driver instance. The configuration data can be reset
|
||||
to startup defaults by calling Configure() with MtftpConfigData set to NULL.
|
||||
Whenever the instance is reset, any pending operation is aborted. By changing
|
||||
the EFI MTFTPv4 Protocol driver instance configuration data, the client can
|
||||
connect to different MTFTPv4 servers. The configuration parameters in
|
||||
MtftpConfigData are used as the default parameters in later MTFTPv4 operations
|
||||
|
||||
The Configure() function is used to set and change the configuration data for
|
||||
this EFI MTFTPv4 Protocol driver instance. The configuration data can be reset
|
||||
to startup defaults by calling Configure() with MtftpConfigData set to NULL.
|
||||
Whenever the instance is reset, any pending operation is aborted. By changing
|
||||
the EFI MTFTPv4 Protocol driver instance configuration data, the client can
|
||||
connect to different MTFTPv4 servers. The configuration parameters in
|
||||
MtftpConfigData are used as the default parameters in later MTFTPv4 operations
|
||||
and can be overridden in later operations.
|
||||
|
||||
|
||||
@param This Pointer to the EFI_MTFTP4_PROTOCOL instance
|
||||
@param ConfigData MtftpConfigDataPointer to the configuration data
|
||||
@param ConfigData MtftpConfigDataPointer to the configuration data
|
||||
structure
|
||||
|
||||
@retval EFI_SUCCESS The EFI MTFTPv4 Protocol driver was configured
|
||||
@retval EFI_SUCCESS The EFI MTFTPv4 Protocol driver was configured
|
||||
successfully.
|
||||
@retval EFI_INVALID_PARAMETER One or more following conditions are TRUE:
|
||||
1.This is NULL.
|
||||
2.MtftpConfigData.UseDefaultSetting is FALSE and
|
||||
MtftpConfigData.StationIp is not a valid IPv4
|
||||
2.MtftpConfigData.UseDefaultSetting is FALSE and
|
||||
MtftpConfigData.StationIp is not a valid IPv4
|
||||
unicast address.
|
||||
3.MtftpCofigData.UseDefaultSetting is FALSE and
|
||||
3.MtftpCofigData.UseDefaultSetting is FALSE and
|
||||
MtftpConfigData.SubnetMask is invalid.
|
||||
4.MtftpCofigData.ServerIp is not a valid IPv4
|
||||
4.MtftpCofigData.ServerIp is not a valid IPv4
|
||||
unicast address.
|
||||
5.MtftpConfigData.UseDefaultSetting is FALSE and
|
||||
MtftpConfigData.GatewayIp is not a valid IPv4
|
||||
unicast address or is not in the same subnet
|
||||
5.MtftpConfigData.UseDefaultSetting is FALSE and
|
||||
MtftpConfigData.GatewayIp is not a valid IPv4
|
||||
unicast address or is not in the same subnet
|
||||
with station address.
|
||||
@retval EFI_ACCESS_DENIED The EFI configuration could not be changed at this
|
||||
time because there is one MTFTP background operation
|
||||
@retval EFI_ACCESS_DENIED The EFI configuration could not be changed at this
|
||||
time because there is one MTFTP background operation
|
||||
in progress.
|
||||
@retval EFI_NO_MAPPING When using a default address, configuration
|
||||
@retval EFI_NO_MAPPING When using a default address, configuration
|
||||
(DHCP, BOOTP, RARP, etc.) has not finished yet.
|
||||
@retval EFI_UNSUPPORTED A configuration protocol (DHCP, BOOTP, RARP, etc.)
|
||||
could not be located when clients choose to use
|
||||
@retval EFI_UNSUPPORTED A configuration protocol (DHCP, BOOTP, RARP, etc.)
|
||||
could not be located when clients choose to use
|
||||
the default address settings.
|
||||
@retval EFI_OUT_OF_RESOURCES The EFI MTFTPv4 Protocol driver instance data could
|
||||
@retval EFI_OUT_OF_RESOURCES The EFI MTFTPv4 Protocol driver instance data could
|
||||
not be allocated.
|
||||
@retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
|
||||
The EFI MTFTPv4 Protocol driver instance is not
|
||||
@retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
|
||||
The EFI MTFTPv4 Protocol driver instance is not
|
||||
configured.
|
||||
|
||||
**/
|
||||
@@ -681,7 +681,7 @@ EfiMtftp4Configure (
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
if ((Gateway != 0) &&
|
||||
if ((Gateway != 0) &&
|
||||
(!IP4_NET_EQUAL (Gateway, Ip, Netmask) || (Netmask != 0 && !NetIp4IsUnicast (Gateway, Netmask)))) {
|
||||
|
||||
return EFI_INVALID_PARAMETER;
|
||||
@@ -707,21 +707,21 @@ EfiMtftp4Configure (
|
||||
|
||||
/**
|
||||
Parses the options in an MTFTPv4 OACK packet.
|
||||
|
||||
The ParseOptions() function parses the option fields in an MTFTPv4 OACK packet
|
||||
and returns the number of options that were found and optionally a list of
|
||||
|
||||
The ParseOptions() function parses the option fields in an MTFTPv4 OACK packet
|
||||
and returns the number of options that were found and optionally a list of
|
||||
pointers to the options in the packet.
|
||||
If one or more of the option fields are not valid, then EFI_PROTOCOL_ERROR is
|
||||
If one or more of the option fields are not valid, then EFI_PROTOCOL_ERROR is
|
||||
returned and *OptionCount and *OptionList stop at the last valid option.
|
||||
The OptionList is allocated by this function, and caller should free it when used.
|
||||
|
||||
@param This Pointer to the EFI_MTFTP4_PROTOCOL instance.
|
||||
@param PacketLen Length of the OACK packet to be parsed.
|
||||
@param Packet Pointer to the OACK packet to be parsed.
|
||||
@param Packet Pointer to the OACK packet to be parsed.
|
||||
@param OptionCount Pointer to the number of options in following OptionList.
|
||||
@param OptionList Pointer to EFI_MTFTP4_OPTION storage. Call the
|
||||
@param OptionList Pointer to EFI_MTFTP4_OPTION storage. Call the
|
||||
EFI Boot Service FreePool() to release theOptionList
|
||||
if the options in this OptionList are not needed
|
||||
if the options in this OptionList are not needed
|
||||
any more
|
||||
|
||||
@retval EFI_SUCCESS The OACK packet was valid and the OptionCount and
|
||||
@@ -769,25 +769,25 @@ EfiMtftp4ParseOptions (
|
||||
|
||||
/**
|
||||
Downloads a file from an MTFTPv4 server.
|
||||
|
||||
The ReadFile() function is used to initialize and start an MTFTPv4 download
|
||||
process and optionally wait for completion. When the download operation completes,
|
||||
whether successfully or not, the Token.Status field is updated by the EFI MTFTPv4
|
||||
|
||||
The ReadFile() function is used to initialize and start an MTFTPv4 download
|
||||
process and optionally wait for completion. When the download operation completes,
|
||||
whether successfully or not, the Token.Status field is updated by the EFI MTFTPv4
|
||||
Protocol driver and then Token.Event is signaled (if it is not NULL).
|
||||
Data can be downloaded from the MTFTPv4 server into either of the following locations:
|
||||
1.A fixed buffer that is pointed to by Token.Buffer
|
||||
2.A download service function that is pointed to by Token.CheckPacket
|
||||
If both Token.Buffer and Token.CheckPacket are used, then Token.CheckPacket
|
||||
will be called first. If the call is successful, the packet will be stored in
|
||||
If both Token.Buffer and Token.CheckPacket are used, then Token.CheckPacket
|
||||
will be called first. If the call is successful, the packet will be stored in
|
||||
Token.Buffer.
|
||||
|
||||
@param This Pointer to the EFI_MTFTP4_PROTOCOL instance
|
||||
@param Token Pointer to the token structure to provide the
|
||||
@param Token Pointer to the token structure to provide the
|
||||
parameters that are used in this operation.
|
||||
|
||||
@retval EFI_SUCCESS The data file has been transferred successfully.
|
||||
@retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
|
||||
@retval EFI_BUFFER_TOO_SMALL BufferSize is not large enough to hold the downloaded
|
||||
@retval EFI_BUFFER_TOO_SMALL BufferSize is not large enough to hold the downloaded
|
||||
data in downloading process.
|
||||
@retval EFI_ABORTED Current operation is aborted by user.
|
||||
@retval EFI_ICMP_ERROR An ICMP ERROR packet was received.
|
||||
@@ -811,24 +811,24 @@ EfiMtftp4ReadFile (
|
||||
/**
|
||||
Sends a data file to an MTFTPv4 server. May be unsupported in some EFI implementations
|
||||
|
||||
The WriteFile() function is used to initialize an uploading operation with the
|
||||
given option list and optionally wait for completion. If one or more of the
|
||||
options is not supported by the server, the unsupported options are ignored and
|
||||
a standard TFTP process starts instead. When the upload process completes,
|
||||
whether successfully or not, Token.Event is signaled, and the EFI MTFTPv4 Protocol
|
||||
The WriteFile() function is used to initialize an uploading operation with the
|
||||
given option list and optionally wait for completion. If one or more of the
|
||||
options is not supported by the server, the unsupported options are ignored and
|
||||
a standard TFTP process starts instead. When the upload process completes,
|
||||
whether successfully or not, Token.Event is signaled, and the EFI MTFTPv4 Protocol
|
||||
driver updates Token.Status.
|
||||
The caller can supply the data to be uploaded in the following two modes:
|
||||
1.Through the user-provided buffer
|
||||
2.Through a callback function
|
||||
With the user-provided buffer, the Token.BufferSize field indicates the length
|
||||
of the buffer, and the driver will upload the data in the buffer. With an
|
||||
EFI_MTFTP4_PACKET_NEEDED callback function, the driver will call this callback
|
||||
function to get more data from the user to upload. See the definition of
|
||||
EFI_MTFTP4_PACKET_NEEDED for more information. These two modes cannot be used at
|
||||
of the buffer, and the driver will upload the data in the buffer. With an
|
||||
EFI_MTFTP4_PACKET_NEEDED callback function, the driver will call this callback
|
||||
function to get more data from the user to upload. See the definition of
|
||||
EFI_MTFTP4_PACKET_NEEDED for more information. These two modes cannot be used at
|
||||
the same time. The callback function will be ignored if the user provides the buffer.
|
||||
|
||||
@param This Pointer to the EFI_MTFTP4_PROTOCOL instance.
|
||||
@param Token Pointer to the token structure to provide the
|
||||
@param Token Pointer to the token structure to provide the
|
||||
parameters that are used in this function
|
||||
|
||||
@retval EFI_SUCCESS The upload session has started.
|
||||
@@ -843,15 +843,15 @@ EfiMtftp4ReadFile (
|
||||
format.
|
||||
6. Token.Buffer and Token.PacketNeeded are both
|
||||
NULL.
|
||||
7. One or more IPv4 addresses in Token.OverrideData
|
||||
are not valid unicast IPv4 addresses if
|
||||
7. One or more IPv4 addresses in Token.OverrideData
|
||||
are not valid unicast IPv4 addresses if
|
||||
Token.OverrideData is not NULL.
|
||||
@retval EFI_UNSUPPORTED One or more options in the Token.OptionList are in the
|
||||
unsupported list of structure EFI_MTFTP4_MODE_DATA.
|
||||
@retval EFI_NOT_STARTED The EFI MTFTPv4 Protocol driver has not been started.
|
||||
@retval EFI_NO_MAPPING When using a default address, configuration (DHCP,
|
||||
@retval EFI_NO_MAPPING When using a default address, configuration (DHCP,
|
||||
BOOTP, RARP, etc.) is not finished yet.
|
||||
@retval EFI_ALREADY_STARTED This Token is already being used in another MTFTPv4
|
||||
@retval EFI_ALREADY_STARTED This Token is already being used in another MTFTPv4
|
||||
session.
|
||||
@retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
|
||||
@retval EFI_ACCESS_DENIED The previous operation has not completed yet.
|
||||
@@ -870,35 +870,35 @@ EfiMtftp4WriteFile (
|
||||
|
||||
|
||||
/**
|
||||
Downloads a data file "directory" from an MTFTPv4 server.
|
||||
Downloads a data file "directory" from an MTFTPv4 server.
|
||||
May be unsupported in some EFI implementations
|
||||
|
||||
The ReadDirectory() function is used to return a list of files on the MTFTPv4
|
||||
server that are logically (or operationally) related to Token.Filename. The
|
||||
directory request packet that is sent to the server is built with the option
|
||||
|
||||
The ReadDirectory() function is used to return a list of files on the MTFTPv4
|
||||
server that are logically (or operationally) related to Token.Filename. The
|
||||
directory request packet that is sent to the server is built with the option
|
||||
list that was provided by caller, if present.
|
||||
The file information that the server returns is put into either of the following
|
||||
The file information that the server returns is put into either of the following
|
||||
locations:
|
||||
1.A fixed buffer that is pointed to by Token.Buffer
|
||||
2.A download service function that is pointed to by Token.CheckPacket
|
||||
If both Token.Buffer and Token.CheckPacket are used, then Token.CheckPacket will
|
||||
If both Token.Buffer and Token.CheckPacket are used, then Token.CheckPacket will
|
||||
be called first. If the call is successful, the packet will be stored in Token.Buffer.
|
||||
The returned directory listing in the Token.Buffer or EFI_MTFTP4_PACKET consists
|
||||
of a list of two or three variable-length ASCII strings, each terminated by a
|
||||
null character, for each file in the directory. If the multicast option is involved,
|
||||
the first field of each directory entry is the static multicast IP address and
|
||||
UDP port number that is associated with the file name. The format of the field
|
||||
is ip:ip:ip:ip:port. If the multicast option is not involved, this field and its
|
||||
The returned directory listing in the Token.Buffer or EFI_MTFTP4_PACKET consists
|
||||
of a list of two or three variable-length ASCII strings, each terminated by a
|
||||
null character, for each file in the directory. If the multicast option is involved,
|
||||
the first field of each directory entry is the static multicast IP address and
|
||||
UDP port number that is associated with the file name. The format of the field
|
||||
is ip:ip:ip:ip:port. If the multicast option is not involved, this field and its
|
||||
terminating null character are not present.
|
||||
The next field of each directory entry is the file name and the last field is
|
||||
the file information string. The information string contains the file size and
|
||||
the create/modify timestamp. The format of the information string is filesize
|
||||
yyyy-mm-dd hh:mm:ss:ffff. The timestamp is Coordinated Universal Time
|
||||
The next field of each directory entry is the file name and the last field is
|
||||
the file information string. The information string contains the file size and
|
||||
the create/modify timestamp. The format of the information string is filesize
|
||||
yyyy-mm-dd hh:mm:ss:ffff. The timestamp is Coordinated Universal Time
|
||||
(UTC; also known as Greenwich Mean Time [GMT]).
|
||||
The only difference between ReadFile and ReadDirectory is the opcode used.
|
||||
|
||||
@param This Pointer to the EFI_MTFTP4_PROTOCOL instance
|
||||
@param Token Pointer to the token structure to provide the
|
||||
@param Token Pointer to the token structure to provide the
|
||||
parameters that are used in this function
|
||||
|
||||
@retval EFI_SUCCESS The MTFTPv4 related file "directory" has been downloaded.
|
||||
@@ -913,15 +913,15 @@ EfiMtftp4WriteFile (
|
||||
format.
|
||||
6. Token.Buffer and Token.PacketNeeded are both
|
||||
NULL.
|
||||
7. One or more IPv4 addresses in Token.OverrideData
|
||||
are not valid unicast IPv4 addresses if
|
||||
7. One or more IPv4 addresses in Token.OverrideData
|
||||
are not valid unicast IPv4 addresses if
|
||||
Token.OverrideData is not NULL.
|
||||
@retval EFI_UNSUPPORTED One or more options in the Token.OptionList are in the
|
||||
unsupported list of structure EFI_MTFTP4_MODE_DATA.
|
||||
@retval EFI_NOT_STARTED The EFI MTFTPv4 Protocol driver has not been started.
|
||||
@retval EFI_NO_MAPPING When using a default address, configuration (DHCP,
|
||||
@retval EFI_NO_MAPPING When using a default address, configuration (DHCP,
|
||||
BOOTP, RARP, etc.) is not finished yet.
|
||||
@retval EFI_ALREADY_STARTED This Token is already being used in another MTFTPv4
|
||||
@retval EFI_ALREADY_STARTED This Token is already being used in another MTFTPv4
|
||||
session.
|
||||
@retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
|
||||
@retval EFI_ACCESS_DENIED The previous operation has not completed yet.
|
||||
@@ -940,31 +940,31 @@ EfiMtftp4ReadDirectory (
|
||||
|
||||
|
||||
/**
|
||||
Gets information about a file from an MTFTPv4 server.
|
||||
|
||||
The GetInfo() function assembles an MTFTPv4 request packet with options;
|
||||
sends it to the MTFTPv4 server; and may return an MTFTPv4 OACK, MTFTPv4 ERROR,
|
||||
or ICMP ERROR packet. Retries occur only if no response packets are received
|
||||
Gets information about a file from an MTFTPv4 server.
|
||||
|
||||
The GetInfo() function assembles an MTFTPv4 request packet with options;
|
||||
sends it to the MTFTPv4 server; and may return an MTFTPv4 OACK, MTFTPv4 ERROR,
|
||||
or ICMP ERROR packet. Retries occur only if no response packets are received
|
||||
from the MTFTPv4 server before the timeout expires.
|
||||
It is implemented with EfiMtftp4ReadFile: build a token, then pass it to
|
||||
It is implemented with EfiMtftp4ReadFile: build a token, then pass it to
|
||||
EfiMtftp4ReadFile. In its check packet callback abort the opertions.
|
||||
|
||||
@param This Pointer to the EFI_MTFTP4_PROTOCOL instance
|
||||
@param OverrideData Data that is used to override the existing
|
||||
parameters. If NULL, the default parameters that
|
||||
were set in the EFI_MTFTP4_PROTOCOL.Configure()
|
||||
@param OverrideData Data that is used to override the existing
|
||||
parameters. If NULL, the default parameters that
|
||||
were set in the EFI_MTFTP4_PROTOCOL.Configure()
|
||||
function are used
|
||||
@param Filename Pointer to null-terminated ASCII file name string
|
||||
@param ModeStr Pointer to null-terminated ASCII mode string. If NULL, "octet"
|
||||
@param ModeStr Pointer to null-terminated ASCII mode string. If NULL, "octet"
|
||||
will be used
|
||||
@param OptionCount Number of option/value string pairs in OptionList
|
||||
@param OptionList Pointer to array of option/value string pairs.
|
||||
@param OptionList Pointer to array of option/value string pairs.
|
||||
Ignored if OptionCount is zero
|
||||
@param PacketLength The number of bytes in the returned packet
|
||||
@param Packet PacketThe pointer to the received packet. This
|
||||
@param Packet PacketThe pointer to the received packet. This
|
||||
buffer must be freed by the caller.
|
||||
|
||||
@retval EFI_SUCCESS An MTFTPv4 OACK packet was received and is in
|
||||
@retval EFI_SUCCESS An MTFTPv4 OACK packet was received and is in
|
||||
the Buffer.
|
||||
@retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
|
||||
1.This is NULL.
|
||||
@@ -972,21 +972,21 @@ EfiMtftp4ReadDirectory (
|
||||
3.OptionCount is not zero and OptionList is NULL.
|
||||
4.One or more options in OptionList have wrong format.
|
||||
5.PacketLength is NULL.
|
||||
6.One or more IPv4 addresses in OverrideData are
|
||||
not valid unicast IPv4 addresses if OverrideData
|
||||
6.One or more IPv4 addresses in OverrideData are
|
||||
not valid unicast IPv4 addresses if OverrideData
|
||||
is not NULL.
|
||||
@retval EFI_UNSUPPORTED One or more options in the OptionList are in the
|
||||
unsupported list of structure EFI_MTFTP4_MODE_DATA
|
||||
@retval EFI_NOT_STARTED The EFI MTFTPv4 Protocol driver has not been started.
|
||||
@retval EFI_NO_MAPPING When using a default address, configuration (DHCP,
|
||||
@retval EFI_NO_MAPPING When using a default address, configuration (DHCP,
|
||||
BOOTP, RARP, etc.) has not finished yet.
|
||||
@retval EFI_ACCESS_DENIED The previous operation has not completed yet.
|
||||
@retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
|
||||
@retval EFI_TFTP_ERROR An MTFTPv4 ERROR packet was received and is in
|
||||
@retval EFI_TFTP_ERROR An MTFTPv4 ERROR packet was received and is in
|
||||
the Buffer.
|
||||
@retval EFI_ICMP_ERROR An ICMP ERROR packet was received and the Packet
|
||||
@retval EFI_ICMP_ERROR An ICMP ERROR packet was received and the Packet
|
||||
is set to NULL.
|
||||
@retval EFI_PROTOCOL_ERROR An unexpected MTFTPv4 packet was received and is
|
||||
@retval EFI_PROTOCOL_ERROR An unexpected MTFTPv4 packet was received and is
|
||||
in the Buffer.
|
||||
@retval EFI_TIMEOUT No responses were received from the MTFTPv4 server.
|
||||
@retval EFI_DEVICE_ERROR An unexpected network error or system error occurred.
|
||||
@@ -1053,15 +1053,15 @@ EfiMtftp4GetInfo (
|
||||
/**
|
||||
Polls for incoming data packets and processes outgoing data packets.
|
||||
|
||||
The Poll() function can be used by network drivers and applications to increase
|
||||
the rate that data packets are moved between the communications device and the
|
||||
The Poll() function can be used by network drivers and applications to increase
|
||||
the rate that data packets are moved between the communications device and the
|
||||
transmit and receive queues.
|
||||
In some systems, the periodic timer event in the managed network driver may not
|
||||
poll the underlying communications device fast enough to transmit and/or receive
|
||||
all data packets without missing incoming packets or dropping outgoing packets.
|
||||
Drivers and applications that are experiencing packet loss should try calling
|
||||
In some systems, the periodic timer event in the managed network driver may not
|
||||
poll the underlying communications device fast enough to transmit and/or receive
|
||||
all data packets without missing incoming packets or dropping outgoing packets.
|
||||
Drivers and applications that are experiencing packet loss should try calling
|
||||
the Poll() function more often.
|
||||
|
||||
|
||||
@param This Pointer to the EFI_MTFTP4_PROTOCOL instance
|
||||
|
||||
@retval EFI_SUCCESS Incoming or outgoing data was processed.
|
||||
@@ -1070,7 +1070,7 @@ EfiMtftp4GetInfo (
|
||||
BOOTP, RARP, etc.) is not finished yet.
|
||||
@retval EFI_INVALID_PARAMETER This is NULL.
|
||||
@retval EFI_DEVICE_ERROR An unexpected system or network error occurred.
|
||||
@retval EFI_TIMEOUT Data was dropped out of the transmit and/or receive
|
||||
@retval EFI_TIMEOUT Data was dropped out of the transmit and/or receive
|
||||
queue. Consider increasing the polling rate.
|
||||
|
||||
**/
|
||||
|
@@ -1,14 +1,14 @@
|
||||
/** @file
|
||||
|
||||
|
||||
Mtftp4 Implementation.
|
||||
|
||||
|
||||
Mtftp4 Implementation, it supports the following RFCs:
|
||||
RFC1350 - THE TFTP PROTOCOL (REVISION 2)
|
||||
RFC2090 - TFTP Multicast Option
|
||||
RFC2347 - TFTP Option Extension
|
||||
RFC2348 - TFTP Blocksize Option
|
||||
RFC2349 - TFTP Timeout Interval and Transfer Size Options
|
||||
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -171,8 +171,8 @@ Mtftp4CleanOperation (
|
||||
|
||||
/**
|
||||
Start the MTFTP session for upload.
|
||||
|
||||
It will first init some states, then send the WRQ request packet,
|
||||
|
||||
It will first init some states, then send the WRQ request packet,
|
||||
and start receiving the packet.
|
||||
|
||||
@param Instance The MTFTP session
|
||||
@@ -190,9 +190,9 @@ Mtftp4WrqStart (
|
||||
);
|
||||
|
||||
/**
|
||||
Start the MTFTP session to download.
|
||||
|
||||
It will first initialize some of the internal states then build and send a RRQ
|
||||
Start the MTFTP session to download.
|
||||
|
||||
It will first initialize some of the internal states then build and send a RRQ
|
||||
reqeuest packet, at last, it will start receive for the downloading.
|
||||
|
||||
@param Instance The Mtftp session
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Routines to process MTFTP4 options.
|
||||
|
||||
Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -38,8 +38,8 @@ typedef struct {
|
||||
} MTFTP4_OPTION;
|
||||
|
||||
/**
|
||||
Allocate and fill in a array of Mtftp options from the Packet.
|
||||
|
||||
Allocate and fill in a array of Mtftp options from the Packet.
|
||||
|
||||
It first calls Mtftp4FillOption to get the option number, then allocate
|
||||
the array, at last, call Mtftp4FillOption again to save the options.
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
/** @file
|
||||
Routines to process Rrq (download).
|
||||
|
||||
|
||||
(C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -37,9 +37,9 @@ Mtftp4RrqInput (
|
||||
|
||||
|
||||
/**
|
||||
Start the MTFTP session to download.
|
||||
|
||||
It will first initialize some of the internal states then build and send a RRQ
|
||||
Start the MTFTP session to download.
|
||||
|
||||
It will first initialize some of the internal states then build and send a RRQ
|
||||
reqeuest packet, at last, it will start receive for the downloading.
|
||||
|
||||
@param Instance The Mtftp session
|
||||
@@ -158,7 +158,7 @@ Mtftp4RrqSaveBlock (
|
||||
// This is the last block, save the block no
|
||||
//
|
||||
if (DataLen < Instance->BlkSize) {
|
||||
Completed = TRUE;
|
||||
Completed = TRUE;
|
||||
Instance->LastBlock = Block;
|
||||
Mtftp4SetLastBlockNum (&Instance->Blocks, Block);
|
||||
}
|
||||
@@ -167,7 +167,7 @@ Mtftp4RrqSaveBlock (
|
||||
// Remove this block number from the file hole. If Mtftp4RemoveBlockNum
|
||||
// returns EFI_NOT_FOUND, the block has been saved, don't save it again.
|
||||
// Note that : For bigger files, allowing the block counter to roll over
|
||||
// to accept transfers of unlimited size. So TotalBlock is memorised as
|
||||
// to accept transfers of unlimited size. So TotalBlock is memorised as
|
||||
// continuous block counter.
|
||||
//
|
||||
Status = Mtftp4RemoveBlockNum (&Instance->Blocks, Block, Completed, &TotalBlock);
|
||||
@@ -228,8 +228,8 @@ Mtftp4RrqSaveBlock (
|
||||
|
||||
|
||||
/**
|
||||
Function to process the received data packets.
|
||||
|
||||
Function to process the received data packets.
|
||||
|
||||
It will save the block then send back an ACK if it is active.
|
||||
|
||||
@param Instance The downloading MTFTP session
|
||||
@@ -318,7 +318,7 @@ Mtftp4RrqHandleData (
|
||||
|
||||
/**
|
||||
Validate whether the options received in the server's OACK packet is valid.
|
||||
|
||||
|
||||
The options are valid only if:
|
||||
1. The server doesn't include options not requested by us
|
||||
2. The server can only use smaller blksize than that is requested
|
||||
@@ -428,20 +428,20 @@ Mtftp4RrqConfigMcastPort (
|
||||
return Status;
|
||||
}
|
||||
|
||||
if (!Config->UseDefaultSetting &&
|
||||
if (!Config->UseDefaultSetting &&
|
||||
!EFI_IP4_EQUAL (&mZeroIp4Addr, &Config->GatewayIp)) {
|
||||
//
|
||||
// The station IP address is manually configured and the Gateway IP is not 0.
|
||||
// Add the default route for this UDP instance.
|
||||
//
|
||||
Status = McastIo->Protocol.Udp4->Routes (
|
||||
McastIo->Protocol.Udp4,
|
||||
McastIo->Protocol.Udp4,
|
||||
FALSE,
|
||||
&mZeroIp4Addr,
|
||||
&mZeroIp4Addr,
|
||||
&Config->GatewayIp
|
||||
);
|
||||
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
McastIo->Protocol.Udp4->Configure (McastIo->Protocol.Udp4, NULL);
|
||||
return Status;
|
||||
@@ -459,8 +459,8 @@ Mtftp4RrqConfigMcastPort (
|
||||
|
||||
|
||||
/**
|
||||
Function to process the OACK.
|
||||
|
||||
Function to process the OACK.
|
||||
|
||||
It will first validate the OACK packet, then update the various negotiated parameters.
|
||||
|
||||
@param Instance The download MTFTP session
|
||||
@@ -591,22 +591,22 @@ Mtftp4RrqHandleOack (
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Update the parameters used.
|
||||
//
|
||||
if (Reply.BlkSize != 0) {
|
||||
Instance->BlkSize = Reply.BlkSize;
|
||||
}
|
||||
|
||||
|
||||
if (Reply.Timeout != 0) {
|
||||
Instance->Timeout = Reply.Timeout;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
Instance->Master = TRUE;
|
||||
|
||||
|
||||
if (Reply.BlkSize != 0) {
|
||||
Instance->BlkSize = Reply.BlkSize;
|
||||
}
|
||||
@@ -615,7 +615,7 @@ Mtftp4RrqHandleOack (
|
||||
Instance->Timeout = Reply.Timeout;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Send an ACK to (Expected - 1) which is 0 for unicast download,
|
||||
// or tell the server we want to receive the Expected block.
|
||||
@@ -762,7 +762,7 @@ Mtftp4RrqInput (
|
||||
case EFI_MTFTP4_OPCODE_ERROR:
|
||||
Status = EFI_TFTP_ERROR;
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/** @file
|
||||
Support routines for Mtftp.
|
||||
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -48,16 +48,16 @@ Mtftp4AllocateRange (
|
||||
|
||||
|
||||
/**
|
||||
Initialize the block range for either RRQ or WRQ.
|
||||
|
||||
RRQ and WRQ have different requirements for Start and End.
|
||||
For example, during start up, WRQ initializes its whole valid block range
|
||||
to [0, 0xffff]. This is bacause the server will send us a ACK0 to inform us
|
||||
to start the upload. When the client received ACK0, it will remove 0 from the
|
||||
Initialize the block range for either RRQ or WRQ.
|
||||
|
||||
RRQ and WRQ have different requirements for Start and End.
|
||||
For example, during start up, WRQ initializes its whole valid block range
|
||||
to [0, 0xffff]. This is bacause the server will send us a ACK0 to inform us
|
||||
to start the upload. When the client received ACK0, it will remove 0 from the
|
||||
range, get the next block number, which is 1, then upload the BLOCK1. For RRQ
|
||||
without option negotiation, the server will directly send us the BLOCK1 in
|
||||
response to the client's RRQ. When received BLOCK1, the client will remove
|
||||
it from the block range and send an ACK. It also works if there is option
|
||||
without option negotiation, the server will directly send us the BLOCK1 in
|
||||
response to the client's RRQ. When received BLOCK1, the client will remove
|
||||
it from the block range and send an ACK. It also works if there is option
|
||||
negotiation.
|
||||
|
||||
@param Head The block range head to initialize
|
||||
@@ -93,7 +93,7 @@ Mtftp4InitBlockRange (
|
||||
|
||||
@param Head The block range head
|
||||
|
||||
@return The first valid block number, -1 if the block range is empty.
|
||||
@return The first valid block number, -1 if the block range is empty.
|
||||
|
||||
**/
|
||||
INTN
|
||||
@@ -113,10 +113,10 @@ Mtftp4GetNextBlockNum (
|
||||
|
||||
|
||||
/**
|
||||
Set the last block number of the block range list.
|
||||
|
||||
Set the last block number of the block range list.
|
||||
|
||||
It will remove all the blocks after the Last. MTFTP initialize the block range
|
||||
to the maximum possible range, such as [0, 0xffff] for WRQ. When it gets the
|
||||
to the maximum possible range, such as [0, 0xffff] for WRQ. When it gets the
|
||||
last block number, it will call this function to set the last block number.
|
||||
|
||||
@param Head The block range list
|
||||
@@ -159,7 +159,7 @@ Mtftp4SetLastBlockNum (
|
||||
@param Head The block range list to remove from
|
||||
@param Num The block number to remove
|
||||
@param Completed Whether Num is the last block number
|
||||
@param TotalBlock The continuous block number in all
|
||||
@param TotalBlock The continuous block number in all
|
||||
|
||||
@retval EFI_NOT_FOUND The block number isn't in the block range list
|
||||
@retval EFI_SUCCESS The block number has been removed from the list
|
||||
@@ -213,22 +213,22 @@ Mtftp4RemoveBlockNum (
|
||||
Range->Start++;
|
||||
|
||||
//
|
||||
// Note that: RFC 1350 does not mention block counter roll-over,
|
||||
// but several TFTP hosts implement the roll-over be able to accept
|
||||
// transfers of unlimited size. There is no consensus, however, whether
|
||||
// the counter should wrap around to zero or to one. Many implementations
|
||||
// wrap to zero, because this is the simplest to implement. Here we choose
|
||||
// Note that: RFC 1350 does not mention block counter roll-over,
|
||||
// but several TFTP hosts implement the roll-over be able to accept
|
||||
// transfers of unlimited size. There is no consensus, however, whether
|
||||
// the counter should wrap around to zero or to one. Many implementations
|
||||
// wrap to zero, because this is the simplest to implement. Here we choose
|
||||
// this solution.
|
||||
//
|
||||
*TotalBlock = Num;
|
||||
|
||||
*TotalBlock = Num;
|
||||
|
||||
if (Range->Round > 0) {
|
||||
*TotalBlock += Range->Bound + MultU64x32 ((UINTN) (Range->Round -1), (UINT32) (Range->Bound + 1)) + 1;
|
||||
}
|
||||
*TotalBlock += Range->Bound + MultU64x32 ((UINTN) (Range->Round -1), (UINT32) (Range->Bound + 1)) + 1;
|
||||
}
|
||||
|
||||
if (Range->Start > Range->Bound) {
|
||||
Range->Start = 0;
|
||||
Range->Round ++;
|
||||
Range->Start = 0;
|
||||
Range->Round ++;
|
||||
}
|
||||
|
||||
if ((Range->Start > Range->End) || Completed) {
|
||||
@@ -321,7 +321,7 @@ Mtftp4SendRequest (
|
||||
|
||||
Packet->OpCode = HTONS (Instance->Operation);
|
||||
BufferLength -= sizeof (Packet->OpCode);
|
||||
|
||||
|
||||
Cur = Packet->Rrq.Filename;
|
||||
Status = AsciiStrCpyS ((CHAR8 *) Cur, BufferLength, (CHAR8 *) Token->Filename);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
@@ -335,17 +335,17 @@ Mtftp4SendRequest (
|
||||
for (Index = 0; Index < Token->OptionCount; ++Index) {
|
||||
OptionStrLength = AsciiStrLen ((CHAR8 *) Options[Index].OptionStr);
|
||||
ValueStrLength = AsciiStrLen ((CHAR8 *) Options[Index].ValueStr);
|
||||
|
||||
|
||||
Status = AsciiStrCpyS ((CHAR8 *) Cur, BufferLength, (CHAR8 *) Options[Index].OptionStr);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
BufferLength -= (UINT32) (OptionStrLength + 1);
|
||||
Cur += OptionStrLength + 1;
|
||||
|
||||
|
||||
Status = AsciiStrCpyS ((CHAR8 *) Cur, BufferLength, (CHAR8 *) Options[Index].ValueStr);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
BufferLength -= (UINT32) (ValueStrLength + 1);
|
||||
Cur += ValueStrLength + 1;
|
||||
|
||||
|
||||
}
|
||||
|
||||
return Mtftp4SendPacket (Instance, Nbuf);
|
||||
@@ -356,7 +356,7 @@ Mtftp4SendRequest (
|
||||
Build then send an error message.
|
||||
|
||||
@param Instance The MTFTP session
|
||||
@param ErrCode The error code
|
||||
@param ErrCode The error code
|
||||
@param ErrInfo The error message
|
||||
|
||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory for the error packet
|
||||
@@ -395,7 +395,7 @@ Mtftp4SendError (
|
||||
|
||||
/**
|
||||
The callback function called when the packet is transmitted.
|
||||
|
||||
|
||||
It simply frees the packet.
|
||||
|
||||
@param Packet The transmitted (or failed to) packet
|
||||
@@ -437,10 +437,10 @@ Mtftp4SetTimeout (
|
||||
|
||||
|
||||
/**
|
||||
Send the packet for the instance.
|
||||
|
||||
It will first save a reference to the packet for later retransmission.
|
||||
Then determine the destination port, listen port for requests, and connected
|
||||
Send the packet for the instance.
|
||||
|
||||
It will first save a reference to the packet for later retransmission.
|
||||
Then determine the destination port, listen port for requests, and connected
|
||||
port for others. At last, send the packet out.
|
||||
|
||||
@param Instance The Mtftp instance
|
||||
@@ -484,7 +484,7 @@ Mtftp4SendPacket (
|
||||
ASSERT (Buffer != NULL);
|
||||
OpCode = NTOHS (*(UINT16 *)Buffer);
|
||||
|
||||
if ((OpCode == EFI_MTFTP4_OPCODE_RRQ) ||
|
||||
if ((OpCode == EFI_MTFTP4_OPCODE_RRQ) ||
|
||||
(OpCode == EFI_MTFTP4_OPCODE_DIR) ||
|
||||
(OpCode == EFI_MTFTP4_OPCODE_WRQ)) {
|
||||
UdpPoint.RemotePort = Instance->ListeningPort;
|
||||
@@ -634,7 +634,7 @@ Mtftp4OnTimerTick (
|
||||
if (!Instance->HasTimeout) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Instance->HasTimeout = FALSE;
|
||||
|
||||
//
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/** @file
|
||||
Support routines for MTFTP.
|
||||
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -30,16 +30,16 @@ typedef struct {
|
||||
|
||||
|
||||
/**
|
||||
Initialize the block range for either RRQ or WRQ.
|
||||
|
||||
RRQ and WRQ have different requirements for Start and End.
|
||||
For example, during start up, WRQ initializes its whole valid block range
|
||||
to [0, 0xffff]. This is bacause the server will send us a ACK0 to inform us
|
||||
to start the upload. When the client received ACK0, it will remove 0 from the
|
||||
Initialize the block range for either RRQ or WRQ.
|
||||
|
||||
RRQ and WRQ have different requirements for Start and End.
|
||||
For example, during start up, WRQ initializes its whole valid block range
|
||||
to [0, 0xffff]. This is bacause the server will send us a ACK0 to inform us
|
||||
to start the upload. When the client received ACK0, it will remove 0 from the
|
||||
range, get the next block number, which is 1, then upload the BLOCK1. For RRQ
|
||||
without option negotiation, the server will directly send us the BLOCK1 in
|
||||
response to the client's RRQ. When received BLOCK1, the client will remove
|
||||
it from the block range and send an ACK. It also works if there is option
|
||||
without option negotiation, the server will directly send us the BLOCK1 in
|
||||
response to the client's RRQ. When received BLOCK1, the client will remove
|
||||
it from the block range and send an ACK. It also works if there is option
|
||||
negotiation.
|
||||
|
||||
@param Head The block range head to initialize
|
||||
@@ -62,7 +62,7 @@ Mtftp4InitBlockRange (
|
||||
|
||||
@param Head The block range head
|
||||
|
||||
@return The first valid block number, -1 if the block range is empty.
|
||||
@return The first valid block number, -1 if the block range is empty.
|
||||
|
||||
**/
|
||||
INTN
|
||||
@@ -71,10 +71,10 @@ Mtftp4GetNextBlockNum (
|
||||
);
|
||||
|
||||
/**
|
||||
Set the last block number of the block range list.
|
||||
|
||||
Set the last block number of the block range list.
|
||||
|
||||
It will remove all the blocks after the Last. MTFTP initialize the block range
|
||||
to the maximum possible range, such as [0, 0xffff] for WRQ. When it gets the
|
||||
to the maximum possible range, such as [0, 0xffff] for WRQ. When it gets the
|
||||
last block number, it will call this function to set the last block number.
|
||||
|
||||
@param Head The block range list
|
||||
@@ -93,7 +93,7 @@ Mtftp4SetLastBlockNum (
|
||||
@param Head The block range list to remove from
|
||||
@param Num The block number to remove
|
||||
@param Completed Wether Num is the last block number
|
||||
@param TotalBlock The continuous block number in all
|
||||
@param TotalBlock The continuous block number in all
|
||||
|
||||
@retval EFI_NOT_FOUND The block number isn't in the block range list
|
||||
@retval EFI_SUCCESS The block number has been removed from the list
|
||||
@@ -120,10 +120,10 @@ Mtftp4SetTimeout (
|
||||
);
|
||||
|
||||
/**
|
||||
Send the packet for the instance.
|
||||
|
||||
It will first save a reference to the packet for later retransmission.
|
||||
Then determine the destination port, listen port for requests, and connected
|
||||
Send the packet for the instance.
|
||||
|
||||
It will first save a reference to the packet for later retransmission.
|
||||
Then determine the destination port, listen port for requests, and connected
|
||||
port for others. At last, send the packet out.
|
||||
|
||||
@param Instance The Mtftp instance
|
||||
@@ -158,7 +158,7 @@ Mtftp4SendRequest (
|
||||
Build then send an error message.
|
||||
|
||||
@param Instance The MTFTP session
|
||||
@param ErrCode The error code
|
||||
@param ErrCode The error code
|
||||
@param ErrInfo The error message
|
||||
|
||||
@retval EFI_OUT_OF_RESOURCES Failed to allocate memory for the error packet
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/** @file
|
||||
Routines to process Wrq (upload).
|
||||
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -124,9 +124,9 @@ Mtftp4WrqSendBlock (
|
||||
|
||||
|
||||
/**
|
||||
Function to handle received ACK packet.
|
||||
|
||||
If the ACK number matches the expected block number, and there are more
|
||||
Function to handle received ACK packet.
|
||||
|
||||
If the ACK number matches the expected block number, and there are more
|
||||
data pending, send the next block. Otherwise tell the caller that we are done.
|
||||
|
||||
@param Instance The MTFTP upload session
|
||||
@@ -150,7 +150,7 @@ Mtftp4WrqHandleAck (
|
||||
UINT16 AckNum;
|
||||
INTN Expected;
|
||||
UINT64 TotalBlock;
|
||||
|
||||
|
||||
*Completed = FALSE;
|
||||
AckNum = NTOHS (Packet->Ack.Block[0]);
|
||||
Expected = Mtftp4GetNextBlockNum (&Instance->Blocks);
|
||||
@@ -175,7 +175,7 @@ Mtftp4WrqHandleAck (
|
||||
Expected = Mtftp4GetNextBlockNum (&Instance->Blocks);
|
||||
|
||||
if (Expected < 0) {
|
||||
|
||||
|
||||
//
|
||||
// The block range is empty. It may either because the the last
|
||||
// block has been ACKed, or the sequence number just looped back,
|
||||
@@ -202,8 +202,8 @@ Mtftp4WrqHandleAck (
|
||||
|
||||
|
||||
/**
|
||||
Check whether the received OACK is valid.
|
||||
|
||||
Check whether the received OACK is valid.
|
||||
|
||||
The OACK is valid only if:
|
||||
1. It only include options requested by us
|
||||
2. It can only include a smaller block size
|
||||
@@ -244,8 +244,8 @@ Mtftp4WrqOackValid (
|
||||
|
||||
|
||||
/**
|
||||
Function to handle the MTFTP OACK packet.
|
||||
|
||||
Function to handle the MTFTP OACK packet.
|
||||
|
||||
It parses the packet's options, and update the internal states of the session.
|
||||
|
||||
@param Instance The MTFTP session
|
||||
@@ -458,7 +458,7 @@ Mtftp4WrqInput (
|
||||
case EFI_MTFTP4_OPCODE_ERROR:
|
||||
Status = EFI_TFTP_ERROR;
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -492,8 +492,8 @@ ON_EXIT:
|
||||
|
||||
/**
|
||||
Start the MTFTP session for upload.
|
||||
|
||||
It will first init some states, then send the WRQ request packet,
|
||||
|
||||
It will first init some states, then send the WRQ request packet,
|
||||
and start receiving the packet.
|
||||
|
||||
@param Instance The MTFTP session
|
||||
|
@@ -1,11 +1,11 @@
|
||||
/** @file
|
||||
UEFI Component Name(2) protocol implementation for SnpDxe driver.
|
||||
|
||||
Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials are licensed
|
||||
and made available under the terms and conditions of the BSD License which
|
||||
accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials are licensed
|
||||
and made available under the terms and conditions of the BSD License which
|
||||
accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
@@ -238,10 +238,10 @@ SimpleNetworkComponentNameGetDriverName (
|
||||
|
||||
@param Snp[in] A pointer to the EFI_SIMPLE_NETWORK_PROTOCOL.
|
||||
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Update the ControllerNameTable of this instance successfully.
|
||||
@retval EFI_INVALID_PARAMETER The input parameter is invalid.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
UpdateName (
|
||||
@@ -285,7 +285,7 @@ UpdateName (
|
||||
FreeUnicodeStringTable (gSimpleNetworkControllerNameTable);
|
||||
gSimpleNetworkControllerNameTable = NULL;
|
||||
}
|
||||
|
||||
|
||||
Status = AddUnicodeString2 (
|
||||
"eng",
|
||||
gSimpleNetworkComponentName.SupportedLanguages,
|
||||
@@ -296,7 +296,7 @@ UpdateName (
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
return AddUnicodeString2 (
|
||||
"en",
|
||||
gSimpleNetworkComponentName2.SupportedLanguages,
|
||||
@@ -317,8 +317,8 @@ UpdateName (
|
||||
and EFI_SUCCESS is returned. If the driver specified by This is not currently
|
||||
managing the controller specified by ControllerHandle and ChildHandle,
|
||||
then EFI_UNSUPPORTED is returned. If the driver specified by This does not
|
||||
support the language specified by Language, then EFI_UNSUPPORTED is returned.
|
||||
Currently not implemented.
|
||||
support the language specified by Language, then EFI_UNSUPPORTED is returned.
|
||||
Currently not implemented.
|
||||
|
||||
@param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
|
||||
EFI_COMPONENT_NAME_PROTOCOL instance.
|
||||
@@ -387,7 +387,7 @@ SimpleNetworkComponentNameGetControllerName (
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_SIMPLE_NETWORK_PROTOCOL *Snp;
|
||||
|
||||
|
||||
if (ChildHandle != NULL) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
@@ -404,9 +404,9 @@ SimpleNetworkComponentNameGetControllerName (
|
||||
return Status;
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
// Retrieve an instance of a produced protocol from ControllerHandle
|
||||
//
|
||||
//
|
||||
Status = gBS->OpenProtocol (
|
||||
ControllerHandle,
|
||||
&gEfiSimpleNetworkProtocolGuid,
|
||||
|
@@ -1,11 +1,11 @@
|
||||
/** @file
|
||||
Implementation of initializing a network adapter.
|
||||
Implementation of initializing a network adapter.
|
||||
|
||||
Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials are licensed
|
||||
and made available under the terms and conditions of the BSD License which
|
||||
accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials are licensed
|
||||
and made available under the terms and conditions of the BSD License which
|
||||
accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
@@ -19,9 +19,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
Call UNDI to initialize the interface.
|
||||
|
||||
@param Snp Pointer to snp driver structure.
|
||||
@param CableDetectFlag Do/don't detect the cable (depending on what
|
||||
@param CableDetectFlag Do/don't detect the cable (depending on what
|
||||
undi supports).
|
||||
|
||||
|
||||
@retval EFI_SUCCESS UNDI is initialized successfully.
|
||||
@retval EFI_DEVICE_ERROR UNDI could not be initialized.
|
||||
@retval Other Other errors as indicated.
|
||||
@@ -103,17 +103,17 @@ PxeInit (
|
||||
|
||||
//
|
||||
// There are two fields need to be checked here:
|
||||
// First is the upper two bits (14 & 15) in the CDB.StatFlags field. Until these bits change to report
|
||||
// First is the upper two bits (14 & 15) in the CDB.StatFlags field. Until these bits change to report
|
||||
// PXE_STATFLAGS_COMMAND_COMPLETE or PXE_STATFLAGS_COMMAND_FAILED, the command has not been executed by the UNDI.
|
||||
// Second is the CDB.StatCode field. After command execution completes, either successfully or not,
|
||||
// Second is the CDB.StatCode field. After command execution completes, either successfully or not,
|
||||
// the CDB.StatCode field contains the result of the command execution.
|
||||
//
|
||||
if ((((Snp->Cdb.StatFlags) & PXE_STATFLAGS_STATUS_MASK) == PXE_STATFLAGS_COMMAND_COMPLETE) &&
|
||||
(Snp->Cdb.StatCode == PXE_STATCODE_SUCCESS)) {
|
||||
//
|
||||
// If cable detect feature is enabled in CDB.OpFlags, check the CDB.StatFlags to see if there is an
|
||||
// active connection to this network device. If the no media StatFlag is set, the UNDI and network
|
||||
// device are still initialized.
|
||||
// If cable detect feature is enabled in CDB.OpFlags, check the CDB.StatFlags to see if there is an
|
||||
// active connection to this network device. If the no media StatFlag is set, the UNDI and network
|
||||
// device are still initialized.
|
||||
//
|
||||
if (CableDetectFlag == PXE_OPFLAGS_INITIALIZE_DETECT_CABLE) {
|
||||
if(((Snp->Cdb.StatFlags) & PXE_STATFLAGS_INITIALIZED_NO_MEDIA) != PXE_STATFLAGS_INITIALIZED_NO_MEDIA) {
|
||||
@@ -122,7 +122,7 @@ PxeInit (
|
||||
Snp->Mode.MediaPresent = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Snp->Mode.State = EfiSimpleNetworkInitialized;
|
||||
Status = EFI_SUCCESS;
|
||||
} else {
|
||||
@@ -151,8 +151,8 @@ PxeInit (
|
||||
|
||||
|
||||
/**
|
||||
Resets a network adapter and allocates the transmit and receive buffers
|
||||
required by the network interface; optionally, also requests allocation of
|
||||
Resets a network adapter and allocates the transmit and receive buffers
|
||||
required by the network interface; optionally, also requests allocation of
|
||||
additional transmit and receive buffers.
|
||||
|
||||
This function allocates the transmit and receive buffers required by the network
|
||||
@@ -164,8 +164,8 @@ PxeInit (
|
||||
|
||||
@param ExtraRxBufferSize The size, in bytes, of the extra receive buffer space
|
||||
that the driver should allocate for the network interface.
|
||||
Some network interfaces will not be able to use the
|
||||
extra buffer, and the caller will not know if it is
|
||||
Some network interfaces will not be able to use the
|
||||
extra buffer, and the caller will not know if it is
|
||||
actually being used.
|
||||
@param ExtraTxBufferSize The size, in bytes, of the extra transmit buffer space
|
||||
that the driver should allocate for the network interface.
|
||||
|
@@ -1,12 +1,12 @@
|
||||
/** @file
|
||||
Implementation of converting an multicast IP address to multicast HW MAC
|
||||
address.
|
||||
|
||||
Copyright (c) 2004 - 2007, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials are licensed
|
||||
and made available under the terms and conditions of the BSD License which
|
||||
accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
Implementation of converting an multicast IP address to multicast HW MAC
|
||||
address.
|
||||
|
||||
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials are licensed
|
||||
and made available under the terms and conditions of the BSD License which
|
||||
accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
@@ -23,11 +23,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
@param IP Multicast IP address.
|
||||
@param MAC Pointer to hold the return MAC address.
|
||||
|
||||
@retval EFI_SUCCESS The multicast IP address was mapped to the
|
||||
@retval EFI_SUCCESS The multicast IP address was mapped to the
|
||||
multicast HW MAC address.
|
||||
@retval EFI_INVALID_PARAMETER Invalid UNDI command.
|
||||
@retval EFI_UNSUPPORTED Command is not supported by UNDI.
|
||||
@retval EFI_DEVICE_ERROR Fail to execute UNDI command.
|
||||
@retval EFI_INVALID_PARAMETER Invalid UNDI command.
|
||||
@retval EFI_UNSUPPORTED Command is not supported by UNDI.
|
||||
@retval EFI_DEVICE_ERROR Fail to execute UNDI command.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -103,29 +103,29 @@ PxeIp2Mac (
|
||||
|
||||
/**
|
||||
Converts a multicast IP address to a multicast HW MAC address.
|
||||
|
||||
This function converts a multicast IP address to a multicast HW MAC address
|
||||
|
||||
This function converts a multicast IP address to a multicast HW MAC address
|
||||
for all packet transactions. If the mapping is accepted, then EFI_SUCCESS will
|
||||
be returned.
|
||||
|
||||
@param This A pointer to the EFI_SIMPLE_NETWORK_PROTOCOL instance.
|
||||
@param IPv6 Set to TRUE if the multicast IP address is IPv6 [RFC 2460].
|
||||
Set to FALSE if the multicast IP address is IPv4 [RFC 791].
|
||||
@param IP The multicast IP address that is to be converted to a multicast
|
||||
Set to FALSE if the multicast IP address is IPv4 [RFC 791].
|
||||
@param IP The multicast IP address that is to be converted to a multicast
|
||||
HW MAC address.
|
||||
@param MAC The multicast HW MAC address that is to be generated from IP.
|
||||
|
||||
@retval EFI_SUCCESS The multicast IP address was mapped to the
|
||||
multicast HW MAC address.
|
||||
@retval EFI_NOT_STARTED The Simple Network Protocol interface has not
|
||||
@retval EFI_NOT_STARTED The Simple Network Protocol interface has not
|
||||
been started by calling Start().
|
||||
@retval EFI_INVALID_PARAMETER IP is NULL.
|
||||
@retval EFI_INVALID_PARAMETER MAC is NULL.
|
||||
@retval EFI_INVALID_PARAMETER IP does not point to a valid IPv4 or IPv6
|
||||
@retval EFI_INVALID_PARAMETER IP does not point to a valid IPv4 or IPv6
|
||||
multicast address.
|
||||
@retval EFI_DEVICE_ERROR The Simple Network Protocol interface has not
|
||||
@retval EFI_DEVICE_ERROR The Simple Network Protocol interface has not
|
||||
been initialized by calling Initialize().
|
||||
@retval EFI_UNSUPPORTED IPv6 is TRUE and the implementation does not
|
||||
@retval EFI_UNSUPPORTED IPv6 is TRUE and the implementation does not
|
||||
support IPv6 multicast to MAC address conversion.
|
||||
|
||||
**/
|
||||
|
@@ -1,12 +1,12 @@
|
||||
/** @file
|
||||
Implementation of reading and writing operations on the NVRAM device
|
||||
attached to a network interface.
|
||||
|
||||
Copyright (c) 2004 - 2009, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials are licensed
|
||||
and made available under the terms and conditions of the BSD License which
|
||||
accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
Implementation of reading and writing operations on the NVRAM device
|
||||
attached to a network interface.
|
||||
|
||||
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials are licensed
|
||||
and made available under the terms and conditions of the BSD License which
|
||||
accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
@@ -97,51 +97,51 @@ PxeNvDataRead (
|
||||
|
||||
|
||||
/**
|
||||
Performs read and write operations on the NVRAM device attached to a network
|
||||
Performs read and write operations on the NVRAM device attached to a network
|
||||
interface.
|
||||
|
||||
This function performs read and write operations on the NVRAM device attached
|
||||
|
||||
This function performs read and write operations on the NVRAM device attached
|
||||
to a network interface. If ReadWrite is TRUE, a read operation is performed.
|
||||
If ReadWrite is FALSE, a write operation is performed. Offset specifies the
|
||||
byte offset at which to start either operation. Offset must be a multiple of
|
||||
NvRamAccessSize , and it must have a value between zero and NvRamSize.
|
||||
If ReadWrite is FALSE, a write operation is performed. Offset specifies the
|
||||
byte offset at which to start either operation. Offset must be a multiple of
|
||||
NvRamAccessSize , and it must have a value between zero and NvRamSize.
|
||||
BufferSize specifies the length of the read or write operation. BufferSize must
|
||||
also be a multiple of NvRamAccessSize, and Offset + BufferSize must not exceed
|
||||
NvRamSize.
|
||||
If any of the above conditions is not met, then EFI_INVALID_PARAMETER will be
|
||||
returned.
|
||||
If all the conditions are met and the operation is "read," the NVRAM device
|
||||
attached to the network interface will be read into Buffer and EFI_SUCCESS
|
||||
NvRamSize.
|
||||
If any of the above conditions is not met, then EFI_INVALID_PARAMETER will be
|
||||
returned.
|
||||
If all the conditions are met and the operation is "read," the NVRAM device
|
||||
attached to the network interface will be read into Buffer and EFI_SUCCESS
|
||||
will be returned. If this is a write operation, the contents of Buffer will be
|
||||
used to update the contents of the NVRAM device attached to the network
|
||||
used to update the contents of the NVRAM device attached to the network
|
||||
interface and EFI_SUCCESS will be returned.
|
||||
|
||||
|
||||
It does the basic checking on the input parameters and retrieves snp structure
|
||||
and then calls the read_nvdata() call which does the actual reading
|
||||
|
||||
@param This A pointer to the EFI_SIMPLE_NETWORK_PROTOCOL instance.
|
||||
@param ReadWrite TRUE for read operations, FALSE for write operations.
|
||||
@param Offset Byte offset in the NVRAM device at which to start the read or
|
||||
write operation. This must be a multiple of NvRamAccessSize
|
||||
and less than NvRamSize. (See EFI_SIMPLE_NETWORK_MODE)
|
||||
@param BufferSize The number of bytes to read or write from the NVRAM device.
|
||||
@param Offset Byte offset in the NVRAM device at which to start the read or
|
||||
write operation. This must be a multiple of NvRamAccessSize
|
||||
and less than NvRamSize. (See EFI_SIMPLE_NETWORK_MODE)
|
||||
@param BufferSize The number of bytes to read or write from the NVRAM device.
|
||||
This must also be a multiple of NvramAccessSize.
|
||||
@param Buffer A pointer to the data buffer.
|
||||
|
||||
@retval EFI_SUCCESS The NVRAM access was performed.
|
||||
@retval EFI_NOT_STARTED The network interface has not been started.
|
||||
@retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
|
||||
* The This parameter is NULL
|
||||
* The This parameter does not point to a valid
|
||||
* The This parameter is NULL
|
||||
* The This parameter does not point to a valid
|
||||
EFI_SIMPLE_NETWORK_PROTOCOL structure
|
||||
* The Offset parameter is not a multiple of
|
||||
* The Offset parameter is not a multiple of
|
||||
EFI_SIMPLE_NETWORK_MODE.NvRamAccessSize
|
||||
* The Offset parameter is not less than
|
||||
* The Offset parameter is not less than
|
||||
EFI_SIMPLE_NETWORK_MODE.NvRamSize
|
||||
* The BufferSize parameter is not a multiple of
|
||||
* The BufferSize parameter is not a multiple of
|
||||
EFI_SIMPLE_NETWORK_MODE.NvRamAccessSize
|
||||
* The Buffer parameter is NULL
|
||||
@retval EFI_DEVICE_ERROR The command could not be sent to the network
|
||||
@retval EFI_DEVICE_ERROR The command could not be sent to the network
|
||||
interface.
|
||||
@retval EFI_UNSUPPORTED This function is not supported by the network
|
||||
interface.
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user