NetworkPkg/DnsDxe/DnsDhcp.c File Reference


Functions

VOID EFIAPI TimeoutToGetMap (IN EFI_EVENT Event, IN VOID *Context)
EFI_STATUS EFIAPI DnsStartIp4 (IN EFI_HANDLE Controller, IN EFI_HANDLE Image)
VOID DnsInitSeedPacket (OUT EFI_DHCP4_PACKET *Seed, IN EFI_IP4_CONFIG2_INTERFACE_INFO *InterfaceInfo)
VOID EFIAPI DhcpCommonNotify (IN EFI_EVENT Event, IN VOID *Context)
EFI_STATUS ParseDhcp4Ack (IN EFI_DHCP4_PROTOCOL *Dhcp4, IN EFI_DHCP4_PACKET *Packet, IN DNS4_SERVER_INFOR *DnsServerInfor)
EFI_STATUS EFIAPI ParseDhcp6Ack (IN EFI_DHCP6_PROTOCOL *This, IN VOID *Context, IN EFI_DHCP6_PACKET *Packet)
EFI_STATUS GetDns4ServerFromDhcp4 (IN DNS_INSTANCE *Instance, OUT UINT32 *DnsServerCount, OUT EFI_IPv4_ADDRESS **DnsServerList)
EFI_STATUS GetDns6ServerFromDhcp6 (IN EFI_HANDLE Image, IN EFI_HANDLE Controller, OUT UINT32 *DnsServerCount, OUT EFI_IPv6_ADDRESS **DnsServerList)

Detailed Description

Functions implementation related with DHCPv4/v6 for DNS driver.

Copyright (c) 2015, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php

THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.


Function Documentation

VOID EFIAPI DhcpCommonNotify ( IN EFI_EVENT  Event,
IN VOID *  Context 
)

The common notify function.

Parameters:
[in] Event The event signaled.
[in] Context The context.

Referenced by GetDns4ServerFromDhcp4().

VOID DnsInitSeedPacket ( OUT EFI_DHCP4_PACKET *  Seed,
IN EFI_IP4_CONFIG2_INTERFACE_INFO *  InterfaceInfo 
)

This function initialize the DHCP4 message instance.

This function will pad each item of dhcp4 message packet.

Parameters:
Seed Pointer to the message instance of the DHCP4 packet.
InterfaceInfo Pointer to the EFI_IP4_CONFIG2_INTERFACE_INFO instance.

References DHCP4_MAGIC, DHCP4_OPCODE_REQUEST, and DHCP4_TAG_EOP.

Referenced by GetDns4ServerFromDhcp4().

EFI_STATUS EFIAPI DnsStartIp4 ( IN EFI_HANDLE  Controller,
IN EFI_HANDLE  Image 
)

Create an IP child, use it to start the auto configuration, then destroy it.

Parameters:
[in] Controller The controller which has the service installed.
[in] Image The image handle used to open service.
Return values:
EFI_SUCCESS The configuration is done.
Others Other errors as indicated.

References TimeoutToGetMap().

Referenced by GetDns4ServerFromDhcp4().

EFI_STATUS GetDns4ServerFromDhcp4 ( IN DNS_INSTANCE Instance,
OUT UINT32 *  DnsServerCount,
OUT EFI_IPv4_ADDRESS **  DnsServerList 
)

Parse the DHCP ACK to get Dns4 server information.

Parameters:
Instance The DNS instance.
DnsServerCount Retrieved Dns4 server Ip count.
DnsServerList Retrieved Dns4 server Ip list.
Return values:
EFI_SUCCESS The Dns4 information is got from the DHCP ACK.
EFI_OUT_OF_RESOURCES Failed to allocate memory.
EFI_NO_MEDIA There was a media error.
Others Other errors as indicated.

