Lines Matching refs:Instance
66 Create then initialize a MTFTP6 service binding instance.
72 binding instance.
74 @retval EFI_OUT_OF_RESOURCES Failed to allocate resources to create the instance
76 @retval EFI_SUCCESS The service instance is created for the controller.
151 Destroy the MTFTP6 instance and recycle the resources.
153 @param[in] Instance The pointer to the MTFTP6 instance.
158 IN MTFTP6_INSTANCE *Instance
165 if (Instance->Config != NULL) {
166 FreePool (Instance->Config);
169 if (Instance->Token != NULL && Instance->Token->Event != NULL) {
170 gBS->SignalEvent (Instance->Token->Event);
173 if (Instance->LastPacket != NULL) {
174 NetbufFree (Instance->LastPacket);
177 if (Instance->UdpIo!= NULL) {
178 UdpIoFreeIo (Instance->UdpIo);
181 if (Instance->McastUdpIo != NULL) {
182 UdpIoFreeIo (Instance->McastUdpIo);
185 NET_LIST_FOR_EACH_SAFE (Entry, Next, &Instance->BlkList) {
191 FreePool (Instance);
196 Create the MTFTP6 instance and initialize it.
199 @param[out] Instance The pointer to the MTFTP6 instance.
202 @retval EFI_SUCCESS The MTFTP6 instance is created.
208 OUT MTFTP6_INSTANCE **Instance
213 *Instance = NULL;
233 *Instance = Mtftp6Ins;
256 MTFTP6_INSTANCE *Instance;
265 Instance = NET_LIST_USER_STRUCT_S (Entry, MTFTP6_INSTANCE, Link, MTFTP6_INSTANCE_SIGNATURE);
270 if (!NetIsInHandleBuffer (Instance->Handle, NumberOfChildren, ChildHandleBuffer)) {
274 return ServiceBinding->DestroyChild (ServiceBinding, Instance->Handle);
318 @param[in] This Protocol instance pointer.
354 @param[in] This Protocol instance pointer.
450 @param[in] This Protocol instance pointer.
503 // Destroy the Mtftp6 child instance in ChildHandleBuffer.
519 // Destroy the Mtftp6 service if there is no Mtftp6 child instance left.
542 @param[in] This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
560 MTFTP6_INSTANCE *Instance;
571 Status = Mtftp6CreateInstance (Service, &Instance);
577 ASSERT (Instance != NULL);
585 &Instance->Mtftp6,
593 Instance->Handle = *ChildHandle;
603 Instance->Handle,
609 Instance->Handle,
611 &Instance->Mtftp6,
619 // Add the new Mtftp6 instance into the children list of Mtftp6 service.
623 InsertTailList (&Service->Children, &Instance->Link);
631 Mtftp6DestroyInstance (Instance);
643 @param[in] This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
660 MTFTP6_INSTANCE *Instance;
685 Instance = MTFTP6_INSTANCE_FROM_THIS (Mtftp6);
688 if (Instance->Service != Service) {
693 // Check whether the instance already in Destroy state.
695 if (Instance->InDestroy) {
701 Instance->InDestroy = TRUE;
710 if (Instance->UdpIo != NULL) {
712 Instance->UdpIo->UdpHandle,
715 Instance->Handle
719 if (Instance->McastUdpIo != NULL) {
721 Instance->McastUdpIo->UdpHandle,
724 Instance->Handle
739 Instance->InDestroy = FALSE;
745 // Remove the Mtftp6 instance from the children list of Mtftp6 service.
747 RemoveEntryList (&Instance->Link);
752 Mtftp6DestroyInstance (Instance);