]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Universal/Network/ArpDxe/ArpDriver.h
sync comments, fix function header, rename variable name to follow coding style.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / ArpDxe / ArpDriver.h
1 /** @file
2
3 Copyright (c) 2006 - 2008, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12 Module Name:
13
14 ArpDriver.c
15
16 Abstract:
17
18
19 **/
20
21 #ifndef _ARP_DRIVER_H_
22 #define _ARP_DRIVER_H_
23
24
25 #include <PiDxe.h>
26
27 #include <Protocol/Arp.h>
28 #include <Protocol/ManagedNetwork.h>
29 #include <Protocol/ServiceBinding.h>
30
31 #include <Library/DebugLib.h>
32 #include <Library/UefiDriverEntryPoint.h>
33 #include <Library/UefiBootServicesTableLib.h>
34 #include <Library/UefiLib.h>
35
36
37 //
38 // Global variables
39 //
40 extern EFI_DRIVER_BINDING_PROTOCOL gArpDriverBinding;
41 extern EFI_COMPONENT_NAME_PROTOCOL gArpComponentName;
42 extern EFI_COMPONENT_NAME2_PROTOCOL gArpComponentName2;
43
44 /**
45 Test to see if this driver supports ControllerHandle.
46
47 @param This Protocol instance pointer.
48 @param ControllerHandle Handle of device to test.
49 @param RemainingDevicePath Optional parameter use to pick a specific child
50 device to start.
51
52 @retval EFI_SUCCES This driver supports this device
53 @retval EFI_ALREADY_STARTED This driver is already running on this device.
54 @retval other This driver does not support this device.
55
56 **/
57 EFI_STATUS
58 EFIAPI
59 ArpDriverBindingSupported (
60 IN EFI_DRIVER_BINDING_PROTOCOL *This,
61 IN EFI_HANDLE ControllerHandle,
62 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL
63 );
64
65 /**
66 Start this driver on ControllerHandle.
67
68 @param This Protocol instance pointer.
69 @param ControllerHandle Handle of device to bind driver to
70 @param RemainingDevicePath Optional parameter use to pick a specific child
71 device to start.
72
73 @retval EFI_SUCCES This driver is added to ControllerHandle
74 @retval EFI_ALREADY_STARTED This driver is already running on ControllerHandle
75 @retval other This driver does not support this device
76
77 **/
78 EFI_STATUS
79 EFIAPI
80 ArpDriverBindingStart (
81 IN EFI_DRIVER_BINDING_PROTOCOL *This,
82 IN EFI_HANDLE ControllerHandle,
83 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL
84 );
85
86 /**
87 Stop this driver on ControllerHandle.
88
89 @param This Protocol instance pointer.
90 @param ControllerHandle Handle of device to stop driver on
91 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number
92 of children is zero stop the entire bus driver.
93 @param ChildHandleBuffer List of Child Handles to Stop.
94
95 @retval EFI_SUCCES This driver is removed ControllerHandle
96 @retval other This driver was not removed from this device
97
98 **/
99 EFI_STATUS
100 EFIAPI
101 ArpDriverBindingStop (
102 IN EFI_DRIVER_BINDING_PROTOCOL *This,
103 IN EFI_HANDLE ControllerHandle,
104 IN UINTN NumberOfChildren,
105 IN EFI_HANDLE *ChildHandleBuffer
106 );
107
108 /**
109 Creates a child handle with a set of I/O services.
110
111 @param This Protocol instance pointer.
112 @param ChildHandle Pointer to the handle of the child to create. If
113 it is NULL, then a new handle is created. If it is
114 not NULL, then the I/O services are added to the
115 existing child handle.
116
117 @retval EFI_SUCCES The child handle was created with the I/O
118 services.
119 @retval EFI_OUT_OF_RESOURCES There are not enough resources availabe to create
120 the child.
121 @retval other The child handle was not created.
122
123 **/
124 EFI_STATUS
125 EFIAPI
126 ArpServiceBindingCreateChild (
127 IN EFI_SERVICE_BINDING_PROTOCOL *This,
128 IN EFI_HANDLE *ChildHandle
129 );
130
131 /**
132 Destroys a child handle with a set of I/O services.
133
134 @param This Protocol instance pointer.
135 @param ChildHandle Handle of the child to destroy.
136
137 @retval EFI_SUCCES The I/O services were removed from the child
138 handle.
139 @retval EFI_UNSUPPORTED The child handle does not support the I/O services
140 that are being removed.
141 @retval EFI_INVALID_PARAMETER Child handle is not a valid EFI Handle.
142 @retval EFI_ACCESS_DENIED The child handle could not be destroyed because
143 its I/O services are being used.
144 @retval other The child handle was not destroyed.
145
146 **/
147 EFI_STATUS
148 EFIAPI
149 ArpServiceBindingDestroyChild (
150 IN EFI_SERVICE_BINDING_PROTOCOL *This,
151 IN EFI_HANDLE ChildHandle
152 );
153
154 #endif
155