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