]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/Ip6Dxe/Ip6Driver.h
Add NetworkPkg (P.UDK2010.UP3.Network.P1)
[mirror_edk2.git] / NetworkPkg / Ip6Dxe / Ip6Driver.h
diff --git a/NetworkPkg/Ip6Dxe/Ip6Driver.h b/NetworkPkg/Ip6Dxe/Ip6Driver.h
new file mode 100644 (file)
index 0000000..fcb92ab
--- /dev/null
@@ -0,0 +1,185 @@
+/** @file\r
+  The driver binding and service binding protocol for IP6 driver.\r
+\r
+  Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+\r
+  This program and the accompanying materials\r
+  are licensed and made available under the terms and conditions of the BSD License\r
+  which accompanies this distribution.  The full text of the license may be found at\r
+  http://opensource.org/licenses/bsd-license.php.\r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+#ifndef __EFI_IP6_DRIVER_H__\r
+#define __EFI_IP6_DRIVER_H__\r
+\r
+extern EFI_DRIVER_BINDING_PROTOCOL  gIp6DriverBinding;\r
+extern EFI_COMPONENT_NAME_PROTOCOL  gIp6ComponentName;\r
+extern EFI_COMPONENT_NAME2_PROTOCOL gIp6ComponentName2;\r
+\r
+/**\r
+  Clean up an IP6 service binding instance. It releases all\r
+  the resource allocated by the instance. The instance may be\r
+  partly initialized, or partly destroyed. If a resource is\r
+  destroyed, it is marked as that in case the destory failed and\r
+  being called again later.\r
+\r
+  @param[in]  IpSb               The IP6 service binding instance to clean up.\r
+\r
+  @retval EFI_SUCCESS            The resource used by the instance are cleaned up.\r
+  @retval Others                 Failed to clean up some of the resources.\r
+\r
+**/\r
+EFI_STATUS\r
+Ip6CleanService (\r
+  IN IP6_SERVICE            *IpSb\r
+  );\r
+\r
+//\r
+// Function prototype for the driver's entry point\r
+//\r
+\r
+/**\r
+  This is the declaration of an EFI image entry point. This entry point is\r
+  the same for UEFI Applications, UEFI OS Loaders, and UEFI Drivers including\r
+  both device drivers and bus drivers.\r
+\r
+  The entry point for IP6 driver which installs the driver\r
+  binding and component name protocol on its image.\r
+\r
+  @param[in]  ImageHandle           The firmware allocated handle for the UEFI image.\r
+  @param[in]  SystemTable           A pointer to the EFI System Table.\r
+\r
+  @retval EFI_SUCCESS           The operation completed successfully.\r
+  @retval EFI_OUT_OF_RESOURCES  The request could not be completed due to a lack of resources.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+Ip6DriverEntryPoint (\r
+  IN EFI_HANDLE             ImageHandle,\r
+  IN EFI_SYSTEM_TABLE       *SystemTable\r
+  );\r
+\r
+//\r
+// Function prototypes for the Drivr Binding Protocol\r
+//\r
+\r
+/**\r
+  Test to see if this driver supports ControllerHandle.\r
+\r
+  @param[in]  This                   Protocol instance pointer.\r
+  @param[in]  ControllerHandle       Handle of device to test.\r
+  @param[in]  RemainingDevicePath    Optional parameter use to pick a specific child\r
+                                     device to start.\r
+\r
+  @retval EFI_SUCCESS                This driver supports this device.\r
+  @retval EFI_ALREADY_STARTED        This driver is already running on this device.\r
+  @retval other                      This driver does not support this device.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+Ip6DriverBindingSupported (\r
+  IN EFI_DRIVER_BINDING_PROTOCOL  *This,\r
+  IN EFI_HANDLE                   ControllerHandle,\r
+  IN EFI_DEVICE_PATH_PROTOCOL     *RemainingDevicePath OPTIONAL\r
+  );\r
+\r
+/**\r
+  Start this driver on ControllerHandle.\r
+\r
+  @param[in]  This                Protocol instance pointer.\r
+  @param[in]  ControllerHandle    Handle of device to bind driver to.\r
+  @param[in]  RemainingDevicePath Optional parameter used to pick a specific child\r
+                                  device to start.\r
+\r
+  @retval EFI_SUCCES              This driver is added to ControllerHandle.\r
+  @retval EFI_ALREADY_STARTED     This driver is already running on ControllerHandle.\r
+  @retval other                   This driver does not support this device.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+Ip6DriverBindingStart (\r
+  IN EFI_DRIVER_BINDING_PROTOCOL  *This,\r
+  IN EFI_HANDLE                   ControllerHandle,\r
+  IN EFI_DEVICE_PATH_PROTOCOL     *RemainingDevicePath OPTIONAL\r
+  );\r
+\r
+/**\r
+  Stop this driver on ControllerHandle.\r
+\r
+  @param[in]  This               Protocol instance pointer.\r
+  @param[in]  ControllerHandle   Handle of device to stop driver on.\r
+  @param[in]  NumberOfChildren   Number of Handles in ChildHandleBuffer. If number\r
+                                 of children is zero, stop the entire  bus driver.\r
+  @param[in]  ChildHandleBuffer  An array of child handles to be freed. May be NULL\r
+                                 if NumberOfChildren is 0.\r
+\r
+  @retval EFI_SUCCESS           The device was stopped.\r
+  @retval EFI_DEVICE_ERROR      The device could not be stopped due to a device error.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+Ip6DriverBindingStop (\r
+  IN  EFI_DRIVER_BINDING_PROTOCOL  *This,\r
+  IN  EFI_HANDLE                   ControllerHandle,\r
+  IN  UINTN                        NumberOfChildren,\r
+  IN  EFI_HANDLE                   *ChildHandleBuffer OPTIONAL\r
+  );\r
+\r
+//\r
+// Function ptototypes for the ServiceBinding Prococol\r
+//\r
+\r
+/**\r
+  Creates a child handle with a set of I/O services.\r
+\r
+  @param[in]  This               Protocol instance pointer.\r
+  @param[in]  ChildHandle        Pointer to the handle of the child to create.   If\r
+                                 it is NULL, then a new handle is created.   If it\r
+                                 is not NULL, then the I/O services are added to\r
+                                 the existing child handle.\r
+\r
+  @retval EFI_SUCCES             The child handle was created with the I/O services.\r
+  @retval EFI_OUT_OF_RESOURCES   There are not enough resources availabe to create\r
+                                 the child.\r
+  @retval other                  The child handle was not created.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+Ip6ServiceBindingCreateChild (\r
+  IN EFI_SERVICE_BINDING_PROTOCOL  *This,\r
+  IN EFI_HANDLE                    *ChildHandle\r
+  );\r
+\r
+/**\r
+  Destroys a child handle with a set of I/O services.\r
+\r
+  @param[in]  This               Protocol instance pointer.\r
+  @param[in]  ChildHandle        Handle of the child to destroy.\r
+\r
+  @retval EFI_SUCCES             The I/O services were removed from the child\r
+                                 handle.\r
+  @retval EFI_UNSUPPORTED        The child handle does not support the I/O services\r
+                                  that are being removed.\r
+  @retval EFI_INVALID_PARAMETER  Child handle is not a valid EFI Handle.\r
+  @retval EFI_ACCESS_DENIED      The child handle could not be destroyed because\r
+                                 its  I/O services are being used.\r
+  @retval other                  The child handle was not destroyed.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+Ip6ServiceBindingDestroyChild (\r
+  IN EFI_SERVICE_BINDING_PROTOCOL  *This,\r
+  IN EFI_HANDLE                    ChildHandle\r
+  );\r
+\r
+#endif\r