25 *((BOOLEAN *)Context) =
TRUE;
56 UINTN DnsServerListCount;
61 DnsServerListCount = 0;
69 Status =
gBS->HandleProtocol (Controller, &gEfiIp4Config2ProtocolGuid, (VOID **)&Ip4Config2);
70 if (!EFI_ERROR (Status)) {
76 if (Status == EFI_BUFFER_TOO_SMALL) {
78 if (DnsServerList ==
NULL) {
79 return EFI_OUT_OF_RESOURCES;
83 if (EFI_ERROR (Status)) {
98 &gEfiDns4ServiceBindingProtocolGuid,
101 if (EFI_ERROR (Status)) {
105 Status =
gBS->OpenProtocol (
107 &gEfiDns4ProtocolGuid,
111 EFI_OPEN_PROTOCOL_BY_DRIVER
113 if (EFI_ERROR (Status)) {
120 ZeroMem (&Dns4CfgData,
sizeof (Dns4CfgData));
124 IP4_COPY_ADDRESS (&Dns4CfgData.
StationIp, &NvData->LocalIp);
125 IP4_COPY_ADDRESS (&Dns4CfgData.
SubnetMask, &NvData->SubnetMask);
126 Dns4CfgData.
Protocol = EFI_IP_PROTO_UDP;
127 Status = Dns4->Configure (
131 if (EFI_ERROR (Status)) {
138 ZeroMem (&Token,
sizeof (Token));
139 Status =
gBS->CreateEvent (
146 if (EFI_ERROR (Status)) {
153 Token.
Status = EFI_NOT_READY;
157 if (HostName ==
NULL) {
158 return EFI_OUT_OF_RESOURCES;
167 Status = Dns4->HostNameToIp (Dns4, HostName, &Token);
168 if (EFI_ERROR (Status)) {
180 if (!EFI_ERROR (Status)) {
182 Status = EFI_DEVICE_ERROR;
187 Status = EFI_DEVICE_ERROR;
213 Dns4->Configure (Dns4,
NULL);
217 &gEfiDns4ProtocolGuid,
223 if (Dns4Handle !=
NULL) {
227 &gEfiDns4ServiceBindingProtocolGuid,
262 UINTN DnsServerListCount;
267 DnsServerList =
NULL;
268 DnsServerListCount = 0;
276 Status =
gBS->HandleProtocol (Controller, &gEfiIp6ConfigProtocolGuid, (VOID **)&Ip6Config);
277 if (!EFI_ERROR (Status)) {
283 if (Status == EFI_BUFFER_TOO_SMALL) {
285 if (DnsServerList ==
NULL) {
286 return EFI_OUT_OF_RESOURCES;
290 if (EFI_ERROR (Status)) {
292 DnsServerList =
NULL;
305 &gEfiDns6ServiceBindingProtocolGuid,
308 if (EFI_ERROR (Status)) {
312 Status =
gBS->OpenProtocol (
314 &gEfiDns6ProtocolGuid,
318 EFI_OPEN_PROTOCOL_BY_DRIVER
320 if (EFI_ERROR (Status)) {
331 Dns6ConfigData.
Protocol = EFI_IP_PROTO_UDP;
332 Status = Dns6->Configure (
336 if (EFI_ERROR (Status)) {
340 Token.
Status = EFI_NOT_READY;
345 Status =
gBS->CreateEvent (
352 if (EFI_ERROR (Status)) {
360 if (HostName ==
NULL) {
361 return EFI_OUT_OF_RESOURCES;
369 Status = Dns6->HostNameToIp (Dns6, HostName, &Token);
370 if (EFI_ERROR (Status)) {
382 if (!EFI_ERROR (Status)) {
384 Status = EFI_DEVICE_ERROR;
389 Status = EFI_DEVICE_ERROR;
415 Dns6->Configure (Dns6,
NULL);
419 &gEfiDns6ProtocolGuid,
425 if (Dns6Handle !=
NULL) {
429 &gEfiDns6ServiceBindingProtocolGuid,
RETURN_STATUS EFIAPI AsciiStrToUnicodeStrS(IN CONST CHAR8 *Source, OUT CHAR16 *Destination, IN UINTN DestMax)
VOID *EFIAPI ZeroMem(OUT VOID *Buffer, IN UINTN Length)
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID EFIAPI FreePool(IN VOID *Buffer)
VOID EFIAPI IScsiCommonNotify(IN EFI_EVENT Event, IN VOID *Context)
EFI_STATUS IScsiDns4(IN EFI_HANDLE Image, IN EFI_HANDLE Controller, IN OUT ISCSI_SESSION_CONFIG_NVDATA *NvData)
EFI_STATUS IScsiDns6(IN EFI_HANDLE Image, IN EFI_HANDLE Controller, IN OUT ISCSI_SESSION_CONFIG_NVDATA *NvData)
@ Ip4Config2DataTypeDnsServer
@ Ip6ConfigDataTypeDnsServer
EFI_STATUS EFIAPI NetLibCreateServiceChild(IN EFI_HANDLE Controller, IN EFI_HANDLE Image, IN EFI_GUID *ServiceBindingGuid, IN OUT EFI_HANDLE *ChildHandle)
EFI_STATUS EFIAPI NetLibDestroyServiceChild(IN EFI_HANDLE Controller, IN EFI_HANDLE Image, IN EFI_GUID *ServiceBindingGuid, IN EFI_HANDLE ChildHandle)
VOID *EFIAPI AllocatePool(IN UINTN AllocationSize)
VOID EFIAPI Exit(IN EFI_STATUS Status)
IPv6_ADDRESS EFI_IPv6_ADDRESS
IPv4_ADDRESS EFI_IPv4_ADDRESS
EFI_IPv6_ADDRESS * IpList
EFI_IPv4_ADDRESS * IpList
DNS_HOST_TO_ADDR_DATA * H2AData
union EFI_DNS4_COMPLETION_TOKEN::@573 RspData
EFI_IPv4_ADDRESS * DnsServerList
EFI_IPv4_ADDRESS SubnetMask
EFI_IPv4_ADDRESS StationIp
DNS6_HOST_TO_ADDR_DATA * H2AData
union EFI_DNS6_COMPLETION_TOKEN::@574 RspData
EFI_IPv6_ADDRESS * DnsServerList