/* Callback function which provided by user to remove one node in NetDestroyLinkList process. */
EFI_STATUS EFIAPI Mtftp4DestroyChildEntryInHandleBuffer(IN LIST_ENTRY *Entry, IN VOID *Context)
/* Callback function which provided by user to remove one node in NetDestroyLinkList process. */
EFI_STATUS EFIAPI Mtftp4DestroyChildEntryInHandleBuffer(IN LIST_ENTRY *Entry, IN VOID *Context)
{
  MTFTP4_PROTOCOL               *Instance;
  EFI_SERVICE_BINDING_PROTOCOL  *ServiceBinding;
  UINTN                         NumberOfChildren;
  EFI_HANDLE                    *ChildHandleBuffer;
  if ((Entry == NULL) || (Context == NULL)) {
    return EFI_INVALID_PARAMETER;
  }
  Instance          = NET_LIST_USER_STRUCT_S (Entry, MTFTP4_PROTOCOL, Link, MTFTP4_PROTOCOL_SIGNATURE);
  ServiceBinding    = ((MTFTP4_DESTROY_CHILD_IN_HANDLE_BUF_CONTEXT *)Context)->ServiceBinding;
  NumberOfChildren  = ((MTFTP4_DESTROY_CHILD_IN_HANDLE_BUF_CONTEXT *)Context)->NumberOfChildren;
  ChildHandleBuffer = ((MTFTP4_DESTROY_CHILD_IN_HANDLE_BUF_CONTEXT *)Context)->ChildHandleBuffer;
  if (!NetIsInHandleBuffer (Instance->Handle, NumberOfChildren, ChildHandleBuffer)) {
    return EFI_SUCCESS;
  }
  return ServiceBinding->DestroyChild (ServiceBinding, Instance->Handle);
}