References DHCP4_MSG_INFORM, DHCP4_TAG_DNS_SERVER, DHCP4_TAG_PARA_LIST, DHCP4_TAG_TYPE, DhcpCommonNotify(), DNS_TIME_TO_GETMAP, DnsInitSeedPacket(), DnsStartIp4(), IP4_ETHER_PROTO, ParseDhcp4Ack(), DNS4_SERVER_INFOR::ServerCount, and DNS4_SERVER_INFOR::ServerList.

Referenced by Dns4Configure().

EFI_STATUS GetDns6ServerFromDhcp6 ( IN EFI_HANDLE  Image,
IN EFI_HANDLE  Controller,
OUT UINT32 *  DnsServerCount,
OUT EFI_IPv6_ADDRESS **  DnsServerList 
)

Parse the DHCP ACK to get Dns6 server information.

Parameters:
Image The handle of the driver image.
Controller The handle of the controller.
DnsServerCount Retrieved Dns6 server Ip count.
DnsServerList Retrieved Dns6 server Ip list.
Return values:
EFI_SUCCESS The Dns6 information is got from the DHCP ACK.
EFI_OUT_OF_RESOURCES Failed to allocate memory.
EFI_NO_MEDIA There was a media error.
Others Other errors as indicated.

References DHCP6_TAG_DNS_REQUEST, DHCP6_TAG_DNS_SERVER, DNS_TIME_TO_GETMAP, ParseDhcp6Ack(), DNS6_SERVER_INFOR::ServerCount, and DNS6_SERVER_INFOR::ServerList.

Referenced by Dns6Configure().

EFI_STATUS ParseDhcp4Ack ( IN EFI_DHCP4_PROTOCOL *  Dhcp4,
IN EFI_DHCP4_PACKET *  Packet,
IN DNS4_SERVER_INFOR DnsServerInfor 
)

Parse the ACK to get required information

Parameters:
Dhcp4 The DHCP4 protocol.
Packet Packet waiting for parse.
DnsServerInfor The required Dns4 server information.
Return values:
EFI_SUCCESS The DNS information is got from the DHCP ACK.
EFI_NO_MAPPING DHCP failed to acquire address and other information.
EFI_DEVICE_ERROR Other errors as indicated.
EFI_OUT_OF_RESOURCES Failed to allocate memory.

References DHCP4_TAG_DNS_SERVER.

Referenced by GetDns4ServerFromDhcp4().

EFI_STATUS EFIAPI ParseDhcp6Ack ( IN EFI_DHCP6_PROTOCOL *  This,
IN VOID *  Context,
IN EFI_DHCP6_PACKET *  Packet 
)

EFI_DHCP6_INFO_CALLBACK is provided by the consumer of the EFI DHCPv6 Protocol instance to intercept events that occurs in the DHCPv6 Information Request exchange process.

Parameters:
This Pointer to the EFI_DHCP6_PROTOCOL instance that is used to configure this callback function.
Context Pointer to the context that is initialized in the EFI_DHCP6_PROTOCOL.InfoRequest().
Packet Pointer to Reply packet that has been received. The EFI DHCPv6 Protocol instance is responsible for freeing the buffer.
Return values:
EFI_SUCCESS The DNS information is got from the DHCP ACK.
EFI_DEVICE_ERROR Other errors as indicated.
EFI_OUT_OF_RESOURCES Failed to allocate memory.

References DHCP6_TAG_DNS_SERVER, DNS6_SERVER_INFOR::ServerCount, and DNS6_SERVER_INFOR::ServerList.

Referenced by GetDns6ServerFromDhcp6().

VOID EFIAPI TimeoutToGetMap ( IN EFI_EVENT  Event,
IN VOID *  Context 
)

The callback function for the timer event used to get map.

Parameters:
[in] Event The event this function is registered to.
[in] Context The context registered to the event.

Referenced by DnsStartIp4().


Generated on Mon Sep 28 08:49:05 2015 for NetworkPkg[ALL] by  doxygen 1.5.7.1