NetworkPkg/IpSecDxe/IpSecDriver.c File Reference


Functions

EFI_STATUS EFIAPI IpSecSupported (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath, IN UINT8 IpVersion)
EFI_STATUS EFIAPI IpSecStart (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath, IN UINT8 IpVersion)
EFI_STATUS EFIAPI IpSecStop (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer, IN UINT8 IpVersion)
EFI_STATUS EFIAPI IpSec4DriverBindingSupported (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
EFI_STATUS EFIAPI IpSec4DriverBindingStart (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
EFI_STATUS EFIAPI IpSec4DriverBindingStop (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer)
EFI_STATUS EFIAPI IpSec6DriverBindingSupported (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
EFI_STATUS EFIAPI IpSec6DriverBindingStart (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
EFI_STATUS EFIAPI IpSec6DriverBindingStop (IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer)
VOID EFIAPI IpSecCleanupAllSa (IN EFI_EVENT Event, IN VOID *Context)
EFI_STATUS EFIAPI IpSecDriverEntryPoint (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)

Variables

EFI_DRIVER_BINDING_PROTOCOL gIpSec4DriverBinding
EFI_DRIVER_BINDING_PROTOCOL gIpSec6DriverBinding

Detailed Description

Driver Binding Protocol for IPsec Driver.

Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.

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.


Function Documentation

EFI_STATUS EFIAPI IpSec4DriverBindingStart ( IN EFI_DRIVER_BINDING_PROTOCOL *  This,
IN EFI_HANDLE  ControllerHandle,
IN EFI_DEVICE_PATH_PROTOCOL *  RemainingDevicePath 
)

Start this driver on ControllerHandle.

Parameters:
[in] This Protocol instance pointer.
[in] ControllerHandle Handle of device to bind driver to.
[in] RemainingDevicePath Optional parameter used to pick a specific child device to start.
Return values:
EFI_SUCCES This driver is added to ControllerHandle
EFI_ALREADY_STARTED This driver is already running on ControllerHandle
EFI_DEVICE_ERROR The device could not be started due to a device error. Currently not implemented.
other This driver does not support this device

References IpSecStart().

EFI_STATUS EFIAPI IpSec4DriverBindingStop ( IN EFI_DRIVER_BINDING_PROTOCOL *  This,
IN EFI_HANDLE  ControllerHandle,
IN UINTN  NumberOfChildren,
IN EFI_HANDLE *  ChildHandleBuffer 
)

Stop this driver on ControllerHandle.

Parameters:
[in] This Protocol instance pointer.
[in] ControllerHandle Handle of a device to stop the driver on.
[in] NumberOfChildren Number of Handles in ChildHandleBuffer. If the number of children is zero, stop the entire bus driver.
[in] ChildHandleBuffer List of Child Handles to Stop.
Return values:
EFI_SUCCES This driver removed ControllerHandle.
other This driver was not removed from this device.

References IpSecStop().

EFI_STATUS EFIAPI IpSec4DriverBindingSupported ( IN EFI_DRIVER_BINDING_PROTOCOL *  This,
IN EFI_HANDLE  ControllerHandle,
IN EFI_DEVICE_PATH_PROTOCOL *  RemainingDevicePath 
)

Test to see if this driver supports ControllerHandle.

Parameters:
[in] This Protocol instance pointer.
[in] ControllerHandle Handle of device to test.
[in] RemainingDevicePath Optional parameter used to pick a specific child device to start.
Return values:
EFI_SUCCES This driver supports this device.
EFI_ALREADY_STARTED This driver is already running on this device.
other This driver does not support this device.

References IpSecSupported().

EFI_STATUS EFIAPI IpSec6DriverBindingStart ( IN EFI_DRIVER_BINDING_PROTOCOL *  This,
IN EFI_HANDLE  ControllerHandle,
IN EFI_DEVICE_PATH_PROTOCOL *  RemainingDevicePath 
)

Start this driver on ControllerHandle.

Parameters:
[in] This Protocol instance pointer.
[in] ControllerHandle Handle of device to bind driver to.
[in] RemainingDevicePath Optional parameter used to pick a specific child device to start.
Return values:
EFI_SUCCES This driver is added to ControllerHandle
EFI_ALREADY_STARTED This driver is already running on ControllerHandle
EFI_DEVICE_ERROR The device could not be started due to a device error. Currently not implemented.
other This driver does not support this device

References IpSecStart().

EFI_STATUS EFIAPI IpSec6DriverBindingStop ( IN EFI_DRIVER_BINDING_PROTOCOL *  This,
IN EFI_HANDLE  ControllerHandle,
IN UINTN  NumberOfChildren,
IN EFI_HANDLE *  ChildHandleBuffer 
)

Stop this driver on ControllerHandle.

Parameters:
[in] This Protocol instance pointer.
[in] ControllerHandle Handle of a device to stop the driver on.
[in] NumberOfChildren Number of Handles in ChildHandleBuffer. If the number of children is zero, stop the entire bus driver.
[in] ChildHandleBuffer List of Child Handles to Stop.
Return values:
EFI_SUCCES This driver removed ControllerHandle.
other This driver was not removed from this device.

References IpSecStop().

EFI_STATUS EFIAPI IpSec6DriverBindingSupported ( IN EFI_DRIVER_BINDING_PROTOCOL *  This,
IN EFI_HANDLE  ControllerHandle,
IN EFI_DEVICE_PATH_PROTOCOL *  RemainingDevicePath 
)

Test to see if this driver supports ControllerHandle.

Parameters:
[in] This Protocol instance pointer.
[in] ControllerHandle Handle of device to test.
[in] RemainingDevicePath Optional parameter used to pick a specific child device to start.
Return values:
EFI_SUCCES This driver supports this device.
EFI_ALREADY_STARTED This driver is already running on this device.
other This driver does not support this device.

References IpSecSupported().

VOID EFIAPI IpSecCleanupAllSa ( IN EFI_EVENT  Event,
IN VOID *  Context 
)

This is a callback function when the mIpSecInstance.DisabledEvent is signaled.

Parameters:
[in] Event Event whose notification function is being invoked.
[in] Context Pointer to the notification function's context.

References IkeDeleteAllSas(), and _IPSEC_PRIVATE_DATA::IsIPsecDisabling.

Referenced by IpSecDriverEntryPoint().

EFI_STATUS EFIAPI IpSecDriverEntryPoint ( IN EFI_HANDLE  ImageHandle,
IN EFI_SYSTEM_TABLE *  SystemTable 
)

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 IPsec driver which installs the driver binding, component name protocol, IPsec Config protcolon, and IPsec protocol in its ImageHandle.

Parameters:
[in] ImageHandle The firmware allocated handle for the UEFI image.
[in] SystemTable A pointer to the EFI System Table.
Return values:
EFI_SUCCESS The operation completed successfully.
EFI_ALREADY_STARTED The IPsec driver has been already loaded.
EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.
Others The operation is failed.

References gIpSec4DriverBinding, gIpSec6DriverBinding, gIpSecComponentName, gIpSecComponentName2, _IPSEC_PRIVATE_DATA::Handle, _IPSEC_PRIVATE_DATA::Ikev1EstablishedList, _IPSEC_PRIVATE_DATA::Ikev1SessionList, _IPSEC_PRIVATE_DATA::Ikev2EstablishedList, _IPSEC_PRIVATE_DATA::Ikev2SessionList, _IPSEC_PRIVATE_DATA::ImageHandle, _IPSEC_PRIVATE_DATA::IpSec, IPSEC_PRIVATE_DATA_SIGNATURE, IpSecCleanupAllSa(), _IPSEC_PRIVATE_DATA::IpSecConfig, IpSecConfigInitialize(), mDpc, mIpSecInstance, _IPSEC_PRIVATE_DATA::Signature, _IPSEC_PRIVATE_DATA::Udp4List, and _IPSEC_PRIVATE_DATA::Udp6List.

EFI_STATUS EFIAPI IpSecStart ( IN EFI_DRIVER_BINDING_PROTOCOL *  This,
IN EFI_HANDLE  ControllerHandle,
IN EFI_DEVICE_PATH_PROTOCOL *  RemainingDevicePath,
IN UINT8  IpVersion 
)

Start this driver on ControllerHandle. This is the worker function for IpSec4(6)DriverbindingStart.

Parameters:
[in] This Protocol instance pointer.
[in] ControllerHandle Handle of device to bind driver to.
[in] RemainingDevicePath Optional parameter used to pick a specific child device to start.
[in] IpVersion IP_VERSION_4 or IP_VERSION_6.
Return values:
EFI_SUCCES This driver is added to ControllerHandle
EFI_ALREADY_STARTED This driver is already running on ControllerHandle
EFI_DEVICE_ERROR The device could not be started due to a device error. Currently not implemented.
other This driver does not support this device

References IkeOpenInputUdp4(), IkeOpenInputUdp6(), and IPSEC_PRIVATE_DATA_FROM_IPSEC.

Referenced by IpSec4DriverBindingStart(), and IpSec6DriverBindingStart().

EFI_STATUS EFIAPI IpSecStop ( IN EFI_DRIVER_BINDING_PROTOCOL *  This,
IN EFI_HANDLE  ControllerHandle,
IN UINTN  NumberOfChildren,
IN EFI_HANDLE *  ChildHandleBuffer,
IN UINT8  IpVersion 
)

Stop this driver on ControllerHandle. This is the worker function for IpSec4(6)DriverbindingStop.

Parameters:
[in] This Protocol instance pointer.
[in] ControllerHandle Handle of a device to stop the driver on.
[in] NumberOfChildren Number of Handles in ChildHandleBuffer. If the number of children is zero, stop the entire bus driver.
[in] ChildHandleBuffer List of Child Handles to Stop.
[in] IpVersion IP_VERSION_4 or IP_VERSION_6.
Return values:
EFI_SUCCES This driver removed ControllerHandle.
other This driver was not removed from this device.

References IKEV2_SA_SESSION::BySessionTable, IKEV2_SA_SESSION_BY_SESSION, _IPSEC_PRIVATE_DATA::Ikev2EstablishedList, Ikev2SaSessionFree(), _IPSEC_PRIVATE_DATA::Ikev2SessionList, IKE_UDP_SERVICE::Input, IPSEC_PRIVATE_DATA_FROM_IPSEC, IPSEC_UDP_SERVICE_FROM_LIST, IKE_UDP_SERVICE::List, IKE_UDP_SERVICE::Output, _IPSEC_PRIVATE_DATA::Udp4List, _IPSEC_PRIVATE_DATA::Udp4Num, _IPSEC_PRIVATE_DATA::Udp6List, and _IPSEC_PRIVATE_DATA::Udp6Num.

Referenced by IpSec4DriverBindingStop(), and IpSec6DriverBindingStop().

EFI_STATUS EFIAPI IpSecSupported ( IN EFI_DRIVER_BINDING_PROTOCOL *  This,
IN EFI_HANDLE  ControllerHandle,
IN EFI_DEVICE_PATH_PROTOCOL *  RemainingDevicePath,
IN UINT8  IpVersion 
)

Test to see if this driver supports ControllerHandle. This is the worker function for IpSec4(6)DriverbindingSupported.

Parameters:
[in] This Protocol instance pointer.
[in] ControllerHandle Handle of device to test.
[in] RemainingDevicePath Optional parameter used to pick a specific child device to start.
[in] IpVersion IP_VERSION_4 or IP_VERSION_6.
Return values:
EFI_SUCCES This driver supports this device.
EFI_ALREADY_STARTED This driver is already running on this device.
other This driver does not support this device.

Referenced by IpSec4DriverBindingSupported(), and IpSec6DriverBindingSupported().


Variable Documentation

EFI_DRIVER_BINDING_PROTOCOL gIpSec4DriverBinding

EFI_DRIVER_BINDING_PROTOCOL gIpSec6DriverBinding


Generated on Mon Sep 28 08:49:06 2015 for NetworkPkg[ALL] by  doxygen 1.5.7.1