Lines Matching refs:Instance
40 Retrieve mode data of this DNS instance.
42 This function is used to retrieve DNS mode data for this DNS instance.
44 @param[in] This Pointer to EFI_DNS4_PROTOCOL instance.
49 is available because this instance has not been
61 DNS_INSTANCE *Instance;
89 Instance = DNS_INSTANCE_FROM_THIS_PROTOCOL4 (This);
90 if (Instance->State == DNS_STATE_UNCONFIGED) {
98 // Get the current configuration data of this instance.
100 Status = Dns4CopyConfigure (&DnsModeData->DnsConfigData, &Instance->Dns4CfgData);
158 Configure this DNS instance.
160 This function is used to configure DNS mode data for this DNS instance.
162 @param[in] This Pointer to EFI_DNS4_PROTOCOL instance.
174 @retval EFI_OUT_OF_RESOURCES The DNS instance data or required space could not be
177 EFI DNSv4 Protocol instance is not configured.
179 reconfigure the instance the caller must call Configure()
190 DNS_INSTANCE *Instance;
214 Instance = DNS_INSTANCE_FROM_THIS_PROTOCOL4 (This);
217 ZeroMem (&Instance->SessionDnsServer, sizeof (EFI_IP_ADDRESS));
220 // Reset the Instance if ConfigData is NULL
222 if (!NetMapIsEmpty(&Instance->Dns4TxTokens)) {
223 Dns4InstanceCancelToken(Instance, NULL);
226 Instance->MaxRetry = 0;
228 if (Instance->UdpIo != NULL){
229 UdpIoCleanIo (Instance->UdpIo);
232 if (Instance->Dns4CfgData.DnsServerList != NULL) {
233 FreePool (Instance->Dns4CfgData.DnsServerList);
235 ZeroMem (&Instance->Dns4CfgData, sizeof (EFI_DNS4_CONFIG_DATA));
237 Instance->State = DNS_STATE_UNCONFIGED;
254 Status = Dns4CopyConfigure (&Instance->Dns4CfgData, DnsConfigData);
263 // The DNS instance will retrieve DNS server from DHCP Server
266 Instance,
278 CopyMem (&Instance->SessionDnsServer.v4, &ServerList[0], sizeof (EFI_IPv4_ADDRESS));
280 CopyMem (&Instance->SessionDnsServer.v4, &DnsConfigData->DnsServerList[0], sizeof (EFI_IPv4_ADDRESS));
286 Status = Dns4ConfigUdp (Instance, Instance->UdpIo);
288 if (Instance->Dns4CfgData.DnsServerList != NULL) {
289 FreePool (Instance->Dns4CfgData.DnsServerList);
290 Instance->Dns4CfgData.DnsServerList = NULL;
296 // Add configured DNS server used by this instance to ServerList.
298 Status = AddDns4ServerIp (&mDriverData->Dns4ServerList, Instance->SessionDnsServer.v4);
300 if (Instance->Dns4CfgData.DnsServerList != NULL) {
301 FreePool (Instance->Dns4CfgData.DnsServerList);
302 Instance->Dns4CfgData.DnsServerList = NULL;
307 Instance->State = DNS_STATE_CONFIGED;
321 @param[in] This Pointer to EFI_DNS4_PROTOCOL instance.
333 @retval EFI_NOT_STARTED This instance has not been started.
345 DNS_INSTANCE *Instance;
376 Instance = DNS_INSTANCE_FROM_THIS_PROTOCOL4 (This);
378 ConfigData = &(Instance->Dns4CfgData);
380 Instance->MaxRetry = ConfigData->RetryCount;
386 if (Instance->State != DNS_STATE_CONFIGED) {
394 if (Instance->MaxRetry == 0) {
395 Instance->MaxRetry = DNS_DEFAULT_RETRY;
478 Status = ConstructDNSQuery (Instance, QueryName, DNS_TYPE_A, DNS_CLASS_INET, &Packet);
492 Status = NetMapInsertTail (&Instance->Dns4TxTokens, TokenEntry, Packet);
506 Status = DoDnsQuery (Instance, Packet);
508 Dns4RemoveTokenEntry (&Instance->Dns4TxTokens, TokenEntry);
532 @param[in] This Pointer to EFI_DNS4_PROTOCOL instance.
567 @param[in] This Pointer to EFI_DNS4_PROTOCOL instance.
598 DNS_INSTANCE *Instance;
620 Instance = DNS_INSTANCE_FROM_THIS_PROTOCOL4 (This);
622 ConfigData = &(Instance->Dns4CfgData);
624 Instance->MaxRetry = ConfigData->RetryCount;
630 if (Instance->State != DNS_STATE_CONFIGED) {
638 if (Instance->MaxRetry == 0) {
639 Instance->MaxRetry = DNS_DEFAULT_RETRY;
662 Status = ConstructDNSQuery (Instance, QName, QType, QClass, &Packet);
676 Status = NetMapInsertTail (&Instance->Dns4TxTokens, TokenEntry, Packet);
690 Status = DoDnsQuery (Instance, Packet);
692 Dns4RemoveTokenEntry (&Instance->Dns4TxTokens, TokenEntry);
713 @param[in] This Pointer to EFI_DNS4_PROTOCOL instance.
774 @param[in] This Pointer to EFI_DNS4_PROTOCOL instance.
777 @retval EFI_NOT_STARTED This EFI DNS Protocol instance has not been started.
789 DNS_INSTANCE *Instance;
796 Instance = DNS_INSTANCE_FROM_THIS_PROTOCOL4 (This);
798 if (Instance->State == DNS_STATE_UNCONFIGED) {
800 } else if (Instance->State == DNS_STATE_DESTROY) {
804 Udp = Instance->UdpIo->Protocol.Udp4;
819 @param[in] This Pointer to EFI_DNS4_PROTOCOL instance.
827 @retval EFI_NOT_STARTED This EFI DNS4 Protocol instance has not been started.
842 DNS_INSTANCE *Instance;
849 Instance = DNS_INSTANCE_FROM_THIS_PROTOCOL4 (This);
851 if (Instance->State == DNS_STATE_UNCONFIGED) {
858 // Cancle the tokens specified by Token for this instance.
860 Status = Dns4InstanceCancelToken (Instance, Token);
873 Retrieve mode data of this DNS instance.
875 This function is used to retrieve DNS mode data for this DNS instance.
877 @param[in] This Pointer to EFI_DNS6_PROTOCOL instance.
883 is available because this instance has not been
895 DNS_INSTANCE *Instance;
922 Instance = DNS_INSTANCE_FROM_THIS_PROTOCOL6 (This);
923 if (Instance->State == DNS_STATE_UNCONFIGED) {
931 // Get the current configuration data of this instance.
933 Status = Dns6CopyConfigure (&DnsModeData->DnsConfigData, &Instance->Dns6CfgData);
991 Configure this DNS instance.
994 EFI DNSv6 Protocol driver instance. Reset the DNS instance if DnsConfigData is NULL.
996 @param[in] This Pointer to EFI_DNS6_PROTOCOL instance.
1005 @retval EFI_OUT_OF_RESOURCES The DNS instance data or required space could not be allocated.
1007 EFI DNSv6 Protocol instance is not configured.
1010 reconfigure the instance the caller must call Configure() with
1021 DNS_INSTANCE *Instance;
1043 Instance = DNS_INSTANCE_FROM_THIS_PROTOCOL6 (This);
1046 ZeroMem (&Instance->SessionDnsServer, sizeof (EFI_IP_ADDRESS));
1049 // Reset the Instance if ConfigData is NULL
1051 if (!NetMapIsEmpty(&Instance->Dns6TxTokens)) {
1052 Dns6InstanceCancelToken(Instance, NULL);
1055 Instance->MaxRetry = 0;
1057 if (Instance->UdpIo != NULL){
1058 UdpIoCleanIo (Instance->UdpIo);
1061 if (Instance->Dns6CfgData.DnsServerList != NULL) {
1062 FreePool (Instance->Dns6CfgData.DnsServerList);
1064 ZeroMem (&Instance->Dns6CfgData, sizeof (EFI_DNS6_CONFIG_DATA));
1066 Instance->State = DNS_STATE_UNCONFIGED;
1076 Status = Dns6CopyConfigure (&Instance->Dns6CfgData, DnsConfigData);
1085 //The DNS instance will retrieve DNS server from DHCP Server.
1088 Instance->Service->ImageHandle,
1089 Instance->Service->ControllerHandle,
1101 CopyMem (&Instance->SessionDnsServer.v6, &ServerList[0], sizeof (EFI_IPv6_ADDRESS));
1103 CopyMem (&Instance->SessionDnsServer.v6, &DnsConfigData->DnsServerList[0], sizeof (EFI_IPv6_ADDRESS));
1109 Status = Dns6ConfigUdp (Instance, Instance->UdpIo);
1111 if (Instance->Dns6CfgData.DnsServerList != NULL) {
1112 FreePool (Instance->Dns6CfgData.DnsServerList);
1113 Instance->Dns6CfgData.DnsServerList = NULL;
1119 // Add configured DNS server used by this instance to ServerList.
1121 Status = AddDns6ServerIp (&mDriverData->Dns6ServerList, Instance->SessionDnsServer.v6);
1123 if (Instance->Dns6CfgData.DnsServerList != NULL) {
1124 FreePool (Instance->Dns6CfgData.DnsServerList);
1125 Instance->Dns6CfgData.DnsServerList = NULL;
1130 Instance->State = DNS_STATE_CONFIGED;
1144 @param[in] This Pointer to EFI_DNS6_PROTOCOL instance.
1157 @retval EFI_NOT_STARTED This instance has not been started.
1170 DNS_INSTANCE *Instance;
1201 Instance = DNS_INSTANCE_FROM_THIS_PROTOCOL6 (This);
1203 ConfigData = &(Instance->Dns6CfgData);
1205 Instance->MaxRetry = ConfigData->RetryCount;
1211 if (Instance->State != DNS_STATE_CONFIGED) {
1219 if (Instance->MaxRetry == 0) {
1220 Instance->MaxRetry = DNS_DEFAULT_RETRY;
1304 Status = ConstructDNSQuery (Instance, QueryName, DNS_TYPE_AAAA, DNS_CLASS_INET, &Packet);
1318 Status = NetMapInsertTail (&Instance->Dns6TxTokens, TokenEntry, Packet);
1332 Status = DoDnsQuery (Instance, Packet);
1334 Dns6RemoveTokenEntry (&Instance->Dns6TxTokens, TokenEntry);
1359 @param[in] This Pointer to EFI_DNS6_PROTOCOL instance.
1372 @retval EFI_NOT_STARTED This instance has not been started.
1396 @param[in] This Pointer to EFI_DNS6_PROTOCOL instance.
1412 @retval EFI_NOT_STARTED This instance has not been started.
1427 DNS_INSTANCE *Instance;
1449 Instance = DNS_INSTANCE_FROM_THIS_PROTOCOL6 (This);
1451 ConfigData = &(Instance->Dns6CfgData);
1453 Instance->MaxRetry = ConfigData->RetryCount;
1459 if (Instance->State != DNS_STATE_CONFIGED) {
1467 if (Instance->MaxRetry == 0) {
1468 Instance->MaxRetry = DNS_DEFAULT_RETRY;
1491 Status = ConstructDNSQuery (Instance, QName, QType, QClass, &Packet);
1505 Status = NetMapInsertTail (&Instance->Dns6TxTokens, TokenEntry, Packet);
1519 Status = DoDnsQuery (Instance, Packet);
1521 Dns6RemoveTokenEntry (&Instance->Dns6TxTokens, TokenEntry);
1542 @param[in] This Pointer to EFI_DNS6_PROTOCOL instance.
1605 @param[in] This Pointer to EFI_DNS6_PROTOCOL instance.
1608 @retval EFI_NOT_STARTED This EFI DNS Protocol instance has not been started.
1621 DNS_INSTANCE *Instance;
1628 Instance = DNS_INSTANCE_FROM_THIS_PROTOCOL6 (This);
1630 if (Instance->State == DNS_STATE_UNCONFIGED) {
1632 } else if (Instance->State == DNS_STATE_DESTROY) {
1636 Udp = Instance->UdpIo->Protocol.Udp6;
1651 @param[in] This Pointer to EFI_DNS6_PROTOCOL instance.
1659 @retval EFI_NOT_STARTED This EFI DNS6 Protocol instance has not been started.
1675 DNS_INSTANCE *Instance;
1682 Instance = DNS_INSTANCE_FROM_THIS_PROTOCOL6 (This);
1684 if (Instance->State == DNS_STATE_UNCONFIGED) {
1691 // Cancle the tokens specified by Token for this instance.
1693 Status = Dns6InstanceCancelToken (Instance, Token);