Lines Matching refs:Instance
23 @param[in] Instance The pointer to the Dhcp6 instance.
37 IN DHCP6_INSTANCE *Instance,
48 IaCb = &Instance->IaCb;
216 // Insert into the retransmit list of the instance.
218 InsertTailList (&Instance->TxList, &TxCb->Link);
227 @param[in] Instance The pointer to the Dhcp6 instance.
238 IN DHCP6_INSTANCE *Instance,
251 NET_LIST_FOR_EACH_SAFE (Entry, NextEntry, &Instance->TxList) {
263 NET_LIST_FOR_EACH_SAFE (Entry, NextEntry, &Instance->InfList) {
298 @param[in] Instance The pointer to the Dhcp6 instance.
304 IN DHCP6_INSTANCE *Instance,
318 NET_LIST_FOR_EACH_SAFE (Entry, NextEntry, &Instance->TxList) {
339 NET_LIST_FOR_EACH_SAFE (Entry, NextEntry, &Instance->TxList) {
354 NET_LIST_FOR_EACH_SAFE (Entry, NextEntry, &Instance->InfList) {
368 Check whether the TxCb is still a valid control block in the instance's retry list.
370 @param[in] Instance The pointer to DHCP6_INSTANCE.
373 @retval TRUE The control block is in Instance's retry list.
374 @retval FALSE The control block is NOT in Instance's retry list.
379 IN DHCP6_INSTANCE *Instance,
385 NET_LIST_FOR_EACH (Entry, &Instance->TxList) {
395 Clean up the session of the instance stateful exchange.
397 @param[in, out] Instance The pointer to the Dhcp6 instance.
403 IN OUT DHCP6_INSTANCE *Instance,
410 ASSERT(Instance->Config);
411 ASSERT(Instance->IaCb.Ia);
416 Dhcp6CleanupRetry (Instance, DHCP6_PACKET_STATEFUL);
418 if (Instance->Unicast != NULL) {
419 FreePool (Instance->Unicast);
422 if (Instance->AdSelect != NULL) {
423 FreePool (Instance->AdSelect);
426 if (Instance->IaCb.Ia->ReplyPacket != NULL) {
427 FreePool (Instance->IaCb.Ia->ReplyPacket);
431 // Reinitialize the Ia fields of the instance.
433 Instance->UdpSts = Status;
434 Instance->AdSelect = NULL;
435 Instance->AdPref = 0;
436 Instance->Unicast = NULL;
437 Instance->IaCb.T1 = 0;
438 Instance->IaCb.T2 = 0;
439 Instance->IaCb.AllExpireTime = 0;
440 Instance->IaCb.LeaseTime = 0;
445 Instance->StartTime = 0;
447 Ia = Instance->IaCb.Ia;
464 if (Instance->Config->IaInfoEvent != NULL) {
465 gBS->SignalEvent (Instance->Config->IaInfoEvent);
473 @param[in] Instance The pointer to the Dhcp6 instance.
485 IN DHCP6_INSTANCE *Instance,
496 ASSERT (Instance->Config != NULL);
497 ASSERT (Instance->IaCb.Ia != NULL);
501 Callback = Instance->Config->Dhcp6Callback;
502 Context = Instance->Config->CallbackContext;
510 &Instance->Dhcp6,
512 Instance->IaCb.Ia->State,
534 @param[in, out] Instance The pointer to the Dhcp6 instance.
543 IN OUT DHCP6_INSTANCE *Instance,
555 ASSERT (Instance->Config != NULL);
571 &Instance->Config->IaDescriptor
618 if (Instance->Config->IaDescriptor.Type == Dhcp6OptIana) {
671 Instance,
688 @param[in] Instance The pointer to the Dhcp6 instance.
698 IN DHCP6_INSTANCE *Instance,
730 &Instance->Config->IaDescriptor
777 if (Instance->Config->IaDescriptor.Type == Dhcp6OptIana) {
819 @param[in] Instance The pointer to the Dhcp6 instance.
830 IN DHCP6_INSTANCE *Instance,
841 Service = Instance->Service;
863 if (Instance->Unicast != NULL) {
866 Instance->Unicast,
884 SetElapsedTime (Elapsed, Instance);
911 @param[in] Instance The pointer to the Dhcp6 instance.
920 IN DHCP6_INSTANCE *Instance
934 Service = Instance->Service;
939 ASSERT (Instance->Config != NULL);
940 ASSERT (Instance->IaCb.Ia != NULL);
945 for (Index = 0; Index < Instance->Config->OptionCount; Index++) {
946 UserLen += (NTOHS (Instance->Config->OptionList[Index]->OpLen) + 4);
977 Instance,
983 Instance->IaCb.Ia,
984 Instance->IaCb.T1,
985 Instance->IaCb.T2,
992 for (Index = 0; Index < Instance->Config->OptionCount; Index++) {
994 UserOpt = Instance->Config->OptionList[Index];
1012 Status = Dhcp6CallbackUser (Instance, Dhcp6SendSolicit, &Packet);
1023 Instance->IaCb.Ia->State = Dhcp6Selecting;
1027 Instance->StartTime = 0;
1029 Status = Dhcp6TransmitPacket (Instance, Packet, Elapsed);
1040 Instance,
1043 Instance->Config->SolicitRetransmission
1050 @param[in] Instance The pointer to the Dhcp6 instance.
1059 IN DHCP6_INSTANCE *Instance
1062 Instance->IaCb.T1 = 0;
1063 Instance->IaCb.T2 = 0;
1064 Instance->IaCb.Ia->IaAddressCount = 0;
1066 return Dhcp6SendSolicitMsg (Instance);
1073 @param[in] Instance The pointer to the Dhcp6 instance.
1083 IN DHCP6_INSTANCE *Instance
1099 ASSERT(Instance->AdSelect != NULL);
1100 ASSERT(Instance->Config != NULL);
1101 ASSERT(Instance->IaCb.Ia != NULL);
1102 ASSERT(Instance->Service != NULL);
1104 Service = Instance->Service;
1113 Instance->AdSelect->Dhcp6.Option,
1114 Instance->AdSelect->Length - 4,
1127 for (Index = 0; Index < Instance->Config->OptionCount; Index++) {
1128 UserLen += (NTOHS (Instance->Config->OptionList[Index]->OpLen) + 4);
1159 Instance,
1172 Instance->IaCb.Ia,
1173 Instance->IaCb.T1,
1174 Instance->IaCb.T2,
1181 for (Index = 0; Index < Instance->Config->OptionCount; Index++) {
1183 UserOpt = Instance->Config->OptionList[Index];
1201 Status = Dhcp6CallbackUser (Instance, Dhcp6SendRequest, &Packet);
1212 Instance->IaCb.Ia->State = Dhcp6Requesting;
1216 Instance->StartTime = 0;
1218 Status = Dhcp6TransmitPacket (Instance, Packet, Elapsed);
1228 return Dhcp6EnqueueRetry (Instance, Packet, Elapsed, NULL);
1235 @param[in] Instance The pointer to the Dhcp6 instance.
1246 IN DHCP6_INSTANCE *Instance,
1261 ASSERT (Instance->Config != NULL);
1262 ASSERT (Instance->IaCb.Ia != NULL);
1263 ASSERT (Instance->Service != NULL);
1265 Service = Instance->Service;
1267 LastReply = Instance->IaCb.Ia->ReplyPacket;
1317 Instance,
1339 Status = Dhcp6CallbackUser (Instance, Dhcp6SendDecline, &Packet);
1350 Instance->IaCb.Ia->State = Dhcp6Declining;
1354 Instance->StartTime = 0;
1356 Status = Dhcp6TransmitPacket (Instance, Packet, Elapsed);
1366 return Dhcp6EnqueueRetry (Instance, Packet, Elapsed, NULL);
1373 @param[in] Instance The pointer to the Dhcp6 instance.
1384 IN DHCP6_INSTANCE *Instance,
1399 ASSERT(Instance->Config);
1400 ASSERT(Instance->IaCb.Ia);
1402 Service = Instance->Service;
1404 LastReply = Instance->IaCb.Ia->ReplyPacket;
1461 Instance,
1476 Status = Dhcp6CallbackUser (Instance, Dhcp6SendRelease, &Packet);
1487 Instance->IaCb.Ia->State = Dhcp6Releasing;
1489 Status = Dhcp6TransmitPacket (Instance, Packet, Elapsed);
1499 return Dhcp6EnqueueRetry (Instance, Packet, Elapsed, NULL);
1506 @param[in] Instance The pointer to the Dhcp6 instance.
1518 IN DHCP6_INSTANCE *Instance,
1538 ASSERT(Instance->Config);
1539 ASSERT(Instance->IaCb.Ia);
1541 Service = Instance->Service;
1550 for (Index = 0; Index < Instance->Config->OptionCount; Index++) {
1551 UserLen += (NTOHS (Instance->Config->OptionList[Index]->OpLen) + 4);
1582 Instance,
1588 Instance->IaCb.Ia,
1589 Instance->IaCb.T1,
1590 Instance->IaCb.T2,
1599 LastReply = Instance->IaCb.Ia->ReplyPacket;
1625 for (Index = 0; Index < Instance->Config->OptionCount; Index++) {
1627 UserOpt = Instance->Config->OptionList[Index];
1648 Status = Dhcp6CallbackUser (Instance, Event, &Packet);
1661 Instance->IaCb.Ia->State = State;
1662 Instance->IaCb.LeaseTime = (RebindRequest) ? Instance->IaCb.T2 : Instance->IaCb.T1;
1666 Instance->StartTime = 0;
1668 Status = Dhcp6TransmitPacket (Instance, Packet, Elapsed);
1678 return Dhcp6EnqueueRetry (Instance, Packet, Elapsed, NULL);
1684 @param[in] Instance The pointer to the Dhcp6 instance.
1704 IN DHCP6_INSTANCE *Instance,
1720 Service = Instance->Service;
1723 Instance->UdpSts = EFI_ALREADY_STARTED;
1738 InsertTailList (&Instance->InfList, &InfCb->Link);
1744 Instance,
1785 @param[in] Instance The pointer to the Dhcp6 instance.
1802 IN DHCP6_INSTANCE *Instance,
1824 Service = Instance->Service;
1869 Instance,
1903 Instance->StartTime = 0;
1908 Status = Dhcp6TransmitPacket (Instance, Packet, Elapsed);
1918 return Dhcp6EnqueueRetry (Instance, Packet, Elapsed, Retransmission);
1925 @param[in] Instance The pointer to the Dhcp6 instance.
1935 IN DHCP6_INSTANCE *Instance
1949 ASSERT (Instance->Config != NULL);
1950 ASSERT (Instance->IaCb.Ia != NULL);
1951 ASSERT (Instance->Service != NULL);
1953 Service = Instance->Service;
1961 for (Index = 0; Index < Instance->Config->OptionCount; Index++) {
1962 UserLen += (NTOHS (Instance->Config->OptionList[Index]->OpLen) + 4);
1993 Instance,
1999 Instance->IaCb.Ia,
2000 Instance->IaCb.T1,
2001 Instance->IaCb.T2,
2008 for (Index = 0; Index < Instance->Config->OptionCount; Index++) {
2009 UserOpt = Instance->Config->OptionList[Index];
2027 Status = Dhcp6CallbackUser (Instance, Dhcp6SendConfirm, &Packet);
2038 Instance->IaCb.Ia->State = Dhcp6Confirming;
2042 Instance->StartTime = 0;
2044 Status = Dhcp6TransmitPacket (Instance, Packet, Elapsed);
2054 return Dhcp6EnqueueRetry (Instance, Packet, Elapsed, NULL);
2062 @param[in] Instance The pointer to Dhcp6 instance.
2073 IN DHCP6_INSTANCE *Instance,
2081 ASSERT (Instance->Config != NULL);
2082 ASSERT (Instance->IaCb.Ia != NULL);
2104 if ((Option != NULL && !Instance->Config->RapidCommit) || (Option == NULL && Instance->Config->RapidCommit)) {
2112 if (Instance->IaCb.Ia->State == Dhcp6Requesting ||
2113 Instance->IaCb.Ia->State == Dhcp6Renewing ||
2114 Instance->IaCb.Ia->State == Dhcp6Rebinding
2120 &Instance->Config->IaDescriptor
2130 Status = Dhcp6CallbackUser (Instance, Dhcp6RcvdReply, &Packet);
2141 if (Instance->IaCb.Ia->State == Dhcp6Declining || Instance->IaCb.Ia->State == Dhcp6Releasing) {
2143 if (Instance->IaCb.Ia->IaAddressCount != 0) {
2144 Instance->IaCb.Ia->State = Dhcp6Bound;
2146 ASSERT (Instance->IaCb.Ia->ReplyPacket);
2147 FreePool (Instance->IaCb.Ia->ReplyPacket);
2148 Instance->IaCb.Ia->ReplyPacket = NULL;
2149 Instance->IaCb.Ia->State = Dhcp6Init;
2155 Instance->UdpSts = EFI_SUCCESS;
2160 if (Instance->Config->IaInfoEvent != NULL) {
2161 gBS->SignalEvent (Instance->Config->IaInfoEvent);
2167 Instance->StartTime = 0;
2180 Instance,
2189 Status = Dhcp6UpdateIaInfo (Instance, Packet);
2194 Instance->StartTime = 0;
2199 if (Instance->IaCb.Ia->ReplyPacket != NULL) {
2200 FreePool (Instance->IaCb.Ia->ReplyPacket);
2203 Instance->IaCb.Ia->ReplyPacket = AllocateZeroPool (Packet->Size);
2205 if (Instance->IaCb.Ia->ReplyPacket == NULL) {
2210 CopyMem (Instance->IaCb.Ia->ReplyPacket, Packet, Packet->Size);
2212 Instance->IaCb.Ia->State = Dhcp6Bound;
2217 Instance->UdpSts = EFI_SUCCESS;
2225 Dhcp6AppendCacheIa (Instance);
2230 if (Instance->Config->IaInfoEvent != NULL) {
2231 gBS->SignalEvent (Instance->Config->IaInfoEvent);
2263 if (Instance->Unicast != NULL) {
2264 FreePool (Instance->Unicast);
2265 Instance->Unicast = NULL;
2270 if (Instance->IaCb.Ia->State == Dhcp6Confirming) {
2274 Status = Dhcp6CacheIa (Instance);
2282 Status = Dhcp6InitSolicitMsg (Instance);
2290 if (Instance->IaCb.Ia->State == Dhcp6Renewing || Instance->IaCb.Ia->State == Dhcp6Rebinding) {
2295 Status = Dhcp6SendRequestMsg(Instance);
2316 Instance,
2329 @param[in] Instance The pointer to the Dhcp6 instance.
2339 IN DHCP6_INSTANCE *Instance,
2352 Status = Dhcp6CallbackUser (Instance, Dhcp6SelectAdvertise, &AdSelect);
2358 Instance->AdSelect = AdSelect;
2364 Instance,
2385 Instance->Unicast = AllocateZeroPool (sizeof(EFI_IPv6_ADDRESS));
2387 if (Instance->Unicast == NULL) {
2391 CopyMem (Instance->Unicast, Option + 4, sizeof(EFI_IPv6_ADDRESS));
2397 Status = Dhcp6UpdateIaInfo (Instance, AdSelect);
2406 return Dhcp6SendRequestMsg (Instance);
2413 @param[in] Instance The pointer to the Dhcp6 instance.
2424 IN DHCP6_INSTANCE *Instance,
2432 ASSERT(Instance->Config);
2433 ASSERT(Instance->IaCb.Ia);
2449 if (Option != NULL && Instance->Config->RapidCommit && Packet->Dhcp6.Header.MessageType == Dhcp6MsgReply) {
2451 return Dhcp6HandleReplyMsg (Instance, Packet);
2465 Instance,
2476 Status = Dhcp6CallbackUser (Instance, Dhcp6RcvdAdvertise, &Packet);
2482 if (Instance->AdSelect != NULL) {
2483 FreePool (Instance->AdSelect);
2489 Instance->AdSelect = AllocateZeroPool (Packet->Size);
2491 if (Instance->AdSelect == NULL) {
2495 CopyMem (Instance->AdSelect, Packet, Packet->Size);
2497 Instance->AdPref = 0xff;
2503 if (Instance->AdPref == 0xff && Instance->AdSelect == NULL) {
2522 if (Instance->AdSelect == NULL || (Option != NULL && *(Option + 4) > Instance->AdPref)) {
2528 if (Instance->AdSelect != NULL) {
2529 FreePool (Instance->AdSelect);
2532 Instance->AdSelect = AllocateZeroPool (Packet->Size);
2534 if (Instance->AdSelect == NULL) {
2538 CopyMem (Instance->AdSelect, Packet, Packet->Size);
2541 Instance->AdPref = *(Option + 4);
2562 if (Instance->AdPref == 0xff || Timeout) {
2563 Status = Dhcp6SelectAdvertiseMsg (Instance, Instance->AdSelect);
2573 @param[in] Instance The pointer to the Dhcp6 instance.
2579 IN DHCP6_INSTANCE *Instance,
2588 Service = Instance->Service;
2592 if (Instance->Config == NULL) {
2597 ASSERT (Instance->Config);
2598 ASSERT (Instance->IaCb.Ia);
2633 switch (Instance->IaCb.Ia->State) {
2639 Dhcp6HandleAdvertiseMsg (Instance, Packet);
2653 Status = Dhcp6HandleReplyMsg (Instance, Packet);
2677 Dhcp6CleanupSession (Instance, Status);
2685 @param[in] Instance The pointer to the Dhcp6 instance.
2691 IN DHCP6_INSTANCE *Instance,
2701 Service = Instance->Service;
2713 while (!IsListEmpty (&Instance->InfList)) {
2714 InfCb = NET_LIST_HEAD (&Instance->InfList, DHCP6_INF_CB, Link);
2742 &Instance->Dhcp6,
2760 Instance,
2768 Instance->UdpSts = Status;
2780 Dhcp6CleanupRetry (Instance, DHCP6_PACKET_STATELESS);
2806 DHCP6_INSTANCE *Instance;
2821 Instance = NULL;
2849 // Dispatch packet to right instance by transaction id.
2853 Instance = NET_LIST_USER_STRUCT (Entry1, DHCP6_INSTANCE, Link);
2855 NET_LIST_FOR_EACH_SAFE (Entry2, Next2, &Instance->TxList) {
2878 // Skip this packet if not dispatched to any instance.
2885 // Dispatch the received packet ot the right instance.
2888 Dhcp6HandleStateless (Instance, Packet);
2890 Dhcp6HandleStateful (Instance, Packet);
2904 Instance = NET_LIST_USER_STRUCT (Entry1, DHCP6_INSTANCE, Link);
2905 Dhcp6CleanupRetry (Instance, DHCP6_PACKET_ALL);
2925 @param[in] Instance The pointer to DHCP6_INSTANCE.
2933 IN DHCP6_INSTANCE *Instance
2941 ASSERT (Instance != NULL);
2942 Snp = Instance->Service->Snp;
2943 MediaPresent = Instance->MediaPresent;
2960 Instance->MediaPresent = Snp->Mode->MediaPresent;
2964 if (!MediaPresent && Instance->MediaPresent) {
2972 The timer routine of the Dhcp6 instance for each second.
2987 DHCP6_INSTANCE *Instance;
2995 Instance = (DHCP6_INSTANCE *) Context;
3001 NET_LIST_FOR_EACH_SAFE (Entry, NextEntry, &Instance->TxList) {
3012 if (Instance->AdSelect == NULL) {
3017 Instance->AdPref = 0xff;
3022 Status = Dhcp6SelectAdvertiseMsg (Instance, Instance->AdSelect);
3090 Dhcp6TransmitPacket (Instance, TxCb->TxPacket, TxCb->Elapsed);
3102 IaCb = &Instance->IaCb;
3104 if (Instance->Config == NULL || IaCb->Ia == NULL) {
3116 Dhcp6SendRenewRebindMsg (Instance, TRUE);
3123 Dhcp6SendRenewRebindMsg (Instance, FALSE);
3131 if (Dhcp6LinkMovDetect (Instance) && (IaCb->Ia->State == Dhcp6Bound)) {
3132 Dhcp6SendConfirmMsg (Instance);
3139 if (Dhcp6IsValidTxCb (Instance, TxCb) &&
3150 ASSERT (Instance->IaCb.Ia);
3151 Instance->IaCb.Ia->State = Dhcp6Bound;
3157 Instance->UdpSts = EFI_NO_RESPONSE;
3160 Instance,
3168 Dhcp6CleanupSession (Instance, Status);