]>
Commit | Line | Data |
---|---|---|
cff298f4 | 1 | /** @file\r |
2 | This file defines the EFI Domain Name Service Binding Protocol interface. It is split\r | |
3 | into the following two main sections:\r | |
4 | DNSv4 Service Binding Protocol (DNSv4SB)\r | |
5 | DNSv4 Protocol (DNSv4)\r | |
6 | \r | |
9095d37b | 7 | Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r |
9344f092 | 8 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
cff298f4 | 9 | \r |
10 | @par Revision Reference:\r | |
11 | This Protocol is introduced in UEFI Specification 2.5\r | |
12 | \r | |
13 | **/\r | |
14 | \r | |
15 | #ifndef __EFI_DNS4_PROTOCOL_H__\r | |
16 | #define __EFI_DNS4_PROTOCOL_H__\r | |
17 | \r | |
18 | #define EFI_DNS4_SERVICE_BINDING_PROTOCOL_GUID \\r | |
19 | { \\r | |
20 | 0xb625b186, 0xe063, 0x44f7, {0x89, 0x5, 0x6a, 0x74, 0xdc, 0x6f, 0x52, 0xb4 } \\r | |
21 | }\r | |
22 | \r | |
23 | #define EFI_DNS4_PROTOCOL_GUID \\r | |
24 | { \\r | |
25 | 0xae3d28cc, 0xe05b, 0x4fa1, {0xa0, 0x11, 0x7e, 0xb5, 0x5a, 0x3f, 0x14, 0x1 } \\r | |
26 | }\r | |
27 | \r | |
28 | typedef struct _EFI_DNS4_PROTOCOL EFI_DNS4_PROTOCOL;\r | |
29 | \r | |
30 | ///\r | |
31 | /// EFI_DNS4_CONFIG_DATA\r | |
32 | ///\r | |
33 | typedef struct {\r | |
34 | ///\r | |
9095d37b LG |
35 | /// Count of the DNS servers. When used with GetModeData(),\r |
36 | /// this field is the count of originally configured servers when\r | |
37 | /// Configure() was called for this instance. When used with\r | |
38 | /// Configure() this is the count of caller-supplied servers. If the\r | |
39 | /// DnsServerListCount is zero, the DNS server configuration\r | |
cff298f4 | 40 | /// will be retrieved from DHCP server automatically.\r |
41 | ///\r | |
2f88bd3a | 42 | UINTN DnsServerListCount;\r |
cff298f4 | 43 | ///\r |
9095d37b LG |
44 | /// Pointer to DNS server list containing DnsServerListCount entries or NULL\r |
45 | /// if DnsServerListCountis 0. For Configure(), this will be NULL when there are\r | |
46 | /// no caller supplied server addresses, and, the DNS instance will retrieve\r | |
47 | /// DNS server from DHCP Server. The provided DNS server list is\r | |
48 | /// recommended to be filled up in the sequence of preference. When\r | |
49 | /// used with GetModeData(), the buffer containing the list will\r | |
50 | /// be allocated by the driver implementing this protocol and must be\r | |
51 | /// freed by the caller. When used with Configure(), the buffer\r | |
cff298f4 | 52 | /// containing the list will be allocated and released by the caller.\r |
53 | ///\r | |
2f88bd3a | 54 | EFI_IPv4_ADDRESS *DnsServerList;\r |
cff298f4 | 55 | ///\r |
56 | /// Set to TRUE to use the default IP address/subnet mask and default routing table.\r | |
57 | ///\r | |
2f88bd3a | 58 | BOOLEAN UseDefaultSetting;\r |
cff298f4 | 59 | ///\r |
60 | /// If TRUE, enable DNS cache function for this DNS instance. If FALSE, all DNS\r | |
61 | /// query will not lookup local DNS cache.\r | |
62 | ///\r | |
2f88bd3a | 63 | BOOLEAN EnableDnsCache;\r |
cff298f4 | 64 | ///\r |
9095d37b LG |
65 | /// Use the protocol number defined in "Links to UEFI-Related\r |
66 | /// Documents"(http://uefi.org/uefi) under the heading "IANA\r | |
67 | /// Protocol Numbers". Only TCP or UDP are supported, and other\r | |
68 | /// protocol values are invalid. An implementation can choose to\r | |
cff298f4 | 69 | /// support only UDP, or both TCP and UDP.\r |
70 | ///\r | |
2f88bd3a | 71 | UINT8 Protocol;\r |
cff298f4 | 72 | ///\r |
73 | /// If UseDefaultSetting is FALSE indicates the station address to use.\r | |
74 | ///\r | |
2f88bd3a | 75 | EFI_IPv4_ADDRESS StationIp;\r |
cff298f4 | 76 | ///\r |
77 | /// If UseDefaultSetting is FALSE indicates the subnet mask to use.\r | |
78 | ///\r | |
2f88bd3a | 79 | EFI_IPv4_ADDRESS SubnetMask;\r |
cff298f4 | 80 | ///\r |
81 | /// Local port number. Set to zero to use the automatically assigned port number.\r | |
82 | ///\r | |
2f88bd3a | 83 | UINT16 LocalPort;\r |
cff298f4 | 84 | ///\r |
85 | /// Retry number if no response received after RetryInterval.\r | |
86 | ///\r | |
2f88bd3a | 87 | UINT32 RetryCount;\r |
cff298f4 | 88 | ///\r |
89 | /// Minimum interval of retry is 2 second. If the retry interval is less than 2\r | |
90 | /// seconds, then use the 2 seconds.\r | |
91 | ///\r | |
2f88bd3a | 92 | UINT32 RetryInterval;\r |
cff298f4 | 93 | } EFI_DNS4_CONFIG_DATA;\r |
94 | \r | |
cff298f4 | 95 | ///\r |
96 | /// EFI_DNS4_CACHE_ENTRY\r | |
97 | ///\r | |
98 | typedef struct {\r | |
99 | ///\r | |
100 | /// Host name.\r | |
101 | ///\r | |
2f88bd3a | 102 | CHAR16 *HostName;\r |
cff298f4 | 103 | ///\r |
104 | /// IP address of this host.\r | |
105 | ///\r | |
2f88bd3a | 106 | EFI_IPv4_ADDRESS *IpAddress;\r |
cff298f4 | 107 | ///\r |
108 | /// Time in second unit that this entry will remain in DNS cache. A value of zero\r | |
109 | /// means that this entry is permanent. A nonzero value will override the existing\r | |
110 | /// one if this entry to be added is dynamic entry. Implementations may set its\r | |
111 | /// default timeout value for the dynamically created DNS cache entry after one DNS\r | |
112 | /// resolve succeeds.\r | |
113 | ///\r | |
2f88bd3a | 114 | UINT32 Timeout;\r |
cff298f4 | 115 | } EFI_DNS4_CACHE_ENTRY;\r |
116 | \r | |
117 | ///\r | |
118 | /// EFI_DNS4_MODE_DATA\r | |
119 | ///\r | |
120 | typedef struct {\r | |
121 | ///\r | |
122 | /// The configuration data of this instance.\r | |
123 | ///\r | |
2f88bd3a | 124 | EFI_DNS4_CONFIG_DATA DnsConfigData;\r |
cff298f4 | 125 | ///\r |
126 | /// Number of configured DNS server. Each DNS instance has its own DNS server\r | |
127 | /// configuration.\r | |
128 | ///\r | |
2f88bd3a | 129 | UINT32 DnsServerCount;\r |
cff298f4 | 130 | ///\r |
9095d37b LG |
131 | /// Pointer to common list of addresses of all configured DNS server\r |
132 | /// used by EFI_DNS4_PROTOCOL instances. List will include\r | |
133 | /// DNS servers configured by this or any other EFI_DNS4_PROTOCOL instance.\r | |
134 | /// The storage for this list is allocated by the driver publishing this\r | |
cff298f4 | 135 | /// protocol, and must be freed by the caller.\r |
136 | ///\r | |
2f88bd3a | 137 | EFI_IPv4_ADDRESS *DnsServerList;\r |
cff298f4 | 138 | ///\r |
139 | /// Number of DNS Cache entries. The DNS Cache is shared among all DNS instances.\r | |
140 | ///\r | |
2f88bd3a | 141 | UINT32 DnsCacheCount;\r |
cff298f4 | 142 | ///\r |
9095d37b LG |
143 | /// Pointer to a buffer containing DnsCacheCount DNS Cache\r |
144 | /// entry structures. The storage for this list is allocated by the driver\r | |
cff298f4 | 145 | /// publishing this protocol and must be freed by caller.\r |
146 | ///\r | |
2f88bd3a | 147 | EFI_DNS4_CACHE_ENTRY *DnsCacheList;\r |
cff298f4 | 148 | } EFI_DNS4_MODE_DATA;\r |
149 | \r | |
150 | ///\r | |
151 | /// DNS_HOST_TO_ADDR_DATA\r | |
152 | ///\r | |
153 | typedef struct {\r | |
154 | ///\r | |
155 | /// Number of the returned IP addresses.\r | |
156 | ///\r | |
2f88bd3a | 157 | UINT32 IpCount;\r |
cff298f4 | 158 | ///\r |
159 | /// Pointer to the all the returned IP addresses.\r | |
160 | ///\r | |
2f88bd3a | 161 | EFI_IPv4_ADDRESS *IpList;\r |
cff298f4 | 162 | } DNS_HOST_TO_ADDR_DATA;\r |
163 | \r | |
164 | ///\r | |
165 | /// DNS_ADDR_TO_HOST_DATA\r | |
166 | ///\r | |
167 | typedef struct {\r | |
168 | ///\r | |
169 | /// Pointer to the primary name for this host address. It's the caller's\r | |
170 | /// responsibility to free the response memory.\r | |
171 | ///\r | |
2f88bd3a | 172 | CHAR16 *HostName;\r |
cff298f4 | 173 | } DNS_ADDR_TO_HOST_DATA;\r |
174 | \r | |
175 | ///\r | |
176 | /// DNS_RESOURCE_RECORD\r | |
177 | ///\r | |
178 | typedef struct {\r | |
179 | ///\r | |
180 | /// The Owner name.\r | |
181 | ///\r | |
2f88bd3a | 182 | CHAR8 *QName;\r |
cff298f4 | 183 | ///\r |
184 | /// The Type Code of this RR.\r | |
185 | ///\r | |
2f88bd3a | 186 | UINT16 QType;\r |
cff298f4 | 187 | ///\r |
188 | /// The CLASS code of this RR.\r | |
189 | ///\r | |
2f88bd3a | 190 | UINT16 QClass;\r |
cff298f4 | 191 | ///\r |
192 | /// 32 bit integer which specify the time interval that the resource record may be\r | |
193 | /// cached before the source of the information should again be consulted. Zero means\r | |
194 | /// this RR can not be cached.\r | |
195 | ///\r | |
2f88bd3a | 196 | UINT32 TTL;\r |
cff298f4 | 197 | ///\r |
198 | /// 16 big integer which specify the length of RData.\r | |
199 | ///\r | |
2f88bd3a | 200 | UINT16 DataLength;\r |
cff298f4 | 201 | ///\r |
202 | /// A string of octets that describe the resource, the format of this information\r | |
203 | /// varies according to QType and QClass difference.\r | |
204 | ///\r | |
2f88bd3a | 205 | CHAR8 *RData;\r |
cff298f4 | 206 | } DNS_RESOURCE_RECORD;\r |
207 | \r | |
208 | ///\r | |
209 | /// DNS_GENERAL_LOOKUP_DATA\r | |
210 | ///\r | |
211 | typedef struct {\r | |
212 | ///\r | |
213 | /// Number of returned matching RRs.\r | |
214 | ///\r | |
2f88bd3a | 215 | UINTN RRCount;\r |
cff298f4 | 216 | ///\r |
217 | /// Pointer to the all the returned matching RRs. It's caller responsibility to free\r | |
218 | /// the allocated memory to hold the returned RRs.\r | |
219 | ///\r | |
2f88bd3a | 220 | DNS_RESOURCE_RECORD *RRList;\r |
cff298f4 | 221 | } DNS_GENERAL_LOOKUP_DATA;\r |
222 | \r | |
223 | ///\r | |
224 | /// EFI_DNS4_COMPLETION_TOKEN\r | |
225 | ///\r | |
226 | typedef struct {\r | |
227 | ///\r | |
228 | /// This Event will be signaled after the Status field is updated by the EFI DNS\r | |
229 | /// protocol driver. The type of Event must be EFI_NOTIFY_SIGNAL.\r | |
230 | ///\r | |
2f88bd3a | 231 | EFI_EVENT Event;\r |
cff298f4 | 232 | ///\r |
233 | /// Will be set to one of the following values:\r | |
234 | /// EFI_SUCCESS: The host name to address translation completed successfully.\r | |
235 | /// EFI_NOT_FOUND: No matching Resource Record (RR) is found.\r | |
236 | /// EFI_TIMEOUT: No DNS server reachable, or RetryCount was exhausted without\r | |
237 | /// response from all specified DNS servers.\r | |
238 | /// EFI_DEVICE_ERROR: An unexpected system or network error occurred.\r | |
239 | /// EFI_NO_MEDIA: There was a media error.\r | |
240 | ///\r | |
2f88bd3a | 241 | EFI_STATUS Status;\r |
cff298f4 | 242 | ///\r |
243 | /// Retry number if no response received after RetryInterval. If zero, use the\r | |
244 | /// parameter configured through Dns.Configure() interface.\r | |
245 | ///\r | |
2f88bd3a | 246 | UINT32 RetryCount;\r |
cff298f4 | 247 | ///\r |
248 | /// Minimum interval of retry is 2 second. If the retry interval is less than 2\r | |
249 | /// seconds, then use the 2 seconds. If zero, use the parameter configured through\r | |
250 | /// Dns.Configure() interface.\r | |
2f88bd3a | 251 | UINT32 RetryInterval;\r |
cff298f4 | 252 | ///\r |
253 | /// DNSv4 completion token data\r | |
254 | ///\r | |
255 | union {\r | |
256 | ///\r | |
257 | /// When the Token is used for host name to address translation, H2AData is a pointer\r | |
258 | /// to the DNS_HOST_TO_ADDR_DATA.\r | |
259 | ///\r | |
2f88bd3a | 260 | DNS_HOST_TO_ADDR_DATA *H2AData;\r |
cff298f4 | 261 | ///\r |
262 | /// When the Token is used for host address to host name translation, A2HData is a\r | |
263 | /// pointer to the DNS_ADDR_TO_HOST_DATA.\r | |
264 | ///\r | |
2f88bd3a | 265 | DNS_ADDR_TO_HOST_DATA *A2HData;\r |
cff298f4 | 266 | ///\r |
267 | /// When the Token is used for a general lookup function, GLookupDATA is a pointer to\r | |
268 | /// the DNS_GENERAL_LOOKUP_DATA.\r | |
269 | ///\r | |
2f88bd3a | 270 | DNS_GENERAL_LOOKUP_DATA *GLookupData;\r |
cff298f4 | 271 | } RspData;\r |
272 | } EFI_DNS4_COMPLETION_TOKEN;\r | |
273 | \r | |
274 | /**\r | |
275 | Retrieve mode data of this DNS instance.\r | |
276 | \r | |
277 | This function is used to retrieve DNS mode data for this DNS instance.\r | |
278 | \r | |
279 | @param[in] This Pointer to EFI_DNS4_PROTOCOL instance.\r | |
280 | @param[out] DnsModeData Point to the mode data.\r | |
281 | \r | |
282 | @retval EFI_SUCCESS The operation completed successfully.\r | |
283 | @retval EFI_NOT_STARTED When DnsConfigData is queried, no configuration data\r | |
284 | is available because this instance has not been\r | |
285 | configured.\r | |
286 | @retval EFI_INVALID_PARAMETER This is NULL or DnsModeData is NULL.\r | |
287 | @retval EFI_OUT_OF_RESOURCES Failed to allocate needed resources.\r | |
288 | **/\r | |
289 | typedef\r | |
290 | EFI_STATUS\r | |
2f88bd3a | 291 | (EFIAPI *EFI_DNS4_GET_MODE_DATA)(\r |
cff298f4 | 292 | IN EFI_DNS4_PROTOCOL *This,\r |
293 | OUT EFI_DNS4_MODE_DATA *DnsModeData\r | |
294 | );\r | |
295 | \r | |
296 | /**\r | |
297 | Configure this DNS instance.\r | |
298 | \r | |
299 | This function is used to configure DNS mode data for this DNS instance.\r | |
300 | \r | |
301 | @param[in] This Pointer to EFI_DNS4_PROTOCOL instance.\r | |
302 | @param[in] DnsConfigData Point to the Configuration data.\r | |
303 | \r | |
304 | @retval EFI_SUCCESS The operation completed successfully.\r | |
305 | @retval EFI_UNSUPPORTED The designated protocol is not supported.\r | |
00b7cc0f | 306 | @retval EFI_INVALID_PARAMETER This is NULL.\r |
9095d37b | 307 | The StationIp address provided in DnsConfigData is not a\r |
cff298f4 | 308 | valid unicast.\r |
309 | DnsServerList is NULL while DnsServerListCount\r | |
310 | is not ZERO.\r | |
311 | DnsServerListCount is ZERO while DnsServerList\r | |
312 | is not NULL\r | |
313 | @retval EFI_OUT_OF_RESOURCES The DNS instance data or required space could not be\r | |
314 | allocated.\r | |
315 | @retval EFI_DEVICE_ERROR An unexpected system or network error occurred. The\r | |
316 | EFI DNSv4 Protocol instance is not configured.\r | |
9095d37b LG |
317 | @retval EFI_ALREADY_STARTED Second call to Configure() with DnsConfigData. To\r |
318 | reconfigure the instance the caller must call Configure()\r | |
cff298f4 | 319 | with NULL first to return driver to unconfigured state.\r |
320 | **/\r | |
321 | typedef\r | |
322 | EFI_STATUS\r | |
2f88bd3a | 323 | (EFIAPI *EFI_DNS4_CONFIGURE)(\r |
cff298f4 | 324 | IN EFI_DNS4_PROTOCOL *This,\r |
325 | IN EFI_DNS4_CONFIG_DATA *DnsConfigData\r | |
326 | );\r | |
327 | \r | |
328 | /**\r | |
329 | Host name to host address translation.\r | |
330 | \r | |
331 | The HostNameToIp () function is used to translate the host name to host IP address. A\r | |
332 | type A query is used to get the one or more IP addresses for this host.\r | |
333 | \r | |
334 | @param[in] This Pointer to EFI_DNS4_PROTOCOL instance.\r | |
4c4cbee9 | 335 | @param[in] HostName Host name.\r |
cff298f4 | 336 | @param[in] Token Point to the completion token to translate host name\r |
337 | to host address.\r | |
338 | \r | |
339 | @retval EFI_SUCCESS The operation completed successfully.\r | |
340 | @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:\r | |
341 | This is NULL.\r | |
342 | Token is NULL.\r | |
343 | Token.Event is NULL.\r | |
344 | HostName is NULL. HostName string is unsupported format.\r | |
345 | @retval EFI_NO_MAPPING There's no source address is available for use.\r | |
346 | @retval EFI_NOT_STARTED This instance has not been started.\r | |
347 | **/\r | |
348 | typedef\r | |
349 | EFI_STATUS\r | |
2f88bd3a MK |
350 | (EFIAPI *EFI_DNS4_HOST_NAME_TO_IP)(\r |
351 | IN EFI_DNS4_PROTOCOL *This,\r | |
352 | IN CHAR16 *HostName,\r | |
353 | IN EFI_DNS4_COMPLETION_TOKEN *Token\r | |
cff298f4 | 354 | );\r |
355 | \r | |
356 | /**\r | |
357 | IPv4 address to host name translation also known as Reverse DNS lookup.\r | |
358 | \r | |
9095d37b | 359 | The IpToHostName() function is used to translate the host address to host name. A type PTR\r |
cff298f4 | 360 | query is used to get the primary name of the host. Support of this function is optional.\r |
361 | \r | |
362 | @param[in] This Pointer to EFI_DNS4_PROTOCOL instance.\r | |
363 | @param[in] IpAddress Ip Address.\r | |
364 | @param[in] Token Point to the completion token to translate host\r | |
365 | address to host name.\r | |
366 | \r | |
367 | @retval EFI_SUCCESS The operation completed successfully.\r | |
368 | @retval EFI_UNSUPPORTED This function is not supported.\r | |
369 | @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:\r | |
370 | This is NULL.\r | |
371 | Token is NULL.\r | |
372 | Token.Event is NULL.\r | |
373 | IpAddress is not valid IP address .\r | |
374 | @retval EFI_NO_MAPPING There's no source address is available for use.\r | |
375 | @retval EFI_ALREADY_STARTED This Token is being used in another DNS session.\r | |
cff298f4 | 376 | @retval EFI_OUT_OF_RESOURCES Failed to allocate needed resources.\r |
377 | **/\r | |
378 | typedef\r | |
379 | EFI_STATUS\r | |
2f88bd3a MK |
380 | (EFIAPI *EFI_DNS4_IP_TO_HOST_NAME)(\r |
381 | IN EFI_DNS4_PROTOCOL *This,\r | |
382 | IN EFI_IPv4_ADDRESS IpAddress,\r | |
383 | IN EFI_DNS4_COMPLETION_TOKEN *Token\r | |
cff298f4 | 384 | );\r |
385 | \r | |
386 | /**\r | |
9095d37b | 387 | Retrieve arbitrary information from the DNS server.\r |
cff298f4 | 388 | \r |
389 | This GeneralLookup() function retrieves arbitrary information from the DNS. The caller\r | |
390 | supplies a QNAME, QTYPE, and QCLASS, and all of the matching RRs are returned. All\r | |
391 | RR content (e.g., TTL) was returned. The caller need parse the returned RR to get\r | |
392 | required information. The function is optional.\r | |
393 | \r | |
394 | @param[in] This Pointer to EFI_DNS4_PROTOCOL instance.\r | |
395 | @param[in] QName Pointer to Query Name.\r | |
396 | @param[in] QType Query Type.\r | |
397 | @param[in] QClass Query Name.\r | |
398 | @param[in] Token Point to the completion token to retrieve arbitrary\r | |
399 | information.\r | |
400 | \r | |
401 | @retval EFI_SUCCESS The operation completed successfully.\r | |
402 | @retval EFI_UNSUPPORTED This function is not supported. Or the requested\r | |
403 | QType is not supported\r | |
404 | @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:\r | |
405 | This is NULL.\r | |
406 | Token is NULL.\r | |
407 | Token.Event is NULL.\r | |
408 | QName is NULL.\r | |
409 | @retval EFI_NO_MAPPING There's no source address is available for use.\r | |
410 | @retval EFI_ALREADY_STARTED This Token is being used in another DNS session.\r | |
411 | @retval EFI_OUT_OF_RESOURCES Failed to allocate needed resources.\r | |
412 | **/\r | |
413 | typedef\r | |
414 | EFI_STATUS\r | |
2f88bd3a | 415 | (EFIAPI *EFI_DNS4_GENERAL_LOOKUP)(\r |
cff298f4 | 416 | IN EFI_DNS4_PROTOCOL *This,\r |
417 | IN CHAR8 *QName,\r | |
418 | IN UINT16 QType,\r | |
419 | IN UINT16 QClass,\r | |
420 | IN EFI_DNS4_COMPLETION_TOKEN *Token\r | |
421 | );\r | |
422 | \r | |
423 | /**\r | |
424 | This function is to update the DNS Cache.\r | |
425 | \r | |
426 | The UpdateDnsCache() function is used to add/delete/modify DNS cache entry. DNS cache\r | |
427 | can be normally dynamically updated after the DNS resolve succeeds. This function\r | |
428 | provided capability to manually add/delete/modify the DNS cache.\r | |
429 | \r | |
430 | @param[in] This Pointer to EFI_DNS4_PROTOCOL instance.\r | |
431 | @param[in] DeleteFlag If FALSE, this function is to add one entry to the\r | |
432 | DNS Cahce. If TRUE, this function will delete\r | |
433 | matching DNS Cache entry.\r | |
434 | @param[in] Override If TRUE, the maching DNS cache entry will be\r | |
435 | overwritten with the supplied parameter. If FALSE,\r | |
436 | EFI_ACCESS_DENIED will be returned if the entry to\r | |
437 | be added is already existed.\r | |
438 | @param[in] DnsCacheEntry Pointer to DNS Cache entry.\r | |
439 | \r | |
440 | @retval EFI_SUCCESS The operation completed successfully.\r | |
441 | @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:\r | |
442 | This is NULL.\r | |
443 | DnsCacheEntry.HostName is NULL.\r | |
444 | DnsCacheEntry.IpAddress is NULL.\r | |
445 | DnsCacheEntry.Timeout is zero.\r | |
446 | @retval EFI_ACCESS_DENIED The DNS cache entry already exists and Override is\r | |
447 | not TRUE.\r | |
448 | **/\r | |
449 | typedef\r | |
450 | EFI_STATUS\r | |
2f88bd3a | 451 | (EFIAPI *EFI_DNS4_UPDATE_DNS_CACHE)(\r |
cff298f4 | 452 | IN EFI_DNS4_PROTOCOL *This,\r |
453 | IN BOOLEAN DeleteFlag,\r | |
454 | IN BOOLEAN Override,\r | |
455 | IN EFI_DNS4_CACHE_ENTRY DnsCacheEntry\r | |
456 | );\r | |
457 | \r | |
458 | /**\r | |
459 | Polls for incoming data packets and processes outgoing data packets.\r | |
460 | \r | |
461 | The Poll() function can be used by network drivers and applications to increase the\r | |
462 | rate that data packets are moved between the communications device and the transmit\r | |
463 | and receive queues.\r | |
464 | In some systems, the periodic timer event in the managed network driver may not poll\r | |
465 | the underlying communications device fast enough to transmit and/or receive all data\r | |
466 | packets without missing incoming packets or dropping outgoing packets. Drivers and\r | |
467 | applications that are experiencing packet loss should try calling the Poll()\r | |
468 | function more often.\r | |
469 | \r | |
470 | @param[in] This Pointer to EFI_DNS4_PROTOCOL instance.\r | |
471 | \r | |
472 | @retval EFI_SUCCESS Incoming or outgoing data was processed.\r | |
473 | @retval EFI_NOT_STARTED This EFI DNS Protocol instance has not been started.\r | |
474 | @retval EFI_INVALID_PARAMETER This is NULL.\r | |
475 | @retval EFI_DEVICE_ERROR An unexpected system or network error occurred.\r | |
476 | @retval EFI_TIMEOUT Data was dropped out of the transmit and/or receive\r | |
477 | queue. Consider increasing the polling rate.\r | |
478 | **/\r | |
479 | typedef\r | |
480 | EFI_STATUS\r | |
2f88bd3a | 481 | (EFIAPI *EFI_DNS4_POLL)(\r |
cff298f4 | 482 | IN EFI_DNS4_PROTOCOL *This\r |
483 | );\r | |
484 | \r | |
485 | /**\r | |
486 | Abort an asynchronous DNS operation, including translation between IP and Host, and\r | |
487 | general look up behavior.\r | |
488 | \r | |
489 | The Cancel() function is used to abort a pending resolution request. After calling\r | |
490 | this function, Token.Status will be set to EFI_ABORTED and then Token.Event will be\r | |
491 | signaled. If the token is not in one of the queues, which usually means that the\r | |
492 | asynchronous operation has completed, this function will not signal the token and\r | |
493 | EFI_NOT_FOUND is returned.\r | |
494 | \r | |
495 | @param[in] This Pointer to EFI_DNS4_PROTOCOL instance.\r | |
496 | @param[in] Token Pointer to a token that has been issued by\r | |
497 | EFI_DNS4_PROTOCOL.HostNameToIp (),\r | |
498 | EFI_DNS4_PROTOCOL.IpToHostName() or\r | |
499 | EFI_DNS4_PROTOCOL.GeneralLookup().\r | |
500 | If NULL, all pending tokens are aborted.\r | |
501 | \r | |
502 | @retval EFI_SUCCESS Incoming or outgoing data was processed.\r | |
503 | @retval EFI_NOT_STARTED This EFI DNS4 Protocol instance has not been started.\r | |
504 | @retval EFI_INVALID_PARAMETER This is NULL.\r | |
505 | @retval EFI_NOT_FOUND When Token is not NULL, and the asynchronous DNS\r | |
506 | operation was not found in the transmit queue. It\r | |
507 | was either completed or was not issued by\r | |
508 | HostNameToIp(), IpToHostName() or GeneralLookup().\r | |
509 | **/\r | |
510 | typedef\r | |
511 | EFI_STATUS\r | |
2f88bd3a | 512 | (EFIAPI *EFI_DNS4_CANCEL)(\r |
cff298f4 | 513 | IN EFI_DNS4_PROTOCOL *This,\r |
514 | IN EFI_DNS4_COMPLETION_TOKEN *Token\r | |
515 | );\r | |
516 | \r | |
517 | ///\r | |
518 | /// The EFI_DNS4_Protocol provides the function to get the host name and address\r | |
519 | /// mapping, also provides pass through interface to retrieve arbitrary information\r | |
520 | /// from DNS.\r | |
521 | ///\r | |
522 | struct _EFI_DNS4_PROTOCOL {\r | |
2f88bd3a MK |
523 | EFI_DNS4_GET_MODE_DATA GetModeData;\r |
524 | EFI_DNS4_CONFIGURE Configure;\r | |
525 | EFI_DNS4_HOST_NAME_TO_IP HostNameToIp;\r | |
526 | EFI_DNS4_IP_TO_HOST_NAME IpToHostName;\r | |
527 | EFI_DNS4_GENERAL_LOOKUP GeneralLookUp;\r | |
528 | EFI_DNS4_UPDATE_DNS_CACHE UpdateDnsCache;\r | |
529 | EFI_DNS4_POLL Poll;\r | |
530 | EFI_DNS4_CANCEL Cancel;\r | |
cff298f4 | 531 | };\r |
532 | \r | |
2f88bd3a MK |
533 | extern EFI_GUID gEfiDns4ServiceBindingProtocolGuid;\r |
534 | extern EFI_GUID gEfiDns4ProtocolGuid;\r | |
cff298f4 | 535 | \r |
536 | #endif\r |